diff options
author | Simon Glass <sjg@chromium.org> | 2012-12-13 20:49:11 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-02-04 09:05:45 -0500 |
commit | 8ee666a76ffe2b63174af477c93ebf389a49d76b (patch) | |
tree | 7adbc432825654849d9b5c996f6c0ef3a22d1f65 /arch | |
parent | 3d0f8c8f8072a3f2844fc54bfaf2a42026903755 (diff) |
sandbox: Move ram_buf to arch_global_data
Move this field into arch_global_data and tidy up.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sandbox/cpu/cpu.c | 2 | ||||
-rw-r--r-- | arch/sandbox/include/asm/global_data.h | 2 | ||||
-rw-r--r-- | arch/sandbox/lib/board.c | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c index d7684d38eb7..b2788d5d536 100644 --- a/arch/sandbox/cpu/cpu.c +++ b/arch/sandbox/cpu/cpu.c @@ -54,7 +54,7 @@ int cleanup_before_linux(void) void *map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags) { - return (void *)(gd->ram_buf + paddr); + return (void *)(gd->arch.ram_buf + paddr); } void flush_dcache_range(unsigned long start, unsigned long stop) diff --git a/arch/sandbox/include/asm/global_data.h b/arch/sandbox/include/asm/global_data.h index f33f4658256..3ba7ed5dc3a 100644 --- a/arch/sandbox/include/asm/global_data.h +++ b/arch/sandbox/include/asm/global_data.h @@ -28,6 +28,7 @@ /* Architecture-specific global data */ struct arch_global_data { + u8 *ram_buf; /* emulated RAM buffer */ }; /* @@ -46,7 +47,6 @@ typedef struct global_data { unsigned long env_addr; /* Address of Environment struct */ unsigned long env_valid; /* Checksum of Environment valid? */ unsigned long fb_base; /* base address of frame buffer */ - u8 *ram_buf; /* emulated RAM buffer */ phys_size_t ram_size; /* RAM size */ const void *fdt_blob; /* Our device tree, NULL if none */ void **jt; /* jump table */ diff --git a/arch/sandbox/lib/board.c b/arch/sandbox/lib/board.c index 83858c1ffe5..3752fab5020 100644 --- a/arch/sandbox/lib/board.c +++ b/arch/sandbox/lib/board.c @@ -174,7 +174,7 @@ void board_init_f(ulong bootflag) mem = os_malloc(CONFIG_SYS_SDRAM_SIZE); assert(mem); - gd->ram_buf = mem; + gd->arch.ram_buf = mem; addr = (ulong)(mem + size); /* @@ -227,8 +227,8 @@ void board_init_r(gd_t *id, ulong dest_addr) #endif /* The Malloc area is at the top of simulated DRAM */ - mem_malloc_init((ulong)gd->ram_buf + gd->ram_size - TOTAL_MALLOC_LEN, - TOTAL_MALLOC_LEN); + mem_malloc_init((ulong)gd->arch.ram_buf + gd->ram_size - + TOTAL_MALLOC_LEN, TOTAL_MALLOC_LEN); /* initialize environment */ env_relocate(); |