Skip to contentSkip to conversation

mxs: Reset the EMI block on mx23

PATCH New Marek Vasut 2 participants 2 messages Jan 29, 2013

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

PATCH 1/1 mxs: Reset the EMI block on mx23

The real reason for memory instability was the fact that the EMI block was gated and not reset throughout the boards' operation. This patch resets the EMI block properly while also reverts the memory voltage bump. The memory stability issues were caused by the EMI not being reset properly and thus there is no longer need to run the memory at higher voltage than it ought to run at.

This partly reverts 8303ed128a55519f19c5f11087032d4bc4e0537a .

Cc Fabio Estevam <[email protected]>
Cc Otavio Salvador <[email protected]>
Cc Stefano Babic <[email protected]>
---
 arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

NOTE: Please apply _SEVERE_ testing!

arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c +9 -2
index f8392f6..20833f5 100644
@@ -229,7 +229,7 @@ static void mx23_mem_setup_vddmem(void)
 	struct mxs_power_regs *power_regs =
 		(struct mxs_power_regs *)MXS_POWER_BASE;
 
-	writel((0x12 << POWER_VDDMEMCTRL_TRG_OFFSET) |
+	writel((0x10 << POWER_VDDMEMCTRL_TRG_OFFSET) |
 		POWER_VDDMEMCTRL_ENABLE_ILIMIT |
 		POWER_VDDMEMCTRL_ENABLE_LINREG |
 		POWER_VDDMEMCTRL_PULLDOWN_ACTIVE,
@@ -237,13 +237,20 @@ static void mx23_mem_setup_vddmem(void)
 
 	early_delay(10000);
 
-	writel((0x12 << POWER_VDDMEMCTRL_TRG_OFFSET) |
+	writel((0x10 << POWER_VDDMEMCTRL_TRG_OFFSET) |
 		POWER_VDDMEMCTRL_ENABLE_LINREG,
 		&power_regs->hw_power_vddmemctrl);
 }
 
 static void mx23_mem_init(void)
 {
+	/*
+	 * Reset/ungate the EMI block. This is essential, otherwise the system
+	 * suffers from memory instability. This thing is mx23 specific and is
+	 * no longer present on mx28.
+	 */
+	mxs_reset_block(MXS_EMI_BASE);
+
 	mx23_mem_setup_vddmem();
 
 	/*
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 mxs: Reset the EMI block on mx23

Quoted 13 lines · Marek Vasut

The real reason for memory instability was the fact that the EMI block was gated and not reset throughout the boards' operation. This patch resets the EMI block properly while also reverts the memory voltage bump. The memory stability issues were caused by the EMI not being reset properly and thus there is no longer need to run the memory at higher voltage than it ought to run at.

This partly reverts 8303ed128a55519f19c5f11087032d4bc4e0537a .

Cc Fabio Estevam <[email protected]>
Cc Otavio Salvador <[email protected]>
Cc Stefano Babic <[email protected]>
Quoted 6 lines
---
 arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

NOTE: Please apply _SEVERE_ testing!

I did a test with and without the patch. *Without* this patch I see an error in memony but it takes some time to it to error out. With the patch, the error is mostly instantaneous:

=> mtest
Pattern FFFFFFDD Writing... Reading...
Mem error @ 0x40087F6C: found BFFDE002, expected FFFDE002

So it seems to make it worse; but I am not sure if something else is missing too.

--
Otavio Salvador O.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br