From: Michael Wu <michael@allwinnertech.com>
To: ulf.hansson@linaro.org, mripard@kernel.org, wens@csie.org,
samuel@sholland.org, andre.przywara@arm.com
Cc: jernej.skrabec@gmail.com, linux-mmc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org,
Michael Wu <michael@allwinnertech.com>
Subject: [PATCH 1/3] mmc:sunxi-mmc:add support on discrete device power supply
Date: Wed, 22 Dec 2021 11:06:34 +0800 [thread overview]
Message-ID: <20211222030634.33816-1-michael@allwinnertech.com> (raw)
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
next reply other threads:[~2021-12-22 3:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-22 3:06 Michael Wu [this message]
2021-12-28 16:49 ` [PATCH 1/3] mmc:sunxi-mmc:add support on discrete device power supply Ulf Hansson
[not found] ` <2021123116275961132724@allwinnertech.com>
2021-12-31 12:14 ` Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211222030634.33816-1-michael@allwinnertech.com \
--to=michael@allwinnertech.com \
--cc=andre.przywara@arm.com \
--cc=jernej.skrabec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=mripard@kernel.org \
--cc=samuel@sholland.org \
--cc=ulf.hansson@linaro.org \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox