]> git.sur5r.net Git - u-boot/blobdiff - drivers/mmc/mmc-uclass.c
mmc: omap_hsmmc: use mmc_of_parse to populate mmc_config
[u-boot] / drivers / mmc / mmc-uclass.c
index 26c6ab7ad1fde014f6680e594ba62abc6ab9c238..a3536b15ae677596c403b01e8a805d0f6df65061 100644 (file)
@@ -140,13 +140,12 @@ int mmc_of_parse(struct udevice *dev, struct mmc_config *cfg)
                cfg->host_caps |= MMC_MODE_1BIT;
                break;
        default:
-               debug("warning: %s invalid bus-width property. using 1-bit\n",
-                     dev_read_name(dev));
-               cfg->host_caps |= MMC_MODE_1BIT;
-               break;
+               dev_err(dev, "Invalid \"bus-width\" value %u!\n", val);
+               return -EINVAL;
        }
 
-       cfg->f_max = dev_read_u32_default(dev, "max-frequency", 52000000);
+       /* f_max is obtained from the optional "max-frequency" property */
+       dev_read_u32(dev, "max-frequency", &cfg->f_max);
 
        if (dev_read_bool(dev, "cap-sd-highspeed"))
                cfg->host_caps |= MMC_CAP(SD_HS);