Skip to contentSkip to conversation

ARM/i.MX53: fix SDRAM setup routines

PATCH Applied Juergen Borleis 2 participants 2 messages Feb 21, 2018 – Feb 22, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM/i.MX53: fix SDRAM setup routines

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.

---
 arch/arm/mach-imx/esdctl-v4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-imx/esdctl-v4.c +2 -2
index 0652b492e..6de4a8d6e 100644
@@ -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);
 
Signature · 7 lines
2.16.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
maintainer Applied
#1 lore raw
Quoted 10 lines · Juergen Borleis

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.

---
 arch/arm/mach-imx/esdctl-v4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks

Sascha

Quoted 26 lines
arch/arm/mach-imx/esdctl-v4.c +2 -2
index 0652b492e..6de4a8d6e 100644
@@ -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);
 
Signature · 7 lines
2.16.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox