diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-01-28 14:52:40 -0500 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-01-28 14:52:40 -0500 |
commit | b20f86625de738658c74f2ecfe4050416d2252cc (patch) | |
tree | b84216b70bd923409217834a953f983700e39eda /include/linux/mmc/host.h | |
parent | 9f1065032ceb7e86c7c9f16bb86518857e88a172 (diff) | |
parent | dcd6c92267155e70a94b3927bce681ce74b80d1f (diff) |
Merge commit 'v3.3-rc1' into fbdev-next
Diffstat (limited to 'include/linux/mmc/host.h')
-rw-r--r-- | include/linux/mmc/host.h | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index a3ac9c48e5de..0beba1e5e1ed 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -56,10 +56,13 @@ struct mmc_ios { | |||
56 | #define MMC_TIMING_UHS_SDR50 3 | 56 | #define MMC_TIMING_UHS_SDR50 3 |
57 | #define MMC_TIMING_UHS_SDR104 4 | 57 | #define MMC_TIMING_UHS_SDR104 4 |
58 | #define MMC_TIMING_UHS_DDR50 5 | 58 | #define MMC_TIMING_UHS_DDR50 5 |
59 | #define MMC_TIMING_MMC_HS200 6 | ||
59 | 60 | ||
60 | #define MMC_SDR_MODE 0 | 61 | #define MMC_SDR_MODE 0 |
61 | #define MMC_1_2V_DDR_MODE 1 | 62 | #define MMC_1_2V_DDR_MODE 1 |
62 | #define MMC_1_8V_DDR_MODE 2 | 63 | #define MMC_1_8V_DDR_MODE 2 |
64 | #define MMC_1_2V_SDR_MODE 3 | ||
65 | #define MMC_1_8V_SDR_MODE 4 | ||
63 | 66 | ||
64 | unsigned char signal_voltage; /* signalling voltage (1.8V or 3.3V) */ | 67 | unsigned char signal_voltage; /* signalling voltage (1.8V or 3.3V) */ |
65 | 68 | ||
@@ -148,7 +151,9 @@ struct mmc_host_ops { | |||
148 | void (*init_card)(struct mmc_host *host, struct mmc_card *card); | 151 | void (*init_card)(struct mmc_host *host, struct mmc_card *card); |
149 | 152 | ||
150 | int (*start_signal_voltage_switch)(struct mmc_host *host, struct mmc_ios *ios); | 153 | int (*start_signal_voltage_switch)(struct mmc_host *host, struct mmc_ios *ios); |
151 | int (*execute_tuning)(struct mmc_host *host); | 154 | |
155 | /* The tuning command opcode value is different for SD and eMMC cards */ | ||
156 | int (*execute_tuning)(struct mmc_host *host, u32 opcode); | ||
152 | void (*enable_preset_value)(struct mmc_host *host, bool enable); | 157 | void (*enable_preset_value)(struct mmc_host *host, bool enable); |
153 | int (*select_drive_strength)(unsigned int max_dtr, int host_drv, int card_drv); | 158 | int (*select_drive_strength)(unsigned int max_dtr, int host_drv, int card_drv); |
154 | void (*hw_reset)(struct mmc_host *host); | 159 | void (*hw_reset)(struct mmc_host *host); |
@@ -167,6 +172,11 @@ struct mmc_async_req { | |||
167 | int (*err_check) (struct mmc_card *, struct mmc_async_req *); | 172 | int (*err_check) (struct mmc_card *, struct mmc_async_req *); |
168 | }; | 173 | }; |
169 | 174 | ||
175 | struct mmc_hotplug { | ||
176 | unsigned int irq; | ||
177 | void *handler_priv; | ||
178 | }; | ||
179 | |||
170 | struct mmc_host { | 180 | struct mmc_host { |
171 | struct device *parent; | 181 | struct device *parent; |
172 | struct device class_dev; | 182 | struct device class_dev; |
@@ -242,6 +252,11 @@ struct mmc_host { | |||
242 | #define MMC_CAP2_CACHE_CTRL (1 << 1) /* Allow cache control */ | 252 | #define MMC_CAP2_CACHE_CTRL (1 << 1) /* Allow cache control */ |
243 | #define MMC_CAP2_POWEROFF_NOTIFY (1 << 2) /* Notify poweroff supported */ | 253 | #define MMC_CAP2_POWEROFF_NOTIFY (1 << 2) /* Notify poweroff supported */ |
244 | #define MMC_CAP2_NO_MULTI_READ (1 << 3) /* Multiblock reads don't work */ | 254 | #define MMC_CAP2_NO_MULTI_READ (1 << 3) /* Multiblock reads don't work */ |
255 | #define MMC_CAP2_NO_SLEEP_CMD (1 << 4) /* Don't allow sleep command */ | ||
256 | #define MMC_CAP2_HS200_1_8V_SDR (1 << 5) /* can support */ | ||
257 | #define MMC_CAP2_HS200_1_2V_SDR (1 << 6) /* can support */ | ||
258 | #define MMC_CAP2_HS200 (MMC_CAP2_HS200_1_8V_SDR | \ | ||
259 | MMC_CAP2_HS200_1_2V_SDR) | ||
245 | 260 | ||
246 | mmc_pm_flag_t pm_caps; /* supported pm features */ | 261 | mmc_pm_flag_t pm_caps; /* supported pm features */ |
247 | unsigned int power_notify_type; | 262 | unsigned int power_notify_type; |
@@ -253,10 +268,12 @@ struct mmc_host { | |||
253 | int clk_requests; /* internal reference counter */ | 268 | int clk_requests; /* internal reference counter */ |
254 | unsigned int clk_delay; /* number of MCI clk hold cycles */ | 269 | unsigned int clk_delay; /* number of MCI clk hold cycles */ |
255 | bool clk_gated; /* clock gated */ | 270 | bool clk_gated; /* clock gated */ |
256 | struct work_struct clk_gate_work; /* delayed clock gate */ | 271 | struct delayed_work clk_gate_work; /* delayed clock gate */ |
257 | unsigned int clk_old; /* old clock value cache */ | 272 | unsigned int clk_old; /* old clock value cache */ |
258 | spinlock_t clk_lock; /* lock for clk fields */ | 273 | spinlock_t clk_lock; /* lock for clk fields */ |
259 | struct mutex clk_gate_mutex; /* mutex for clock gating */ | 274 | struct mutex clk_gate_mutex; /* mutex for clock gating */ |
275 | struct device_attribute clkgate_delay_attr; | ||
276 | unsigned long clkgate_delay; | ||
260 | #endif | 277 | #endif |
261 | 278 | ||
262 | /* host specific block data */ | 279 | /* host specific block data */ |
@@ -297,6 +314,8 @@ struct mmc_host { | |||
297 | int claim_cnt; /* "claim" nesting count */ | 314 | int claim_cnt; /* "claim" nesting count */ |
298 | 315 | ||
299 | struct delayed_work detect; | 316 | struct delayed_work detect; |
317 | int detect_change; /* card detect flag */ | ||
318 | struct mmc_hotplug hotplug; | ||
300 | 319 | ||
301 | const struct mmc_bus_ops *bus_ops; /* current bus driver */ | 320 | const struct mmc_bus_ops *bus_ops; /* current bus driver */ |
302 | unsigned int bus_refs; /* reference counter */ | 321 | unsigned int bus_refs; /* reference counter */ |
@@ -323,6 +342,8 @@ struct mmc_host { | |||
323 | struct fault_attr fail_mmc_request; | 342 | struct fault_attr fail_mmc_request; |
324 | #endif | 343 | #endif |
325 | 344 | ||
345 | unsigned int actual_clock; /* Actual HC clock rate */ | ||
346 | |||
326 | unsigned long private[0] ____cacheline_aligned; | 347 | unsigned long private[0] ____cacheline_aligned; |
327 | }; | 348 | }; |
328 | 349 | ||
@@ -396,7 +417,7 @@ static inline void mmc_set_disable_delay(struct mmc_host *host, | |||
396 | } | 417 | } |
397 | 418 | ||
398 | /* Module parameter */ | 419 | /* Module parameter */ |
399 | extern int mmc_assume_removable; | 420 | extern bool mmc_assume_removable; |
400 | 421 | ||
401 | static inline int mmc_card_is_removable(struct mmc_host *host) | 422 | static inline int mmc_card_is_removable(struct mmc_host *host) |
402 | { | 423 | { |