summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorT Karthik Reddy <t.karthik.reddy@xilinx.com>2019-06-25 13:39:02 +0200
committerPeng Fan <peng.fan@nxp.com>2019-07-15 10:16:49 +0800
commit86a94e7b2b8cdf37138e2c5cef10193f6093a9bd (patch)
tree481e07107bc16d17c19cb98e361e4e4f7fccf5bf /drivers
parente3a14b6684bc591d0648e2bb8de383074ee81f43 (diff)
mmc: Read sd card detect properties from DT
This patch reads card detect properties from device tree & added mmc capability macros in mmc.h. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/mmc-uclass.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index a9c8f335c1..fa4d1af55d 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -171,6 +171,15 @@ int mmc_of_parse(struct udevice *dev, struct mmc_config *cfg)
if (dev_read_bool(dev, "mmc-hs400-1_2v"))
cfg->host_caps |= MMC_CAP(MMC_HS_400);
+ if (dev_read_bool(dev, "non-removable")) {
+ cfg->host_caps |= MMC_CAP_NONREMOVABLE;
+ } else {
+ if (dev_read_bool(dev, "cd-inverted"))
+ cfg->host_caps |= MMC_CAP_CD_ACTIVE_HIGH;
+ if (dev_read_bool(dev, "broken-cd"))
+ cfg->host_caps |= MMC_CAP_NEEDS_POLL;
+ }
+
return 0;
}