Skip to contentSkip to conversation

Revert "imx: mx7: implement reset_misc"

PATCH New Fabio Estevam 4 participants 5 messages Feb 22, 2017

Subsystems (3)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 Revert "imx: mx7: implement reset_misc"

From: Fabio Estevam <[email protected]>

Commit 9f8fa184fc1ac ("imx: mx7: implement reset_misc") says it needs to to power down lcdif to make 'reset' can pass stress test.

However I see 100% of reset failures with this commit applied, so better revert it for now.

This reverts commit 9f8fa184fc1acb6fe8e15e3bbbfcb916e6bc4cc1.

---
 arch/arm/cpu/armv7/mx7/soc.c | 8 --------
 1 file changed, 8 deletions(-)
arch/arm/cpu/armv7/mx7/soc.c +0 -8
index dead1d3..b1d0e21 100644
@@ -455,11 +455,3 @@ void s_init(void)
 
 	return;
 }
-
-void reset_misc(void)
-{
-#ifdef CONFIG_VIDEO_MXS
-	lcdif_power_down();
-#endif
-}
-
Signature · 1 line
2.7.4
author reviewer
#1 lore raw

PATCH 1/1 Revert "imx: mx7: implement reset_misc"

Hi Stefano and Peng,

Quoted 11 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Commit 9f8fa184fc1ac ("imx: mx7: implement reset_misc") says it needs to to power down lcdif to make 'reset' can pass stress test.

However I see 100% of reset failures with this commit applied, so better revert it for now.

This reverts commit 9f8fa184fc1acb6fe8e15e3bbbfcb916e6bc4cc1.

I realized that the reset failure always happen only when 'videomode' variable is not present:

=> setenv videomode
=> saveenv
=> reset

Then reset hangs.

If I do the check like this, then it does not hang:

drivers/video/mxsfb.c +5 -0
@@ -135,6 +135,11 @@ void lcdif_power_down(void)
 {
        struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)MXS_LCDIF_BASE;
        int timeout = 1000000;
+       char *penv;
+
+       penv = getenv("videomode");
+       if (!penv)
+               return;
 
        writel(panel.frameAdrs, &regs->hw_lcdif_cur_buf_reg);
        writel(panel.frameAdrs, &regs->hw_lcdif_next_buf_reg);

What do you think of such proposal instead of doing the revert?

#2 lore raw

PATCH 1/1 Revert "imx: mx7: implement reset_misc"

Hi Fabio,

Quoted 49 lines

-----Original Message-----
From: Fabio Estevam [mailto:festevam at gmail.com]
Sent: Wednesday, February 22, 2017 5:34 PM
To: Stefano Babic <[email protected]>
Cc: Tom Rini <[email protected]>; U-Boot-Denx <[email protected]>; Peng Fan <[email protected]>; Fabio Estevam <[email protected]>
Subject: Re: [PATCH] Revert "imx: mx7: implement reset_misc"

Hi Stefano and Peng,

Quoted 11 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Commit 9f8fa184fc1ac ("imx: mx7: implement reset_misc") says it needs to to power down lcdif to make 'reset' can pass stress test.

However I see 100% of reset failures with this commit applied, so better revert it for now.

This reverts commit 9f8fa184fc1acb6fe8e15e3bbbfcb916e6bc4cc1.

I realized that the reset failure always happen only when 'videomode' variable is not present:

=> setenv videomode
=> saveenv
=> reset

Then reset hangs.

If I do the check like this, then it does not hang:

drivers/video/mxsfb.c +5 -0
@@ -135,6 +135,11 @@ void lcdif_power_down(void)  {
        struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)MXS_LCDIF_BASE;
        int timeout = 1000000;
+       char *penv;
+
+       penv = getenv("videomode");
+       if (!penv)
+               return;
 
        writel(panel.frameAdrs, &regs->hw_lcdif_cur_buf_reg);
        writel(panel.frameAdrs, &regs->hw_lcdif_next_buf_reg);
 
Quoted 1 line

What do you think of such proposal instead of doing the revert?

If no videomode set, that means lcd will not be initialized. So there is no need to power down the lcdif, agree with your new approach. Because when lcdif is initialized, there is also a risk that system hang if lcdif is not powered down, so no revert.

Regards,
Peng.

#3 lore raw

PATCH 1/1 Revert "imx: mx7: implement reset_misc"

In reply to Fabio Estevam
Quoted 11 lines · Fabio Estevam

Hi Stefano and Peng,

Quoted 8 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Commit 9f8fa184fc1ac ("imx: mx7: implement reset_misc") says it needs to to power down lcdif to make 'reset' can pass stress test.

However I see 100% of reset failures with this commit applied, so better revert it for now.

Quoted 7 lines
Quoted 3 lines

This reverts commit 9f8fa184fc1acb6fe8e15e3bbbfcb916e6bc4cc1.

I realized that the reset failure always happen only when 'videomode' variable is not present:

Ouch ! Wrong access ?

Quoted 23 lines

=> setenv videomode
=> saveenv
=> reset

Then reset hangs.

If I do the check like this, then it does not hang:

drivers/video/mxsfb.c +5 -0
@@ -135,6 +135,11 @@ void lcdif_power_down(void)
 {
        struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)MXS_LCDIF_BASE;
        int timeout = 1000000;
+       char *penv;
+
+       penv = getenv("videomode");
+       if (!penv)
+               return;
 
        writel(panel.frameAdrs, &regs->hw_lcdif_cur_buf_reg);
        writel(panel.frameAdrs, &regs->hw_lcdif_next_buf_reg);
Quoted 2 lines

What do you think of such proposal instead of doing the revert?

Fully agree !

Best regards,
Stefano

Signature · 8 lines
Meet DENX at the Embedded World Trade Show
14 Mar - 16 Mar 2017, Nuremberg Trade Fair Centre, Hall 4, Booth 581
--
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#4 lore raw

PATCH 1/1 Revert "imx: mx7: implement reset_misc"

In reply to Fabio Estevam
Quoted 41 lines · Fabio Estevam

Hi Stefano and Peng,

Quoted 11 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Commit 9f8fa184fc1ac ("imx: mx7: implement reset_misc") says it needs to to power down lcdif to make 'reset' can pass stress test.

However I see 100% of reset failures with this commit applied, so better revert it for now.

This reverts commit 9f8fa184fc1acb6fe8e15e3bbbfcb916e6bc4cc1.

I realized that the reset failure always happen only when 'videomode' variable is not present:

=> setenv videomode
=> saveenv
=> reset

Then reset hangs.

If I do the check like this, then it does not hang:

drivers/video/mxsfb.c +5 -0
@@ -135,6 +135,11 @@ void lcdif_power_down(void)
 {
       struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)MXS_LCDIF_BASE;
       int timeout = 1000000;
+       char *penv;
+
+       penv = getenv("videomode");
+       if (!penv)
+               return;
 
       writel(panel.frameAdrs, &regs->hw_lcdif_cur_buf_reg);
       writel(panel.frameAdrs, &regs->hw_lcdif_next_buf_reg);
Quoted 1 line

What do you think of such proposal instead of doing the revert?

Sorry for repost, my outlook seems work abnormally.

No revert. When videomode is set, lcdif will be initialized, then when reset, need to power down lcdif to avoid reset failure.

If no videomode, lcdif will not be initialized, no need to powerdown.

Agree with your new approach.

Regards,
Peng.

Quoted 4 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot