]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mmc: core: Clarify usage of mmc_set_signal_voltage()
authorUlf Hansson <ulf.hansson@linaro.org>
Wed, 25 Jan 2017 09:25:01 +0000 (10:25 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 13 Feb 2017 12:20:43 +0000 (13:20 +0100)
The mmc_set_signal_voltage() function is used for SD/SDIO when switching to
1.8V for UHS mode. To clarify this let's do the following changes.

- We are always providing MMC_SIGNAL_VOLTAGE_180 as the signal_voltage
  parameter to the function. Then, let's just remove the parameter as it
  serves no purpose.
- Rename the function to mmc_set_uhs_voltage().

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Tested-by: Jan Glauber <jglauber@cavium.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
drivers/mmc/core/core.c
drivers/mmc/core/core.h
drivers/mmc/core/sd.c
drivers/mmc/core/sdio.c

index bb819d49291ecf6ca0fab91532f9a1cc5be57193..82c1a02b9c2a0b6429e726769d2a2b0f01de6af0 100644 (file)
@@ -1647,7 +1647,7 @@ int __mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage)
 
 }
 
-int mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage, u32 ocr)
+int mmc_set_uhs_voltage(struct mmc_host *host, u32 ocr)
 {
        struct mmc_command cmd = {};
        int err = 0;
@@ -1691,7 +1691,7 @@ int mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage, u32 ocr)
        host->ios.clock = 0;
        mmc_set_ios(host);
 
-       if (__mmc_set_signal_voltage(host, signal_voltage)) {
+       if (__mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180)) {
                /*
                 * Voltages may not have been switched, but we've already
                 * sent CMD11, so a power cycle is required anyway
index 8a95c82554be6f97cd2e5e872764532a0194e746..aee23f54a7ed9c1567726c4dff0169e5134e6499 100644 (file)
@@ -48,7 +48,7 @@ void mmc_set_clock(struct mmc_host *host, unsigned int hz);
 void mmc_set_bus_mode(struct mmc_host *host, unsigned int mode);
 void mmc_set_bus_width(struct mmc_host *host, unsigned int width);
 u32 mmc_select_voltage(struct mmc_host *host, u32 ocr);
-int mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage, u32 ocr);
+int mmc_set_uhs_voltage(struct mmc_host *host, u32 ocr);
 int __mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage);
 void mmc_set_timing(struct mmc_host *host, unsigned int timing);
 void mmc_set_driver_type(struct mmc_host *host, unsigned int drv_type);
index 8b4f1394371254ec71c8fc723d75095a4a7a0a57..89531b48ae841a405400c943138c5a82297a0791 100644 (file)
@@ -788,8 +788,7 @@ try_again:
         */
        if (!mmc_host_is_spi(host) && rocr &&
           ((*rocr & 0x41000000) == 0x41000000)) {
-               err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180,
-                                       pocr);
+               err = mmc_set_uhs_voltage(host, pocr);
                if (err == -EAGAIN) {
                        retries--;
                        goto try_again;
index 261c88632c43662e3d7b79f5e6d7a8bb557265ac..a64a8709ec72327eb171715f82a4c03bb93a0b00 100644 (file)
@@ -642,8 +642,7 @@ try_again:
         * to make sure which speed mode should work.
         */
        if (!powered_resume && (rocr & ocr & R4_18V_PRESENT)) {
-               err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180,
-                                       ocr_card);
+               err = mmc_set_uhs_voltage(host, ocr_card);
                if (err == -EAGAIN) {
                        mmc_sdio_resend_if_cond(host, card);
                        retries--;