Patchwork [U-Boot] i.MX28: Shut down the LCD controller before reset

login
register
mail settings
Submitter Marek Vasut
Date April 17, 2012, 2:38 p.m.
Message ID <1334673527-27361-1-git-send-email-marex@denx.de>
Download mbox | patch
Permalink /patch/153193/
State Accepted
Commit 8d4c759f2c165c1a6a6e840867eb59d92bfe998f
Delegated to: Stefano Babic
Headers show

Comments

Marek Vasut - April 17, 2012, 2:38 p.m.
If the LCD controller is on before the CPU goes into reset, the traffic on LCDIF
data pins interferes with the BootROM's boot mode sampling. So shut the
controller down.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
---
 arch/arm/cpu/arm926ejs/mx28/mx28.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
Wolfgang Denk - April 18, 2012, 6:19 a.m.
Dear Marek Vasut,

In message <1334673527-27361-1-git-send-email-marex@denx.de> you wrote:
> If the LCD controller is on before the CPU goes into reset, the traffic on LCDIF
> data pins interferes with the BootROM's boot mode sampling. So shut the
> controller down.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Detlev Zundel <dzu@denx.de>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Fabio Estevam <festevam@gmail.com>
> ---
>  arch/arm/cpu/arm926ejs/mx28/mx28.c |    9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)

Tested-by: Wolfgang Denk <wd@denx.de>
Acked-by: Wolfgang Denk <wd@denx.de>


Best regards,

Wolfgang Denk

Patch

diff --git a/arch/arm/cpu/arm926ejs/mx28/mx28.c b/arch/arm/cpu/arm926ejs/mx28/mx28.c
index 01445cd..550207e 100644
--- a/arch/arm/cpu/arm926ejs/mx28/mx28.c
+++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c
@@ -50,9 +50,16 @@  void reset_cpu(ulong ignored) __attribute__((noreturn));
 
 void reset_cpu(ulong ignored)
 {
-
 	struct mx28_rtc_regs *rtc_regs =
 		(struct mx28_rtc_regs *)MXS_RTC_BASE;
+	struct mx28_lcdif_regs *lcdif_regs =
+		(struct mx28_lcdif_regs *)MXS_LCDIF_BASE;
+
+	/*
+	 * Shut down the LCD controller as it interferes with BootROM boot mode
+	 * pads sampling.
+	 */
+	writel(LCDIF_CTRL_RUN, &lcdif_regs->hw_lcdif_ctrl_clr);
 
 	/* Wait 1 uS before doing the actual watchdog reset */
 	writel(1, &rtc_regs->hw_rtc_watchdog);