mmc: s5p_sdhci: Read generic MMC properties from DT
authorMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 16 Jan 2020 15:25:33 +0000 (16:25 +0100)
committerMinkyu Kang <mk7.kang@samsung.com>
Thu, 23 Jan 2020 02:43:10 +0000 (11:43 +0900)
Read generic MMC properties from device-tree. This allows to specify for
example cd-inverted property and let MMC core to properly handle such
case.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
drivers/mmc/s5p_sdhci.c

index 53efa968cf507bff43dd2919a24102eedb6dbeee..b5fe828dd60a566337f2a4403300cdc9507d149a 100644 (file)
@@ -204,8 +204,13 @@ static int s5p_sdhci_probe(struct udevice *dev)
        if (ret)
                return ret;
 
+       ret = mmc_of_parse(dev, &plat->cfg);
+       if (ret)
+               return ret;
+
        host->mmc = &plat->mmc;
        host->mmc->dev = dev;
+
        ret = sdhci_setup_cfg(&plat->cfg, host, 0, 400000);
        if (ret)
                return ret;