mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
* [PATCH] mmc: meson: initial ocr available by default value
@ 2021-12-13  7:03 Rong Chen
  2021-12-13  8:00 ` Martin Blumenstingl
       [not found] ` <2021121319503910358221@amlogic.com>
  0 siblings, 2 replies; 4+ messages in thread
From: Rong Chen @ 2021-12-13  7:03 UTC (permalink / raw)
  To: Ulf Hansson, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, --to=1131046452
  Cc: 45581586, linux-mmc, linux-arm-kernel, linux-amlogic,
	linux-kernel, Rong Chen

The patch will add a value of ocr supported by the controller,
to specify some of voltage values are supported.

Ocr_avail should place an initial value to avoid uncertain
value for the platform that unsupport regulator such as S4.

Signed-off-by: Rong Chen <rong.chen@amlogic.com>
---
 drivers/mmc/host/meson-gx-mmc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 8f36536cb1b6..c339e12d5516 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -4,6 +4,9 @@
  *
  * Copyright (c) 2016 BayLibre, SAS.
  * Author: Kevin Hilman <khilman@baylibre.com>
+ *
+ * Copyright (c) 2021 Amlogic, inc.
+ * Author: Rong Chen <Rong.Chen@amlogic.com>
  */
 #include <linux/kernel.h>
 #include <linux/module.h>
@@ -130,6 +133,7 @@
 #define SD_EMMC_DESC_CHAIN_MODE BIT(1)
 
 #define MUX_CLK_NUM_PARENTS 2
+#define SD_EMMC_OCR_AVAIL 0x200080
 
 struct meson_mmc_data {
 	unsigned int tx_delay_mask;
@@ -1150,6 +1154,7 @@ static int meson_mmc_probe(struct platform_device *pdev)
 	host->dram_access_quirk = device_property_read_bool(&pdev->dev,
 					"amlogic,dram-access-quirk");
 
+	mmc->ocr_avail = SD_EMMC_OCR_AVAIL;
 	/* Get regulators and the supported OCR mask */
 	host->vqmmc_enabled = false;
 	ret = mmc_regulator_get_supply(mmc);

base-commit: 141edd9e99eb91393e8a4d97742bd98328bff724
-- 
2.25.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

end of thread, other threads:[~2021-12-13 19:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13  7:03 [PATCH] mmc: meson: initial ocr available by default value Rong Chen
2021-12-13  8:00 ` Martin Blumenstingl
     [not found] ` <2021121319503910358221@amlogic.com>
2021-12-13 13:22   ` Jerome Brunet
2021-12-13 19:02     ` Martin Blumenstingl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®