diff options
author | Nicolas Saenz Julienne <nsaenzjulienne@suse.de> | 2020-03-06 18:44:06 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2020-03-24 14:39:53 +0100 |
commit | 98160562e3bb7dc4c552a277b71f6692cc7c684f (patch) | |
tree | 10e8929f9a884cd8688a8148b6be798ef8280f1b | |
parent | mmc: sdhci: milbeaut: Use sdhci_set_power_and_voltage() (diff) | |
download | linux-98160562e3bb7dc4c552a277b71f6692cc7c684f.tar.xz linux-98160562e3bb7dc4c552a277b71f6692cc7c684f.zip |
mmc: sdhci: at91: Use sdhci_set_power_and_voltage()
The sdhci core provides a helper function with the same functionality as
this controller's set_power() callback. Use it instead.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20200306174413.20634-5-nsaenzjulienne@suse.de
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/host/sdhci-of-at91.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/mmc/host/sdhci-of-at91.c b/drivers/mmc/host/sdhci-of-at91.c index fcef5c0d0908..e36db6c6618e 100644 --- a/drivers/mmc/host/sdhci-of-at91.c +++ b/drivers/mmc/host/sdhci-of-at91.c @@ -101,22 +101,6 @@ static void sdhci_at91_set_clock(struct sdhci_host *host, unsigned int clock) sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL); } -/* - * In this specific implementation of the SDHCI controller, the power register - * needs to have a valid voltage set even when the power supply is managed by - * an external regulator. - */ -static void sdhci_at91_set_power(struct sdhci_host *host, unsigned char mode, - unsigned short vdd) -{ - if (!IS_ERR(host->mmc->supply.vmmc)) { - struct mmc_host *mmc = host->mmc; - - mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd); - } - sdhci_set_power_noreg(host, mode, vdd); -} - static void sdhci_at91_set_uhs_signaling(struct sdhci_host *host, unsigned int timing) { @@ -146,7 +130,7 @@ static const struct sdhci_ops sdhci_at91_sama5d2_ops = { .set_bus_width = sdhci_set_bus_width, .reset = sdhci_at91_reset, .set_uhs_signaling = sdhci_at91_set_uhs_signaling, - .set_power = sdhci_at91_set_power, + .set_power = sdhci_set_power_and_bus_voltage, }; static const struct sdhci_pltfm_data sdhci_sama5d2_pdata = { |