RE: [v5, 2/5] mmc: sdhci-of-esdhc: add support for signal voltage switch

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

 



Hi Uffe,


> -----Original Message-----
> From: Ulf Hansson [mailto:ulf.hansson@xxxxxxxxxx]
> Sent: Thursday, April 20, 2017 10:06 PM
> To: Y.B. Lu
> Cc: linux-mmc@xxxxxxxxxxxxxxx; Adrian Hunter; Xiaobo Xie
> Subject: Re: [v5, 2/5] mmc: sdhci-of-esdhc: add support for signal
> voltage switch
> 
> [...]
> 
> > +       switch (ios->signal_voltage) {
> > +       case MMC_SIGNAL_VOLTAGE_330:
> > +               val &= ~ESDHC_VOLT_SEL;
> > +               sdhci_writel(host, val, ESDHC_PROCTL);
> > +               return 0;
> > +       case MMC_SIGNAL_VOLTAGE_180:
> > +               scfg_node = of_find_matching_node(NULL,
> scfg_device_ids);
> > +               if (scfg_node)
> > +                       scfg_base = of_iomap(scfg_node, 0);
> 
> Why don't you do this at probe time instead of every time you do the
> voltage switch?
> 
> Never mind at this point, I have queued this up for 4.12, however feel
> free to send a new patch on top.

[Lu Yangbo-B47093] Thank you very much for point out this.
I will work on another patch to fix this :)

- Yangbo Lu

> 
> > +               if (scfg_base) {
> > +                       sdhciovselcr = SDHCIOVSELCR_TGLEN |
> > +                                      SDHCIOVSELCR_VSELVAL;
> > +                       iowrite32be(sdhciovselcr,
> > +                               scfg_base + SCFG_SDHCIOVSELCR);
> > +
> > +                       val |= ESDHC_VOLT_SEL;
> > +                       sdhci_writel(host, val, ESDHC_PROCTL);
> > +                       mdelay(5);
> > +
> > +                       sdhciovselcr = SDHCIOVSELCR_TGLEN |
> > +                                      SDHCIOVSELCR_SDHC_VS;
> > +                       iowrite32be(sdhciovselcr,
> > +                               scfg_base + SCFG_SDHCIOVSELCR);
> > +                       iounmap(scfg_base);
> > +               } else {
> > +                       val |= ESDHC_VOLT_SEL;
> > +                       sdhci_writel(host, val, ESDHC_PROCTL);
> > +               }
> > +               return 0;
> > +       default:
> > +               return 0;
> > +       }
> > +}
> 
> [...]
> 
> Kind regards
> Uffe
��.n��������+%������w��{.n�����{��i��)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥




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

  Powered by Linux