Skip to contentSkip to conversation

armv7 cpu_init_crit: Simplify code

PATCH New Benoît Thébaudeau 2 participants 2 messages Aug 10, 2012 – Oct 4, 2012 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 armv7 cpu_init_crit: Simplify code

We don't need to return to cpu_init_crit after calling lowlevel_init, so lowlevel_init can directly return to the caller of cpu_init_crit.

---
 .../arch/arm/cpu/armv7/start.S                     |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
arch/arm/cpu/armv7/start.S +1 -4
index aee27fd..e8e533e 100644
@@ -357,10 +357,7 @@ ENTRY(cpu_init_crit)
 	 * basic memory. Go here to bump up clock rate and handle
 	 * wake up conditions.
 	 */
-	mov	ip, lr			@ persevere link reg across call
-	bl	lowlevel_init		@ go setup pll,mux,memory
-	mov	lr, ip			@ restore link
-	mov	pc, lr			@ back to my caller
+	b	lowlevel_init		@ go setup pll,mux,memory
 ENDPROC(cpu_init_crit)
 #endif
 
#1 lore raw

PATCH 1/1 armv7 cpu_init_crit: Simplify code

Hi Beno?t,

Quoted 16 lines · Beno?t Th?baudeau

We don't need to return to cpu_init_crit after calling lowlevel_init, so lowlevel_init can directly return to the caller of cpu_init_crit.

---
 .../arch/arm/cpu/armv7/start.S                     |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
arch/arm/cpu/armv7/start.S +0 -0
index aee27fd..e8e533e 100644
@@ -357,10 +357,7 @@ ENTRY(cpu_init_crit)
 	 * basic memory. Go here to bump up clock rate and handle

arch/arm/cpu/armv7/start.S ENTRY(cpu_init_crit) · line 363

Quoted 10 lines
arch/arm/cpu/armv7/start.S +1 -4
 	 * wake up conditions.
 	 */
-	mov	ip, lr			@ persevere link reg across call
-	bl	lowlevel_init		@ go setup pll,mux,memory
-	mov	lr, ip			@ restore link
-	mov	pc, lr			@ back to my caller
+	b	lowlevel_init		@ go setup pll,mux,memory
 ENDPROC(cpu_init_crit)
 #endif
 

Applied to u-boot-arm/master, thanks!

Amicalement,

Signature · 1 line
Albert.