The arm library includes an implementation of bss_clear that is already called from crt0.S. This re-clearing of BSS should not be performed in the machine code and should therefore be removed.
Signed-off-by: Greg Malysa <malysag...@gmail.com> --- arch/arm/mach-sc5xx/soc.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/arch/arm/mach-sc5xx/soc.c b/arch/arm/mach-sc5xx/soc.c index f3619206e91..9bf7c314e01 100644 --- a/arch/arm/mach-sc5xx/soc.c +++ b/arch/arm/mach-sc5xx/soc.c @@ -172,34 +172,8 @@ void fixup_dp83867_phy(struct phy_device *phydev) phy_write(phydev, MDIO_DEVAD_NONE, 0, 0x3100); } -extern char __bss_start, __bss_end; -extern char __rel_dyn_end; - -void bss_clear(void) -{ - char *bss_start = &__bss_start; - char *bss_end = &__bss_end; - char *rel_dyn_end = &__rel_dyn_end; - - char *start; - - if (rel_dyn_end >= bss_start && rel_dyn_end <= bss_end) - start = rel_dyn_end; - else - start = bss_start; - - u32 *pt; - size_t sz = bss_end - start; - - for (int i = 0; i < sz; i += 4) { - pt = (u32 *)(start + i); - *pt = 0; - } -} - int board_early_init_f(void) { - bss_clear(); return 0; } -- 2.45.2