board: ti: am335x: eth_cpsw should depend on CONFIG_NET
PATCH 1/1 board: ti: am335x: eth_cpsw should depend on CONFIG_NET
The origin of this patch is the breaking of am335x-hs boot
due to commit e41651fffda7 ("dm: Support parent devices with of-platdata")
HS boards have less SRAM for SPL and so this commit increased memory usage beyond am335x limit. This commit added 10 driver binding pass and am335x boot only if one pass is done. SPL try to do more than one pass due to eth_cpsw failing.
Since HS SPL does not need network (and NET is already disabled in config),
the easiest fix is to "remove" eth_cpsw from SPL by testing if NET is enabled.
--- board/ti/am335x/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/ti/am335x/board.c +1 -1
@@ -902,7 +902,7 @@ int board_late_init(void)#endif /* CPSW plat */ -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if CONFIG_IS_ENABLED(NET) && !CONFIG_IS_ENABLED(OF_CONTROL) struct cpsw_slave_data slave_data[] = { { .slave_reg_ofs = CPSW_SLAVE0_OFFSET,
Signature · 1 line
2.25.1
Quoted 9 lines · Corentin LABBE
The origin of this patch is the breaking of am335x-hs boot
due to commite41651fffda7("dm: Support parent devices with of-platdata")
HS boards have less SRAM for SPL and so this commit increased memory usage beyond am335x limit. This commit added 10 driver binding pass and am335x boot only if one pass is done. SPL try to do more than one pass due toeth_cpswfailing.
Since HS SPL does not need network (and NET is already disabled in config),
the easiest fix is to "remove"eth_cpswfrom SPL by testing if NET is enabled.Signed-off-by Corentin LABBE <[email protected]>
Signature · 1 line
Tom
Quoted 10 lines · Corentin LABBE
The origin of this patch is the breaking of am335x-hs boot
due to commite41651fffda7("dm: Support parent devices with of-platdata")
HS boards have less SRAM for SPL and so this commit increased memory usage beyond am335x limit. This commit added 10 driver binding pass and am335x boot only if one pass is done. SPL try to do more than one pass due toeth_cpswfailing.
Since HS SPL does not need network (and NET is already disabled in config),
the easiest fix is to "remove"eth_cpswfrom SPL by testing if NET is enabled.Signed-off-by Corentin LABBE <[email protected]>---
If no one was using this data I wonder if the compiler could have removed it with LTO enabled.. Something to think on.
Quoted 16 lines
board/ti/am335x/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)board/ti/am335x/board.c +1
-1@@ -902,7 +902,7 @@ int board_late_init(void)#endif /* CPSW plat */ -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if CONFIG_IS_ENABLED(NET) && !CONFIG_IS_ENABLED(OF_CONTROL) struct cpsw_slave_data slave_data[] = { { .slave_reg_ofs = CPSW_SLAVE0_OFFSET,
Quoted 11 lines · Corentin LABBE
The origin of this patch is the breaking of am335x-hs boot
due to commite41651fffda7("dm: Support parent devices with of-platdata")
HS boards have less SRAM for SPL and so this commit increased memory usage beyond am335x limit. This commit added 10 driver binding pass and am335x boot only if one pass is done. SPL try to do more than one pass due toeth_cpswfailing.
Since HS SPL does not need network (and NET is already disabled in config),
the easiest fix is to "remove"eth_cpswfrom SPL by testing if NET is enabled.Signed-off-by Corentin LABBE <[email protected]>Reviewed-by Tom Rini <[email protected]>Acked-by Andrew Davis <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom