public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Peng Fan <van.freenix@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Revert "imx: mx7: implement reset_misc"
Date: Wed, 22 Feb 2017 17:43:45 +0800	[thread overview]
Message-ID: <20170222094342.GA9692@linux-7smt.suse> (raw)
In-Reply-To: <CAOMZO5CsFOLGejG=J02EA85gngn1pS2+pMSNa0=RpPJeKv0qdw@mail.gmail.com>

On Wed, Feb 22, 2017 at 06:33:32AM -0300, Fabio Estevam wrote:
>Hi Stefano and Peng,
>
>On Tue, Feb 21, 2017 at 11:21 PM, Fabio Estevam <festevam@gmail.com> wrote:
>> From: Fabio Estevam <fabio.estevam@nxp.com>
>>
>> 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.
>>
>> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
>
>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:
>
>--- a/drivers/video/mxsfb.c
>+++ b/drivers/video/mxsfb.c
>@@ -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?

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.

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

      parent reply	other threads:[~2017-02-22  9:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-22  2:21 [U-Boot] [PATCH] Revert "imx: mx7: implement reset_misc" Fabio Estevam
2017-02-22  9:33 ` Fabio Estevam
2017-02-22  9:38   ` Peng Fan
2017-02-22  9:39   ` Stefano Babic
2017-02-22  9:43   ` Peng Fan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170222094342.GA9692@linux-7smt.suse \
    --to=van.freenix@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox