drivers: mmc: sdhci_am654: Add the quirk to set TESTCD bit
authorVignesh Raghavendra <vigneshr@ti.com>
Mon, 25 Apr 2022 06:31:20 +0000 (12:01 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:34 +0000 (10:22 +0200)
commit7eb8e4787b43f499d91f3e4e9dcf905e68b0a312
tree828e8a3454fdbcb9314cee186a5d0d40f1c936df
parent353298cadbd4c7d8e8a16d6000066414694933c3
drivers: mmc: sdhci_am654: Add the quirk to set TESTCD bit

[ Upstream commit c7666240ec76422cb7546bd07cc8ae80dc0ccdd2 ]

The ARASAN MMC controller on Keystone 3 class of devices need the SDCD
line to be connected for proper functioning. Similar to the issue pointed
out in sdhci-of-arasan.c driver, commit 3794c542641f ("mmc:
sdhci-of-arasan: Set controller to test mode when no CD bit").

In cases where this can't be connected, add a quirk to force the
controller into test mode and set the TESTCD bit. Use the flag
"ti,fails-without-test-cd", to implement this above quirk when required.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Link: https://lore.kernel.org/r/20220425063120.10135-3-a-govindraju@ti.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mmc/host/sdhci_am654.c