X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=arch%2Fpowerpc%2Flib%2Fbootm.c;h=116d81bec6bf03baf0d53fb796f0960c840710e4;hb=10fa8d7c703b564bcbdaa2345442e30483c01f98;hp=0685a9331cba9fa7918b309b8c004709308c4436;hpb=500fbae2043532275e09a8666d837d052c9bad9a;p=u-boot diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c index 0685a9331c..116d81bec6 100644 --- a/arch/powerpc/lib/bootm.c +++ b/arch/powerpc/lib/bootm.c @@ -47,7 +47,6 @@ DECLARE_GLOBAL_DATA_PTR; -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); extern ulong get_effective_memsize(void); static ulong get_sp (void); static void set_clocks_in_mhz (bd_t *kbd); @@ -163,8 +162,8 @@ void arch_lmb_reserve(struct lmb *lmb) sp = get_sp(); debug ("## Current stack ends at 0x%08lx\n", sp); - /* adjust sp by 1K to be safe */ - sp -= 1024; + /* adjust sp by 4K to be safe */ + sp -= 4096; lmb_reserve(lmb, sp, (CONFIG_SYS_SDRAM_BASE + get_effective_memsize() - sp)); return ; @@ -253,7 +252,7 @@ static int boot_body_linux(bootm_headers_t *images) if (ret) return ret; -#if defined(CONFIG_OF_LIBFDT) +#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_SYS_BOOTMAPSZ) ret = boot_relocate_fdt(lmb, bootmap_base, of_flat_tree, &of_size); if (ret) return ret; @@ -292,12 +291,12 @@ static int boot_body_linux(bootm_headers_t *images) if (*initrd_start && *initrd_end) fdt_initrd(*of_flat_tree, *initrd_start, *initrd_end, 1); } -#endif /* CONFIG_OF_LIBFDT */ +#endif /* CONFIG_OF_LIBFDT && CONFIG_SYS_BOOTMAPSZ */ return 0; } __attribute__((noinline)) -int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) +int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images) { int ret;