summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2012-07-18 08:58:43 +0200
committerWolfgang Denk <wd@denx.de>2012-07-18 08:58:43 +0200
commit3a9469b5cbd467b3a7b176b4feb2073a04f294b6 (patch)
treeea416abdc57c9ec52cff99503e99e93f2c968307 /arch
parent975324a7d9abd26423594b596d8cd7b83699171a (diff)
parent7dfb0602915447d10d89096634be7e9d15925eb3 (diff)
downloadu-boot-imx-3a9469b5cbd467b3a7b176b4feb2073a04f294b6.zip
u-boot-imx-3a9469b5cbd467b3a7b176b4feb2073a04f294b6.tar.gz
u-boot-imx-3a9469b5cbd467b3a7b176b4feb2073a04f294b6.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-nios
* 'master' of git://git.denx.de/u-boot-nios: nios2: move gd and bd into BSS Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/nios2/lib/board.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/nios2/lib/board.c b/arch/nios2/lib/board.c
index ca8a3e5..1e495d4 100644
--- a/arch/nios2/lib/board.c
+++ b/arch/nios2/lib/board.c
@@ -87,17 +87,15 @@ void board_init (void)
{
bd_t *bd;
init_fnc_t **init_fnc_ptr;
+ static gd_t gd_data;
+ static bd_t bd_data;
- /* Pointer is writable since we allocated a register for it.
- * Nios treats CONFIG_SYS_GBL_DATA_OFFSET as an address.
- */
- gd = (gd_t *)CONFIG_SYS_GBL_DATA_OFFSET;
+ /* Pointer is writable since we allocated a register for it. */
+ gd = &gd_data;
/* compiler optimization barrier needed for GCC >= 3.4 */
__asm__ __volatile__("": : :"memory");
- memset( gd, 0, GENERATED_GBL_DATA_SIZE );
-
- gd->bd = (bd_t *)(gd+1); /* At end of global data */
+ gd->bd = &bd_data;
gd->baudrate = CONFIG_BAUDRATE;
gd->cpu_clk = CONFIG_SYS_CLK_FREQ;