From 5a75e121075a63f312ae07409477b6f686840a93 Mon Sep 17 00:00:00 2001 From: John Rigby Date: Wed, 13 Oct 2010 13:57:34 -0600 Subject: FDT: only call boot_get_fdt from generic code All arches except nios2 and microblaze call boot_get_fdt from bootm_start in common/cmd_bootm.c. Having nios2 and microblaze do so as well removes code from their respective do_bootm_linux routines and allows removal of a nasty ifdef from bootm_start. In the case where boot_get_fdt returns an error bootm_start returns and the platform specific do_bootm_linux routines will never get called. Also only check argv[3] for an fdt addr if argc > 3 first. This is already the case for nios2. Signed-off-by: John Rigby CC: Scott McNutt CC: Michal Simek CC: Thomas Chou Acked-by: Wolfgang Denk Acked-by: Michal Simek Tested-by: Thomas Chou --- common/cmd_bootm.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'common/cmd_bootm.c') diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index db59e6f..25bc39c 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -308,7 +308,6 @@ static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] } #if defined(CONFIG_OF_LIBFDT) -#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SPARC) /* find flattened device tree */ ret = boot_get_fdt (flag, argc, argv, &images, &images.ft_addr, &images.ft_len); @@ -319,7 +318,6 @@ static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] set_working_fdt_addr(images.ft_addr); #endif -#endif } images.os.start = (ulong)os_hdr; -- cgit v1.1