summaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-10-26 14:34:52 +0200
committerWolfgang Denk <wd@denx.de>2010-10-26 21:05:30 +0200
commit25ddd1fb0a2281b182529afbc8fda5de2dc16d96 (patch)
treeb1d57d9d1324fb6b8fddf7ebc976dbe822468649 /arch/powerpc
parent16a354f920f3959ed847bd917bdfbc7eba48cf1e (diff)
downloadu-boot-imx-25ddd1fb0a2281b182529afbc8fda5de2dc16d96.zip
u-boot-imx-25ddd1fb0a2281b182529afbc8fda5de2dc16d96.tar.gz
u-boot-imx-25ddd1fb0a2281b182529afbc8fda5de2dc16d96.tar.bz2
Replace CONFIG_SYS_GBL_DATA_SIZE by auto-generated value
CONFIG_SYS_GBL_DATA_SIZE has always been just a bad workarond for not being able to use "sizeof(struct global_data)" in assembler files. Recent experience has shown that manual synchronization is not reliable enough. This patch renames CONFIG_SYS_GBL_DATA_SIZE into GENERATED_GBL_DATA_SIZE which gets automatically generated by the asm-offsets tool. In the result, all definitions of this value can be deleted from the board config files. We have to make sure that all files that reference such data include the new <asm-offsets.h> file. No other changes have been done yet, but it is obvious that similar changes / simplifications can be done for other, related macro definitions as well. Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/cpu/74xx_7xx/start.S1
-rw-r--r--arch/powerpc/cpu/mpc512x/start.S1
-rw-r--r--arch/powerpc/cpu/mpc5xx/start.S1
-rw-r--r--arch/powerpc/cpu/mpc5xxx/start.S1
-rw-r--r--arch/powerpc/cpu/mpc8220/start.S1
-rw-r--r--arch/powerpc/cpu/mpc824x/start.S1
-rw-r--r--arch/powerpc/cpu/mpc8260/start.S1
-rw-r--r--arch/powerpc/cpu/mpc83xx/start.S1
-rw-r--r--arch/powerpc/cpu/mpc85xx/release.S1
-rw-r--r--arch/powerpc/cpu/mpc85xx/start.S1
-rw-r--r--arch/powerpc/cpu/mpc86xx/start.S1
-rw-r--r--arch/powerpc/cpu/mpc8xx/start.S1
-rw-r--r--arch/powerpc/cpu/ppc4xx/start.S3
-rw-r--r--arch/powerpc/include/asm/global_data.h2
14 files changed, 15 insertions, 2 deletions
diff --git a/arch/powerpc/cpu/74xx_7xx/start.S b/arch/powerpc/cpu/74xx_7xx/start.S
index b4121df..280781e 100644
--- a/arch/powerpc/cpu/74xx_7xx/start.S
+++ b/arch/powerpc/cpu/74xx_7xx/start.S
@@ -32,6 +32,7 @@
* board_init lies at a quite high address and when the cpu has
* jumped there, everything is ok.
*/
+#include <asm-offsets.h>
#include <config.h>
#include <74xx_7xx.h>
#include <timestamp.h>
diff --git a/arch/powerpc/cpu/mpc512x/start.S b/arch/powerpc/cpu/mpc512x/start.S
index 2265c8c..fe35190 100644
--- a/arch/powerpc/cpu/mpc512x/start.S
+++ b/arch/powerpc/cpu/mpc512x/start.S
@@ -29,6 +29,7 @@
* U-Boot - Startup Code for MPC512x based Embedded Boards
*/
+#include <asm-offsets.h>
#include <config.h>
#include <timestamp.h>
#include <version.h>
diff --git a/arch/powerpc/cpu/mpc5xx/start.S b/arch/powerpc/cpu/mpc5xx/start.S
index da42557..63449c3 100644
--- a/arch/powerpc/cpu/mpc5xx/start.S
+++ b/arch/powerpc/cpu/mpc5xx/start.S
@@ -30,6 +30,7 @@
*
*/
+#include <asm-offsets.h>
#include <config.h>
#include <mpc5xx.h>
#include <timestamp.h>
diff --git a/arch/powerpc/cpu/mpc5xxx/start.S b/arch/powerpc/cpu/mpc5xxx/start.S
index 92858fc..ad54677 100644
--- a/arch/powerpc/cpu/mpc5xxx/start.S
+++ b/arch/powerpc/cpu/mpc5xxx/start.S
@@ -25,6 +25,7 @@
/*
* U-Boot - Startup Code for MPC5xxx CPUs
*/
+#include <asm-offsets.h>
#include <config.h>
#include <mpc5xxx.h>
#include <timestamp.h>
diff --git a/arch/powerpc/cpu/mpc8220/start.S b/arch/powerpc/cpu/mpc8220/start.S
index b5c160b..b029e84 100644
--- a/arch/powerpc/cpu/mpc8220/start.S
+++ b/arch/powerpc/cpu/mpc8220/start.S
@@ -25,6 +25,7 @@
/*
* U-Boot - Startup Code for MPC8220 CPUs
*/
+#include <asm-offsets.h>
#include <config.h>
#include <mpc8220.h>
#include <timestamp.h>
diff --git a/arch/powerpc/cpu/mpc824x/start.S b/arch/powerpc/cpu/mpc824x/start.S
index d10231e..616de58 100644
--- a/arch/powerpc/cpu/mpc824x/start.S
+++ b/arch/powerpc/cpu/mpc824x/start.S
@@ -37,6 +37,7 @@
* board_init will change CS0 to be positioned at the correct
* address and (s)dram will be positioned at address 0
*/
+#include <asm-offsets.h>
#include <config.h>
#include <mpc824x.h>
#include <timestamp.h>
diff --git a/arch/powerpc/cpu/mpc8260/start.S b/arch/powerpc/cpu/mpc8260/start.S
index 55c64ea..521a639 100644
--- a/arch/powerpc/cpu/mpc8260/start.S
+++ b/arch/powerpc/cpu/mpc8260/start.S
@@ -25,6 +25,7 @@
/*
* U-Boot - Startup Code for MPC8260 PowerPC based Embedded Boards
*/
+#include <asm-offsets.h>
#include <config.h>
#include <mpc8260.h>
#include <timestamp.h>
diff --git a/arch/powerpc/cpu/mpc83xx/start.S b/arch/powerpc/cpu/mpc83xx/start.S
index 403fda4..a35697d 100644
--- a/arch/powerpc/cpu/mpc83xx/start.S
+++ b/arch/powerpc/cpu/mpc83xx/start.S
@@ -27,6 +27,7 @@
* U-Boot - Startup Code for MPC83xx PowerPC based Embedded Boards
*/
+#include <asm-offsets.h>
#include <config.h>
#include <mpc83xx.h>
#include <timestamp.h>
diff --git a/arch/powerpc/cpu/mpc85xx/release.S b/arch/powerpc/cpu/mpc85xx/release.S
index 53cefaf..56a853e 100644
--- a/arch/powerpc/cpu/mpc85xx/release.S
+++ b/arch/powerpc/cpu/mpc85xx/release.S
@@ -21,6 +21,7 @@
* MA 02111-1307 USA
*/
+#include <asm-offsets.h>
#include <config.h>
#include <mpc85xx.h>
#include <version.h>
diff --git a/arch/powerpc/cpu/mpc85xx/start.S b/arch/powerpc/cpu/mpc85xx/start.S
index 7e5e6b1..291557d 100644
--- a/arch/powerpc/cpu/mpc85xx/start.S
+++ b/arch/powerpc/cpu/mpc85xx/start.S
@@ -28,6 +28,7 @@
*
*/
+#include <asm-offsets.h>
#include <config.h>
#include <mpc85xx.h>
#include <timestamp.h>
diff --git a/arch/powerpc/cpu/mpc86xx/start.S b/arch/powerpc/cpu/mpc86xx/start.S
index 36004b7..6127115 100644
--- a/arch/powerpc/cpu/mpc86xx/start.S
+++ b/arch/powerpc/cpu/mpc86xx/start.S
@@ -30,6 +30,7 @@
* board_init lies at a quite high address and when the cpu has
* jumped there, everything is ok.
*/
+#include <asm-offsets.h>
#include <config.h>
#include <mpc86xx.h>
#include <timestamp.h>
diff --git a/arch/powerpc/cpu/mpc8xx/start.S b/arch/powerpc/cpu/mpc8xx/start.S
index 4a8c5d9..9d022bf 100644
--- a/arch/powerpc/cpu/mpc8xx/start.S
+++ b/arch/powerpc/cpu/mpc8xx/start.S
@@ -37,6 +37,7 @@
* board_init will change CS0 to be positioned at the correct
* address and (s)dram will be positioned at address 0
*/
+#include <asm-offsets.h>
#include <config.h>
#include <mpc8xx.h>
#include <timestamp.h>
diff --git a/arch/powerpc/cpu/ppc4xx/start.S b/arch/powerpc/cpu/ppc4xx/start.S
index 140bfc9..363becc 100644
--- a/arch/powerpc/cpu/ppc4xx/start.S
+++ b/arch/powerpc/cpu/ppc4xx/start.S
@@ -63,6 +63,7 @@
* board_init will change CS0 to be positioned at the correct
* address and (s)dram will be positioned at address 0
*/
+#include <asm-offsets.h>
#include <config.h>
#include <asm/ppc4xx.h>
#include <timestamp.h>
@@ -1399,7 +1400,7 @@ relocate_code:
/* Flush initial global data range */
mr r3, r4
- addi r4, r4, CONFIG_SYS_GBL_DATA_SIZE@l
+ addi r4, r4, GENERATED_GBL_DATA_SIZE@l
bl flush_dcache_range
#if defined(CONFIG_SYS_INIT_DCACHE_CS)
diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h
index 2a323e1..2e218de 100644
--- a/arch/powerpc/include/asm/global_data.h
+++ b/arch/powerpc/include/asm/global_data.h
@@ -34,7 +34,7 @@
* global variables during system initialization (until we have set
* up the memory controller so that we can use RAM).
*
- * Keep it *SMALL* and remember to set CONFIG_SYS_GBL_DATA_SIZE > sizeof(gd_t)
+ * Keep it *SMALL* and remember to set GENERATED_GBL_DATA_SIZE > sizeof(gd_t)
*/
typedef struct global_data {