From 3b74e7ec58e2cc352b0a396a614065cfeb8d138f Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sat, 16 May 2009 10:47:45 +0200 Subject: MPC512x: remove include/mpc512x.h Move needed definitions (register descriptions etc.) from include/mpc512x.h into include/asm-ppc/immap_512x.h. Instead of using a #define'd register offset, use a function that provides the PATA controller's base address. All the rest of include/mpc512x.h are register offset definitions which can be eliminated by proper use of C structures. There are only a few register offsets remaining that are needed in cpu/mpc512x/start.S; for these we provide cpu/mpc512x/asm-offsets.h which is intended as a temporary workaround only. In a later patch this file will be removed, too, and then auto-generated from the respective C structs. Signed-off-by: Wolfgang Denk Cc: John Rigby --- cpu/mpc512x/asm-offsets.h | 15 +++++++++++++++ cpu/mpc512x/cpu.c | 1 - cpu/mpc512x/cpu_init.c | 1 - cpu/mpc512x/i2c.c | 1 - cpu/mpc512x/speed.c | 1 - cpu/mpc512x/start.S | 6 ++++-- 6 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 cpu/mpc512x/asm-offsets.h (limited to 'cpu') diff --git a/cpu/mpc512x/asm-offsets.h b/cpu/mpc512x/asm-offsets.h new file mode 100644 index 0000000000..4b147783fb --- /dev/null +++ b/cpu/mpc512x/asm-offsets.h @@ -0,0 +1,15 @@ +/* + * needed for cpu/mpc512x/start.S + * + * These should be auto-generated + */ +#define LPCS0AW 0x0024 +#define SRAMBAR 0x00C4 +#define SWCRR 0x0904 +#define LPC_OFFSET 0x10000 +#define CS0_CONFIG 0x00000 +#define CS_CTRL 0x00020 +#define CS_CTRL_ME 0x01000000 /* CS Master Enable bit */ + +#define EXC_OFF_SYS_RESET 0x0100 +#define _START_OFFSET EXC_OFF_SYS_RESET diff --git a/cpu/mpc512x/cpu.c b/cpu/mpc512x/cpu.c index 8021bc15e3..42ccd81e76 100644 --- a/cpu/mpc512x/cpu.c +++ b/cpu/mpc512x/cpu.c @@ -29,7 +29,6 @@ #include #include -#include #include #include #include diff --git a/cpu/mpc512x/cpu_init.c b/cpu/mpc512x/cpu_init.c index 69ec871995..fe6beaf84d 100644 --- a/cpu/mpc512x/cpu_init.c +++ b/cpu/mpc512x/cpu_init.c @@ -25,7 +25,6 @@ */ #include -#include #include #include diff --git a/cpu/mpc512x/i2c.c b/cpu/mpc512x/i2c.c index 4a3f9a0873..97bda0d84e 100644 --- a/cpu/mpc512x/i2c.c +++ b/cpu/mpc512x/i2c.c @@ -30,7 +30,6 @@ DECLARE_GLOBAL_DATA_PTR; #ifdef CONFIG_HARD_I2C -#include #include /* by default set I2C bus 0 active */ diff --git a/cpu/mpc512x/speed.c b/cpu/mpc512x/speed.c index 0fec00461c..ce8d0949b2 100644 --- a/cpu/mpc512x/speed.c +++ b/cpu/mpc512x/speed.c @@ -26,7 +26,6 @@ */ #include -#include #include #include #include diff --git a/cpu/mpc512x/start.S b/cpu/mpc512x/start.S index 360682dafc..178e5d1b3c 100644 --- a/cpu/mpc512x/start.S +++ b/cpu/mpc512x/start.S @@ -1,7 +1,7 @@ /* * Copyright (C) 1998 Dan Malek * Copyright (C) 1999 Magnus Damm - * Copyright (C) 2000, 2001, 2002, 2007 Wolfgang Denk + * Copyright (C) 2000-2009 Wolfgang Denk * Copyright Freescale Semiconductor, Inc. 2004, 2006. All rights reserved. * * See file CREDITS for list of people who contributed to this @@ -30,12 +30,14 @@ */ #include -#include #include #include #define CONFIG_521X 1 /* needed for Linux kernel header files*/ +#include +#include "asm-offsets.h" + #include #include -- cgit