diff options
author | Zhangfei Gao <zhangfei.gao@linaro.org> | 2015-05-14 16:45:18 +0800 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-06-01 09:07:04 +0200 |
commit | 8f7849c4f9aa2fbed629736c8930d8d1d2c426bc (patch) | |
tree | 8e967bb407d30261b1950d8eaf17f51e9590330c /drivers/mmc/host/dw_mmc.c | |
parent | d9c7eb3895f755ab0e458a216961964ebffd9edb (diff) | |
download | op-kernel-dev-8f7849c4f9aa2fbed629736c8930d8d1d2c426bc.zip op-kernel-dev-8f7849c4f9aa2fbed629736c8930d8d1d2c426bc.tar.gz |
mmc: dw_mmc: add switch_voltage
switch_voltage is required on some platform since special register accessing
Signed-off-by: Jorge A. Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: Dan Yuan <yuandan@hisilicon.com>
Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/dw_mmc.c')
-rw-r--r-- | drivers/mmc/host/dw_mmc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 5f5adaf..ce66565 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -1236,11 +1236,15 @@ static int dw_mci_switch_voltage(struct mmc_host *mmc, struct mmc_ios *ios) { struct dw_mci_slot *slot = mmc_priv(mmc); struct dw_mci *host = slot->host; + const struct dw_mci_drv_data *drv_data = host->drv_data; u32 uhs; u32 v18 = SDMMC_UHS_18V << slot->id; int min_uv, max_uv; int ret; + if (drv_data && drv_data->switch_voltage) + return drv_data->switch_voltage(mmc, ios); + /* * Program the voltage. Note that some instances of dw_mmc may use * the UHS_REG for this. For other instances (like exynos) the UHS_REG |