]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/mmc.h
mmc: support the correct card version for eMMC
[karo-tx-uboot.git] / include / mmc.h
index 7546b4a6c82393ab066696660593669fa3711f6a..d5b3a9ea383af16169ba417eb43b7f661ab0847a 100644 (file)
 #include <linux/compiler.h>
 
 #define SD_VERSION_SD  0x20000
-#define SD_VERSION_2   (SD_VERSION_SD | 0x20)
-#define SD_VERSION_1_0 (SD_VERSION_SD | 0x10)
-#define SD_VERSION_1_10        (SD_VERSION_SD | 0x1a)
+#define SD_VERSION_2   (SD_VERSION_SD | 0x200)
+#define SD_VERSION_1_0 (SD_VERSION_SD | 0x100)
+#define SD_VERSION_1_10        (SD_VERSION_SD | 0x10a)
 #define MMC_VERSION_MMC                0x10000
 #define MMC_VERSION_UNKNOWN    (MMC_VERSION_MMC)
-#define MMC_VERSION_1_2                (MMC_VERSION_MMC | 0x12)
-#define MMC_VERSION_1_4                (MMC_VERSION_MMC | 0x14)
-#define MMC_VERSION_2_2                (MMC_VERSION_MMC | 0x22)
-#define MMC_VERSION_3          (MMC_VERSION_MMC | 0x30)
-#define MMC_VERSION_4          (MMC_VERSION_MMC | 0x40)
+#define MMC_VERSION_1_2                (MMC_VERSION_MMC | 0x102)
+#define MMC_VERSION_1_4                (MMC_VERSION_MMC | 0x104)
+#define MMC_VERSION_2_2                (MMC_VERSION_MMC | 0x202)
+#define MMC_VERSION_3          (MMC_VERSION_MMC | 0x300)
+#define MMC_VERSION_4          (MMC_VERSION_MMC | 0x400)
+#define MMC_VERSION_4_1                (MMC_VERSION_MMC | 0x401)
+#define MMC_VERSION_4_2                (MMC_VERSION_MMC | 0x402)
+#define MMC_VERSION_4_3                (MMC_VERSION_MMC | 0x403)
+#define MMC_VERSION_4_41       (MMC_VERSION_MMC | 0x429)
+#define MMC_VERSION_4_5                (MMC_VERSION_MMC | 0x405)
 
 #define MMC_MODE_HS            0x001
 #define MMC_MODE_HS_52MHz      0x010
 #define EXT_CSD_CARD_TYPE              196     /* RO */
 #define EXT_CSD_SEC_CNT                        212     /* RO, 4 bytes */
 #define EXT_CSD_HC_ERASE_GRP_SIZE      224     /* RO */
+#define EXT_CSD_BOOT_MULT              226     /* RO */
 
 /*
  * EXT_CSD field definitions
@@ -214,7 +220,6 @@ struct mmc_cmd {
        uint resp_type;
        uint cmdarg;
        uint response[4];
-       uint flags;
 };
 
 struct mmc_data {
@@ -259,6 +264,7 @@ struct mmc {
        void (*set_ios)(struct mmc *mmc);
        int (*init)(struct mmc *mmc);
        int (*getcd)(struct mmc *mmc);
+       int (*getwp)(struct mmc *mmc);
        uint b_max;
 };
 
@@ -274,6 +280,7 @@ int get_mmc_num(void);
 int board_mmc_getcd(struct mmc *mmc);
 int mmc_switch_part(int dev_num, unsigned int part_num);
 int mmc_getcd(struct mmc *mmc);
+int mmc_getwp(struct mmc *mmc);
 void spl_mmc_load(void) __noreturn;
 
 #ifdef CONFIG_GENERIC_MMC