diff mbox series

[U-Boot,09/12] arm: spear: Simplify start.S organization

Message ID 20190507121854.18575-10-miquel.raynal@bootlin.com
State Accepted
Commit 6a9d0e275f0edb952541ae4efb0dc394242f9b5a
Delegated to: Tom Rini
Headers show
Series Enable returning back to BootROM from spear SPL | expand

Commit Message

Miquel Raynal May 7, 2019, 12:18 p.m. UTC
There is no reason to do the few spear-related initialization, in a
different procedure than 'reset'. Spare one branching and get a linear
code flow by removing this indirection.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 arch/arm/cpu/arm926ejs/spear/start.S | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

Comments

Stefan Roese May 7, 2019, 12:42 p.m. UTC | #1
On 07.05.19 14:18, Miquel Raynal wrote:
> There is no reason to do the few spear-related initialization, in a
> different procedure than 'reset'. Spare one branching and get a linear
> code flow by removing this indirection.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan
Tom Rini July 11, 2019, 10:05 p.m. UTC | #2
On Tue, May 07, 2019 at 02:18:51PM +0200, Miquel Raynal wrote:

> There is no reason to do the few spear-related initialization, in a
> different procedure than 'reset'. Spare one branching and get a linear
> code flow by removing this indirection.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> Reviewed-by: Stefan Roese <sr@denx.de>

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

Patch

diff --git a/arch/arm/cpu/arm926ejs/spear/start.S b/arch/arm/cpu/arm926ejs/spear/start.S
index 2bc9d5990e..5fb2bd12ec 100644
--- a/arch/arm/cpu/arm926ejs/spear/start.S
+++ b/arch/arm/cpu/arm926ejs/spear/start.S
@@ -36,20 +36,7 @@  reset:
 	* UART boot, USB boot): save registers in BootROM's stack.
 	*/
 	push	{r0-r12,lr}
-	bl	cpu_init_crit
-	pop	{r0-r12,pc}
 
-/*
- *************************************************************************
- *
- * CPU_init_critical registers
- *
- * setup important registers
- * setup memory timing
- *
- *************************************************************************
- */
-cpu_init_crit:
 	/*
 	 * Flush v4 I/D caches
 	 */
@@ -67,6 +54,6 @@  cpu_init_crit:
 	/*
 	 * Go setup Memory and board specific bits prior to relocation.
 	 */
-	push	{lr}
 	bl	_main	/* _main will call board_init_f */
-	pop	{pc}
+
+	pop	{r0-r12,pc}