From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Ford Date: Tue, 29 Jan 2019 07:40:26 -0600 Subject: [U-Boot] [PATCH v2 05/22] mmc: fsl_esdhc: Fix DM_REGULATOR ifdefs for SPL builds In-Reply-To: <1548761421-8267-6-git-send-email-abel.vesa@nxp.com> References: <1548761421-8267-1-git-send-email-abel.vesa@nxp.com> <1548761421-8267-6-git-send-email-abel.vesa@nxp.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Jan 29, 2019 at 5:34 AM Abel Vesa wrote: > > Since the fsl_esdhc will also be used by SPL, make the > preprocessor switches more generic to allow any kind of build. > I have a similar patch pending wtih both DM_GPIO and DM_REGULATOR conversions. https://patchwork.ozlabs.org/patch/1023230/ adam > Signed-off-by: Abel Vesa > --- > drivers/mmc/fsl_esdhc.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c > index b8171ba..47f2a8f 100644 > --- a/drivers/mmc/fsl_esdhc.c > +++ b/drivers/mmc/fsl_esdhc.c > @@ -804,7 +804,7 @@ static int esdhc_set_voltage(struct mmc *mmc) > case MMC_SIGNAL_VOLTAGE_330: > if (priv->vs18_enable) > return -EIO; > -#ifdef CONFIG_DM_REGULATOR > +#if CONFIG_IS_ENABLED(DM_REGULATOR) > if (!IS_ERR_OR_NULL(priv->vqmmc_dev)) { > ret = regulator_set_value(priv->vqmmc_dev, 3300000); > if (ret) { > @@ -823,7 +823,7 @@ static int esdhc_set_voltage(struct mmc *mmc) > > return -EAGAIN; > case MMC_SIGNAL_VOLTAGE_180: > -#ifdef CONFIG_DM_REGULATOR > +#if CONFIG_IS_ENABLED(DM_REGULATOR) > if (!IS_ERR_OR_NULL(priv->vqmmc_dev)) { > ret = regulator_set_value(priv->vqmmc_dev, 1800000); > if (ret) { > @@ -1442,7 +1442,7 @@ static int fsl_esdhc_probe(struct udevice *dev) > int node = dev_of_offset(dev); > struct esdhc_soc_data *data = > (struct esdhc_soc_data *)dev_get_driver_data(dev); > -#ifdef CONFIG_DM_REGULATOR > +#if CONFIG_IS_ENABLED(DM_REGULATOR) > struct udevice *vqmmc_dev; > #endif > fdt_addr_t addr; > @@ -1500,7 +1500,7 @@ static int fsl_esdhc_probe(struct udevice *dev) > > priv->vs18_enable = 0; > > -#ifdef CONFIG_DM_REGULATOR > +#if CONFIG_IS_ENABLED(DM_REGULATOR) > /* > * If emmc I/O has a fixed voltage at 1.8V, this must be provided, > * otherwise, emmc will work abnormally. > -- > 2.7.4 > > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > https://lists.denx.de/listinfo/u-boot