summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRex Chen <rex.chen_1@nxp.com>2025-07-28 17:22:29 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-29 13:59:53 +0100
commit8613c9fb1c565d4282d764ee12b3710d6d93d279 (patch)
treebc145edb0a09e9b82b848413d68344cc7a6138ea /drivers
parentd70c7265472a4f48de73fc717886d994e38b7c59 (diff)
downloadlinux-8613c9fb1c565d4282d764ee12b3710d6d93d279.tar.gz
linux-8613c9fb1c565d4282d764ee12b3710d6d93d279.tar.bz2
linux-8613c9fb1c565d4282d764ee12b3710d6d93d279.zip
mmc: core: SPI mode remove cmd7
commit fec40f44afdabcbc4a7748e4278f30737b54bb1a upstream. SPI mode doesn't support cmd7, so remove it in mmc_sdio_alive() and confirm if sdio is active by checking CCCR register value is available or not. Signed-off-by: Rex Chen <rex.chen_1@nxp.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250728082230.1037917-2-rex.chen_1@nxp.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/core/sdio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 2362a70460f1..2908037a1526 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -868,7 +868,11 @@ static void mmc_sdio_remove(struct mmc_host *host)
*/
static int mmc_sdio_alive(struct mmc_host *host)
{
- return mmc_select_card(host->card);
+ if (!mmc_host_is_spi(host))
+ return mmc_select_card(host->card);
+ else
+ return mmc_io_rw_direct(host->card, 0, 0, SDIO_CCCR_CCCR, 0,
+ NULL);
}
/*