Skip to content

Commit 8c3e5b7

Browse files
committed
mmc: core: Fixup storing of OCR for MMC_QUIRK_NONSTD_SDIO
The mmc core takes a specific path to support initializing of a non-standard SDIO card. This is triggered by looking for the card-quirk, MMC_QUIRK_NONSTD_SDIO. In mmc_sdio_init_card() this gets rather messy, as it causes the code to bail out earlier, compared to the usual path. This leads to that the OCR doesn't get saved properly in card->ocr. Fortunately, only omap_hsmmc has been using the MMC_QUIRK_NONSTD_SDIO and is dealing with the issue, by assigning a hardcoded value (0x80) to card->ocr from an ->init_card() ops. To make the behaviour consistent, let's instead rely on the core to save the OCR in card->ocr during initialization. Reported-by: H. Nikolaus Schaller <[email protected]> Signed-off-by: Ulf Hansson <[email protected]> Signed-off-by: H. Nikolaus Schaller <[email protected]> Link: https://lore.kernel.org/r/e7936cff7fc24d187ef2680d3b4edb0ade58f293.1636564631.git.hns@goldelico.com Signed-off-by: Ulf Hansson <[email protected]>
1 parent 818cd40 commit 8c3e5b7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/mmc/core/sdio.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,8 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
709709
host->ops->init_card(host, card);
710710
mmc_fixup_device(card, sdio_card_init_methods);
711711

712+
card->ocr = ocr_card;
713+
712714
/*
713715
* If the host and card support UHS-I mode request the card
714716
* to switch to 1.8V signaling level. No 1.8v signalling if
@@ -821,7 +823,7 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
821823
goto mismatch;
822824
}
823825
}
824-
card->ocr = ocr_card;
826+
825827
mmc_fixup_device(card, sdio_fixup_methods);
826828

827829
if (card->type == MMC_TYPE_SD_COMBO) {

0 commit comments

Comments
 (0)