]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00152547-02 [MX6Q]add SDHC3.0 support on uSDHC controller
authorTony Lin <tony.lin@freescale.com>
Tue, 12 Jul 2011 03:08:22 +0000 (11:08 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:09:15 +0000 (14:09 +0200)
add CMD used on SDHC3.0 card
add specific parameters for SDHC3.0 card tuning

Signed-off-by: Tony Lin <tony.lin@freescale.com>
include/linux/mmc/card.h
include/linux/mmc/host.h
include/linux/mmc/sd.h
include/linux/mmc/sdhci.h

index 6e652f9a42975f1b00596592049e112394e5b13a..b7702db5ba4671c6696296c34945e8b00c9cd6e2 100644 (file)
@@ -93,6 +93,7 @@ struct sd_scr {
        unsigned char           cmds;
 #define SD_SCR_CMD20_SUPPORT   (1<<0)
 #define SD_SCR_CMD23_SUPPORT   (1<<1)
+       unsigned char           sda_vsn3;
 };
 
 struct sd_ssr {
@@ -182,6 +183,9 @@ struct mmc_card {
 #define MMC_STATE_HIGHSPEED_DDR (1<<4)         /* card is in high speed mode */
 #define MMC_STATE_ULTRAHIGHSPEED (1<<5)                /* card is in ultra high speed mode */
 #define MMC_CARD_SDXC          (1<<6)          /* card is SDXC */
+#define MMC_STATE_SD_SDR50     (1<<5)          /* card is in sdr50 mode */
+#define MMC_STATE_SD_SDR104    (1<<6)          /* card is in sdr104 mode */
+#define MMC_STATE_SD_DDR50     (1<<7)          /* card is in ddr50 mode */
        unsigned int            quirks;         /* card quirks */
 #define MMC_QUIRK_LENIENT_FN0  (1<<0)          /* allow SDIO FN0 writes outside of the VS CCCR range */
 #define MMC_QUIRK_BLKSZ_FOR_BYTE_MODE (1<<1)   /* use func->cur_blksize */
index f8d1e741d80c4adc058192e961074057d516bb38..66bf0fb1dbfa5fc0d07bfe3095a379347a68afa9 100644 (file)
@@ -74,6 +74,8 @@ struct mmc_ios {
 #define MMC_SET_DRIVER_TYPE_A  1
 #define MMC_SET_DRIVER_TYPE_C  2
 #define MMC_SET_DRIVER_TYPE_D  3
+       unsigned int    tuning_flag;            /* request tuning only */
+       unsigned int    tuning;                 /* tuning parameter */
 };
 
 struct mmc_host_ops {
@@ -231,7 +233,9 @@ struct mmc_host {
        unsigned int            max_req_size;   /* maximum number of bytes in one req */
        unsigned int            max_blk_size;   /* maximum size of one mmc block */
        unsigned int            max_blk_count;  /* maximum number of blocks in one req */
-
+       unsigned int            tuning_min;
+       unsigned int            tuning_max;
+       unsigned int            tuning_step;
        /* private data */
        spinlock_t              lock;           /* lock for claim and bus ops */
 
index 7d35d52c3df374a2a19ad7d9089381992f88317c..ae7cf9519b217606732f45f37ffbf9cc5afc6a0a 100644 (file)
@@ -91,5 +91,7 @@
 #define SD_SWITCH_ACCESS_DEF   0
 #define SD_SWITCH_ACCESS_HS    1
 
-#endif
+#define SD_VOLTAGE_SWITCH      11
+#define SD_TUNING_CMD          19
 
+#endif
index 6a68c4eb4e444b55137d0e561275aad5f80f1910..eb07153d045126b9e5f260616df5fce0fbc570df 100644 (file)
@@ -159,6 +159,9 @@ struct sdhci_host {
        unsigned int            tuning_mode;    /* Re-tuning mode supported by host */
 #define SDHCI_TUNING_MODE_1    0
        struct timer_list       tuning_timer;   /* Timer for tuning */
+       unsigned int            tuning_min;
+       unsigned int            tuning_max;
+       unsigned int            tuning_step;
 
        unsigned long private[0] ____cacheline_aligned;
 };