diff mbox series

[1/4] nds32: Remove dead reset_cpu() implementation

Message ID 23c0ac5b511df82adb9703023f114cb7110181b1.1608045173.git.hws@denx.de
State Accepted
Commit 5075bf28d65c70cc777620ac7974adaac5d20095
Delegated to: Tom Rini
Headers show
Series Remove addr parameter from reset_cpu() | expand

Commit Message

Harald Seiler Dec. 15, 2020, 3:47 p.m. UTC
nds32 is one of the only architectures which still have a reset_cpu()
implementation that makes use of the `addr` parameter.  The rest of
U-Boot now ignores it and passes 0 everywhere.  It turns out that even
here, reset_cpu() is no longer referenced anywhere; reset is either not
implemented (e.g. ae3xx) or realized using a WDT (e.g. ag101).

Remove this left-over implementation in preparation for the removal of
the `addr` parameter in the entire tree.

Cc: Rick Chen <rick@andestech.com>
Signed-off-by: Harald Seiler <hws@denx.de>
---
 arch/nds32/cpu/n1213/start.S | 22 ----------------------
 1 file changed, 22 deletions(-)

Comments

Simon Glass Dec. 19, 2020, 2:28 a.m. UTC | #1
On Tue, 15 Dec 2020 at 08:48, Harald Seiler <hws@denx.de> wrote:
>
> nds32 is one of the only architectures which still have a reset_cpu()
> implementation that makes use of the `addr` parameter.  The rest of
> U-Boot now ignores it and passes 0 everywhere.  It turns out that even
> here, reset_cpu() is no longer referenced anywhere; reset is either not
> implemented (e.g. ae3xx) or realized using a WDT (e.g. ag101).
>
> Remove this left-over implementation in preparation for the removal of
> the `addr` parameter in the entire tree.
>
> Cc: Rick Chen <rick@andestech.com>
> Signed-off-by: Harald Seiler <hws@denx.de>
> ---
>  arch/nds32/cpu/n1213/start.S | 22 ----------------------
>  1 file changed, 22 deletions(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
Rick Chen Dec. 21, 2020, 12:33 a.m. UTC | #2
> From: Harald Seiler [mailto:hws@denx.de]
> Sent: Tuesday, December 15, 2020 11:48 PM
> To: u-boot@lists.denx.de
> Cc: Harald Seiler; Tom Rini; Simon Glass; Rick Jian-Zhi Chen(陳建志)
> Subject: [PATCH 1/4] nds32: Remove dead reset_cpu() implementation
>
> nds32 is one of the only architectures which still have a reset_cpu()
> implementation that makes use of the `addr` parameter.  The rest of
> U-Boot now ignores it and passes 0 everywhere.  It turns out that even
> here, reset_cpu() is no longer referenced anywhere; reset is either not
> implemented (e.g. ae3xx) or realized using a WDT (e.g. ag101).
>
> Remove this left-over implementation in preparation for the removal of
> the `addr` parameter in the entire tree.
>
> Cc: Rick Chen <rick@andestech.com>
> Signed-off-by: Harald Seiler <hws@denx.de>
> ---
>  arch/nds32/cpu/n1213/start.S | 22 ----------------------
>  1 file changed, 22 deletions(-)

Reviewed-by: Rick Chen <rick@andestech.com>
Tom Rini March 3, 2021, 7:07 p.m. UTC | #3
On Tue, Dec 15, 2020 at 04:47:49PM +0100, Harald Seiler wrote:

> nds32 is one of the only architectures which still have a reset_cpu()
> implementation that makes use of the `addr` parameter.  The rest of
> U-Boot now ignores it and passes 0 everywhere.  It turns out that even
> here, reset_cpu() is no longer referenced anywhere; reset is either not
> implemented (e.g. ae3xx) or realized using a WDT (e.g. ag101).
> 
> Remove this left-over implementation in preparation for the removal of
> the `addr` parameter in the entire tree.
> 
> Cc: Rick Chen <rick@andestech.com>
> Signed-off-by: Harald Seiler <hws@denx.de>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Rick Chen <rick@andestech.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/arch/nds32/cpu/n1213/start.S b/arch/nds32/cpu/n1213/start.S
index 386c1998dcef..3395721552a3 100644
--- a/arch/nds32/cpu/n1213/start.S
+++ b/arch/nds32/cpu/n1213/start.S
@@ -500,25 +500,3 @@  software_interrupt:
 	bal	do_interruption
 
 	.align	5
-
-/*
- * void reset_cpu(ulong addr);
- * $r0: input address to jump to
- */
-.globl reset_cpu
-reset_cpu:
-/* No need to disable MMU because we never enable it */
-
-	bal	invalidate_icac
-	bal	invalidate_dcac
-	mfsr	$p0, $MMU_CFG
-	andi	$p0, $p0, 0x3			! MMPS
-	li	$p1, 0x2			! TLB MMU
-	bne	$p0, $p1, 1f
-	tlbop	flushall			! Flush TLB
-1:
-	mfsr	$p0, MR_CAC_CTL			! Get the $CACHE_CTL reg
-	li	$p1, DIS_DCAC
-	and	$p0, $p0, $p1			! Clear the DC_EN bit
-	mtsr	$p0, MR_CAC_CTL			! Write back the $CACHE_CTL reg
-	br	$r0				! Jump to the input address