diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2013-09-12 09:36:34 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-10-30 20:26:26 -0400 |
commit | 0f791fdad82a02af013e4fc8c385dc690080c366 (patch) | |
tree | 265a07101e0165b05fae01cb9236f142578d47b1 | |
parent | 4a065193c46a16f1ddf20622c7011c8f327e0478 (diff) |
mmc: core: Let mmc_set_signal_voltage take ocr as parameter
This is yet another step of restructure code to be able to fixup the
setup of the negotiated ocr mask.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r-- | drivers/mmc/core/core.c | 4 | ||||
-rw-r--r-- | drivers/mmc/core/core.h | 2 | ||||
-rw-r--r-- | drivers/mmc/core/sd.c | 3 | ||||
-rw-r--r-- | drivers/mmc/core/sdio.c | 3 |
4 files changed, 7 insertions, 5 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index b66e7ab2ad43..5909ba46b8f2 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c | |||
@@ -1397,7 +1397,7 @@ int __mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage) | |||
1397 | 1397 | ||
1398 | } | 1398 | } |
1399 | 1399 | ||
1400 | int mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage) | 1400 | int mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage, u32 ocr) |
1401 | { | 1401 | { |
1402 | struct mmc_command cmd = {0}; | 1402 | struct mmc_command cmd = {0}; |
1403 | int err = 0; | 1403 | int err = 0; |
@@ -1479,7 +1479,7 @@ power_cycle: | |||
1479 | if (err) { | 1479 | if (err) { |
1480 | pr_debug("%s: Signal voltage switch failed, " | 1480 | pr_debug("%s: Signal voltage switch failed, " |
1481 | "power cycling card\n", mmc_hostname(host)); | 1481 | "power cycling card\n", mmc_hostname(host)); |
1482 | mmc_power_cycle(host, host->ocr); | 1482 | mmc_power_cycle(host, ocr); |
1483 | } | 1483 | } |
1484 | 1484 | ||
1485 | mmc_host_clk_release(host); | 1485 | mmc_host_clk_release(host); |
diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h index 502769a71821..443a584660f0 100644 --- a/drivers/mmc/core/core.h +++ b/drivers/mmc/core/core.h | |||
@@ -42,7 +42,7 @@ void mmc_set_ungated(struct mmc_host *host); | |||
42 | void mmc_set_bus_mode(struct mmc_host *host, unsigned int mode); | 42 | void mmc_set_bus_mode(struct mmc_host *host, unsigned int mode); |
43 | void mmc_set_bus_width(struct mmc_host *host, unsigned int width); | 43 | void mmc_set_bus_width(struct mmc_host *host, unsigned int width); |
44 | u32 mmc_select_voltage(struct mmc_host *host, u32 ocr); | 44 | u32 mmc_select_voltage(struct mmc_host *host, u32 ocr); |
45 | int mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage); | 45 | int mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage, u32 ocr); |
46 | int __mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage); | 46 | int __mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage); |
47 | void mmc_set_timing(struct mmc_host *host, unsigned int timing); | 47 | void mmc_set_timing(struct mmc_host *host, unsigned int timing); |
48 | void mmc_set_driver_type(struct mmc_host *host, unsigned int drv_type); | 48 | void mmc_set_driver_type(struct mmc_host *host, unsigned int drv_type); |
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index af55e9e0819c..5818887fffb3 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c | |||
@@ -773,7 +773,8 @@ try_again: | |||
773 | */ | 773 | */ |
774 | if (!mmc_host_is_spi(host) && rocr && | 774 | if (!mmc_host_is_spi(host) && rocr && |
775 | ((*rocr & 0x41000000) == 0x41000000)) { | 775 | ((*rocr & 0x41000000) == 0x41000000)) { |
776 | err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180); | 776 | err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180, |
777 | host->ocr); | ||
777 | if (err == -EAGAIN) { | 778 | if (err == -EAGAIN) { |
778 | retries--; | 779 | retries--; |
779 | goto try_again; | 780 | goto try_again; |
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index 355c95270d48..15cbc418c95f 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c | |||
@@ -664,7 +664,8 @@ try_again: | |||
664 | * it. | 664 | * it. |
665 | */ | 665 | */ |
666 | if (!powered_resume && (ocr & R4_18V_PRESENT) && mmc_host_uhs(host)) { | 666 | if (!powered_resume && (ocr & R4_18V_PRESENT) && mmc_host_uhs(host)) { |
667 | err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180); | 667 | err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180, |
668 | host->ocr); | ||
668 | if (err == -EAGAIN) { | 669 | if (err == -EAGAIN) { |
669 | sdio_reset(host); | 670 | sdio_reset(host); |
670 | mmc_go_idle(host); | 671 | mmc_go_idle(host); |