Revert "mmc: tmio: remove workaround for NON_REMOVABLE"
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 21 Nov 2019 11:17:33 +0000 (12:17 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 21 Nov 2019 11:27:24 +0000 (12:27 +0100)
This reverts commit 7a7dab237027939cb95dc07c4647b80bad5fbbde. We found
out that there is still a race with RuntimePM. This can lead to a hang
when accessing the eMMC in some situations. Revert this change until the
RPM issue is fixed.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/tmio_mmc_core.c

index 6936b04940a3d44e20262f5a1bde2daf46928253..dec5a99f52cf8d3d0539ca84e7a1aac9eb87a605 100644 (file)
@@ -1208,6 +1208,15 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host)
        if (!_host->reset)
                _host->reset = tmio_mmc_reset;
 
+       /*
+        * On Gen2+, eMMC with NONREMOVABLE currently fails because native
+        * hotplug gets disabled. It seems RuntimePM related yet we need further
+        * research. Since we are planning a PM overhaul anyway, let's enforce
+        * for now the device being active by enabling native hotplug always.
+        */
+       if (pdata->flags & TMIO_MMC_MIN_RCAR2)
+               _host->native_hotplug = true;
+
        /*
         * While using internal tmio hardware logic for card detection, we need
         * to ensure it stays powered for it to work.