diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 7466ce098e60a086e4f60c5111c19c1b85cd6d60..d854bff037a248e2c26e1f5f0d1993e4ac11e767 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1296,6 +1296,12 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, memcpy(card->raw_cid, cid, sizeof(card->raw_cid)); } + /* + * Call the optional HC's init_card function to handle quirks. + */ + if (host->ops->init_card) + host->ops->init_card(host, card); + /* * For native busses: set card RCA and quit open drain mode. */ diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index d90a6de7901d7514550b3c9ed64d383e528244ad..29fccdcacd6878fce71fad022da78d3013a5686e 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -932,6 +932,12 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr, memcpy(card->raw_cid, cid, sizeof(card->raw_cid)); } + /* + * Call the optional HC's init_card function to handle quirks. + */ + if (host->ops->init_card) + host->ops->init_card(host, card); + /* * For native busses: get card RCA and quit open drain mode. */ @@ -1271,4 +1277,3 @@ int mmc_attach_sd(struct mmc_host *host) return err; } -