RE: [PATCH] mmc: sdhci: make DDR50 tuning optionally

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Adrian Hunter [mailto:adrian.hunter@xxxxxxxxx]
> Sent: 2018年12月20日 22:01
> To: BOUGH CHEN <haibo.chen@xxxxxxx>; ulf.hansson@xxxxxxxxxx
> Cc: linux-mmc@xxxxxxxxxxxxxxx; dl-linux-imx <linux-imx@xxxxxxx>
> Subject: Re: [PATCH] mmc: sdhci: make DDR50 tuning optionally
> 
> On 20/12/18 1:38 PM, BOUGH CHEN wrote:
> > DDR50 tuning is optinally defined in sd 3.0 spec. For example, i.MX
> > uSDHC internally already uses a fixed optimized timing for DDR50,
> > normally does not require tuning for DDR50 mode.
> >
> > So this patch make DDR50 tuning optionally and platform can claim
> > SDHCI_DDR50_NEEDS_TUNING to support if it wants tuning.
> 
> It is optional to call sdhci_execute_tuning().  Consider
> xenon_execute_tuning() for example.
> 
Replace the sdhci_execute_tuning(), this seems to be reasonable, I will use this method and send a new patch.

Thanks!
Bough Chen

> >
> > Signed-off-by: Haibo Chen <haibo.chen@xxxxxxx>
> > ---
> >  drivers/mmc/host/sdhci.c | 6 +++++-
> >  drivers/mmc/host/sdhci.h | 1 +
> >  2 files changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index
> > 67e43ec..144418e 100644
> > --- a/drivers/mmc/host/sdhci.c
> > +++ b/drivers/mmc/host/sdhci.c
> > @@ -2429,9 +2429,13 @@ int sdhci_execute_tuning(struct mmc_host
> *mmc, u32 opcode)
> >  		break;
> >
> >  	case MMC_TIMING_UHS_SDR104:
> > -	case MMC_TIMING_UHS_DDR50:
> >  		break;
> >
> > +	case MMC_TIMING_UHS_DDR50:
> > +		if (host->flags & SDHCI_DDR50_NEEDS_TUNING)
> > +			break;
> > +		/* FALLTHROUGH */
> > +
> >  	case MMC_TIMING_UHS_SDR50:
> >  		if (host->flags & SDHCI_SDR50_NEEDS_TUNING)
> >  			break;
> > diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index
> > 6cc9a3c..58b363b 100644
> > --- a/drivers/mmc/host/sdhci.h
> > +++ b/drivers/mmc/host/sdhci.h
> > @@ -506,6 +506,7 @@ struct sdhci_host {
> >  #define SDHCI_REQ_USE_DMA	(1<<2)	/* Use DMA for this req. */
> >  #define SDHCI_DEVICE_DEAD	(1<<3)	/* Device unresponsive */
> >  #define SDHCI_SDR50_NEEDS_TUNING (1<<4)	/* SDR50 needs tuning
> */
> > +#define SDHCI_DDR50_NEEDS_TUNING (1<<5) /* DDR50 needs tuning */
> >  #define SDHCI_AUTO_CMD12	(1<<6)	/* Auto CMD12 support */
> >  #define SDHCI_AUTO_CMD23	(1<<7)	/* Auto CMD23 support */
> >  #define SDHCI_PV_ENABLED	(1<<8)	/* Preset value enabled */
> >





[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux