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
WARNING: multiple messages have this Message-ID (diff)
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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2021-12-22 3:12 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-22 3:06 Michael Wu [this message] 2021-12-22 3:06 ` [PATCH 1/3] mmc:sunxi-mmc:add support on discrete device power supply 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
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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.