mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: rdu2: Initialize DEBUG_LL in entry function
@ 2019-06-03 19:28 Andrey Smirnov
  2019-06-04  8:28 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Andrey Smirnov @ 2019-06-03 19:28 UTC (permalink / raw)
  To: barebox; +Cc: Andrey Smirnov

When bootstrapping Barebox via JTAG rdu2_sram_setup() won't be
executed resulting in non functional DEBUG_LL API. Move low-level UART
initialization code to be a part of start_imx6_zii_rdu2() to avoid
that problem.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 arch/arm/boards/zii-imx6q-rdu2/lowlevel.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boards/zii-imx6q-rdu2/lowlevel.c b/arch/arm/boards/zii-imx6q-rdu2/lowlevel.c
index a5ac6f64c..9672a69bf 100644
--- a/arch/arm/boards/zii-imx6q-rdu2/lowlevel.c
+++ b/arch/arm/boards/zii-imx6q-rdu2/lowlevel.c
@@ -271,11 +271,6 @@ static noinline void rdu2_sram_setup(void)
 	enum bootsource bootsrc;
 	int instance;
 
-	imx6_ungate_all_peripherals();
-
-	if (IS_ENABLED(CONFIG_DEBUG_LL))
-		setup_uart();
-
 	arm_setup_stack(0x00920000 - 8);
 	relocate_to_current_adr();
 	setup_c();
@@ -296,6 +291,11 @@ ENTRY_FUNCTION(start_imx6_zii_rdu2, r0, r1, r2)
 {
 	imx6_cpu_lowlevel_init();
 
+	imx6_ungate_all_peripherals();
+
+	if (IS_ENABLED(CONFIG_DEBUG_LL))
+		setup_uart();
+
 	/*
 	 * When still running in SRAM, we need to setup the DRAM now and load
 	 * the remaining image.
-- 
2.21.0


_______________________________________________
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: rdu2: Initialize DEBUG_LL in entry function
  2019-06-03 19:28 [PATCH] ARM: rdu2: Initialize DEBUG_LL in entry function Andrey Smirnov
@ 2019-06-04  8:28 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2019-06-04  8:28 UTC (permalink / raw)
  To: Andrey Smirnov; +Cc: barebox

On Mon, Jun 03, 2019 at 12:28:57PM -0700, Andrey Smirnov wrote:
> When bootstrapping Barebox via JTAG rdu2_sram_setup() won't be
> executed resulting in non functional DEBUG_LL API. Move low-level UART
> initialization code to be a part of start_imx6_zii_rdu2() to avoid
> that problem.
> 
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
>  arch/arm/boards/zii-imx6q-rdu2/lowlevel.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/boards/zii-imx6q-rdu2/lowlevel.c b/arch/arm/boards/zii-imx6q-rdu2/lowlevel.c
> index a5ac6f64c..9672a69bf 100644
> --- a/arch/arm/boards/zii-imx6q-rdu2/lowlevel.c
> +++ b/arch/arm/boards/zii-imx6q-rdu2/lowlevel.c
> @@ -271,11 +271,6 @@ static noinline void rdu2_sram_setup(void)
>  	enum bootsource bootsrc;
>  	int instance;
>  
> -	imx6_ungate_all_peripherals();
> -
> -	if (IS_ENABLED(CONFIG_DEBUG_LL))
> -		setup_uart();
> -
>  	arm_setup_stack(0x00920000 - 8);
>  	relocate_to_current_adr();
>  	setup_c();
> @@ -296,6 +291,11 @@ ENTRY_FUNCTION(start_imx6_zii_rdu2, r0, r1, r2)
>  {
>  	imx6_cpu_lowlevel_init();
>  
> +	imx6_ungate_all_peripherals();
> +
> +	if (IS_ENABLED(CONFIG_DEBUG_LL))
> +		setup_uart();
> +
>  	/*
>  	 * When still running in SRAM, we need to setup the DRAM now and load
>  	 * the remaining image.
> -- 
> 2.21.0
> 
> 
> _______________________________________________
> 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:[~2019-06-04  8:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-03 19:28 [PATCH] ARM: rdu2: Initialize DEBUG_LL in entry function Andrey Smirnov
2019-06-04  8:28 ` Sascha Hauer

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