All of lore.kernel.org
 help / color / mirror / Atom feed
From: Priyanka Jain <priyanka.jain@nxp.com>
To: u-boot@lists.denx.de
Subject: [PATCH] Revert "mpc85xx: ddr: Always start DDR RAM in Self Refresh mode"
Date: Sun, 12 Apr 2020 04:22:02 +0000	[thread overview]
Message-ID: <VE1PR04MB64940FD53AB2FE08CD67FC5AE6DC0@VE1PR04MB6494.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <6719c2bc102baa02c1c51b7eb42ba6ee832c3732.camel@infinera.com>

>-----Original Message-----
>From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
>Sent: Friday, April 10, 2020 5:21 PM
>To: Priyanka Jain <priyanka.jain@nxp.com>; Biwen Li (OSS)
><biwen.li@oss.nxp.com>
>Cc: u-boot at lists.denx.de; Biwen Li <biwen.li@nxp.com>; Jiafei Pan
><jiafei.pan@nxp.com>
>Subject: Re: [PATCH] Revert "mpc85xx: ddr: Always start DDR RAM in Self
>Refresh mode"
>
>On Fri, 2020-04-10 at 11:40 +0000, Priyanka Jain wrote:
>>
>> > -----Original Message-----
>> > From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
>> > Sent: Thursday, April 9, 2020 6:24 PM
>> > To: Priyanka Jain <priyanka.jain@nxp.com>; Biwen Li (OSS)
>> > <biwen.li@oss.nxp.com>
>> > Cc: u-boot at lists.denx.de; Biwen Li <biwen.li@nxp.com>; Jiafei Pan
>> > <jiafei.pan@nxp.com>
>> > Subject: Re: [PATCH] Revert "mpc85xx: ddr: Always start DDR RAM in
>> > Self Refresh mode"
>> >
>> > On Thu, 2020-04-09 at 20:44 +0800, Biwen Li wrote:
>> >
>> > This revert will bring back another bug, can you try finding out why
>> > it does work?
>> > May there are some minor tweaks needed ?
>> >
>> >       Jocke
>> The patch has impacted boot to prompt on many powerpc boards.
>> I agree with you that we also need to have solution to the original problem
>reported by you.
>> We are working on fixing of DDR errata workaround implementation issue
>that you reported.
>
>Is anyone working on the eSPI driver as well? I recall someone at NXP
>volunteered but cannot recall who.
>
Yes, "Xiaowei Bao" is working on that.
The older version is in-review on maillist. He is working on rebasing to top of tree
Priyanka
>>
>> But I need this workaround patch to be reverted now as a quick fix for
>v2020.04 release which is only few days away.
>
>I see
>
> Jocke
>
>>
>> Thanks
>> Priyanka
>> > > From: Biwen Li <biwen.li@nxp.com>
>> > >
>> > > This reverts commit 2a5d5d27edfbdb0e02a7fcf05569f92c02ae44ee.
>> > > After applied this patch, failed to boot to uboot(hang in ddr
>> > > init) on P3041DS, P4080DS and so on.
>> > > ---
>> > >  drivers/ddr/fsl/mpc85xx_ddr_gen3.c | 13 +++++++------
>> > >  1 file changed, 7 insertions(+), 6 deletions(-)
>> > >
>> > > diff --git a/drivers/ddr/fsl/mpc85xx_ddr_gen3.c
>> > > b/drivers/ddr/fsl/mpc85xx_ddr_gen3.c
>> > > index 952b296dd8..a9b085db8c 100644
>> > > --- a/drivers/ddr/fsl/mpc85xx_ddr_gen3.c
>> > > +++ b/drivers/ddr/fsl/mpc85xx_ddr_gen3.c
>> > > @@ -370,8 +370,6 @@ step2:
>> > >         debug("Setting DEBUG_3[21] to 0x%08x\n",
>> > > in_be32(&ddr->debug[2]));
>> > >
>> > >  #endif /* part 1 of the workaound */
>> > > -       /* Always start in self-refresh, clear after MEM_EN */
>> > > -       setbits_be32(&ddr->sdram_cfg_2, SDRAM_CFG2_FRC_SR);
>> > >
>> > >         /*
>> > >          * 500 painful micro-seconds must elapse between @@ -384,6
>> > > +382,8 @@ step2:
>> > >
>> > >  #ifdef CONFIG_DEEP_SLEEP
>> > >         if (is_warm_boot()) {
>> > > +               /* enter self-refresh */
>> > > +               setbits_be32(&ddr->sdram_cfg_2,
>> > > + SDRAM_CFG2_FRC_SR);
>> > >                 /* do board specific memory setup */
>> > >                 board_mem_sleep_setup();
>> > >                 temp_sdram_cfg = (in_be32(&ddr->sdram_cfg) |
>> > > SDRAM_CFG_BI); @@ -395,10 +395,6 @@ step2:
>> > >         out_be32(&ddr->sdram_cfg, temp_sdram_cfg |
>> > SDRAM_CFG_MEM_EN);
>> > >         asm volatile("sync;isync");
>> > >
>> > > -       /* Exit self-refresh after DDR conf as some ddr memories can fail. */
>> > > -       clrbits_be32(&ddr->sdram_cfg_2, SDRAM_CFG2_FRC_SR);
>> > > -       asm volatile("sync;isync");
>> > > -
>> > >         total_gb_size_per_controller = 0;
>> > >         for (i = 0; i < CONFIG_CHIP_SELECTS_PER_CTRL; i++) {
>> > >                 if (!(regs->cs[i].config & 0x80000000)) @@ -548,4
>> > > +544,9 @@ step2:
>> > >                 clrbits_be32(&ddr->sdram_cfg, 0x2);
>> > >         }
>> > >  #endif /* CONFIG_SYS_FSL_ERRATUM_DDR111_DDR134 */
>> > > +#ifdef CONFIG_DEEP_SLEEP
>> > > +       if (is_warm_boot())
>> > > +               /* exit self-refresh */
>> > > +               clrbits_be32(&ddr->sdram_cfg_2,
>> > > +SDRAM_CFG2_FRC_SR); #endif
>> > >  }
>> > > --
>> > > 2.17.1
>> > >

  reply	other threads:[~2020-04-12  4:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09 12:44 [PATCH] Revert "mpc85xx: ddr: Always start DDR RAM in Self Refresh mode" Biwen Li
2020-04-09 12:53 ` Joakim Tjernlund
2020-04-10 11:40   ` Priyanka Jain
2020-04-10 11:50     ` Joakim Tjernlund
2020-04-12  4:22       ` Priyanka Jain [this message]
2020-05-27 19:11         ` eSPI was: " Joakim Tjernlund
2020-05-27 20:51           ` Jagan Teki

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=VE1PR04MB64940FD53AB2FE08CD67FC5AE6DC0@VE1PR04MB6494.eurprd04.prod.outlook.com \
    --to=priyanka.jain@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.