aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-26 12:31:09 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-26 12:31:09 -0500
commited5dc2372dba46e0ecd08791b1a0399d313e5cff (patch)
tree571319985b59a2963fb7580c24ee2aa1696359e2 /include/linux
parent0512c04a2b5d29a33d96d315e1d14c55f5148aa7 (diff)
parent0e786102949d7461859c6ce9f39c2c8d28e42db3 (diff)
Merge tag 'mmc-updates-for-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
Pull MMC update from Chris Ball: "MMC highlights for 3.9: Core: - Support for packed commands in eMMC 4.5. (This requires a host capability to be turned on. It increases write throughput by 20%+, but may also increase average write latency; more testing needed.) - Add DT bindings for capability flags. - Add mmc_of_parse() for shared DT parsing between drivers. Drivers: - android-goldfish: New MMC driver for the Android Goldfish emulator. - mvsdio: Add DT bindings, pinctrl, use slot-gpio for card detection. - omap_hsmmc: Fix boot hangs with RPMB partitions. - sdhci-bcm2835: New driver for controller used by Raspberry Pi. - sdhci-esdhc-imx: Add 8-bit data, auto CMD23 support, use slot-gpio. - sh_mmcif: Add support for eMMC DDR, bundled MMCIF IRQs. - tmio_mmc: Add DT bindings, support for vccq regulator" * tag 'mmc-updates-for-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (92 commits) mmc: tegra: assume CONFIG_OF, remove platform data mmc: add DT bindings for more MMC capability flags mmc: tmio: add support for the VccQ regulator mmc: tmio: remove unused and deprecated symbols mmc: sh_mobile_sdhi: use managed resource allocations mmc: sh_mobile_sdhi: remove unused .pdata field mmc: tmio-mmc: parse device-tree bindings mmc: tmio-mmc: define device-tree bindings mmc: sh_mmcif: use mmc_of_parse() to parse standard MMC DT bindings mmc: (cosmetic) remove "extern" from function declarations mmc: provide a standard MMC device-tree binding parser centrally mmc: detailed definition of CD and WP MMC line polarities in DT mmc: sdhi, tmio: only check flags in tmio-mmc driver proper mmc: sdhci: Fix parameter of sdhci_do_start_signal_voltage_switch() mmc: sdhci: check voltage range only on regulators aware of voltage value mmc: bcm2835: set SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK mmc: support packed write command for eMMC4.5 devices mmc: add packed command feature of eMMC4.5 mmc: rtsx: remove driving adjustment mmc: use regulator_can_change_voltage() instead of regulator_count_voltages ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mfd/tmio.h18
-rw-r--r--include/linux/mmc/card.h22
-rw-r--r--include/linux/mmc/core.h7
-rw-r--r--include/linux/mmc/dw_mmc.h6
-rw-r--r--include/linux/mmc/host.h61
-rw-r--r--include/linux/mmc/mmc.h15
-rw-r--r--include/linux/mmc/sdhci.h1
-rw-r--r--include/linux/mmc/sh_mobile_sdhi.h2
-rw-r--r--include/linux/platform_data/mmc-esdhc-imx.h1
-rw-r--r--include/linux/platform_data/mmc-sdhci-tegra.h28
10 files changed, 95 insertions, 66 deletions
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
index d83af39815ab..99bf3e665997 100644
--- a/include/linux/mfd/tmio.h
+++ b/include/linux/mfd/tmio.h
@@ -65,12 +65,6 @@
65 */ 65 */
66#define TMIO_MMC_SDIO_IRQ (1 << 2) 66#define TMIO_MMC_SDIO_IRQ (1 << 2)
67/* 67/*
68 * Some platforms can detect card insertion events with controller powered
69 * down, using a GPIO IRQ, in which case they have to fill in cd_irq, cd_gpio,
70 * and cd_flags fields of struct tmio_mmc_data.
71 */
72#define TMIO_MMC_HAS_COLD_CD (1 << 3)
73/*
74 * Some controllers require waiting for the SD bus to become 68 * Some controllers require waiting for the SD bus to become
75 * idle before writing to some registers. 69 * idle before writing to some registers.
76 */ 70 */
@@ -117,18 +111,6 @@ struct tmio_mmc_data {
117}; 111};
118 112
119/* 113/*
120 * This function is deprecated and will be removed soon. Please, convert your
121 * platform to use drivers/mmc/core/cd-gpio.c
122 */
123#include <linux/mmc/host.h>
124static inline void tmio_mmc_cd_wakeup(struct tmio_mmc_data *pdata)
125{
126 if (pdata)
127 mmc_detect_change(dev_get_drvdata(pdata->dev),
128 msecs_to_jiffies(100));
129}
130
131/*
132 * data for the NAND controller 114 * data for the NAND controller
133 */ 115 */
134struct tmio_nand_data { 116struct tmio_nand_data {
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index 5c69315d60cc..61b2c30c903b 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -53,6 +53,9 @@ struct mmc_ext_csd {
53 u8 part_config; 53 u8 part_config;
54 u8 cache_ctrl; 54 u8 cache_ctrl;
55 u8 rst_n_function; 55 u8 rst_n_function;
56 u8 max_packed_writes;
57 u8 max_packed_reads;
58 u8 packed_event_en;
56 unsigned int part_time; /* Units: ms */ 59 unsigned int part_time; /* Units: ms */
57 unsigned int sa_timeout; /* Units: 100ns */ 60 unsigned int sa_timeout; /* Units: 100ns */
58 unsigned int generic_cmd6_time; /* Units: 10ms */ 61 unsigned int generic_cmd6_time; /* Units: 10ms */
@@ -83,7 +86,7 @@ struct mmc_ext_csd {
83 unsigned int data_tag_unit_size; /* DATA TAG UNIT size */ 86 unsigned int data_tag_unit_size; /* DATA TAG UNIT size */
84 unsigned int boot_ro_lock; /* ro lock support */ 87 unsigned int boot_ro_lock; /* ro lock support */
85 bool boot_ro_lockable; 88 bool boot_ro_lockable;
86 u8 raw_exception_status; /* 53 */ 89 u8 raw_exception_status; /* 54 */
87 u8 raw_partition_support; /* 160 */ 90 u8 raw_partition_support; /* 160 */
88 u8 raw_rpmb_size_mult; /* 168 */ 91 u8 raw_rpmb_size_mult; /* 168 */
89 u8 raw_erased_mem_count; /* 181 */ 92 u8 raw_erased_mem_count; /* 181 */
@@ -187,6 +190,18 @@ struct sdio_func_tuple;
187 190
188#define SDIO_MAX_FUNCS 7 191#define SDIO_MAX_FUNCS 7
189 192
193enum mmc_blk_status {
194 MMC_BLK_SUCCESS = 0,
195 MMC_BLK_PARTIAL,
196 MMC_BLK_CMD_ERR,
197 MMC_BLK_RETRY,
198 MMC_BLK_ABORT,
199 MMC_BLK_DATA_ERR,
200 MMC_BLK_ECC_ERR,
201 MMC_BLK_NOMEDIUM,
202 MMC_BLK_NEW_REQUEST,
203};
204
190/* The number of MMC physical partitions. These consist of: 205/* The number of MMC physical partitions. These consist of:
191 * boot partitions (2), general purpose partitions (4) in MMC v4.4. 206 * boot partitions (2), general purpose partitions (4) in MMC v4.4.
192 */ 207 */
@@ -295,6 +310,11 @@ static inline void mmc_part_add(struct mmc_card *card, unsigned int size,
295 card->nr_parts++; 310 card->nr_parts++;
296} 311}
297 312
313static inline bool mmc_large_sector(struct mmc_card *card)
314{
315 return card->ext_csd.data_sector_size == 4096;
316}
317
298/* 318/*
299 * The world is not perfect and supplies us with broken mmc/sdio devices. 319 * The world is not perfect and supplies us with broken mmc/sdio devices.
300 * For at least some of these bugs we need a work-around. 320 * For at least some of these bugs we need a work-around.
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index 5bf7c2274fcb..39613b9a6fc5 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -18,6 +18,9 @@ struct mmc_request;
18struct mmc_command { 18struct mmc_command {
19 u32 opcode; 19 u32 opcode;
20 u32 arg; 20 u32 arg;
21#define MMC_CMD23_ARG_REL_WR (1 << 31)
22#define MMC_CMD23_ARG_PACKED ((0 << 31) | (1 << 30))
23#define MMC_CMD23_ARG_TAG_REQ (1 << 29)
21 u32 resp[4]; 24 u32 resp[4];
22 unsigned int flags; /* expected response type */ 25 unsigned int flags; /* expected response type */
23#define MMC_RSP_PRESENT (1 << 0) 26#define MMC_RSP_PRESENT (1 << 0)
@@ -120,6 +123,7 @@ struct mmc_data {
120 s32 host_cookie; /* host private data */ 123 s32 host_cookie; /* host private data */
121}; 124};
122 125
126struct mmc_host;
123struct mmc_request { 127struct mmc_request {
124 struct mmc_command *sbc; /* SET_BLOCK_COUNT for multiblock */ 128 struct mmc_command *sbc; /* SET_BLOCK_COUNT for multiblock */
125 struct mmc_command *cmd; 129 struct mmc_command *cmd;
@@ -128,9 +132,9 @@ struct mmc_request {
128 132
129 struct completion completion; 133 struct completion completion;
130 void (*done)(struct mmc_request *);/* completion function */ 134 void (*done)(struct mmc_request *);/* completion function */
135 struct mmc_host *host;
131}; 136};
132 137
133struct mmc_host;
134struct mmc_card; 138struct mmc_card;
135struct mmc_async_req; 139struct mmc_async_req;
136 140
@@ -147,6 +151,7 @@ extern int mmc_wait_for_app_cmd(struct mmc_host *, struct mmc_card *,
147extern void mmc_start_bkops(struct mmc_card *card, bool from_exception); 151extern void mmc_start_bkops(struct mmc_card *card, bool from_exception);
148extern int __mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int, bool); 152extern int __mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int, bool);
149extern int mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int); 153extern int mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int);
154extern int mmc_send_ext_csd(struct mmc_card *card, u8 *ext_csd);
150 155
151#define MMC_ERASE_ARG 0x00000000 156#define MMC_ERASE_ARG 0x00000000
152#define MMC_SECURE_ERASE_ARG 0x80000000 157#define MMC_SECURE_ERASE_ARG 0x80000000
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
index 34be4f47293c..198f0fa44e9f 100644
--- a/include/linux/mmc/dw_mmc.h
+++ b/include/linux/mmc/dw_mmc.h
@@ -209,8 +209,10 @@ struct dw_mci_dma_ops {
209#define DW_MCI_QUIRK_HIGHSPEED BIT(2) 209#define DW_MCI_QUIRK_HIGHSPEED BIT(2)
210/* Unreliable card detection */ 210/* Unreliable card detection */
211#define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3) 211#define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3)
212/* Write Protect detection not available */ 212
213#define DW_MCI_QUIRK_NO_WRITE_PROTECT BIT(4) 213/* Slot level quirks */
214/* This slot has no write protect */
215#define DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT BIT(0)
214 216
215struct dma_pdata; 217struct dma_pdata;
216 218
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 61a10c17aabd..d6f20cc6415e 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h