]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sandbox: Move ram_buf to arch_global_data
authorSimon Glass <sjg@chromium.org>
Thu, 13 Dec 2012 20:49:11 +0000 (20:49 +0000)
committerTom Rini <trini@ti.com>
Mon, 4 Feb 2013 14:05:45 +0000 (09:05 -0500)
Move this field into arch_global_data and tidy up.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/sandbox/cpu/cpu.c
arch/sandbox/include/asm/global_data.h
arch/sandbox/lib/board.c

index d7684d38eb7f9b35909a5ad625f063bc22ab552e..b2788d5d536280a55733d3b43a764eb05bb3c7b1 100644 (file)
@@ -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)
index f33f46582567c5adcd384c294cd5085f4ed1316c..3ba7ed5dc3a8cec317d938f8da48a7d9c0f78d42 100644 (file)
@@ -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 */
index 83858c1ffe5ca7c738fc6fe79fd95958910fcdb9..3752fab5020223241e76719c1be81da08f9e83c6 100644 (file)
@@ -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();