Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0c3b68c authored by Shawn Lin's avatar Shawn Lin Committed by Ulf Hansson
Browse files

mmc: core: Allow hosts to specify non-support for MMC commands



Host drivers which needs to valdiate for non-supported MMC
commands and returnn error code for such requests.

To improve and simplify the behaviour, let's invent MMC_CAP2_NO_MMC
which these host drivers can set to tell the mmc core to skip sending MMC
commands during card initialization.

Signed-off-by: default avatarShawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 39f80bcb
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2510,6 +2510,7 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
		if (!mmc_attach_sd(host))
			return 0;

	if (!(host->caps2 & MMC_CAP2_NO_MMC))
		if (!mmc_attach_mmc(host))
			return 0;

+1 −0
Original line number Diff line number Diff line
@@ -310,6 +310,7 @@ struct mmc_host {
#define MMC_CAP2_NO_SDIO	(1 << 19)	/* Do not send SDIO commands during initialization */
#define MMC_CAP2_HS400_ES	(1 << 20)	/* Host supports enhanced strobe */
#define MMC_CAP2_NO_SD		(1 << 21)	/* Do not send SD commands during initialization */
#define MMC_CAP2_NO_MMC		(1 << 22)	/* Do not send (e)MMC commands during initialization */

	mmc_pm_flag_t		pm_caps;	/* supported pm features */