U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Malysa <malysagreg@gmail.com>
To: u-boot@lists.denx.de
Cc: Greg Malysa <malysagreg@gmail.com>,
	Arturs Artamonovs <arturs.artamonovs@analog.com>,
	Ian Roberts <ian.roberts@timesys.com>,
	Nathan Barrett-Morrison <nathan.morrison@timesys.com>,
	Oliver Gaskell <Oliver.Gaskell@analog.com>,
	Tom Rini <trini@konsulko.com>,
	Utsav Agarwal <utsav.agarwal@analog.com>,
	Vasileios Bimpikas <vasileios.bimpikas@analog.com>,
	adsp-linux@analog.com
Subject: [PATCH 1/2] arm: mach-sc5xx: Remove manual bss_clear
Date: Fri, 28 Feb 2025 13:58:33 -0500	[thread overview]
Message-ID: <20250228185837.25741-1-malysagreg@gmail.com> (raw)

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


             reply	other threads:[~2025-02-28 18:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-28 18:58 Greg Malysa [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250228185837.25741-1-malysagreg@gmail.com \
    --to=malysagreg@gmail.com \
    --cc=Oliver.Gaskell@analog.com \
    --cc=adsp-linux@analog.com \
    --cc=arturs.artamonovs@analog.com \
    --cc=ian.roberts@timesys.com \
    --cc=nathan.morrison@timesys.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=utsav.agarwal@analog.com \
    --cc=vasileios.bimpikas@analog.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox