Message ID | 1361623389-31095-1-git-send-email-marex@denx.de |
---|---|
State | Awaiting Upstream |
Delegated to: | Stefano Babic |
Headers | show |
On Sat, Feb 23, 2013 at 9:42 AM, Marek Vasut <marex@denx.de> wrote: > 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 . > > Signed-off-by: Marek Vasut <marex@denx.de> What the changes from v1? Last time I tested it, it broke mx23evk as it made it fail in mtest.
Dear Otavio Salvador, > On Sat, Feb 23, 2013 at 9:42 AM, Marek Vasut <marex@denx.de> wrote: > > 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 . > > > > Signed-off-by: Marek Vasut <marex@denx.de> > > What the changes from v1? Last time I tested it, it broke mx23evk as > it made it fail in mtest. The MX23EVK reboots unconditionally when I attempt mtest with or without this patch. And there's no previous version, this patch is V1. The stuff sent before shall be ignored. Best regards, Marek Vasut
On Sat, Feb 23, 2013 at 2:41 PM, Marek Vasut <marex@denx.de> wrote: > Dear Otavio Salvador, > >> On Sat, Feb 23, 2013 at 9:42 AM, Marek Vasut <marex@denx.de> wrote: >> > 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 . >> > >> > Signed-off-by: Marek Vasut <marex@denx.de> >> >> What the changes from v1? Last time I tested it, it broke mx23evk as >> it made it fail in mtest. > > The MX23EVK reboots unconditionally when I attempt mtest with or without this > patch. Here it works fine. > And there's no previous version, this patch is V1. The stuff sent before shall > be ignored. So does it change something from initial post?
Dear Otavio Salvador, > On Sat, Feb 23, 2013 at 9:42 AM, Marek Vasut <marex@denx.de> wrote: > > 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 . > > > > Signed-off-by: Marek Vasut <marex@denx.de> > > What the changes from v1? Last time I tested it, it broke mx23evk as > it made it fail in mtest. I just tested this on MX23EVK, I detect no problem. Best regards, Marek Vasut
Dear Otavio Salvador, > On Sat, Feb 23, 2013 at 2:41 PM, Marek Vasut <marex@denx.de> wrote: > > Dear Otavio Salvador, > > > >> On Sat, Feb 23, 2013 at 9:42 AM, Marek Vasut <marex@denx.de> wrote: > >> > 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 . > >> > > >> > Signed-off-by: Marek Vasut <marex@denx.de> > >> > >> What the changes from v1? Last time I tested it, it broke mx23evk as > >> it made it fail in mtest. > > > > The MX23EVK reboots unconditionally when I attempt mtest with or without > > this patch. > > Here it works fine. > > > And there's no previous version, this patch is V1. The stuff sent before > > shall be ignored. > > So does it change something from initial post? I do not know, that's why this is V1. Best regards, Marek Vasut
On 23/02/2013 13:42, Marek Vasut wrote: > 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 . > > Signed-off-by: Marek Vasut <marex@denx.de> > Cc: Fabio Estevam <fabio.estevam@freescale.com> > Cc: Otavio Salvador <otavio@ossystems.com.br> > Cc: Stefano Babic <sbabic@denx.de> > --- Applied (whole series) to u-boot-imx, thanks. Best regards, Stefano Babic
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c index f8392f6..4a0a5aa 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c @@ -27,6 +27,7 @@ #include <config.h> #include <asm/io.h> #include <asm/arch/imx-regs.h> +#include <asm/arch/sys_proto.h> #include <linux/compiler.h> #include "mxs_init.h" @@ -229,7 +230,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 +238,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((struct mxs_register_32 *)MXS_EMI_BASE); + mx23_mem_setup_vddmem(); /*
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 . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Otavio Salvador <otavio@ossystems.com.br> Cc: Stefano Babic <sbabic@denx.de> --- arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)