]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - drivers/mmc/mmc.c
Merge branch 'rmobile' of git://git.denx.de/u-boot-sh
[karo-tx-uboot.git] / drivers / mmc / mmc.c
index e4a28d4b4ae4105f10d757cae443a27dccf41c6d..8436bc7f5d3c28eaf974efe57da48ae278e867c1 100644 (file)
@@ -1134,10 +1134,11 @@ static int mmc_startup(struct mmc *mmc)
                        mmc_set_bus_width(mmc, widths[idx]);
 
                        err = mmc_send_ext_csd(mmc, test_csd);
+                       /* Only compare read only fields */
                        if (!err && ext_csd[EXT_CSD_PARTITIONING_SUPPORT] \
                                    == test_csd[EXT_CSD_PARTITIONING_SUPPORT]
-                                && ext_csd[EXT_CSD_ERASE_GROUP_DEF] \
-                                   == test_csd[EXT_CSD_ERASE_GROUP_DEF] \
+                                && ext_csd[EXT_CSD_HC_WP_GRP_SIZE] \
+                                   == test_csd[EXT_CSD_HC_WP_GRP_SIZE] \
                                 && ext_csd[EXT_CSD_REV] \
                                    == test_csd[EXT_CSD_REV]
                                 && ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] \
@@ -1276,6 +1277,11 @@ block_dev_desc_t *mmc_get_dev(int dev)
 }
 #endif
 
+/* board-specific MMC power initializations. */
+__weak void board_mmc_power_init(void)
+{
+}
+
 int mmc_start_init(struct mmc *mmc)
 {
        int err;
@@ -1292,6 +1298,8 @@ int mmc_start_init(struct mmc *mmc)
        if (mmc->has_init)
                return 0;
 
+       board_mmc_power_init();
+
        /* made sure it's not NULL earlier */
        err = mmc->cfg->ops->init(mmc);