Patchwork [U-Boot] armv7 cpu_init_crit: Simplify code

login
register
mail settings
Submitter Benoît Thébaudeau
Date Aug. 10, 2012, 10:05 p.m.
Message ID <2025492723.2284420.1344636316297.JavaMail.root@advansee.com>
Download mbox | patch
Permalink /patch/176631/
State Accepted
Delegated to: Albert ARIBAUD
Headers show

Comments

Benoît Thébaudeau - Aug. 10, 2012, 10:05 p.m.
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.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
---
 .../arch/arm/cpu/armv7/start.S                     |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
Albert ARIBAUD - Oct. 4, 2012, 9:19 a.m.
Hi Benoît,

On Sat, 11 Aug 2012 00:05:16 +0200 (CEST), Benoît Thébaudeau
<benoit.thebaudeau@advansee.com> wrote:

> 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.
> 
> Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
> ---
>  .../arch/arm/cpu/armv7/start.S                     |    5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git u-boot-4d3c95f.orig/arch/arm/cpu/armv7/start.S u-boot-4d3c95f/arch/arm/cpu/armv7/start.S
> index aee27fd..e8e533e 100644
> --- u-boot-4d3c95f.orig/arch/arm/cpu/armv7/start.S
> +++ u-boot-4d3c95f/arch/arm/cpu/armv7/start.S
> @@ -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
>  
> 

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

Amicalement,

Patch

diff --git u-boot-4d3c95f.orig/arch/arm/cpu/armv7/start.S u-boot-4d3c95f/arch/arm/cpu/armv7/start.S
index aee27fd..e8e533e 100644
--- u-boot-4d3c95f.orig/arch/arm/cpu/armv7/start.S
+++ u-boot-4d3c95f/arch/arm/cpu/armv7/start.S
@@ -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