mmc:fix: Set mmc width according to MMC host capabilities
[pandora-u-boot.git] / include / mmc.h
index 8744604..ee16349 100644 (file)
@@ -47,6 +47,9 @@
 #define MMC_MODE_SPI           0x400
 #define MMC_MODE_HC            0x800
 
+#define MMC_MODE_MASK_WIDTH_BITS (MMC_MODE_4BIT | MMC_MODE_8BIT)
+#define MMC_MODE_WIDTH_BITS_SHIFT 8
+
 #define SD_DATA_4BIT   0x00040000
 
 #define IS_SD(x) (x->version & SD_VERSION_SD)
 #define MMC_STATUS_CURR_STATE  (0xf << 9)
 #define MMC_STATUS_ERROR       (1 << 19)
 
+#define MMC_STATE_PRG          (7 << 9)
+
 #define MMC_VDD_165_195                0x00000080      /* VDD voltage 1.65 - 1.95 */
 #define MMC_VDD_20_21          0x00000100      /* VDD voltage 2.0 ~ 2.1 */
 #define MMC_VDD_21_22          0x00000200      /* VDD voltage 2.1 ~ 2.2 */
@@ -320,7 +325,6 @@ int mmc_switch_part(int dev_num, unsigned int part_num);
 int mmc_getcd(struct mmc *mmc);
 
 #ifdef CONFIG_GENERIC_MMC
-int atmel_mci_init(void *regs);
 #define mmc_host_is_spi(mmc)   ((mmc)->host_caps & MMC_MODE_SPI)
 struct mmc *mmc_spi_init(uint bus, uint cs, uint speed, uint mode);
 #else