summaryrefslogtreecommitdiff
path: root/board/renesas
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/renesas
parent71aab09b2c1edd1b6e00819abd1e31c04db04f36 (diff)
downloadu-boot-imx-2956532625cf8414ad3efb37598ba34db08d67ec.zip
u-boot-imx-2956532625cf8414ad3efb37598ba34db08d67ec.tar.gz
u-boot-imx-2956532625cf8414ad3efb37598ba34db08d67ec.tar.bz2
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/renesas')
-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
7 files changed, 14 insertions, 14 deletions
diff --git a/board/renesas/MigoR/migo_r.c b/board/renesas/MigoR/migo_r.c
index c0f26ac..75b653f 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 be919f5..758e6f4 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 0c08d68..b70395d 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 396e4b6..0b80099 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 fbf2e23..06552c0 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 88bab70..9f44b9a 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 cad3905..904e755 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));