diff options
author | addy ke <addy.ke@rock-chips.com> | 2015-02-19 21:37:40 -0500 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-03-23 09:13:28 -0400 |
commit | 6d53200b51a57f50bc5a98b36bfcdb47483ad61a (patch) | |
tree | 50aca26b6811f2bcad9a8f075189ebe1b8db6bf2 | |
parent | 801131321a0c53052084c10144dc07a061229f3f (diff) |
mmc: dw_mmc: rockchip: add support MMC_CAP_RUNTIME_RESUME capability
To support HS200 and UHS mode, mmc core will call init_card() to
execute tuning:
- sdio: init_card can be executed at runtime resume.
- sd and mmc: init_card can be executed at resume or runtime resume,
which depends on MMC_CAP_RUNTIME_RESUME capability.
On rk3288 SoC, host will get DRTO interrupt when host send command
to read tuning data. This will spend more than 111ms:
drto_ms = drto_clks * 1000 / bus_hz = 111ms.
And the total tuning time will be more than 400ms.
So we should add MMC_CAP_RUNTIME_RESUME capability to execute tuning
at runtime resume. Only if we do so, can we pass resume test.
Reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Addy Ke <addy.ke@rock-chips.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/host/dw_mmc-rockchip.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c index e2a726a503ee..dbf166f94f1b 100644 --- a/drivers/mmc/host/dw_mmc-rockchip.c +++ b/drivers/mmc/host/dw_mmc-rockchip.c | |||
@@ -76,12 +76,20 @@ static int dw_mci_rockchip_init(struct dw_mci *host) | |||
76 | return 0; | 76 | return 0; |
77 | } | 77 | } |
78 | 78 | ||
79 | /* Common capabilities of RK3288 SoC */ | ||
80 | static unsigned long dw_mci_rk3288_dwmmc_caps[4] = { | ||
81 | MMC_CAP_RUNTIME_RESUME, /* emmc */ | ||
82 | MMC_CAP_RUNTIME_RESUME, /* sdmmc */ | ||
83 | MMC_CAP_RUNTIME_RESUME, /* sdio0 */ | ||
84 | MMC_CAP_RUNTIME_RESUME, /* sdio1 */ | ||
85 | }; | ||
79 | static const struct dw_mci_drv_data rk2928_drv_data = { | 86 | static const struct dw_mci_drv_data rk2928_drv_data = { |
80 | .prepare_command = dw_mci_rockchip_prepare_command, | 87 | .prepare_command = dw_mci_rockchip_prepare_command, |
81 | .init = dw_mci_rockchip_init, | 88 | .init = dw_mci_rockchip_init, |
82 | }; | 89 | }; |
83 | 90 | ||
84 | static const struct dw_mci_drv_data rk3288_drv_data = { | 91 | static const struct dw_mci_drv_data rk3288_drv_data = { |
92 | .caps = dw_mci_rk3288_dwmmc_caps, | ||
85 | .prepare_command = dw_mci_rockchip_prepare_command, | 93 | .prepare_command = dw_mci_rockchip_prepare_command, |
86 | .set_ios = dw_mci_rk3288_set_ios, | 94 | .set_ios = dw_mci_rk3288_set_ios, |
87 | .setup_clock = dw_mci_rk3288_setup_clock, | 95 | .setup_clock = dw_mci_rk3288_setup_clock, |