Remove extra fdt_fixup_ethernet() call
PATCH 1/1 Remove extra fdt_fixup_ethernet() call
ft_cpu_setup() already calls fdt_fixup_ethernet(), calling it in image_setup_libfdt() is both redundant and breaks any modifications done by ft_board_setup(). Restore the old behavior by removing the call in image_setup_libfdt()
--- common/image-fdt.c | 1 - 1 file changed, 1 deletion(-)
common/image-fdt.c +0 -1
@@ -498,7 +498,6 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob, goto err; } } -fdt_fixup_ethernet (blob);/* Delete the old LMB reservation */ lmb_free(lmb, (phys_addr_t)(u32)(uintptr_t)blob,
Signature · 1 line
2.10.2
PATCH 1/1 Remove extra fdt_fixup_ethernet() call
Quoted 15 lines · Joakim Tjernlund
ft_cpu_setup()already callsfdt_fixup_ethernet(), calling it inimage_setup_libfdt()is both redundant and breaks any modifications done byft_board_setup(). Restore the old behavior by removing the call inimage_setup_libfdt()Signed-off-by Joakim Tjernlund <[email protected]>--- common/image-fdt.c | 1 - 1 file changed, 1 deletion(-)common/image-fdt.c +0
-0
common/image-fdt.c int image_setup_libfdt(bootm_headers_t *images, void *blob, · line 503
Quoted 7 lines
common/image-fdt.c +0
-1@@ -498,7 +498,6 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob, goto err; } } -fdt_fixup_ethernet (blob);/* Delete the old LMB reservation */ lmb_free(lmb, (phys_addr_t)(u32)(uintptr_t)blob,
Ping ?
Jocke
PATCH 1/1 Remove extra fdt_fixup_ethernet() call
In reply to Joakim TjernlundHi Joakim,
Quoted 4 lines · Joakim Tjernlund
ft_cpu_setup()already callsfdt_fixup_ethernet(), calling it inimage_setup_libfdt()is both redundant and breaks any modifications done byft_board_setup(). Restore the old behavior by removing the call inimage_setup_libfdt()
Which old behaviour? Can you please add a Fixes: tag with the details?
Also, which ft_cpu_setup()?
Quoted 19 lines
Signed-off-by Joakim Tjernlund <[email protected]>--- common/image-fdt.c | 1 - 1 file changed, 1 deletion(-)common/image-fdt.c +0
-2@@ -498,7 +498,6 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob, goto err; } } -fdt_fixup_ethernet (blob);/* Delete the old LMB reservation */ lmb_free(lmb, (phys_addr_t)(u32)(uintptr_t)blob, --
Quoted 2 lines
2.10.2
Regards,
Simon
PATCH 1/1 Remove extra fdt_fixup_ethernet() call
Quoted 10 lines · Simon Glass
Hi Joakim,
Quoted 4 lines · Joakim Tjernlund
ft_cpu_setup()already callsfdt_fixup_ethernet(), calling it inimage_setup_libfdt()is both redundant and breaks any modifications done byft_board_setup(). Restore the old behavior by removing the call inimage_setup_libfdt()Which old behaviour? Can you please add a Fixes: tag with the details?
The feature of having the possibility to rewrite the dev trees MAC addresses in ft_board_setup(). Currently such rewrites are overwritten by the call to dt_fixup_ethernet(blob) in image_setup_libfdt().
Looking into the history I see that commit 13d06981(by you as it happens :) is the one adding the extra call to fdt_fixup_ethernet()
Quoted 2 lines
Also, which
ft_cpu_setup()?
# > git grep fdt_fixup_ethernet arch/arm/cpu/armv7/ls102xa/fdt.c: fdt_fixup_ethernet(blob); arch/mips/lib/bootm.c: fdt_fixup_ethernet(images->ft_addr); arch/nios2/cpu/fdt.c: fdt_fixup_ethernet(blob); arch/powerpc/cpu/mpc512x/cpu.c: fdt_fixup_ethernet(blob); arch/powerpc/cpu/mpc8260/cpu.c: fdt_fixup_ethernet(blob); arch/powerpc/cpu/mpc83xx/fdt.c: fdt_fixup_ethernet(blob); arch/powerpc/cpu/mpc85xx/fdt.c: fdt_fixup_ethernet(blob); arch/powerpc/cpu/mpc86xx/fdt.c: fdt_fixup_ethernet(blob); arch/powerpc/cpu/mpc8xx/fdt.c: fdt_fixup_ethernet(blob); arch/powerpc/cpu/ppc4xx/fdt.c: fdt_fixup_ethernet(blob);
Seems like it is mostly PPC which has fdt_fixup_ethernet() call though.
Jocke
Quoted 25 lines
Quoted 20 lines
Signed-off-by Joakim Tjernlund <[email protected]>--- common/image-fdt.c | 1 - 1 file changed, 1 deletion(-)common/image-fdt.c +0
-2@@ -498,7 +498,6 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob, goto err; } } -fdt_fixup_ethernet (blob);/* Delete the old LMB reservation */ lmb_free(lmb, (phys_addr_t)(u32)(uintptr_t)blob, --Quoted 2 lines
2.10.2
Regards,
Simon
PATCH 1/1 Remove extra fdt_fixup_ethernet() call
Quoted 31 lines · Joakim Tjernlund
Quoted 10 lines · Simon Glass
Hi Joakim,
Quoted 4 lines · Joakim Tjernlund
ft_cpu_setup()already callsfdt_fixup_ethernet(), calling it inimage_setup_libfdt()is both redundant and breaks any modifications done byft_board_setup(). Restore the old behavior by removing the call inimage_setup_libfdt()Which old behaviour? Can you please add a Fixes: tag with the details?
The feature of having the possibility to rewrite the dev trees MAC addresses in
ft_board_setup(). Currently such rewrites are overwritten by the call todt_fixup_ethernet(blob)inimage_setup_libfdt().
Looking into the history I see that commit 13d06981(by you as it happens :) is the one adding the extra call tofdt_fixup_ethernet()Quoted 2 lines
Also, which
ft_cpu_setup()?# > git grep
fdt_fixup_ethernetarch/arm/cpu/armv7/ls102xa/fdt.c: fdt_fixup_ethernet(blob); arch/mips/lib/bootm.c: fdt_fixup_ethernet(images->ft_addr); arch/nios2/cpu/fdt.c: fdt_fixup_ethernet(blob); arch/powerpc/cpu/mpc512x/cpu.c: fdt_fixup_ethernet(blob); arch/powerpc/cpu/mpc8260/cpu.c: fdt_fixup_ethernet(blob); arch/powerpc/cpu/mpc83xx/fdt.c: fdt_fixup_ethernet(blob); arch/powerpc/cpu/mpc85xx/fdt.c: fdt_fixup_ethernet(blob); arch/powerpc/cpu/mpc86xx/fdt.c: fdt_fixup_ethernet(blob); arch/powerpc/cpu/mpc8xx/fdt.c: fdt_fixup_ethernet(blob); arch/powerpc/cpu/ppc4xx/fdt.c: fdt_fixup_ethernet(blob);
Quoted 1 line
Seems like it is mostly PPC which has
fdt_fixup_ethernet()call though.
I think that's because everyone else is depending on the call in image_setup_libfdt... So far RPi and sunxi are broken. I'm sure there are others.
IMHO, the commit message offers little context on the attempts to check existing users would break or not. Just because someone is not explicitly calling it does not mean they aren't expecting that behavior from the system. There's also no context on what _your_ platform is, how it's affected and and why actually needs the explicit call.
Yes the 2 redundant calls are confusing, and one overwrites the other. However it was introduced in 2007, and device tree usage has increased a lot, particularly for ARM, since then. For us, the "new" behavior was standard from day 1.
Regards
ChenYu
Quoted 31 lines
Jocke
Quoted 17 lines
Quoted 17 lines
Signed-off-by Joakim Tjernlund <[email protected]>--- common/image-fdt.c | 1 - 1 file changed, 1 deletion(-)common/image-fdt.c +0
-1@@ -498,7 +498,6 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob, goto err; } } -fdt_fixup_ethernet (blob);Quoted 8 lines
Quoted 5 lines
common/image-fdt.c +0
-1/* Delete the old LMB reservation */ lmb_free(lmb, (phys_addr_t)(u32)(uintptr_t)blob, --2.10.2
Regards,
Simon_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
Quoted 6 lines · Joakim Tjernlund
ft_cpu_setup()already callsfdt_fixup_ethernet(), calling it inimage_setup_libfdt()is both redundant and breaks any modifications done byft_board_setup(). Restore the old behavior by removing the call inimage_setup_libfdt()Signed-off-by Joakim Tjernlund <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170408/4bbd81c8/attachment.sig>