arm: mach-sc5xx: Remove manual bss_clear
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 <malysagreg@gmail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user