提交 66b3f24d 编写于 作者: D Dirk Behme 提交者: Wolfgang Denk

Make DECLARE_GLOBAL_DATA_PTR global for DaVinci

As discussed in [1], DECLARE_GLOBAL_DATA_PTR has to be global and not
function local.
Signed-off-by: NDirk Behme <dirk.behme@gmail.com>

[1] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/31805
上级 6e7b7b6e
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
#define MACH_TYPE_DAVINCI_EVM 901 #define MACH_TYPE_DAVINCI_EVM 901
DECLARE_GLOBAL_DATA_PTR;
extern void i2c_init(int speed, int slaveaddr); extern void i2c_init(int speed, int slaveaddr);
extern void timer_init(void); extern void timer_init(void);
extern int eth_hw_init(void); extern int eth_hw_init(void);
...@@ -115,8 +117,6 @@ void dsp_on(void) ...@@ -115,8 +117,6 @@ void dsp_on(void)
int board_init(void) int board_init(void)
{ {
DECLARE_GLOBAL_DATA_PTR;
/* arch number of the board */ /* arch number of the board */
gd->bd->bi_arch_number = MACH_TYPE_DAVINCI_EVM; gd->bd->bi_arch_number = MACH_TYPE_DAVINCI_EVM;
...@@ -202,8 +202,6 @@ int misc_init_r (void) ...@@ -202,8 +202,6 @@ int misc_init_r (void)
int dram_init(void) int dram_init(void)
{ {
DECLARE_GLOBAL_DATA_PTR;
gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
......
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
#define MACH_TYPE_SCHMOOGIE 1255 #define MACH_TYPE_SCHMOOGIE 1255
DECLARE_GLOBAL_DATA_PTR;
extern void i2c_init(int speed, int slaveaddr); extern void i2c_init(int speed, int slaveaddr);
extern void timer_init(void); extern void timer_init(void);
extern int eth_hw_init(void); extern int eth_hw_init(void);
...@@ -115,8 +117,6 @@ void dsp_on(void) ...@@ -115,8 +117,6 @@ void dsp_on(void)
int board_init(void) int board_init(void)
{ {
DECLARE_GLOBAL_DATA_PTR;
/* arch number of the board */ /* arch number of the board */
gd->bd->bi_arch_number = MACH_TYPE_SCHMOOGIE; gd->bd->bi_arch_number = MACH_TYPE_SCHMOOGIE;
...@@ -244,8 +244,6 @@ int misc_init_r (void) ...@@ -244,8 +244,6 @@ int misc_init_r (void)
int dram_init(void) int dram_init(void)
{ {
DECLARE_GLOBAL_DATA_PTR;
gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
......
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
#define MACH_TYPE_SONATA 1254 #define MACH_TYPE_SONATA 1254
DECLARE_GLOBAL_DATA_PTR;
extern void i2c_init(int speed, int slaveaddr); extern void i2c_init(int speed, int slaveaddr);
extern void timer_init(void); extern void timer_init(void);
extern int eth_hw_init(void); extern int eth_hw_init(void);
...@@ -115,8 +117,6 @@ void dsp_on(void) ...@@ -115,8 +117,6 @@ void dsp_on(void)
int board_init(void) int board_init(void)
{ {
DECLARE_GLOBAL_DATA_PTR;
/* arch number of the board */ /* arch number of the board */
gd->bd->bi_arch_number = MACH_TYPE_SONATA; gd->bd->bi_arch_number = MACH_TYPE_SONATA;
...@@ -199,8 +199,6 @@ int misc_init_r (void) ...@@ -199,8 +199,6 @@ int misc_init_r (void)
int dram_init(void) int dram_init(void)
{ {
DECLARE_GLOBAL_DATA_PTR;
gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册