All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] mmc:sunxi-mmc:add support on discrete device power supply
@ 2021-12-22  3:06 ` Michael Wu
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Wu @ 2021-12-22  3:06 UTC (permalink / raw)
  To: ulf.hansson, mripard, wens, samuel, andre.przywara
  Cc: jernej.skrabec, linux-mmc, linux-arm-kernel, linux-sunxi,
	linux-kernel, Michael Wu

Because some platform has no regulator, only use discrete devices
to supply power,For this situation, to use sd/mmc card, we add ocr manually

Signed-off-by: Michael Wu <michael@allwinnertech.com>
---
 drivers/mmc/host/sunxi-mmc.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index 2702736a1c57..afeefead6501 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -1300,6 +1300,14 @@ static int sunxi_mmc_resource_request(struct sunxi_mmc_host *host,
 	if (ret)
 		return ret;
 
+	/**
+	 * Some platforms has no regulator. Discrete devices are used instead.
+	 * To support sd/mmc card, we need to add ocr manually.
+	 */
+	if (!host->mmc->ocr_avail)
+		host->mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
+
+
 	host->reg_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(host->reg_base))
 		return PTR_ERR(host->reg_base);
-- 
2.29.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-12-31 14:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-22  3:06 [PATCH 1/3] mmc:sunxi-mmc:add support on discrete device power supply Michael Wu
2021-12-22  3:06 ` Michael Wu
2021-12-28 16:49 ` Ulf Hansson
2021-12-28 16:49   ` Ulf Hansson
2021-12-31  8:27   ` michael
2021-12-31  8:27     ` michael
2021-12-31 12:14     ` Ulf Hansson
2021-12-31 12:14       ` Ulf Hansson
2021-12-31 14:06       ` michael
2021-12-31 14:06         ` michael

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.