[U-Boot] [UBOOT v2 11/15] mmc: zynq_sdhci: Update quirk if 1.8v switching not supported

Siva Durga Prasad Paladugu siva.durga.paladugu at xilinx.com
Mon Jan 30 11:38:28 CET 2017


Update quirk if 1.8 voltage switching is not supported
on boards by reading the property "no-1-8-v" from device
tree.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur at xilinx.com>
---
Changes from v1:
- None
---
 drivers/mmc/zynq_sdhci.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
index 7c42a78..4875a4e 100644
--- a/drivers/mmc/zynq_sdhci.c
+++ b/drivers/mmc/zynq_sdhci.c
@@ -33,6 +33,7 @@ struct arasan_sdhci_priv {
 	struct sdhci_host *host;
 	u8 deviceid;
 	u8 bank;
+	u8 no_1p8;
 };
 
 #if defined(CONFIG_ARCH_ZYNQMP)
@@ -175,8 +176,12 @@ static int arasan_sdhci_probe(struct udevice *dev)
 
 	host->max_clk = CONFIG_ZYNQ_SDHCI_MAX_FREQ;
 
+	if (priv->no_1p8)
+		host->quirks |= SDHCI_QUIRK_NO_1_8_V;
+
 	ret = sdhci_setup_cfg(&plat->cfg, host, 0,
 			      CONFIG_ZYNQ_SDHCI_MIN_FREQ);
+
 	host->mmc = &plat->mmc;
 	if (ret)
 		return ret;
@@ -207,6 +212,10 @@ static int arasan_sdhci_ofdata_to_platdata(struct udevice *dev)
 					"xlnx,device_id", -1);
 	priv->bank = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
 				    "xlnx,mio_bank", -1);
+	if (fdt_get_property(gd->fdt_blob, dev->of_offset, "no-1-8-v", NULL))
+		priv->no_1p8 = 1;
+	else
+		priv->no_1p8 = 0;
 
 	return 0;
 }
-- 
2.7.4



More information about the U-Boot mailing list