aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-11-18 17:47:30 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-18 17:47:30 -0500
commitc2ac2ae44d4c32382d001672021116e771bef4c9 (patch)
tree39a6ab0a118f562bb58ebc9e4c9cb709ac6ce29a /include/linux
parent2d3c627502f2a9b0a7de06a5a2df2365542a72c9 (diff)
parente395c4387c746b4cc7aace4c44baecd7e69a3249 (diff)
Merge tag 'mmc-updates-for-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
Pull MMC updates from Chris Ball: "MMC highlights for 3.13: Core: - Improve runtime PM support, remove mmc_{suspend,resume}_host(). - Add MMC_CAP_RUNTIME_RESUME, for delaying MMC resume until we're outside of the resume sequence (in runtime_resume) to decrease system resume time. Drivers: - dw_mmc: Support HS200 mode. - sdhci-eshdc-imx: Support SD3.0 SDR clock tuning, DDR on IMX6. - sdhci-pci: Add support for Intel Clovertrail and Merrifield" * tag 'mmc-updates-for-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (108 commits) mmc: wbsd: Silence compiler warning mmc: core: Silence compiler warning in __mmc_switch mmc: sh_mmcif: Convert to clk_prepare|unprepare mmc: sh_mmcif: Convert to PM macros when defining dev_pm_ops mmc: dw_mmc: exynos: Revert the sdr_timing assignment mmc: sdhci: Avoid needless loop while handling SDIO interrupts in sdhci_irq mmc: core: Add MMC_CAP_RUNTIME_RESUME to resume at runtime_resume mmc: core: Improve runtime PM support during suspend/resume for sd/mmc mmc: core: Remove redundant mmc_power_up|off at runtime callbacks mmc: Don't force card to active state when entering suspend/shutdown MIPS: db1235: Don't use MMC_CLKGATE mmc: core: Remove deprecated mmc_suspend|resume_host APIs mmc: mmci: Move away from using deprecated APIs mmc: via-sdmmc: Move away from using deprecated APIs mmc: tmio: Move away from using deprecated APIs mmc: sh_mmcif: Move away from using deprecated APIs mmc: sdricoh_cs: Move away from using deprecated APIs mmc: rtsx: Remove redundant suspend and resume callbacks mmc: wbsd: Move away from using deprecated APIs mmc: pxamci: Remove redundant suspend and resume callbacks ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mmc/card.h7
-rw-r--r--include/linux/mmc/core.h4
-rw-r--r--include/linux/mmc/dw_mmc.h4
-rw-r--r--include/linux/mmc/host.h5
-rw-r--r--include/linux/platform_data/mmc-esdhc-imx.h5
5 files changed, 17 insertions, 8 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index 842de3e21e70..176fdf824b14 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -240,6 +240,7 @@ struct mmc_part {
240struct mmc_card { 240struct mmc_card {
241 struct mmc_host *host; /* the host this device belongs to */ 241 struct mmc_host *host; /* the host this device belongs to */
242 struct device dev; /* the device */ 242 struct device dev; /* the device */
243 u32 ocr; /* the current OCR setting */
243 unsigned int rca; /* relative card address of device */ 244 unsigned int rca; /* relative card address of device */
244 unsigned int type; /* card type */ 245 unsigned int type; /* card type */
245#define MMC_TYPE_MMC 0 /* MMC card */ 246#define MMC_TYPE_MMC 0 /* MMC card */
@@ -257,6 +258,7 @@ struct mmc_card {
257#define MMC_CARD_REMOVED (1<<7) /* card has been removed */ 258#define MMC_CARD_REMOVED (1<<7) /* card has been removed */
258#define MMC_STATE_HIGHSPEED_200 (1<<8) /* card is in HS200 mode */ 259#define MMC_STATE_HIGHSPEED_200 (1<<8) /* card is in HS200 mode */
259#define MMC_STATE_DOING_BKOPS (1<<10) /* card is doing BKOPS */ 260#define MMC_STATE_DOING_BKOPS (1<<10) /* card is doing BKOPS */
261#define MMC_STATE_SUSPENDED (1<<11) /* card is suspended */
260 unsigned int quirks; /* card quirks */ 262 unsigned int quirks; /* card quirks */
261#define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */ 263#define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */
262#define MMC_QUIRK_BLKSZ_FOR_BYTE_MODE (1<<1) /* use func->cur_blksize */ 264#define MMC_QUIRK_BLKSZ_FOR_BYTE_MODE (1<<1) /* use func->cur_blksize */
@@ -420,10 +422,10 @@ static inline void __maybe_unused remove_quirk(struct mmc_card *card, int data)
420#define mmc_card_blockaddr(c) ((c)->state & MMC_STATE_BLOCKADDR) 422#define mmc_card_blockaddr(c) ((c)->state & MMC_STATE_BLOCKADDR)
421#define mmc_card_ddr_mode(c) ((c)->state & MMC_STATE_HIGHSPEED_DDR) 423#define mmc_card_ddr_mode(c) ((c)->state & MMC_STATE_HIGHSPEED_DDR)
422#define mmc_card_uhs(c) ((c)->state & MMC_STATE_ULTRAHIGHSPEED) 424#define mmc_card_uhs(c) ((c)->state & MMC_STATE_ULTRAHIGHSPEED)
423#define mmc_sd_card_uhs(c) ((c)->state & MMC_STATE_ULTRAHIGHSPEED)
424#define mmc_card_ext_capacity(c) ((c)->state & MMC_CARD_SDXC) 425#define mmc_card_ext_capacity(c) ((c)->state & MMC_CARD_SDXC)
425#define mmc_card_removed(c) ((c) && ((c)->state & MMC_CARD_REMOVED)) 426#define mmc_card_removed(c) ((c) && ((c)->state & MMC_CARD_REMOVED))
426#define mmc_card_doing_bkops(c) ((c)->state & MMC_STATE_DOING_BKOPS) 427#define mmc_card_doing_bkops(c) ((c)->state & MMC_STATE_DOING_BKOPS)
428#define mmc_card_suspended(c) ((c)->state & MMC_STATE_SUSPENDED)
427 429
428#define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) 430#define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT)
429#define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY) 431#define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY)
@@ -432,11 +434,12 @@ static inline void __maybe_unused remove_quirk(struct mmc_card *card, int data)
432#define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR) 434#define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR)
433#define mmc_card_set_ddr_mode(c) ((c)->state |= MMC_STATE_HIGHSPEED_DDR) 435#define mmc_card_set_ddr_mode(c) ((c)->state |= MMC_STATE_HIGHSPEED_DDR)
434#define mmc_card_set_uhs(c) ((c)->state |= MMC_STATE_ULTRAHIGHSPEED) 436#define mmc_card_set_uhs(c) ((c)->state |= MMC_STATE_ULTRAHIGHSPEED)
435#define mmc_sd_card_set_uhs(c) ((c)->state |= MMC_STATE_ULTRAHIGHSPEED)
436#define mmc_card_set_ext_capacity(c) ((c)->state |= MMC_CARD_SDXC) 437#define mmc_card_set_ext_capacity(c) ((c)->state |= MMC_CARD_SDXC)
437#define mmc_card_set_removed(c) ((c)->state |= MMC_CARD_REMOVED) 438#define mmc_card_set_removed(c) ((c)->state |= MMC_CARD_REMOVED)
438#define mmc_card_set_doing_bkops(c) ((c)->state |= MMC_STATE_DOING_BKOPS) 439#define mmc_card_set_doing_bkops(c) ((c)->state |= MMC_STATE_DOING_BKOPS)
439#define mmc_card_clr_doing_bkops(c) ((c)->state &= ~MMC_STATE_DOING_BKOPS) 440#define mmc_card_clr_doing_bkops(c) ((c)->state &= ~MMC_STATE_DOING_BKOPS)
441#define mmc_card_set_suspended(c) ((c)->state |= MMC_STATE_SUSPENDED)
442#define mmc_card_clr_suspended(c) ((c)->state &= ~MMC_STATE_SUSPENDED)
440 443
441/* 444/*
442 * Quirk add/remove for MMC products. 445 * Quirk add/remove for MMC products.
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index da51bec578c3..87079fc38011 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -151,7 +151,8 @@ extern int mmc_app_cmd(struct mmc_host *, struct mmc_card *);
151extern int mmc_wait_for_app_cmd(struct mmc_host *, struct mmc_card *, 151extern int mmc_wait_for_app_cmd(struct mmc_host *, struct mmc_card *,
152 struct mmc_command *, int); 152 struct mmc_command *, int);
153extern void mmc_start_bkops(struct mmc_card *card, bool from_exception); 153extern void mmc_start_bkops(struct mmc_card *card, bool from_exception);
154extern int __mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int, bool); 154extern int __mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int, bool,
155 bool);
155extern int mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int); 156extern int mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int);
156extern int mmc_send_ext_csd(struct mmc_card *card, u8 *ext_csd); 157extern int mmc_send_ext_csd(struct mmc_card *card, u8 *ext_csd);
157 158
@@ -188,7 +189,6 @@ extern unsigned int mmc_align_data_size(struct mmc_card *, unsigned int);
188 189
189extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort); 190extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort);
190extern void mmc_release_host(struct mmc_host *host); 191extern void mmc_release_host(struct mmc_host *host);
191extern int mmc_try_claim_host(struct mmc_host *host);
192 192
193extern void mmc_get_card(struct mmc_card *card); 193extern void mmc_get_card(struct mmc_card *card);
194extern void mmc_put_card(struct mmc_card *card); 194extern void mmc_put_card(struct mmc_card *card);
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
index 198f0fa44e9f..6ce7d2cd3c7a 100644
--- a/include/linux/mmc/dw_mmc.h
+++ b/include/linux/mmc/dw_mmc.h
@@ -15,6 +15,7 @@
15#define LINUX_MMC_DW_MMC_H 15#define LINUX_MMC_DW_MMC_H
16 16
17#include <linux/scatterlist.h> 17#include <linux/scatterlist.h>
18#include <linux/mmc/core.h>
18 19
19#define MAX_MCI_SLOTS 2 20#define MAX_MCI_SLOTS 2
20 21
@@ -129,6 +130,9 @@ struct dw_mci {
129 struct mmc_request *mrq; 130 struct mmc_request *mrq;
130 struct mmc_command *cmd; 131 struct mmc_command *cmd;
131 struct mmc_data *data; 132 struct mmc_data *data;
133 struct mmc_command stop_abort;
134 unsigned int prev_blksz;
135 unsigned char timing;
132 struct workqueue_struct *card_workqueue; 136 struct workqueue_struct *card_workqueue;
133 137
134 /* DMA interface members*/ 138 /* DMA interface members*/
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 3b0c33ae13e1..99f5709ac343 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -254,6 +254,7 @@ struct mmc_host {
254#define MMC_CAP_UHS_SDR50 (1 << 17) /* Host supports UHS SDR50 mode */ 254#define MMC_CAP_UHS_SDR50 (1 << 17) /* Host supports UHS SDR50 mode */
255#define MMC_CAP_UHS_SDR104 (1 << 18) /* Host supports UHS SDR104 mode */ 255#define MMC_CAP_UHS_SDR104 (1 << 18) /* Host supports UHS SDR104 mode */
256#define MMC_CAP_UHS_DDR50 (1 << 19) /* Host supports UHS DDR50 mode */ 256#define MMC_CAP_UHS_DDR50 (1 << 19) /* Host supports UHS DDR50 mode */
257#define MMC_CAP_RUNTIME_RESUME (1 << 20) /* Resume at runtime_resume. */
257#define MMC_CAP_DRIVER_TYPE_A (1 << 23) /* Host supports Driver Type A */ 258#define MMC_CAP_DRIVER_TYPE_A (1 << 23) /* Host supports Driver Type A */
258#define MMC_CAP_DRIVER_TYPE_C (1 << 24) /* Host supports Driver Type C */ 259#define MMC_CAP_DRIVER_TYPE_C (1 << 24) /* Host supports Driver Type C */
259#define MMC_CAP_DRIVER_TYPE_D (1 << 25) /* Host supports Driver Type D */ 260#define MMC_CAP_DRIVER_TYPE_D (1 << 25) /* Host supports Driver Type D */
@@ -309,7 +310,6 @@ struct mmc_host {
309 spinlock_t lock; /* lock for claim and bus ops */ 310 spinlock_t lock; /* lock for claim and bus ops */
310 311
311 struct mmc_ios ios; /* current io bus settings */ 312 struct mmc_ios ios; /* current io bus settings */
312 u32 ocr; /* the current OCR setting */
313 313
314 /* group bitfields together to minimize padding */ 314 /* group bitfields together to minimize padding */
315 unsigned int use_spi_crc:1; 315 unsigned int use_spi_crc:1;
@@ -382,9 +382,6 @@ static inline void *mmc_priv(struct mmc_host *host)
382#define mmc_classdev(x) (&(x)->class_dev) 382#define mmc_classdev(x) (&(x)->class_dev)
383#define mmc_hostname(x) (dev_name(&(x)->class_dev)) 383#define mmc_hostname(x) (dev_name(&(x)->class_dev))
384 384
385int mmc_suspend_host(struct mmc_host *);
386int mmc_resume_host(struct mmc_host *);
387
388int mmc_power_save_host(struct mmc_host *host); 385int mmc_power_save_host(struct mmc_host *host);
389int mmc_power_restore_host(struct mmc_host *host); 386int mmc_power_restore_host(struct mmc_host *host);
390 387
diff --git a/include/linux/platform_data/mmc-esdhc-imx.h b/include/linux/platform_data/mmc-esdhc-imx.h
index d44912d81578..75f70f6ac137 100644
--- a/include/linux/platform_data/mmc-esdhc-imx.h
+++ b/include/linux/platform_data/mmc-esdhc-imx.h
@@ -10,6 +10,8 @@
10#ifndef __ASM_ARCH_IMX_ESDHC_H 10#ifndef __ASM_ARCH_IMX_ESDHC_H
11#define __ASM_ARCH_IMX_ESDHC_H 11#define __ASM_ARCH_IMX_ESDHC_H
12 12
13#include <linux/types.h>
14
13enum wp_types { 15enum wp_types {
14 ESDHC_WP_NONE, /* no WP, neither controller nor gpio */ 16 ESDHC_WP_NONE, /* no WP, neither controller nor gpio */
15 ESDHC_WP_CONTROLLER, /* mmc controller internal WP */ 17 ESDHC_WP_CONTROLLER, /* mmc controller internal WP */
@@ -32,6 +34,7 @@ enum cd_types {
32 * @cd_gpio: gpio for card_detect interrupt 34 * @cd_gpio: gpio for card_detect interrupt
33 * @wp_type: type of write_protect method (see wp_types enum above) 35 * @wp_type: type of write_protect method (see wp_types enum above)
34 * @cd_type: type of card_detect method (see cd_types enum above) 36 * @cd_type: type of card_detect method (see cd_types enum above)
37 * @support_vsel: indicate it supports 1.8v switching
35 */ 38 */
36 39
37struct esdhc_platform_data { 40struct esdhc_platform_data {
@@ -41,5 +44,7 @@ struct esdhc_platform_data {
41 enum cd_types cd_type; 44 enum cd_types cd_type;
42 int max_bus_width; 45 int max_bus_width;
43 unsigned int f_max; 46 unsigned int f_max;
47 bool support_vsel;
48 unsigned int delay_line;
44}; 49};
45#endif /* __ASM_ARCH_IMX_ESDHC_H */ 50#endif /* __ASM_ARCH_IMX_ESDHC_H */