]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/mmc/core/mmc.c
mmc: fix mmc_set_bus_width_ddr() call without bus-width-test cap
[mv-sheeva.git] / drivers / mmc / core / mmc.c
index 1d8409fcf1558cbad6b5fc72103f2e684e67bf48..c86dd7384d7dd3355898d6347a6506fa1a7dc12b 100644 (file)
@@ -558,6 +558,8 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
                                         EXT_CSD_BUS_WIDTH,
                                         ext_csd_bits[idx][0]);
                        if (!err) {
+                               mmc_set_bus_width_ddr(card->host,
+                                                     bus_width, MMC_SDR_MODE);
                                /*
                                 * If controller can't handle bus width test,
                                 * use the highest bus width to maintain
@@ -565,8 +567,6 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
                                 */
                                if (!(host->caps & MMC_CAP_BUS_WIDTH_TEST))
                                        break;
-                               mmc_set_bus_width_ddr(card->host,
-                                                     bus_width, MMC_SDR_MODE);
                                err = mmc_bus_test(card, bus_width);
                                if (!err)
                                        break;