]> git.sur5r.net Git - u-boot/commitdiff
mmc: ftsdc010: Support High-Speed mode
authorRick Chen <rick@andestech.com>
Mon, 25 Dec 2017 08:25:26 +0000 (16:25 +0800)
committerAndes <uboot@andestech.com>
Fri, 30 Mar 2018 05:13:34 +0000 (13:13 +0800)
ftsdc010 dm driver has been disable High-Speed mode
as default to work around Andes AE3XX platform's problem,
because of it does not support High-Speed mode in
commit id 73cd56b2df213c629191139e5c6705e069b6214f.

But other platforms or SoCs maybe support this function.
So High-Speed mode can be enabled from dts with
cap-mmc-highspeed or cap-sd-highspeed property.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
drivers/mmc/nds32_mmc.c

index 6d3c8572e503650f8c88134b09f7ca41e0ad9595..ec43e9d68825ca1e758bec7dee3b4a276714787d 100644 (file)
@@ -103,6 +103,11 @@ static int nds32_mmc_probe(struct udevice *dev)
        if (ret < 0)
                return ret;
 #endif
+
+       if (dev_read_bool(dev, "cap-mmc-highspeed") || \
+                 dev_read_bool(dev, "cap-sd-highspeed"))
+               chip->caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;
+
        ftsdc_setup_cfg(&plat->cfg, dev->name, chip->buswidth, chip->caps,
                        priv->minmax[1] , priv->minmax[0]);
        chip->mmc = &plat->mmc;