diff options
author | Simon Glass <sjg@chromium.org> | 2014-10-20 19:48:39 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-10-22 10:36:33 -0600 |
commit | 7f1961018cb494c029fcbb446e6562064735ec5e (patch) | |
tree | 10089a45751339df4ed17fd12ed1838ed60c0ca5 /drivers | |
parent | 3a233dbfe9308943122cc2473064bb7e876577f0 (diff) | |
download | u-boot-imx-7f1961018cb494c029fcbb446e6562064735ec5e.zip u-boot-imx-7f1961018cb494c029fcbb446e6562064735ec5e.tar.gz u-boot-imx-7f1961018cb494c029fcbb446e6562064735ec5e.tar.bz2 |
dm: exynos: Make sure that GPIOs are requested
With driver model GPIOs must be requested before use. Make sure this is
done correctly.
(Note that the soft SPI part of universal is omitted, since this driver
is about to be replaced with a driver-model-aware version)
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/s5p_sdhci.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c index 637dd97..0dea45d 100644 --- a/drivers/mmc/s5p_sdhci.c +++ b/drivers/mmc/s5p_sdhci.c @@ -102,6 +102,7 @@ struct sdhci_host sdhci_host[SDHCI_MAX_HOSTS]; static int do_sdhci_init(struct sdhci_host *host) { + char str[20]; int dev_id, flag; int err = 0; @@ -109,6 +110,8 @@ static int do_sdhci_init(struct sdhci_host *host) dev_id = host->index + PERIPH_ID_SDMMC0; if (fdt_gpio_isvalid(&host->pwr_gpio)) { + sprintf(str, "sdhci%d_power", host->index & 0xf); + gpio_request(host->pwr_gpio.gpio, str); gpio_direction_output(host->pwr_gpio.gpio, 1); err = exynos_pinmux_config(dev_id, flag); if (err) { @@ -118,7 +121,9 @@ static int do_sdhci_init(struct sdhci_host *host) } if (fdt_gpio_isvalid(&host->cd_gpio)) { - gpio_direction_output(host->cd_gpio.gpio, 0xf); + sprintf(str, "sdhci%d_cd", host->index & 0xf); + gpio_request(host->cd_gpio.gpio, str); + gpio_direction_output(host->cd_gpio.gpio, 1); if (gpio_get_value(host->cd_gpio.gpio)) return -ENODEV; |