]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
[new uImage] Don't pass kdb to ramdisk_high since we may not have one
authorKumar Gala <galak@kernel.crashing.org>
Thu, 28 Feb 2008 03:51:43 +0000 (21:51 -0600)
committerMarian Balakowicz <m8@semihalf.com>
Fri, 29 Feb 2008 11:27:21 +0000 (12:27 +0100)
We don't actually need the kdb param as we are just using it to get
bd->bi_memsize which we can get from gd->bd->bi_memsize.  Also, if we
boot via OF we might not actually fill out a kdb.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Marian Balakowicz <m8@semihalf.com>
common/image.c
include/image.h
lib_m68k/bootm.c
lib_ppc/bootm.c

index c689b0ee62a5ae860012ead2226cbf4e98fb92e2..92c067f0adeea80f85f5ad9b9e2ad8458ec5b6ce 100644 (file)
@@ -694,7 +694,6 @@ void get_ramdisk (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
  * ramdisk_high - relocate init ramdisk
  * @rd_data: ramdisk data start address
  * @rd_len: ramdisk data length
- * @kbd: kernel board info copy (within BOOTMAPSZ boundary)
  * @sp_limit: stack pointer limit (including BOOTMAPSZ)
  * @sp: current stack pointer
  * @initrd_start: pointer to a ulong variable, will hold final init ramdisk
@@ -712,7 +711,7 @@ void get_ramdisk (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
  *     - returns new allc_current, next free address below BOOTMAPSZ
  */
 ulong ramdisk_high (ulong alloc_current, ulong rd_data, ulong rd_len,
-               bd_t *kbd, ulong sp_limit, ulong sp,
+               ulong sp_limit, ulong sp,
                ulong *initrd_start, ulong *initrd_end)
 {
        char    *s;
@@ -734,9 +733,9 @@ ulong ramdisk_high (ulong alloc_current, ulong rd_data, ulong rd_len,
 
 #ifdef CONFIG_LOGBUFFER
        /* Prevent initrd from overwriting logbuffer */
-       if (initrd_high < (kbd->bi_memsize - LOGBUFF_LEN - LOGBUFF_OVERHEAD))
-               initrd_high = kbd->bi_memsize - LOGBUFF_LEN - LOGBUFF_OVERHEAD;
-       debug ("## Logbuffer at 0x%08lx ", kbd->bi_memsize - LOGBUFF_LEN);
+       if (initrd_high < (gd->bd->bi_memsize - LOGBUFF_LEN - LOGBUFF_OVERHEAD))
+           initrd_high = gd->bd->bi_memsize - LOGBUFF_LEN - LOGBUFF_OVERHEAD;
+       debug ("## Logbuffer at 0x%08lx ", gd->bd->bi_memsize - LOGBUFF_LEN);
 #endif
        debug ("## initrd_high = 0x%08lx, copy_to_ram = %d\n",
                        initrd_high, initrd_copy_to_ram);
index 08566eacec72b58797adcde1df55c9261f9d0eaa..1cec1db1e2df38bf6f4f71658757ca32a1f4e4e3 100644 (file)
@@ -388,7 +388,7 @@ void get_ramdisk (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
 
 #if defined(CONFIG_PPC) || defined(CONFIG_M68K)
 ulong ramdisk_high (ulong alloc_current, ulong rd_data, ulong rd_len,
-               bd_t *kbd, ulong sp_limit, ulong sp,
+               ulong sp_limit, ulong sp,
                ulong *initrd_start, ulong *initrd_end);
 
 ulong get_boot_sp_limit (ulong sp);
index c6114978af3124384edf7d1af1e842926012cb43..74240af554f3fb5c2515fde465f7b8623ab5c9cf 100644 (file)
@@ -100,8 +100,7 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag,
 
        rd_len = rd_data_end - rd_data_start;
        alloc_current = ramdisk_high (alloc_current, rd_data_start, rd_len,
-                       kbd, sp_limit, get_sp (),
-                       &initrd_start, &initrd_end);
+                       sp_limit, get_sp (), &initrd_start, &initrd_end);
 
        debug("## Transferring control to Linux (at address %08lx) ...\n",
              (ulong) kernel);
index d80d69ab2edb27512f930bfdc0a20ee185cd1af5..fa28b4314e57d4b78732d8cba623eaaf4657a57a 100644 (file)
@@ -120,8 +120,7 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
        rd_len = rd_data_end - rd_data_start;
 
        alloc_current = ramdisk_high (alloc_current, rd_data_start, rd_len,
-                       kbd, sp_limit, get_sp (),
-                       &initrd_start, &initrd_end);
+                       sp_limit, get_sp (), &initrd_start, &initrd_end);
 
 #if defined(CONFIG_OF_LIBFDT)
        /* find flattened device tree */