diff options
author | Chaotian Jing <chaotian.jing@mediatek.com> | 2015-10-27 02:24:26 -0400 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-10-27 05:21:16 -0400 |
commit | c9b5061e7728da1f7192ecaf3ffab4a7300920dc (patch) | |
tree | 85a1dce88ee4a767aff4219c41e474699097fd4a /drivers/mmc | |
parent | 62b0d27af85ef1b1729c2ed675c12020e1fbf10f (diff) |
mmc: mediatek: add implement of ops->hw_reset()
add implement of ops->hw_reset() for eMMC
Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/mtk-sd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index 385816375614..562764430881 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c | |||
@@ -64,6 +64,7 @@ | |||
64 | #define SDC_RESP2 0x48 | 64 | #define SDC_RESP2 0x48 |
65 | #define SDC_RESP3 0x4c | 65 | #define SDC_RESP3 0x4c |
66 | #define SDC_BLK_NUM 0x50 | 66 | #define SDC_BLK_NUM 0x50 |
67 | #define EMMC_IOCON 0x7c | ||
67 | #define SDC_ACMD_RESP 0x80 | 68 | #define SDC_ACMD_RESP 0x80 |
68 | #define MSDC_DMA_SA 0x90 | 69 | #define MSDC_DMA_SA 0x90 |
69 | #define MSDC_DMA_CTRL 0x98 | 70 | #define MSDC_DMA_CTRL 0x98 |
@@ -1209,6 +1210,15 @@ end: | |||
1209 | pm_runtime_put_autosuspend(host->dev); | 1210 | pm_runtime_put_autosuspend(host->dev); |
1210 | } | 1211 | } |
1211 | 1212 | ||
1213 | static void msdc_hw_reset(struct mmc_host *mmc) | ||
1214 | { | ||
1215 | struct msdc_host *host = mmc_priv(mmc); | ||
1216 | |||
1217 | sdr_set_bits(host->base + EMMC_IOCON, 1); | ||
1218 | udelay(10); /* 10us is enough */ | ||
1219 | sdr_clr_bits(host->base + EMMC_IOCON, 1); | ||
1220 | } | ||
1221 | |||
1212 | static struct mmc_host_ops mt_msdc_ops = { | 1222 | static struct mmc_host_ops mt_msdc_ops = { |
1213 | .post_req = msdc_post_req, | 1223 | .post_req = msdc_post_req, |
1214 | .pre_req = msdc_pre_req, | 1224 | .pre_req = msdc_pre_req, |
@@ -1216,6 +1226,7 @@ static struct mmc_host_ops mt_msdc_ops = { | |||
1216 | .set_ios = msdc_ops_set_ios, | 1226 | .set_ios = msdc_ops_set_ios, |
1217 | .start_signal_voltage_switch = msdc_ops_switch_volt, | 1227 | .start_signal_voltage_switch = msdc_ops_switch_volt, |
1218 | .card_busy = msdc_card_busy, | 1228 | .card_busy = msdc_card_busy, |
1229 | .hw_reset = msdc_hw_reset, | ||
1219 | }; | 1230 | }; |
1220 | 1231 | ||
1221 | static int msdc_drv_probe(struct platform_device *pdev) | 1232 | static int msdc_drv_probe(struct platform_device *pdev) |