]> Pileus Git - ~andy/linux/blobdiff - include/linux/mmc/host.h
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
[~andy/linux] / include / linux / mmc / host.h
index 949e4d5259898defb452842ed87946317917be71..1ee4424462ebcf98f2e81082b65c7211d64a248e 100644 (file)
@@ -50,6 +50,11 @@ struct mmc_ios {
 #define MMC_TIMING_LEGACY      0
 #define MMC_TIMING_MMC_HS      1
 #define MMC_TIMING_SD_HS       2
+#define MMC_TIMING_UHS_SDR12   MMC_TIMING_LEGACY
+#define MMC_TIMING_UHS_SDR25   MMC_TIMING_SD_HS
+#define MMC_TIMING_UHS_SDR50   3
+#define MMC_TIMING_UHS_SDR104  4
+#define MMC_TIMING_UHS_DDR50   5
 
        unsigned char   ddr;                    /* dual data rate used */
 
@@ -61,6 +66,7 @@ struct mmc_ios {
 
 #define MMC_SIGNAL_VOLTAGE_330 0
 #define MMC_SIGNAL_VOLTAGE_180 1
+#define MMC_SIGNAL_VOLTAGE_120 2
 
        unsigned char   drv_type;               /* driver type (A, B, C, D) */
 
@@ -131,6 +137,8 @@ struct mmc_host_ops {
        void    (*init_card)(struct mmc_host *host, struct mmc_card *card);
 
        int     (*start_signal_voltage_switch)(struct mmc_host *host, struct mmc_ios *ios);
+       int     (*execute_tuning)(struct mmc_host *host);
+       void    (*enable_preset_value)(struct mmc_host *host, bool enable);
 };
 
 struct mmc_card;
@@ -198,6 +206,11 @@ struct mmc_host {
 #define MMC_CAP_DRIVER_TYPE_A  (1 << 23)       /* Host supports Driver Type A */
 #define MMC_CAP_DRIVER_TYPE_C  (1 << 24)       /* Host supports Driver Type C */
 #define MMC_CAP_DRIVER_TYPE_D  (1 << 25)       /* Host supports Driver Type D */
+#define MMC_CAP_MAX_CURRENT_200        (1 << 26)       /* Host max current limit is 200mA */
+#define MMC_CAP_MAX_CURRENT_400        (1 << 27)       /* Host max current limit is 400mA */
+#define MMC_CAP_MAX_CURRENT_600        (1 << 28)       /* Host max current limit is 600mA */
+#define MMC_CAP_MAX_CURRENT_800        (1 << 29)       /* Host max current limit is 800mA */
+#define MMC_CAP_CMD23          (1 << 30)       /* CMD23 supported. */
 
        mmc_pm_flag_t           pm_caps;        /* supported pm features */
 
@@ -208,6 +221,7 @@ struct mmc_host {
        struct work_struct      clk_gate_work; /* delayed clock gate */
        unsigned int            clk_old;        /* old clock value cache */
        spinlock_t              clk_lock;       /* lock for clk fields */
+       struct mutex            clk_gate_mutex; /* mutex for clock gating */
 #endif
 
        /* host specific block data */
@@ -354,5 +368,10 @@ static inline int mmc_card_wake_sdio_irq(struct mmc_host *host)
 {
        return host->pm_flags & MMC_PM_WAKE_SDIO_IRQ;
 }
+
+static inline int mmc_host_cmd23(struct mmc_host *host)
+{
+       return host->caps & MMC_CAP_CMD23;
+}
 #endif