diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-10 14:16:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-10 14:16:00 -0400 |
commit | bfffbea1aaeeb1eb6500c83ff9653416daa5b490 (patch) | |
tree | 1325ecb176b7a3d04924d6a1563b15ad6085d36a /include/linux | |
parent | 34ae0a6f05aee9f51fca17001b4a90703d434ae1 (diff) | |
parent | 01ebea1b411aafc8eab440bf1d2037f01bbed99b (diff) |
Merge tag 'mmc-updates-for-3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
Pull MMC updates from Chris Ball:
"MMC highlights for 3.11:
Core:
- Add support for eMMC 5.1 devices
- Add MMC_CAP_AGGRESSIVE_PM capability for aggressive power
management of eMMC/SD between requests, using runtime PM
- Add an ioctl to perform the eMMC 4.5 Sanitize command. Sample code
at:
git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git
Drivers:
- dw_mmc: Add support for Rockchip's Cortex-A9 SoCs
- dw_mmc: Add support for Altera SoCFPGAs
- sdhci-esdhc-imx: Add support for 8-bit bus width, non-removable
cards
- sdhci-bcm-kona: New driver for Broadcom Kona (281xx) SoCs
- sdhi/tmio: Add DT DMA support"
* tag 'mmc-updates-for-3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (87 commits)
mmc: bcm281xx SDHCI driver
mmc: sdhci: add card_event callback to sdhci
mmc: core: Fixup Oops for SDIO shutdown
mmc: sdhci-pci: add another device id
mmc: esdhc: Fix bug when writing to SDHCI_HOST_CONTROL register
mmc: esdhc: Add support for 8-bit bus width and non-removable card
mmc: core: production year for eMMC 4.41 and later
mmc: omap: remove unnecessary #if 0's
mmc: sdhci: fix ctrl_2 on super-speed selection
mmc: dw_mmc-pltfm: add Rockchip variant
mmc: dw_mmc-pltfm: move probe and remove below dt match table
mmc: dw_mmc-pltfm: remove static from dw_mci_pltfm_remove
mmc: sdhci-acpi: add support for eMMC hardware reset for HID 80860F14
mmc: sdhci-pci: add support for eMMC hardware reset for BYT eMMC.
mmc: dw_mmc: Add support DW SD/MMC driver on SOCFPGA
mmc: sdhci: fix caps2 for HS200
sdhci-pxav3: Fix runtime PM initialization
mmc: core: Add DT-bindings for MMC_CAP2_FULL_PWR_CYCLE
mmc: core: Invent MMC_CAP2_FULL_PWR_CYCLE
mmc: core: Enable power_off_notify for eMMC shutdown sequence
...
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mfd/tmio.h | 5 | ||||
-rw-r--r-- | include/linux/mmc/card.h | 11 | ||||
-rw-r--r-- | include/linux/mmc/core.h | 5 | ||||
-rw-r--r-- | include/linux/mmc/host.h | 12 | ||||
-rw-r--r-- | include/linux/mmc/sdhci.h | 6 | ||||
-rw-r--r-- | include/linux/platform_data/mmc-esdhc-imx.h | 1 |
6 files changed, 30 insertions, 10 deletions
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index 99bf3e665997..ce3511326f80 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h | |||
@@ -81,10 +81,15 @@ int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base); | |||
81 | void tmio_core_mmc_pwr(void __iomem *cnf, int shift, int state); | 81 | void tmio_core_mmc_pwr(void __iomem *cnf, int shift, int state); |
82 | void tmio_core_mmc_clk_div(void __iomem *cnf, int shift, int state); | 82 | void tmio_core_mmc_clk_div(void __iomem *cnf, int shift, int state); |
83 | 83 | ||
84 | struct dma_chan; | ||
85 | |||
84 | struct tmio_mmc_dma { | 86 | struct tmio_mmc_dma { |
85 | void *chan_priv_tx; | 87 | void *chan_priv_tx; |
86 | void *chan_priv_rx; | 88 | void *chan_priv_rx; |
89 | int slave_id_tx; | ||
90 | int slave_id_rx; | ||
87 | int alignment_shift; | 91 | int alignment_shift; |
92 | bool (*filter)(struct dma_chan *chan, void *arg); | ||
88 | }; | 93 | }; |
89 | 94 | ||
90 | struct tmio_mmc_host; | 95 | struct tmio_mmc_host; |
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index f31725ba49f3..842de3e21e70 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -94,7 +94,11 @@ struct mmc_ext_csd { | |||
94 | u8 raw_ext_csd_structure; /* 194 */ | 94 | u8 raw_ext_csd_structure; /* 194 */ |
95 | u8 raw_card_type; /* 196 */ | 95 | u8 raw_card_type; /* 196 */ |
96 | u8 out_of_int_time; /* 198 */ | 96 | u8 out_of_int_time; /* 198 */ |
97 | u8 raw_s_a_timeout; /* 217 */ | 97 | u8 raw_pwr_cl_52_195; /* 200 */ |
98 | u8 raw_pwr_cl_26_195; /* 201 */ | ||
99 | u8 raw_pwr_cl_52_360; /* 202 */ | ||
100 | u8 raw_pwr_cl_26_360; /* 203 */ | ||
101 | u8 raw_s_a_timeout; /* 217 */ | ||
98 | u8 raw_hc_erase_gap_size; /* 221 */ | 102 | u8 raw_hc_erase_gap_size; /* 221 */ |
99 | u8 raw_erase_timeout_mult; /* 223 */ | 103 | u8 raw_erase_timeout_mult; /* 223 */ |
100 | u8 raw_hc_erase_grp_size; /* 224 */ | 104 | u8 raw_hc_erase_grp_size; /* 224 */ |
@@ -102,6 +106,10 @@ struct mmc_ext_csd { | |||
102 | u8 raw_sec_erase_mult; /* 230 */ | 106 | u8 raw_sec_erase_mult; /* 230 */ |
103 | u8 raw_sec_feature_support;/* 231 */ | 107 | u8 raw_sec_feature_support;/* 231 */ |
104 | u8 raw_trim_mult; /* 232 */ | 108 | u8 raw_trim_mult; /* 232 */ |
109 | u8 raw_pwr_cl_200_195; /* 236 */ | ||
110 | u8 raw_pwr_cl_200_360; /* 237 */ | ||
111 | u8 raw_pwr_cl_ddr_52_195; /* 238 */ | ||
112 | u8 raw_pwr_cl_ddr_52_360; /* 239 */ | ||
105 | u8 raw_bkops_status; /* 246 */ | 113 | u8 raw_bkops_status; /* 246 */ |
106 | u8 raw_sectors[4]; /* 212 - 4 bytes */ | 114 | u8 raw_sectors[4]; /* 212 - 4 bytes */ |
107 | 115 | ||
@@ -512,6 +520,7 @@ struct mmc_driver { | |||
512 | void (*remove)(struct mmc_card *); | 520 | void (*remove)(struct mmc_card *); |
513 | int (*suspend)(struct mmc_card *); | 521 | int (*suspend)(struct mmc_card *); |
514 | int (*resume)(struct mmc_card *); | 522 | int (*resume)(struct mmc_card *); |
523 | void (*shutdown)(struct mmc_card *); | ||
515 | }; | 524 | }; |
516 | 525 | ||
517 | extern int mmc_register_driver(struct mmc_driver *); | 526 | extern int mmc_register_driver(struct mmc_driver *); |
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 39613b9a6fc5..443243b241d5 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h | |||
@@ -96,6 +96,8 @@ struct mmc_command { | |||
96 | */ | 96 | */ |
97 | 97 | ||
98 | unsigned int cmd_timeout_ms; /* in milliseconds */ | 98 | unsigned int cmd_timeout_ms; /* in milliseconds */ |
99 | /* Set this flag only for blocking sanitize request */ | ||
100 | bool sanitize_busy; | ||
99 | 101 | ||
100 | struct mmc_data *data; /* data segment associated with cmd */ | 102 | struct mmc_data *data; /* data segment associated with cmd */ |
101 | struct mmc_request *mrq; /* associated request */ | 103 | struct mmc_request *mrq; /* associated request */ |
@@ -188,6 +190,9 @@ extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort); | |||
188 | extern void mmc_release_host(struct mmc_host *host); | 190 | extern void mmc_release_host(struct mmc_host *host); |
189 | extern int mmc_try_claim_host(struct mmc_host *host); | 191 | extern int mmc_try_claim_host(struct mmc_host *host); |
190 | 192 | ||
193 | extern void mmc_get_card(struct mmc_card *card); | ||
194 | extern void mmc_put_card(struct mmc_card *card); | ||
195 | |||
191 | extern int mmc_flush_cache(struct mmc_card *); | 196 | extern int mmc_flush_cache(struct mmc_card *); |
192 | 197 | ||
193 | extern int mmc_detect_card_removed(struct mmc_host *host); | 198 | extern int mmc_detect_card_removed(struct mmc_host *host); |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index e326ae2882a0..3b0c33ae13e1 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -239,7 +239,7 @@ struct mmc_host { | |||
239 | #define MMC_CAP_SPI (1 << 4) /* Talks only SPI protocols */ | 239 | #define MMC_CAP_SPI (1 << 4) /* Talks only SPI protocols */ |
240 | #define MMC_CAP_NEEDS_POLL (1 << 5) /* Needs polling for card-detection */ | 240 | #define MMC_CAP_NEEDS_POLL (1 << 5) /* Needs polling for card-detection */ |
241 | #define MMC_CAP_8_BIT_DATA (1 << 6) /* Can the host do 8 bit transfers */ | 241 | #define MMC_CAP_8_BIT_DATA (1 << 6) /* Can the host do 8 bit transfers */ |
242 | 242 | #define MMC_CAP_AGGRESSIVE_PM (1 << 7) /* Suspend (e)MMC/SD at idle */ | |
243 | #define MMC_CAP_NONREMOVABLE (1 << 8) /* Nonremovable e.g. eMMC */ | 243 | #define MMC_CAP_NONREMOVABLE (1 << 8) /* Nonremovable e.g. eMMC */ |
244 | #define MMC_CAP_WAIT_WHILE_BUSY (1 << 9) /* Waits while card is busy */ | 244 | #define MMC_CAP_WAIT_WHILE_BUSY (1 << 9) /* Waits while card is busy */ |
245 | #define MMC_CAP_ERASE (1 << 10) /* Allow erase/trim commands */ | 245 | #define MMC_CAP_ERASE (1 << 10) /* Allow erase/trim commands */ |
@@ -264,7 +264,7 @@ struct mmc_host { | |||
264 | 264 | ||
265 | #define MMC_CAP2_BOOTPART_NOACC (1 << 0) /* Boot partition no access */ | 265 | #define MMC_CAP2_BOOTPART_NOACC (1 << 0) /* Boot partition no access */ |
266 | #define MMC_CAP2_CACHE_CTRL (1 << 1) /* Allow cache control */ | 266 | #define MMC_CAP2_CACHE_CTRL (1 << 1) /* Allow cache control */ |
267 | #define MMC_CAP2_POWEROFF_NOTIFY (1 << 2) /* Notify poweroff supported */ | 267 | #define MMC_CAP2_FULL_PWR_CYCLE (1 << 2) /* Can do full power cycle */ |
268 | #define MMC_CAP2_NO_MULTI_READ (1 << 3) /* Multiblock reads don't work */ | 268 | #define MMC_CAP2_NO_MULTI_READ (1 << 3) /* Multiblock reads don't work */ |
269 | #define MMC_CAP2_NO_SLEEP_CMD (1 << 4) /* Don't allow sleep command */ | 269 | #define MMC_CAP2_NO_SLEEP_CMD (1 << 4) /* Don't allow sleep command */ |
270 | #define MMC_CAP2_HS200_1_8V_SDR (1 << 5) /* can support */ | 270 | #define MMC_CAP2_HS200_1_8V_SDR (1 << 5) /* can support */ |
@@ -272,7 +272,6 @@ struct mmc_host { | |||
272 | #define MMC_CAP2_HS200 (MMC_CAP2_HS200_1_8V_SDR | \ | 272 | #define MMC_CAP2_HS200 (MMC_CAP2_HS200_1_8V_SDR | \ |
273 | MMC_CAP2_HS200_1_2V_SDR) | 273 | MMC_CAP2_HS200_1_2V_SDR) |
274 | #define MMC_CAP2_BROKEN_VOLTAGE (1 << 7) /* Use the broken voltage */ | 274 | #define MMC_CAP2_BROKEN_VOLTAGE (1 << 7) /* Use the broken voltage */ |
275 | #define MMC_CAP2_DETECT_ON_ERR (1 << 8) /* On I/O err check card removal */ | ||
276 | #define MMC_CAP2_HC_ERASE_SZ (1 << 9) /* High-capacity erase size */ | 275 | #define MMC_CAP2_HC_ERASE_SZ (1 << 9) /* High-capacity erase size */ |
277 | #define MMC_CAP2_CD_ACTIVE_HIGH (1 << 10) /* Card-detect signal active high */ | 276 | #define MMC_CAP2_CD_ACTIVE_HIGH (1 << 10) /* Card-detect signal active high */ |
278 | #define MMC_CAP2_RO_ACTIVE_HIGH (1 << 11) /* Write-protect signal active high */ | 277 | #define MMC_CAP2_RO_ACTIVE_HIGH (1 << 11) /* Write-protect signal active high */ |
@@ -281,6 +280,7 @@ struct mmc_host { | |||
281 | #define MMC_CAP2_PACKED_CMD (MMC_CAP2_PACKED_RD | \ | 280 | #define MMC_CAP2_PACKED_CMD (MMC_CAP2_PACKED_RD | \ |
282 | MMC_CAP2_PACKED_WR) | 281 | MMC_CAP2_PACKED_WR) |
283 | #define MMC_CAP2_NO_PRESCAN_POWERUP (1 << 14) /* Don't power up before scan */ | 282 | #define MMC_CAP2_NO_PRESCAN_POWERUP (1 << 14) /* Don't power up before scan */ |
283 | #define MMC_CAP2_SANITIZE (1 << 15) /* Support Sanitize */ | ||
284 | 284 | ||
285 | mmc_pm_flag_t pm_caps; /* supported pm features */ | 285 | mmc_pm_flag_t pm_caps; /* supported pm features */ |
286 | 286 | ||
@@ -369,7 +369,7 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *); | |||
369 | int mmc_add_host(struct mmc_host *); | 369 | int mmc_add_host(struct mmc_host *); |
370 | void mmc_remove_host(struct mmc_host *); | 370 | void mmc_remove_host(struct mmc_host *); |
371 | void mmc_free_host(struct mmc_host *); | 371 | void mmc_free_host(struct mmc_host *); |
372 | void mmc_of_parse(struct mmc_host *host); | 372 | int mmc_of_parse(struct mmc_host *host); |
373 | 373 | ||
374 | static inline void *mmc_priv(struct mmc_host *host) | 374 | static inline void *mmc_priv(struct mmc_host *host) |
375 | { | 375 | { |
@@ -425,10 +425,6 @@ static inline int mmc_regulator_get_supply(struct mmc_host *mmc) | |||
425 | } | 425 | } |
426 | #endif | 426 | #endif |
427 | 427 | ||
428 | int mmc_card_awake(struct mmc_host *host); | ||
429 | int mmc_card_sleep(struct mmc_host *host); | ||
430 | int mmc_card_can_sleep(struct mmc_host *host); | ||
431 | |||
432 | int mmc_pm_notify(struct notifier_block *notify_block, unsigned long, void *); | 428 | int mmc_pm_notify(struct notifier_block *notify_block, unsigned long, void *); |
433 | 429 | ||
434 | /* Module parameter */ | 430 | /* Module parameter */ |
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index b838ffc49e4a..e3c6a74d980a 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h | |||
@@ -95,6 +95,9 @@ struct sdhci_host { | |||
95 | /* The system physically doesn't support 1.8v, even if the host does */ | 95 | /* The system physically doesn't support 1.8v, even if the host does */ |
96 | #define SDHCI_QUIRK2_NO_1_8_V (1<<2) | 96 | #define SDHCI_QUIRK2_NO_1_8_V (1<<2) |
97 | #define SDHCI_QUIRK2_PRESET_VALUE_BROKEN (1<<3) | 97 | #define SDHCI_QUIRK2_PRESET_VALUE_BROKEN (1<<3) |
98 | #define SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON (1<<4) | ||
99 | /* Controller has a non-standard host control register */ | ||
100 | #define SDHCI_QUIRK2_BROKEN_HOST_CONTROL (1<<5) | ||
98 | 101 | ||
99 | int irq; /* Device IRQ */ | 102 | int irq; /* Device IRQ */ |
100 | void __iomem *ioaddr; /* Mapped address */ | 103 | void __iomem *ioaddr; /* Mapped address */ |
@@ -126,7 +129,7 @@ struct sdhci_host { | |||
126 | #define SDHCI_AUTO_CMD23 (1<<7) /* Auto CMD23 support */ | 129 | #define SDHCI_AUTO_CMD23 (1<<7) /* Auto CMD23 support */ |
127 | #define SDHCI_PV_ENABLED (1<<8) /* Preset value enabled */ | 130 | #define SDHCI_PV_ENABLED (1<<8) /* Preset value enabled */ |
128 | #define SDHCI_SDIO_IRQ_ENABLED (1<<9) /* SDIO irq enabled */ | 131 | #define SDHCI_SDIO_IRQ_ENABLED (1<<9) /* SDIO irq enabled */ |
129 | #define SDHCI_HS200_NEEDS_TUNING (1<<10) /* HS200 needs tuning */ | 132 | #define SDHCI_SDR104_NEEDS_TUNING (1<<10) /* SDR104/HS200 needs tuning */ |
130 | #define SDHCI_USING_RETUNING_TIMER (1<<11) /* Host is using a retuning timer for the card */ | 133 | #define SDHCI_USING_RETUNING_TIMER (1<<11) /* Host is using a retuning timer for the card */ |
131 | 134 | ||
132 | unsigned int version; /* SDHCI spec. version */ | 135 | unsigned int version; /* SDHCI spec. version */ |
@@ -139,6 +142,7 @@ struct sdhci_host { | |||
139 | u8 pwr; /* Current voltage */ | 142 | u8 pwr; /* Current voltage */ |
140 | 143 | ||
141 | bool runtime_suspended; /* Host is runtime suspended */ | 144 | bool runtime_suspended; /* Host is runtime suspended */ |
145 | bool bus_on; /* Bus power prevents runtime suspend */ | ||
142 | 146 | ||
143 | struct mmc_request *mrq; /* Current request */ | 147 | struct mmc_request *mrq; /* Current request */ |
144 | struct mmc_command *cmd; /* Current command */ | 148 | struct mmc_command *cmd; /* Current command */ |
diff --git a/include/linux/platform_data/mmc-esdhc-imx.h b/include/linux/platform_data/mmc-esdhc-imx.h index b4a0521ce411..d44912d81578 100644 --- a/include/linux/platform_data/mmc-esdhc-imx.h +++ b/include/linux/platform_data/mmc-esdhc-imx.h | |||
@@ -40,5 +40,6 @@ struct esdhc_platform_data { | |||
40 | enum wp_types wp_type; | 40 | enum wp_types wp_type; |
41 | enum cd_types cd_type; | 41 | enum cd_types cd_type; |
42 | int max_bus_width; | 42 | int max_bus_width; |
43 | unsigned int f_max; | ||
43 | }; | 44 | }; |
44 | #endif /* __ASM_ARCH_IMX_ESDHC_H */ | 45 | #endif /* __ASM_ARCH_IMX_ESDHC_H */ |