[PATCH] mmc: meson: initial ocr available by default value

Rong Chen rong.chen at amlogic.com
Sun Dec 12 23:03:30 PST 2021


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 at 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 at baylibre.com>
+ *
+ * Copyright (c) 2021 Amlogic, inc.
+ * Author: Rong Chen <Rong.Chen at 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




More information about the linux-arm-kernel mailing list