From: Weijie Gao <weijie.gao@mediatek.com>
To: u-boot@lists.denx.de
Subject: [PATCH] mips: mt7628: fix ddr_type for MT7688KN
Date: Fri, 5 Mar 2021 11:30:02 +0800 [thread overview]
Message-ID: <1614915002.28105.99.camel@mcddlt001> (raw)
In-Reply-To: <da08dd88-56cb-f762-780b-226d6135c4b3@denx.de>
On Fri, 2021-02-26 at 12:23 +0100, Stefan Roese wrote:
> Hi Weijie,
>
> On 23.02.21 08:12, Weijie Gao wrote:
> > The MT7688KN is a multi-chip package with 8MiB DDR1 KGD. So the DDR type
> > from bootstrap register must be ignored, and always be assumed as DDR1.
> >
> > This patch fixes an issue that mt7628_ddr_pad_ldo_config() may be passed
> > with a wrong ddr_type in MT7688KN.
> >
> > Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
> > ---
> > arch/mips/mach-mtmips/mt7628/ddr.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/arch/mips/mach-mtmips/mt7628/ddr.c b/arch/mips/mach-mtmips/mt7628/ddr.c
> > index b091f2ecff..4e72459906 100644
> > --- a/arch/mips/mach-mtmips/mt7628/ddr.c
> > +++ b/arch/mips/mach-mtmips/mt7628/ddr.c
> > @@ -140,6 +140,9 @@ void mt7628_ddr_init(void)
> > lspd = readl(sysc + SYSCTL_CLKCFG0_REG) &
> > (CPU_PLL_FROM_BBP | CPU_PLL_FROM_XTAL);
> >
> > + if (pkg_type == PKG_ID_KN)
> > + ddr_type = DRAM_DDR1;
> > +
> > mt7628_memc_reset(1);
> > __udelay(200);
> >
> > @@ -152,9 +155,6 @@ void mt7628_ddr_init(void)
> > param.memsize = 0;
> > param.bus_width = 0;
> >
> > - if (pkg_type == PKG_ID_KN)
> > - ddr_type = DRAM_DDR1;
> > -
> > if (ddr_type == DRAM_DDR1) {
> > if (lspd)
> > param.cfgs = ddr1_cfgs_160mhz;
> >
>
> Reviewed-by: Stefan Roese <sr@denx.de>
>
> Just out of interest. How did you spot this issue?
I was told by another developer.
>
> Thanks,
> Stefan
next prev parent reply other threads:[~2021-03-05 3:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-23 7:12 [PATCH] mips: mt7628: fix ddr_type for MT7688KN Weijie Gao
2021-02-26 11:23 ` Stefan Roese
2021-03-05 3:30 ` Weijie Gao [this message]
2021-04-22 0:46 ` Daniel Schwierzeck
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=1614915002.28105.99.camel@mcddlt001 \
--to=weijie.gao@mediatek.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