
Dear John Rigby,
In message 1285775292-15060-4-git-send-email-john.rigby@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.rigby@linaro.org CC: Scott McNutt smcnutt@psyent.com CC: Michal Simek monstr@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