mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM/i.MX53: fix SDRAM setup routines
@ 2018-02-21 15:39 Juergen Borleis
  2018-02-22  8:07 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Juergen Borleis @ 2018-02-21 15:39 UTC (permalink / raw)
  To: barebox

Fix setup of the SDRAM's MR0 register: 'val' gets overwritten by the chip
select decision and nothing is written to the MR0 register.

This fix is required since some i.MX53 based platforms still use this
software setup routine to configure their SDRAMs.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
---
 arch/arm/mach-imx/esdctl-v4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-imx/esdctl-v4.c b/arch/arm/mach-imx/esdctl-v4.c
index 0652b492e..6de4a8d6e 100644
--- a/arch/arm/mach-imx/esdctl-v4.c
+++ b/arch/arm/mach-imx/esdctl-v4.c
@@ -191,9 +191,9 @@ void imx_esdctlv4_start_ddr3_sdram(int cs)
 		ESDCTL_V4_DDR3_REG_MR0 | val_cs1;
 
 	if (cs)
-		val = ESDCTL_V4_ESDSCR_DLL_RST1;
+		val |= ESDCTL_V4_ESDSCR_DLL_RST1;
 	else
-		val = ESDCTL_V4_ESDSCR_DLL_RST0;
+		val |= ESDCTL_V4_ESDSCR_DLL_RST0;
 
 	writel(val, base + ESDCTL_V4_ESDSCR);
 
-- 
2.16.1


_______________________________________________
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/i.MX53: fix SDRAM setup routines
  2018-02-21 15:39 [PATCH] ARM/i.MX53: fix SDRAM setup routines Juergen Borleis
@ 2018-02-22  8:07 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2018-02-22  8:07 UTC (permalink / raw)
  To: Juergen Borleis; +Cc: barebox

On Wed, Feb 21, 2018 at 04:39:10PM +0100, Juergen Borleis wrote:
> Fix setup of the SDRAM's MR0 register: 'val' gets overwritten by the chip
> select decision and nothing is written to the MR0 register.
> 
> This fix is required since some i.MX53 based platforms still use this
> software setup routine to configure their SDRAMs.
> 
> Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
> ---
>  arch/arm/mach-imx/esdctl-v4.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/mach-imx/esdctl-v4.c b/arch/arm/mach-imx/esdctl-v4.c
> index 0652b492e..6de4a8d6e 100644
> --- a/arch/arm/mach-imx/esdctl-v4.c
> +++ b/arch/arm/mach-imx/esdctl-v4.c
> @@ -191,9 +191,9 @@ void imx_esdctlv4_start_ddr3_sdram(int cs)
>  		ESDCTL_V4_DDR3_REG_MR0 | val_cs1;
>  
>  	if (cs)
> -		val = ESDCTL_V4_ESDSCR_DLL_RST1;
> +		val |= ESDCTL_V4_ESDSCR_DLL_RST1;
>  	else
> -		val = ESDCTL_V4_ESDSCR_DLL_RST0;
> +		val |= ESDCTL_V4_ESDSCR_DLL_RST0;
>  
>  	writel(val, base + ESDCTL_V4_ESDSCR);
>  
> -- 
> 2.16.1
> 
> 
> _______________________________________________
> 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:[~2018-02-22  8:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-21 15:39 [PATCH] ARM/i.MX53: fix SDRAM setup routines Juergen Borleis
2018-02-22  8:07 ` Sascha Hauer

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