Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Ulf Hansson and committed by
Chris Ball
0f791fda 4a065193

+7 -5
+2 -2
drivers/mmc/core/core.c
··· 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 1402 struct mmc_command cmd = {0}; 1403 1403 int err = 0; ··· 1479 1479 if (err) { 1480 1480 pr_debug("%s: Signal voltage switch failed, " 1481 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 1485 mmc_host_clk_release(host);
+1 -1
drivers/mmc/core/core.h
··· 42 42 void mmc_set_bus_mode(struct mmc_host *host, unsigned int mode); 43 43 void mmc_set_bus_width(struct mmc_host *host, unsigned int width); 44 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 46 int __mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage); 47 47 void mmc_set_timing(struct mmc_host *host, unsigned int timing); 48 48 void mmc_set_driver_type(struct mmc_host *host, unsigned int drv_type);
+2 -1
drivers/mmc/core/sd.c
··· 773 773 */ 774 774 if (!mmc_host_is_spi(host) && rocr && 775 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 778 if (err == -EAGAIN) { 778 779 retries--; 779 780 goto try_again;
+2 -1
drivers/mmc/core/sdio.c
··· 664 664 * it. 665 665 */ 666 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 669 if (err == -EAGAIN) { 669 670 sdio_reset(host); 670 671 mmc_go_idle(host);