* [PATCH 1/2] arm: mach-sc5xx: Remove manual bss_clear
@ 2025-02-28 18:58 Greg Malysa
2025-02-28 18:58 ` [PATCH 2/2] arm: mach-sc5xx: Remove inappropriate board-specific functions Greg Malysa
2025-03-13 18:43 ` [PATCH 1/2] arm: mach-sc5xx: Remove manual bss_clear Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Greg Malysa @ 2025-02-28 18:58 UTC (permalink / raw)
To: u-boot
Cc: Greg Malysa, Arturs Artamonovs, Ian Roberts,
Nathan Barrett-Morrison, Oliver Gaskell, Tom Rini, Utsav Agarwal,
Vasileios Bimpikas, adsp-linux
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>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 2/2] arm: mach-sc5xx: Remove inappropriate board-specific functions
2025-02-28 18:58 [PATCH 1/2] arm: mach-sc5xx: Remove manual bss_clear Greg Malysa
@ 2025-02-28 18:58 ` Greg Malysa
2025-03-13 18:43 ` [PATCH 1/2] arm: mach-sc5xx: Remove manual bss_clear Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Greg Malysa @ 2025-02-28 18:58 UTC (permalink / raw)
To: u-boot
Cc: Greg Malysa, Arturs Artamonovs, Ian Roberts,
Nathan Barrett-Morrison, Oliver Gaskell, Tom Rini, Trevor Woerner,
Utsav Agarwal, Vasileios Bimpikas, adsp-linux
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 <malysagreg@gmail.com>
---
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;
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 1/2] arm: mach-sc5xx: Remove manual bss_clear
2025-02-28 18:58 [PATCH 1/2] arm: mach-sc5xx: Remove manual bss_clear Greg Malysa
2025-02-28 18:58 ` [PATCH 2/2] arm: mach-sc5xx: Remove inappropriate board-specific functions Greg Malysa
@ 2025-03-13 18:43 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2025-03-13 18:43 UTC (permalink / raw)
To: u-boot, Greg Malysa
Cc: Arturs Artamonovs, Ian Roberts, Nathan Barrett-Morrison,
Oliver Gaskell, Utsav Agarwal, Vasileios Bimpikas, adsp-linux
On Fri, 28 Feb 2025 13:58:33 -0500, Greg Malysa wrote:
> 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.
>
>
Applied to u-boot/next, thanks!
[1/2] arm: mach-sc5xx: Remove manual bss_clear
commit: 3ce975ab888b583cb5816b1aa453136ea9549a3c
[2/2] arm: mach-sc5xx: Remove inappropriate board-specific functions
commit: 74f4170a87a72438842ec7084741968dbc270702
--
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-03-13 18:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-28 18:58 [PATCH 1/2] arm: mach-sc5xx: Remove manual bss_clear Greg Malysa
2025-02-28 18:58 ` [PATCH 2/2] arm: mach-sc5xx: Remove inappropriate board-specific functions Greg Malysa
2025-03-13 18:43 ` [PATCH 1/2] arm: mach-sc5xx: Remove manual bss_clear Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox