mmc: add boot bus width set
authorJaehoon Chung <jh80.chung@samsung.com>
Wed, 21 Jul 2010 01:02:50 +0000 (10:02 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Wed, 21 Jul 2010 01:02:50 +0000 (10:02 +0900)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/mmc/mmc.c

index 04634a5..62aa5c8 100644 (file)
@@ -429,6 +429,21 @@ int mmc_change_freq(struct mmc *mmc)
        err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL,
                        EXT_CSD_BOOT_CONFIG, mmc->boot_config);
 
+       /*
+        * Boot bus width configuration
+        * Bit [1:0] BOOT_BUS_WIDTH
+        *      0x0 : default
+        *      0x1 : 4-bit bus width
+        *      0x2 : 8-bit bus width
+        *      0x3 : reserved
+        */
+       if (mmc->boot_config & 0x7) {
+               err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL,
+                               EXT_CSD_BOOT_BUS_WIDTH, 0x1);
+               if (err)
+                       return err;
+       }
+
        if (err)
                return err;