Dear John Rigby, In message <1285775292-15060-4-git-send-email-john.ri...@linaro.org> you wrote: > 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. > > Signed-off-by: John Rigby <john.ri...@linaro.org> > CC: Scott McNutt <smcn...@psyent.com> > CC: Michal Simek <mon...@monstr.eu> > --- > arch/microblaze/lib/bootm.c | 12 +++--------- > arch/nios2/lib/bootm.c | 8 +++----- > common/cmd_bootm.c | 2 -- > 3 files changed, 6 insertions(+), 16 deletions(-) > > diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c > index 8e2c6d8..25f63d9 100644 > --- a/arch/microblaze/lib/bootm.c > +++ b/arch/microblaze/lib/bootm.c > @@ -46,12 +46,9 @@ int do_bootm_linux(int flag, int argc, char * const > argv[], bootm_headers_t *ima > > char *of_flat_tree = NULL; > #if defined(CONFIG_OF_LIBFDT) > - ulong of_size = 0; > - > - /* find flattened device tree */ > - ret = boot_get_fdt (flag, argc, argv, images, &of_flat_tree, &of_size); > - if (ret) > - return 1; > + /* did generic code already find a device tree? */ > + if (images->ft_len) > + of_flat_tree = images->ft_addr; > #endif
So what if the generic code did NOT find a device tree? Before, there was an error return. And now? > diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c > index 40a4d15..f32be52 100644 > --- a/arch/nios2/lib/bootm.c > +++ b/arch/nios2/lib/bootm.c > @@ -36,11 +36,9 @@ int do_bootm_linux(int flag, int argc, char * const > argv[], bootm_headers_t *ima > ulong initrd_end = images->rd_end; > char *of_flat_tree = NULL; > #if defined(CONFIG_OF_LIBFDT) > - ulong of_size = 0; > - > - /* find flattened device tree */ > - if (boot_get_fdt(flag, argc, argv, images, &of_flat_tree, &of_size)) > - return 1; > + /* did generic code already find a device tree? */ > + if (images->ft_len) > + of_flat_tree = images->ft_addr; Ditto. On which nios2 and microblaze has this been tested? You may want to put the NIOS and MB custodians on Cc: Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de "I say we take off; nuke the site from orbit. It's the only way to be sure." - Corporal Hicks, in "Aliens" _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot