Skip to content

Commit e58bb2c

Browse files
Rex-Chen-NXPgregkh
authored andcommitted
mmc: core: SPI mode remove cmd7
commit fec40f4 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 <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1da032d commit e58bb2c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/mmc/core/sdio.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,11 @@ static void mmc_sdio_remove(struct mmc_host *host)
945945
*/
946946
static int mmc_sdio_alive(struct mmc_host *host)
947947
{
948-
return mmc_select_card(host->card);
948+
if (!mmc_host_is_spi(host))
949+
return mmc_select_card(host->card);
950+
else
951+
return mmc_io_rw_direct(host->card, 0, 0, SDIO_CCCR_CCCR, 0,
952+
NULL);
949953
}
950954

951955
/*

0 commit comments

Comments
 (0)