diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2020-10-08 12:25:33 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2020-10-08 12:41:12 +0300 |
commit | db1af1e9712920f47b5dc6a995fca3eec05ea85e (patch) | |
tree | 2a501c854cfa7728eec28522c66a1c68c037dd6b /drivers/mmc | |
parent | 347f6be11de1940dc915596d17b0f94b03779c77 (diff) | |
download | linux-db1af1e9712920f47b5dc6a995fca3eec05ea85e.tar.xz |
mmc: renesas_sdhi: workaround a regression when reinserting SD cards
After the conversions of the reset routines, re-inserting SD cards
didn't work anymore. Apply this temporary workaround to have working SD
cards during the merge window. The issue will be fixed properly until
the final release.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20201008092533.76588-1-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/renesas_sdhi_core.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c index 20e5eb63caf8..414314151d0a 100644 --- a/drivers/mmc/host/renesas_sdhi_core.c +++ b/drivers/mmc/host/renesas_sdhi_core.c @@ -572,6 +572,17 @@ static void renesas_sdhi_reset(struct tmio_mmc_host *host) TMIO_MASK_INIT_RCAR2); } +/* + * This is a temporary workaround! This driver used 'hw_reset' wrongly and the + * fix for that showed a regression. So, we mimic the old behaviour until the + * proper solution is found. + */ +static void renesas_sdhi_hw_reset(struct mmc_host *mmc) +{ + struct tmio_mmc_host *host = mmc_priv(mmc); + renesas_sdhi_reset(host); +} + #define SH_MOBILE_SDHI_MIN_TAP_ROW 3 static int renesas_sdhi_select_tuning(struct tmio_mmc_host *host) @@ -1009,6 +1020,8 @@ int renesas_sdhi_probe(struct platform_device *pdev, if (of_data && of_data->scc_offset) { priv->scc_ctl = host->ctl + of_data->scc_offset; host->reset = renesas_sdhi_reset; + host->ops.hw_reset = renesas_sdhi_hw_reset; + host->mmc->caps |= MMC_CAP_HW_RESET; } } |