Message ID | 20190401174422.10834-1-urjaman@gmail.com |
---|---|
State | Deferred |
Delegated to: | Philipp Tomsich |
Headers | show |
Series | [U-Boot,v2] dw_mmc: turn on the IO supply | expand |
Hi, On Mon, Apr 1, 2019 at 5:44 PM Urja Rannikko <urjaman@gmail.com> wrote: > > Fixes the microSD slot on the ASUS C201. > > Signed-off-by: Urja Rannikko <urjaman@gmail.com> > --- > v2: use #if CONFIG_IS_ENABLED(DM_REGULATOR) Ping? Anything I should do wrt this?
Hiya, On Thu, Apr 11, 2019 at 8:07 PM Urja Rannikko <urjaman@gmail.com> wrote: > > Hi, > > On Mon, Apr 1, 2019 at 5:44 PM Urja Rannikko <urjaman@gmail.com> wrote: > > > > Fixes the microSD slot on the ASUS C201. > > > > Signed-off-by: Urja Rannikko <urjaman@gmail.com> > > --- > > v2: use #if CONFIG_IS_ENABLED(DM_REGULATOR) > > Ping? Anything I should do wrt this? Ping number two. I think i'll resend this the next time so that the actual patch isnt lost in the depths of mailboxes...
Am Montag, 1. April 2019, 19:44:22 CEST schrieb Urja Rannikko: > Fixes the microSD slot on the ASUS C201. > > Signed-off-by: Urja Rannikko <urjaman@gmail.com> > --- > v2: use #if CONFIG_IS_ENABLED(DM_REGULATOR) > - > drivers/mmc/dw_mmc.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c > index 93a836eac3..b04c1f9f41 100644 > --- a/drivers/mmc/dw_mmc.c > +++ b/drivers/mmc/dw_mmc.c > @@ -13,6 +13,7 @@ > #include <mmc.h> > #include <dwmmc.h> > #include <wait_bit.h> > +#include <power/regulator.h> > > #define PAGE_SIZE 4096 > > @@ -440,6 +441,7 @@ static int dwmci_set_ios(struct mmc *mmc) > #endif > struct dwmci_host *host = (struct dwmci_host *)mmc->priv; > u32 ctype, regs; > + int ret; This produces a new warning about an unused variable in the !DM_REGULATOR case. I guess either move the "ret" below or add a " __maybe_unused" if that is possible for variables? > > debug("Buswidth = %d, clock: %d\n", mmc->bus_width, mmc->clock); > > @@ -469,6 +471,19 @@ static int dwmci_set_ios(struct mmc *mmc) > if (host->clksel) > host->clksel(host); > > +#if CONFIG_IS_ENABLED(DM_REGULATOR) > + if (mmc->vqmmc_supply) { > + if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180) > + regulator_set_value(mmc->vqmmc_supply, 1800000); > + else > + regulator_set_value(mmc->vqmmc_supply, 3300000); > + > + ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, true); > + if (ret) > + return ret; > + } > +#endif > + > return 0; > } > >
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 93a836eac3..b04c1f9f41 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -13,6 +13,7 @@ #include <mmc.h> #include <dwmmc.h> #include <wait_bit.h> +#include <power/regulator.h> #define PAGE_SIZE 4096 @@ -440,6 +441,7 @@ static int dwmci_set_ios(struct mmc *mmc) #endif struct dwmci_host *host = (struct dwmci_host *)mmc->priv; u32 ctype, regs; + int ret; debug("Buswidth = %d, clock: %d\n", mmc->bus_width, mmc->clock); @@ -469,6 +471,19 @@ static int dwmci_set_ios(struct mmc *mmc) if (host->clksel) host->clksel(host); +#if CONFIG_IS_ENABLED(DM_REGULATOR) + if (mmc->vqmmc_supply) { + if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180) + regulator_set_value(mmc->vqmmc_supply, 1800000); + else + regulator_set_value(mmc->vqmmc_supply, 3300000); + + ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, true); + if (ret) + return ret; + } +#endif + return 0; }
Fixes the microSD slot on the ASUS C201. Signed-off-by: Urja Rannikko <urjaman@gmail.com> --- v2: use #if CONFIG_IS_ENABLED(DM_REGULATOR) - drivers/mmc/dw_mmc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)