mmc: sdhci-of-at91: fix cd-gpios for SAMA5D2
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Sun, 15 Mar 2020 16:44:25 +0000 (17:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Mar 2020 07:06:11 +0000 (08:06 +0100)
commit0cdbb2f099094388fc96fc654c0e8e4b66d38a33
tree7ec27e53dc0766676118a8f934271f22f93e3091
parent23929cbc88c5244c08a1e8d11ce4c24560574b5f
mmc: sdhci-of-at91: fix cd-gpios for SAMA5D2

commit 53dd0a7cd65edc83b0c243d1c08377c8b876b2ee upstream.

SAMA5D2x doesn't drive CMD line if GPIO is used as CD line (at least
SAMA5D27 doesn't). Fix this by forcing card-detect in the module
if module-controlled CD is not used.

Fixed commit addresses the problem only for non-removable cards. This
amends it to also cover gpio-cd case.

Cc: stable@vger.kernel.org
Fixes: 7a1e3f143176 ("mmc: sdhci-of-at91: force card detect value for non removable devices")
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/8d10950d9940468577daef4772b82a071b204716.1584290561.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/host/sdhci-of-at91.c