mmc: Parse no-1-8-v DT property
authorPeng Fan <peng.fan@nxp.com>
Wed, 10 Jul 2019 09:35:20 +0000 (09:35 +0000)
committerPeng Fan <peng.fan@nxp.com>
Mon, 15 Jul 2019 02:30:08 +0000 (10:30 +0800)
Parse no-1-8-v DT

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
drivers/mmc/mmc-uclass.c

index d4db4c8..5510079 100644 (file)
@@ -184,6 +184,11 @@ int mmc_of_parse(struct udevice *dev, struct mmc_config *cfg)
                        cfg->host_caps |= MMC_CAP_NEEDS_POLL;
        }
 
+       if (dev_read_bool(dev, "no-1-8-v")) {
+               cfg->host_caps &= ~(UHS_CAPS | MMC_MODE_HS200 |
+                                   MMC_MODE_HS400 | MMC_MODE_HS400_ES);
+       }
+
        return 0;
 }