From 3ce975ab888b583cb5816b1aa453136ea9549a3c Mon Sep 17 00:00:00 2001 From: Greg Malysa Date: Fri, 28 Feb 2025 13:58:33 -0500 Subject: 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 --- 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; } -- cgit v1.3.1 From 74f4170a87a72438842ec7084741968dbc270702 Mon Sep 17 00:00:00 2001 From: Greg Malysa Date: Fri, 28 Feb 2025 13:58:34 -0500 Subject: arm: mach-sc5xx: Remove inappropriate board-specific functions The sc5xx machine code includes implementations of board_init and board_early_init_f which should not be included in the base soc support code, as they should be implemented by a board where necessary. This removes the default empty implementations of both from mach-sc5xx. Signed-off-by: Greg Malysa --- arch/arm/mach-sc5xx/soc.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/arch/arm/mach-sc5xx/soc.c b/arch/arm/mach-sc5xx/soc.c index 9bf7c314e01..8f13127a660 100644 --- a/arch/arm/mach-sc5xx/soc.c +++ b/arch/arm/mach-sc5xx/soc.c @@ -172,16 +172,6 @@ void fixup_dp83867_phy(struct phy_device *phydev) phy_write(phydev, MDIO_DEVAD_NONE, 0, 0x3100); } -int board_early_init_f(void) -{ - return 0; -} - -int board_init(void) -{ - return 0; -} - int dram_init(void) { gd->ram_size = CFG_SYS_SDRAM_SIZE; -- cgit v1.3.1