mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: tegra: set up stack before calling maincluster entry
@ 2016-04-12 20:15 Lucas Stach
  2016-04-14  6:50 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Lucas Stach @ 2016-04-12 20:15 UTC (permalink / raw)
  To: barebox

Allows this code to work correct regardless of the used compiler
optimizations.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 arch/arm/mach-tegra/include/mach/lowlevel.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-tegra/include/mach/lowlevel.h b/arch/arm/mach-tegra/include/mach/lowlevel.h
index f70688e..e9ba5ee 100644
--- a/arch/arm/mach-tegra/include/mach/lowlevel.h
+++ b/arch/arm/mach-tegra/include/mach/lowlevel.h
@@ -255,9 +255,6 @@ void tegra_cpu_lowlevel_setup(char *fdt)
 {
 	uint32_t r;
 
-	if (tegra_cpu_is_maincomplex())
-		tegra_maincomplex_entry(fdt - get_runtime_offset());
-
 	/* set the cpu to SVC32 mode */
 	__asm__ __volatile__("mrs %0, cpsr":"=r"(r));
 	r &= ~0x1f;
@@ -265,6 +262,10 @@ void tegra_cpu_lowlevel_setup(char *fdt)
 	__asm__ __volatile__("msr cpsr, %0" : : "r"(r));
 
 	arm_setup_stack(TEGRA_IRAM_BASE + SZ_256K - 8);
+
+	if (tegra_cpu_is_maincomplex())
+		tegra_maincomplex_entry(fdt - get_runtime_offset());
+
 	tegra_ll_delay_setup();
 }
 
-- 
2.5.5


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: tegra: set up stack before calling maincluster entry
  2016-04-12 20:15 [PATCH] ARM: tegra: set up stack before calling maincluster entry Lucas Stach
@ 2016-04-14  6:50 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2016-04-14  6:50 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox

On Tue, Apr 12, 2016 at 10:15:20PM +0200, Lucas Stach wrote:
> Allows this code to work correct regardless of the used compiler
> optimizations.
> 
> Signed-off-by: Lucas Stach <dev@lynxeye.de>
> ---
>  arch/arm/mach-tegra/include/mach/lowlevel.h | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/mach-tegra/include/mach/lowlevel.h b/arch/arm/mach-tegra/include/mach/lowlevel.h
> index f70688e..e9ba5ee 100644
> --- a/arch/arm/mach-tegra/include/mach/lowlevel.h
> +++ b/arch/arm/mach-tegra/include/mach/lowlevel.h
> @@ -255,9 +255,6 @@ void tegra_cpu_lowlevel_setup(char *fdt)
>  {
>  	uint32_t r;
>  
> -	if (tegra_cpu_is_maincomplex())
> -		tegra_maincomplex_entry(fdt - get_runtime_offset());
> -
>  	/* set the cpu to SVC32 mode */
>  	__asm__ __volatile__("mrs %0, cpsr":"=r"(r));
>  	r &= ~0x1f;
> @@ -265,6 +262,10 @@ void tegra_cpu_lowlevel_setup(char *fdt)
>  	__asm__ __volatile__("msr cpsr, %0" : : "r"(r));
>  
>  	arm_setup_stack(TEGRA_IRAM_BASE + SZ_256K - 8);
> +
> +	if (tegra_cpu_is_maincomplex())
> +		tegra_maincomplex_entry(fdt - get_runtime_offset());
> +
>  	tegra_ll_delay_setup();
>  }
>  
> -- 
> 2.5.5
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-14  6:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-12 20:15 [PATCH] ARM: tegra: set up stack before calling maincluster entry Lucas Stach
2016-04-14  6:50 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox