public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefan Christ <s.christ@phytec.de>
To: Haibo Chen <haibo.chen@nxp.com>
Cc: "adrian.hunter@intel.com" <adrian.hunter@intel.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"aisheng.dong@freescale.com" <aisheng.dong@freescale.com>,
	"festevam@gmail.com" <festevam@gmail.com>,
	Aisheng Dong <aisheng.dong@nxp.com>
Subject: Re: [PATCH] mmc: sdhci-esdhc-imx: implement reset quirks for i.MX6 DualLite/Solo
Date: Mon, 20 Jun 2016 09:56:31 +0200	[thread overview]
Message-ID: <20160620075631.GA2377@lws-christ> (raw)
In-Reply-To: <HE1PR0401MB1801712347A13DD827ED1880904E0@HE1PR0401MB1801.eurprd04.prod.outlook.com>

Hi Haibo,

On Mon, May 23, 2016 at 09:57:00AM +0000, Haibo Chen wrote:
> > -----Original Message-----
> > From: linux-mmc-owner@vger.kernel.org [mailto:linux-mmc-
> > owner@vger.kernel.org] On Behalf Of Stefan Christ
> > Sent: Thursday, May 12, 2016 7:53 PM
> > To: adrian.hunter@intel.com; linux-mmc@vger.kernel.org
> > Cc: aisheng.dong@freescale.com; festevam@gmail.com
> > Subject: [PATCH] mmc: sdhci-esdhc-imx: implement reset quirks for i.MX6
> > DualLite/Solo
> > 
> > The ROM Code of i.MX6 Quad/Dual uses the MMC interfaces differently than
> > the i.MX6 Solo/DualLite when it loads the bootloader from the interface:
> > 
> >                 Register DLL_CTRL(0x60)  Bit 25 FBCLK_SEL (0x48)
> >     Quad:       0x0                      0
> >     DualLite:   0x01000021               1
> > 
> > Since the linux kernel or bootloader driver doesn't reset all registers, the MMC
> > interface is in an inconsistent state, which leads to boot failures for some
> > eMMC devices on the i.MX6 DualLite SoC. The errors look like:
> > 
> >     mmcblk1: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card
> > status 0xb00
> >     mmcblk1: retrying using single block read
> >     mmcblk1: error -84 transferring data, sector 2, nr 6, cmd response 0x900, card
> > status 0x0
> >     blk_update_request: I/O error, dev mmcblk1, sector 2
> >     mmcblk1: error -84 transferring data, sector 3, nr 5, cmd response 0x900, card
> > status 0x0
> >     blk_update_request: I/O error, dev mmcblk1, sector 3
> > 
> > The register DLL_CTRL is already reset. Reset also the bit FBCLK_SEL.
> > 
> > Signed-off-by: Stefan Christ <s.christ@phytec.de>
> > ---
> > Hi,
> > 
> > this patch is a follow up to
> > 
> >     http://www.spinics.net/lists/linux-mmc/msg36331.html
> 
> Hi Stefan, 
> Aisheng also take this into consideration, please refer to
> 
>     http://www.spinics.net/lists/linux-mmc/msg36940.html
> 
> Seems this patch still not be in Ulf's branch. 
> 
> Regards,
> Haibo

Please correct me if I'm wrong, but I don't see any activity about this issue
on the mailing list. Is it possible to pick Aisheng's and my patch without
waiting for the whole series to be reworked?

Mit freundlichen Grüßen / Kind regards,
	Stefan Christ

> > 
> >     mmc: sdhci-esdhci-imx: disable DLL delay line settings explicitly
> > 
> >     Disable DLL delay line settings explicitly during driver initialization
> >     in case ROM/uBoot had set an invalid delay.
> >     e.g. MX6DL ROM has set the default delay line(DLLCTRL) to 0x1000021,
> >     the uSDHC clock timing will become marginal when works on DDR mode
> >     due to default delay and will possibly see CRC errors in case the board
> >     is not perfectly designed on the eMMC chip layout.
> > 
> >     Signed-off-by: Dong Aisheng <aisheng.dong@xxxxxxx>
> > 
> > It doesn't apply cleanly on Linus master branch, since the above patch is missing.
> > 
> > Mit freundlichen Grüßen / Kind regards,
> >         Stefan Christ
> > ---
> >  drivers/mmc/host/sdhci-esdhc-imx.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-
> > esdhc-imx.c
> > index 4490808..9101556 100644
> > --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> > +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> > @@ -1191,6 +1191,10 @@ static int sdhci_esdhc_imx_probe(struct
> > platform_device *pdev)
> > 
> >  		/* disable DLL_CTRL delay line settings */
> >  		writel(0x0, host->ioaddr + ESDHC_DLL_CTRL);
> > +
> > +		/* reset bit FBCLK_SEL for i.MX6 Solo/DualLite ROM code */
> > +		writel(readl(host->ioaddr + ESDHC_MIX_CTRL) & ~BIT(25),
> > +			host->ioaddr + ESDHC_MIX_CTRL);
> >  	}
> > 
> >  	if (imx_data->socdata->flags & ESDHC_FLAG_MAN_TUNING)
> > --
> > 1.9.1
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the
> > body of a message to majordomo@vger.kernel.org More majordomo info at
> > http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-06-20  8:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-12 11:52 [PATCH] mmc: sdhci-esdhc-imx: implement reset quirks for i.MX6 DualLite/Solo Stefan Christ
2016-05-23  9:57 ` Haibo Chen
2016-06-20  7:56   ` Stefan Christ [this message]
2016-06-20 10:16     ` Dong Aisheng

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=20160620075631.GA2377@lws-christ \
    --to=s.christ@phytec.de \
    --cc=adrian.hunter@intel.com \
    --cc=aisheng.dong@freescale.com \
    --cc=aisheng.dong@nxp.com \
    --cc=festevam@gmail.com \
    --cc=haibo.chen@nxp.com \
    --cc=linux-mmc@vger.kernel.org \
    /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