summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorJohn Rigby <john.rigby@linaro.org>2010-12-20 18:27:51 -0700
committerWolfgang Denk <wd@denx.de>2010-12-21 11:33:36 +0100
commit2956532625cf8414ad3efb37598ba34db08d67ec (patch)
tree19d9df98e764da9970e9cd0d70243fbaa9120fd5 /board
parent71aab09b2c1edd1b6e00819abd1e31c04db04f36 (diff)
downloadblackbird-obmc-uboot-2956532625cf8414ad3efb37598ba34db08d67ec.tar.gz
blackbird-obmc-uboot-2956532625cf8414ad3efb37598ba34db08d67ec.zip
Move DECLARE_GLOBAL_DATA_PTR to file scope
It can be optimised out by the compiler otherwise resulting in obscure errors like a board not booting. This has been documented in README since 2006 when these were first fixed up for GCC 4.x. Signed-off-by: John Rigby <john.rigby@linaro.org> Fix some additional places. Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-By: Albert ARIBAUD <albert.aribaud@free.fr>
Diffstat (limited to 'board')
-rw-r--r--board/espt/espt.c4
-rw-r--r--board/isee/igep0020/igep0020.c4
-rw-r--r--board/isee/igep0030/igep0030.c4
-rw-r--r--board/linkstation/linkstation.c3
-rw-r--r--board/logicpd/zoom1/zoom1.c4
-rw-r--r--board/logicpd/zoom2/zoom2.c3
-rw-r--r--board/mpr2/mpr2.c4
-rw-r--r--board/ms7720se/ms7720se.c4
-rw-r--r--board/ms7722se/ms7722se.c4
-rw-r--r--board/ms7750se/ms7750se.c4
-rw-r--r--board/overo/overo.c4
-rw-r--r--board/pandora/pandora.c4
-rw-r--r--board/renesas/MigoR/migo_r.c4
-rw-r--r--board/renesas/ap325rxa/ap325rxa.c4
-rw-r--r--board/renesas/r2dplus/r2dplus.c4
-rw-r--r--board/renesas/r7780mp/r7780mp.c4
-rw-r--r--board/renesas/rsk7203/rsk7203.c4
-rw-r--r--board/renesas/sh7763rdp/sh7763rdp.c4
-rw-r--r--board/renesas/sh7785lcr/sh7785lcr.c4
-rw-r--r--board/samsung/smdk6400/smdk6400.c6
-rw-r--r--board/ti/beagle/beagle.c4
-rw-r--r--board/ti/evm/evm.c4
-rw-r--r--board/ti/sdp3430/sdp.c4
23 files changed, 46 insertions, 46 deletions
diff --git a/board/espt/espt.c b/board/espt/espt.c
index 29308587d9..44ab635ed7 100644
--- a/board/espt/espt.c
+++ b/board/espt/espt.c
@@ -24,6 +24,8 @@
#include <asm/io.h>
#include <asm/processor.h>
+DECLARE_GLOBAL_DATA_PTR;
+
int checkboard(void)
{
puts("BOARD: ESPT-GIGA\n");
@@ -37,8 +39,6 @@ int board_init(void)
int dram_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
diff --git a/board/isee/igep0020/igep0020.c b/board/isee/igep0020/igep0020.c
index 3ba541e21e..36cc9248b6 100644
--- a/board/isee/igep0020/igep0020.c
+++ b/board/isee/igep0020/igep0020.c
@@ -32,6 +32,8 @@
#include <asm/mach-types.h>
#include "igep0020.h"
+DECLARE_GLOBAL_DATA_PTR;
+
/* GPMC definitions for LAN9221 chips */
static const u32 gpmc_lan_config[] = {
NET_LAN9221_GPMC_CONFIG1,
@@ -48,8 +50,6 @@ static const u32 gpmc_lan_config[] = {
*/
int board_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
/* board id for Linux */
gd->bd->bi_arch_number = MACH_TYPE_IGEP0020;
diff --git a/board/isee/igep0030/igep0030.c b/board/isee/igep0030/igep0030.c
index bb4dc3ba17..6a927350b4 100644
--- a/board/isee/igep0030/igep0030.c
+++ b/board/isee/igep0030/igep0030.c
@@ -30,14 +30,14 @@
#include <asm/mach-types.h>
#include "igep0030.h"
+DECLARE_GLOBAL_DATA_PTR;
+
/*
* Routine: board_init
* Description: Early hardware init.
*/
int board_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
/* board id for Linux */
gd->bd->bi_arch_number = MACH_TYPE_IGEP0030;
diff --git a/board/linkstation/linkstation.c b/board/linkstation/linkstation.c
index c0d43eb332..e564e505ac 100644
--- a/board/linkstation/linkstation.c
+++ b/board/linkstation/linkstation.c
@@ -32,11 +32,12 @@
#include <pci.h>
#endif
+DECLARE_GLOBAL_DATA_PTR;
+
extern void init_AVR_DUART(void);
int checkboard (void)
{
- DECLARE_GLOBAL_DATA_PTR;
char *p;
bd_t *bd = gd->bd;
diff --git a/board/logicpd/zoom1/zoom1.c b/board/logicpd/zoom1/zoom1.c
index e442d687b7..7ef13cc623 100644
--- a/board/logicpd/zoom1/zoom1.c
+++ b/board/logicpd/zoom1/zoom1.c
@@ -39,14 +39,14 @@
#include <asm/mach-types.h>
#include "zoom1.h"
+DECLARE_GLOBAL_DATA_PTR;
+
/*
* Routine: board_init
* Description: Early hardware init.
*/
int board_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
/* board id for Linux */
gd->bd->bi_arch_number = MACH_TYPE_OMAP_LDP;
diff --git a/board/logicpd/zoom2/zoom2.c b/board/logicpd/zoom2/zoom2.c
index e9f6625ce0..76793e42e7 100644
--- a/board/logicpd/zoom2/zoom2.c
+++ b/board/logicpd/zoom2/zoom2.c
@@ -43,6 +43,8 @@
#include "zoom2.h"
#include "zoom2_serial.h"
+DECLARE_GLOBAL_DATA_PTR;
+
/*
* This the the zoom2, board specific, gpmc configuration for the
* quad uart on the debug board. The more general gpmc configurations
@@ -120,7 +122,6 @@ void zoom2_identify(void)
*/
int board_init (void)
{
- DECLARE_GLOBAL_DATA_PTR;
u32 *gpmc_config;
gpmc_init (); /* in SRAM or SDRAM, finish GPMC */
diff --git a/board/mpr2/mpr2.c b/board/mpr2/mpr2.c
index 0ec0c198b9..488185943f 100644
--- a/board/mpr2/mpr2.c
+++ b/board/mpr2/mpr2.c
@@ -24,6 +24,8 @@
#include <asm/io.h>
#include <asm/processor.h>
+DECLARE_GLOBAL_DATA_PTR;
+
int checkboard(void)
{
puts("BOARD: MPR2\n");
@@ -152,8 +154,6 @@ int board_init(void)
int dram_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
printf("SDRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
diff --git a/board/ms7720se/ms7720se.c b/board/ms7720se/ms7720se.c
index f83c1208a7..ab7c338e07 100644
--- a/board/ms7720se/ms7720se.c
+++ b/board/ms7720se/ms7720se.c
@@ -30,6 +30,8 @@
#include <asm/io.h>
#include <asm/processor.h>
+DECLARE_GLOBAL_DATA_PTR;
+
#define LED_BASE 0xB0800000
int checkboard(void)
@@ -45,8 +47,6 @@ int board_init(void)
int dram_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
diff --git a/board/ms7722se/ms7722se.c b/board/ms7722se/ms7722se.c
index 4e40b17343..4e67ac623f 100644
--- a/board/ms7722se/ms7722se.c
+++ b/board/ms7722se/ms7722se.c
@@ -28,6 +28,8 @@
#include <asm/io.h>
#include <asm/processor.h>
+DECLARE_GLOBAL_DATA_PTR;
+
#define LED_BASE 0xB0800000
int checkboard(void)
@@ -46,8 +48,6 @@ int board_init(void)
int dram_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
diff --git a/board/ms7750se/ms7750se.c b/board/ms7750se/ms7750se.c
index 02ff0a3df5..9370af3825 100644
--- a/board/ms7750se/ms7750se.c
+++ b/board/ms7750se/ms7750se.c
@@ -24,6 +24,8 @@
#include <common.h>
#include <asm/processor.h>
+DECLARE_GLOBAL_DATA_PTR;
+
int checkboard(void)
{
puts("BOARD: SH7750/SH7750S/SH7750R Solution Engine\n");
@@ -37,8 +39,6 @@ int board_init(void)
int dram_init (void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
diff --git a/board/overo/overo.c b/board/overo/overo.c
index f917e402b0..4eafdb1df3 100644
--- a/board/overo/overo.c
+++ b/board/overo/overo.c
@@ -40,6 +40,8 @@
#include <asm/mach-types.h>
#include "overo.h"
+DECLARE_GLOBAL_DATA_PTR;
+
#define TWL4030_I2C_BUS 0
#define EXPANSION_EEPROM_I2C_BUS 2
#define EXPANSION_EEPROM_I2C_ADDRESS 0x51
@@ -87,8 +89,6 @@ static const u32 gpmc_lan_config[] = {
*/
int board_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
/* board id for Linux */
gd->bd->bi_arch_number = MACH_TYPE_OVERO;
diff --git a/board/pandora/pandora.c b/board/pandora/pandora.c
index 355e9eaa8f..992e9f7625 100644
--- a/board/pandora/pandora.c
+++ b/board/pandora/pandora.c
@@ -37,6 +37,8 @@
#include <asm/mach-types.h>
#include "pandora.h"
+DECLARE_GLOBAL_DATA_PTR;
+
#define TWL4030_BB_CFG_BBCHEN (1 << 4)
#define TWL4030_BB_CFG_BBSEL_3200MV (3 << 2)
#define TWL4030_BB_CFG_BBISEL_500UA 2
@@ -47,8 +49,6 @@
*/
int board_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
/* board id for Linux */
gd->bd->bi_arch_number = MACH_TYPE_OMAP3_PANDORA;
diff --git a/board/renesas/MigoR/migo_r.c b/board/renesas/MigoR/migo_r.c
index c0f26ac1ea..75b653f8a1 100644
--- a/board/renesas/MigoR/migo_r.c
+++ b/board/renesas/MigoR/migo_r.c
@@ -28,6 +28,8 @@
#include <asm/io.h>
#include <asm/processor.h>
+DECLARE_GLOBAL_DATA_PTR;
+
int checkboard(void)
{
puts("BOARD: Renesas MigoR\n");
@@ -41,8 +43,6 @@ int board_init(void)
int dram_init (void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
diff --git a/board/renesas/ap325rxa/ap325rxa.c b/board/renesas/ap325rxa/ap325rxa.c
index be919f5454..758e6f4a0b 100644
--- a/board/renesas/ap325rxa/ap325rxa.c
+++ b/board/renesas/ap325rxa/ap325rxa.c
@@ -23,6 +23,8 @@
#include <asm/io.h>
#include <asm/processor.h>
+DECLARE_GLOBAL_DATA_PTR;
+
/* PRI control register */
#define PRPRICR5 0xFF800048 /* LMB */
#define PRPRICR5_D 0x2a
@@ -143,8 +145,6 @@ int board_init(void)
int dram_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
diff --git a/board/renesas/r2dplus/r2dplus.c b/board/renesas/r2dplus/r2dplus.c
index 0c08d68594..b70395dd2b 100644
--- a/board/renesas/r2dplus/r2dplus.c
+++ b/board/renesas/r2dplus/r2dplus.c
@@ -28,6 +28,8 @@
#include <asm/io.h>
#include <asm/pci.h>
+DECLARE_GLOBAL_DATA_PTR;
+
int checkboard(void)
{
puts("BOARD: Renesas Solutions R2D Plus\n");
@@ -41,8 +43,6 @@ int board_init(void)
int dram_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
diff --git a/board/renesas/r7780mp/r7780mp.c b/board/renesas/r7780mp/r7780mp.c
index 396e4b6db3..0b80099047 100644
--- a/board/renesas/r7780mp/r7780mp.c
+++ b/board/renesas/r7780mp/r7780mp.c
@@ -26,6 +26,8 @@
#include <netdev.h>
#include "r7780mp.h"
+DECLARE_GLOBAL_DATA_PTR;
+
int checkboard(void)
{
#if defined(CONFIG_R7780MP)
@@ -46,8 +48,6 @@ int board_init(void)
int dram_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
diff --git a/board/renesas/rsk7203/rsk7203.c b/board/renesas/rsk7203/rsk7203.c
index fbf2e23cf0..06552c0818 100644
--- a/board/renesas/rsk7203/rsk7203.c
+++ b/board/renesas/rsk7203/rsk7203.c
@@ -26,6 +26,8 @@
#include <asm/io.h>
#include <asm/processor.h>
+DECLARE_GLOBAL_DATA_PTR;
+
int checkboard(void)
{
puts("BOARD: Renesas Technology RSK7203\n");
@@ -39,8 +41,6 @@ int board_init(void)
int dram_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
diff --git a/board/renesas/sh7763rdp/sh7763rdp.c b/board/renesas/sh7763rdp/sh7763rdp.c
index 88bab70e35..9f44b9afb8 100644
--- a/board/renesas/sh7763rdp/sh7763rdp.c
+++ b/board/renesas/sh7763rdp/sh7763rdp.c
@@ -25,6 +25,8 @@
#include <asm/io.h>
#include <asm/processor.h>
+DECLARE_GLOBAL_DATA_PTR;
+
#define CPU_CMDREG 0xB1000006
#define PDCR 0xffef0006
#define PECR 0xffef0008
@@ -64,8 +66,6 @@ int board_init(void)
int dram_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
diff --git a/board/renesas/sh7785lcr/sh7785lcr.c b/board/renesas/sh7785lcr/sh7785lcr.c
index cad3905ff2..904e755879 100644
--- a/board/renesas/sh7785lcr/sh7785lcr.c
+++ b/board/renesas/sh7785lcr/sh7785lcr.c
@@ -23,6 +23,8 @@
#include <asm/pci.h>
#include <netdev.h>
+DECLARE_GLOBAL_DATA_PTR;
+
int checkboard(void)
{
puts("BOARD: Renesas Technology Corp. R0P7785LC0011RL\n");
@@ -36,8 +38,6 @@ int board_init(void)
int dram_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
diff --git a/board/samsung/smdk6400/smdk6400.c b/board/samsung/smdk6400/smdk6400.c
index 78aaa9e13a..35aa40b30d 100644
--- a/board/samsung/smdk6400/smdk6400.c
+++ b/board/samsung/smdk6400/smdk6400.c
@@ -32,6 +32,8 @@
#include <netdev.h>
#include <asm/arch/s3c6400.h>
+DECLARE_GLOBAL_DATA_PTR;
+
/* ------------------------------------------------------------------------- */
#define CS8900_Tacs 0x0 /* 0clk address set-up */
#define CS8900_Tcos 0x4 /* 4clk chip selection set-up */
@@ -63,8 +65,6 @@ static void cs8900_pre_init(void)
int board_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
cs8900_pre_init();
/* NOR-flash in SROM0 */
@@ -80,8 +80,6 @@ int board_init(void)
int dram_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index d9b6f01163..c066d6ef52 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -51,6 +51,8 @@
#define BEAGLE_NO_EEPROM 0xffffffff
+DECLARE_GLOBAL_DATA_PTR;
+
static struct {
unsigned int device_vendor;
unsigned char revision;
@@ -66,8 +68,6 @@ static struct {
*/
int board_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
/* board id for Linux */
gd->bd->bi_arch_number = MACH_TYPE_OMAP3_BEAGLE;
diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c
index c2b6350909..aaf3033b04 100644
--- a/board/ti/evm/evm.c
+++ b/board/ti/evm/evm.c
@@ -37,6 +37,8 @@
#include <asm/mach-types.h>
#include "evm.h"
+DECLARE_GLOBAL_DATA_PTR;
+
static u32 omap3_evm_version;
u32 get_omap3_evm_rev(void)
@@ -103,8 +105,6 @@ u8 omap3_evm_need_extvbus(void)
*/
int board_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
/* board id for Linux */
gd->bd->bi_arch_number = MACH_TYPE_OMAP3EVM;
diff --git a/board/ti/sdp3430/sdp.c b/board/ti/sdp3430/sdp.c
index 0d8e20dc7c..72f0984d67 100644
--- a/board/ti/sdp3430/sdp.c
+++ b/board/ti/sdp3430/sdp.c
@@ -31,6 +31,8 @@
#include <asm/mach-types.h>
#include "sdp.h"
+DECLARE_GLOBAL_DATA_PTR;
+
const omap3_sysinfo sysinfo = {
DDR_DISCRETE,
"OMAP3 SDP3430 board",
@@ -101,8 +103,6 @@ extern struct gpmc *gpmc_cfg;
*/
int board_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
/* TODO: Dynamically pop out CS mapping and program accordingly */
/* Configure devices for default ON ON ON settings */
OpenPOWER on IntegriCloud