Re: [PATCH] mmc: sdhci: Use Auto CMD Auto Select only when v4_mode is true

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

 



On Thu, 15 Oct 2020 10:12:07 +0800 Jisheng Zhang wrote:


> 
> On Wed, 14 Oct 2020 22:44:50 +0300 Adrian Hunter wrote:
> 
> >
> >
> > + Chunyan
> >
> > On 14/10/20 1:32 pm, Jisheng Zhang wrote:  
> > > Auto CMD Auto Select can only be used when v4_mode is enabled.  
> >
> > The SDHCI spec. doesn't seem to say that.  AFAICS it refers only to v4.1 not
> > v4 mode.  
> 
> 4.10 defines the "Auto CMD Auto Select" mode, v4 mode bit in SDHCI_HOST_CONTROL2
> selects V3 compatible or V4 compatible mode, I think the v4 here includes
> v4.0, v4.1 and v4.2, so if we want to use the mode we have to ensure v4_mode

So if we want to use the "Auto CMD Auto Select" mode, we have to ensure v4 mode
is enabled.

> is enabled.
> 
> thanks
> 
> >  
> > >
> > > Fixes: 427b6514d095 ("mmc: sdhci: Add Auto CMD Auto Select support")
> > > Signed-off-by: Jisheng Zhang <Jisheng.Zhang@xxxxxxxxxxxxx>
> > > ---
> > >  drivers/mmc/host/sdhci.c | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> > > index 592a55a34b58..5e0ec5df4074 100644
> > > --- a/drivers/mmc/host/sdhci.c
> > > +++ b/drivers/mmc/host/sdhci.c
> > > @@ -1386,7 +1386,8 @@ static inline void sdhci_auto_cmd_select(struct sdhci_host *host,
> > >        * Select' is recommended rather than use of 'Auto CMD12
> > >        * Enable' or 'Auto CMD23 Enable'.
> > >        */
> > > -     if (host->version >= SDHCI_SPEC_410 && (use_cmd12 || use_cmd23)) {
> > > +     if (host->version >= SDHCI_SPEC_410 && host->v4_mode &&
> > > +         (use_cmd12 || use_cmd23)) {
> > >               *mode |= SDHCI_TRNS_AUTO_SEL;
> > >
> > >               ctrl2 = sdhci_readw(host, SDHCI_HOST_CONTROL2);
> > >  
> >  
> 




[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