Commit e2d2dcc8 authored by Kunihiko Hayashi's avatar Kunihiko Hayashi Committed by Ulf Hansson
Browse files

mmc: f-sdh30: Add support for non-removable media



To use F_SDH30 for non-removable meda like eMMC,
need to enable FORCE_CARD_INSERT bit to skip the delay for detection.

Signed-off-by: default avatarKunihiko Hayashi <hayashi.kunihiko@socionext.com>
Acked-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
Link: https://lore.kernel.org/r/20221111081033.3813-6-hayashi.kunihiko@socionext.com


Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 5914a9b1
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -77,6 +77,13 @@ static void sdhci_f_sdh30_reset(struct sdhci_host *host, u8 mask)
		ctl |= F_SDH30_CMD_DAT_DELAY;
		sdhci_writel(host, ctl, F_SDH30_ESD_CONTROL);
	}

	if ((host->mmc->caps & MMC_CAP_NONREMOVABLE) &&
	    !(sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT)) {
		ctl = sdhci_readl(host, F_SDH30_TEST);
		ctl |= F_SDH30_FORCE_CARD_INSERT;
		sdhci_writel(host, ctl, F_SDH30_TEST);
	}
}

static const struct sdhci_ops sdhci_f_sdh30_ops = {
+3 −0
Original line number Diff line number Diff line
@@ -29,4 +29,7 @@
#define  F_SDH30_CMD_DAT_DELAY	BIT(9)
#define	 F_SDH30_EMMC_HS200		BIT(24)

#define F_SDH30_TEST		0x158
#define F_SDH30_FORCE_CARD_INSERT	BIT(6)

#define F_SDH30_MIN_CLOCK		400000