diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2008-02-27 21:51:43 -0600 |
---|---|---|
committer | Marian Balakowicz <m8@semihalf.com> | 2008-02-29 12:27:21 +0100 |
commit | a6612bdfe7ef37b9787b66800cf02aaded05fbeb (patch) | |
tree | 14c9e241c6c8964a31b6e1d824cadbc1457c3e3b | |
parent | 4efbe9dbb129f857f27856936112c8c02f016be6 (diff) | |
download | u-boot-imx-a6612bdfe7ef37b9787b66800cf02aaded05fbeb.zip u-boot-imx-a6612bdfe7ef37b9787b66800cf02aaded05fbeb.tar.gz u-boot-imx-a6612bdfe7ef37b9787b66800cf02aaded05fbeb.tar.bz2 |
[new uImage] Don't pass kdb to ramdisk_high since we may not have one
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>
-rw-r--r-- | common/image.c | 9 | ||||
-rw-r--r-- | include/image.h | 2 | ||||
-rw-r--r-- | lib_m68k/bootm.c | 3 | ||||
-rw-r--r-- | lib_ppc/bootm.c | 3 |
4 files changed, 7 insertions, 10 deletions
diff --git a/common/image.c b/common/image.c index c689b0e..92c067f 100644 --- a/common/image.c +++ b/common/image.c @@ -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); diff --git a/include/image.h b/include/image.h index 08566ea..1cec1db 100644 --- a/include/image.h +++ b/include/image.h @@ -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); diff --git a/lib_m68k/bootm.c b/lib_m68k/bootm.c index c611497..74240af 100644 --- a/lib_m68k/bootm.c +++ b/lib_m68k/bootm.c @@ -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); diff --git a/lib_ppc/bootm.c b/lib_ppc/bootm.c index d80d69a..fa28b43 100644 --- a/lib_ppc/bootm.c +++ b/lib_ppc/bootm.c @@ -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 */ |