]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - lib_arm/board.c
Standardize mem_malloc_init() implementation
[people/ms/u-boot.git] / lib_arm / board.c
index 62b78744372efbd62fce89a3ed88b8acec1c5253..904ea89c2d294772d39c2390ef8b37b8dc21f0b4 100644 (file)
@@ -83,14 +83,13 @@ extern void rtl8019_get_enetaddr (uchar * addr);
 #endif
 
 static
-void mem_malloc_init (ulong dest_addr)
+void mem_malloc_init (ulong start, ulong size)
 {
-       mem_malloc_start = dest_addr;
-       mem_malloc_end = dest_addr + CONFIG_SYS_MALLOC_LEN;
-       mem_malloc_brk = mem_malloc_start;
+       mem_malloc_start = start;
+       mem_malloc_end = start + size;
+       mem_malloc_brk = start;
 
-       memset ((void *) mem_malloc_start, 0,
-                       mem_malloc_end - mem_malloc_start);
+       memset ((void *)mem_malloc_start, 0, size);
 }
 
 
@@ -300,7 +299,8 @@ void start_armboot (void)
        }
 
        /* armboot_start is defined in the board-specific linker script */
-       mem_malloc_init (_armboot_start - CONFIG_SYS_MALLOC_LEN);
+       mem_malloc_init (_armboot_start - CONFIG_SYS_MALLOC_LEN,
+                       CONFIG_SYS_MALLOC_LEN);
 
 #ifndef CONFIG_SYS_NO_FLASH
        /* configure available FLASH banks */