From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Stuebner Date: Tue, 02 Apr 2019 10:25:27 +0200 Subject: [U-Boot] [PATCH 4/4] dw_mmc: turn on the IO supply In-Reply-To: References: <20190322191436.6268-1-urjaman@gmail.com> <3303930.9oTdIFOcIx@diego> Message-ID: <1691278.pilLj144Nr@phil> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de Am Sonntag, 31. März 2019, 21:45:15 CEST schrieb Urja Rannikko: > Hi, > > On Fri, Mar 29, 2019 at 2:09 PM Heiko Stübner wrote: > > > +#ifdef CONFIG_DM_REGULATOR > > > > this should be > > #if CONFIG_IS_ENABLED(DM_REGULATOR) > > Ok, just FYI that fragment was based on the one in tmio-common.c, > so maybe that should also be fixed(?). yep, looks like it. While it doesn't cause compile errors right now, it might after all create runtime errors otherwise. Heiko > > > > because otherwise an SPL-build using the mmc driver may fail with > > > > drivers/mmc/dw_mmc.c: In function ‘dwmci_set_ios’: > > drivers/mmc/dw_mmc.c:475:9: error: ‘struct mmc’ has no member named ‘vqmmc_supply’ > > if (mmc->vqmmc_supply) { > > ^~ > > drivers/mmc/dw_mmc.c:477:27: error: ‘struct mmc’ has no member named ‘vqmmc_supply’ > > regulator_set_value(mmc->vqmmc_supply, 1800000); > > ^~ > > drivers/mmc/dw_mmc.c:479:27: error: ‘struct mmc’ has no member named ‘vqmmc_supply’ > > regulator_set_value(mmc->vqmmc_supply, 3300000); > > ^~ > > drivers/mmc/dw_mmc.c:481:44: error: ‘struct mmc’ has no member named ‘vqmmc_supply’ > > ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, true); > > > > > > > + 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; > > > } > > > > >