aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-19 01:32:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-19 01:32:40 -0400
commita8c91da549f625d0600d5bd7e1831066b55edf0d (patch)
tree494738b095d7c96286c7b0d0d586c7b8fa594f5a /include
parent26b95cac5fddb2916e2cef76495073f9c37a7b54 (diff)
parentc07946a3350244d7c3d9bc1032325e04dd11575b (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (53 commits) mmc: dw_mmc: support mmc power control with regulator mmc: dw_mmc: fix suspend/resume operation mmc: dw_mmc: add quirks for unreliable card detect, and capabilities mmc: tmio: fix address in kunmap_atomic() calls mmc: core: reset card voltage after power off mmc: core: export function mmc_do_release_host() mmc: sdio: remember new card RCA when redetecting card mmc: dw_mmc: Remove set-but-unused variable. mmc: sdhci-esdhc-imx: add card detect on custom GPIO for mx25/35 mmc: sdhci-esdhc: broken card detection is not a default quirk mmc: sdhci-esdhc-imx: add write protect on custom GPIO on mx25/35 mmc: msm_sdcc: remove needless cache flush after dma_unmap_sg() mmc: sh_mmcif: support aggressive clock gating mmc: check if mmc cards < 2GB do sector addressing mmc: core: comment on why sdio_reset is done at init time mmc: dw_mmc: support DDR mode mmc: via-sdmmc: Remove set-but-unused variable. mmc: cb710: Return err value in cb710_wait_while_busy() mmc: sdhci-pci: Remove set-but-unused variable. mmc: mxs-mmc: add mmc host driver for i.MX23/28 ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/mmc/card.h6
-rw-r--r--include/linux/mmc/core.h1
-rw-r--r--include/linux/mmc/dw_mmc.h15
-rw-r--r--include/linux/mmc/mmc.h3
4 files changed, 20 insertions, 5 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index 8ce082781ccb..adb4888248be 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -54,6 +54,9 @@ struct mmc_ext_csd {
54 unsigned int sec_trim_mult; /* Secure trim multiplier */ 54 unsigned int sec_trim_mult; /* Secure trim multiplier */
55 unsigned int sec_erase_mult; /* Secure erase multiplier */ 55 unsigned int sec_erase_mult; /* Secure erase multiplier */
56 unsigned int trim_timeout; /* In milliseconds */ 56 unsigned int trim_timeout; /* In milliseconds */
57 bool enhanced_area_en; /* enable bit */
58 unsigned long long enhanced_area_offset; /* Units: Byte */
59 unsigned int enhanced_area_size; /* Units: KB */
57}; 60};
58 61
59struct sd_scr { 62struct sd_scr {
@@ -121,6 +124,7 @@ struct mmc_card {
121 /* for byte mode */ 124 /* for byte mode */
122#define MMC_QUIRK_NONSTD_SDIO (1<<2) /* non-standard SDIO card attached */ 125#define MMC_QUIRK_NONSTD_SDIO (1<<2) /* non-standard SDIO card attached */
123 /* (missing CIA registers) */ 126 /* (missing CIA registers) */
127#define MMC_QUIRK_BROKEN_CLK_GATING (1<<3) /* clock gating the sdio bus will make card fail */
124 128
125 unsigned int erase_size; /* erase size in sectors */ 129 unsigned int erase_size; /* erase size in sectors */
126 unsigned int erase_shift; /* if erase unit is power 2 */ 130 unsigned int erase_shift; /* if erase unit is power 2 */
@@ -148,6 +152,8 @@ struct mmc_card {
148 struct dentry *debugfs_root; 152 struct dentry *debugfs_root;
149}; 153};
150 154
155void mmc_fixup_device(struct mmc_card *dev);
156
151#define mmc_card_mmc(c) ((c)->type == MMC_TYPE_MMC) 157#define mmc_card_mmc(c) ((c)->type == MMC_TYPE_MMC)
152#define mmc_card_sd(c) ((c)->type == MMC_TYPE_SD) 158#define mmc_card_sd(c) ((c)->type == MMC_TYPE_SD)
153#define mmc_card_sdio(c) ((c)->type == MMC_TYPE_SDIO) 159#define mmc_card_sdio(c) ((c)->type == MMC_TYPE_SDIO)
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index 64e013f1cfb8..07f27af4dba5 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -160,6 +160,7 @@ extern unsigned int mmc_align_data_size(struct mmc_card *, unsigned int);
160 160
161extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort); 161extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort);
162extern void mmc_release_host(struct mmc_host *host); 162extern void mmc_release_host(struct mmc_host *host);
163extern void mmc_do_release_host(struct mmc_host *host);
163extern int mmc_try_claim_host(struct mmc_host *host); 164extern int mmc_try_claim_host(struct mmc_host *host);
164 165
165/** 166/**
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
index 16b0261763ed..c0207a770476 100644
--- a/include/linux/mmc/dw_mmc.h
+++ b/include/linux/mmc/dw_mmc.h
@@ -140,6 +140,7 @@ struct dw_mci {
140 u32 bus_hz; 140 u32 bus_hz;
141 u32 current_speed; 141 u32 current_speed;
142 u32 num_slots; 142 u32 num_slots;
143 u32 fifoth_val;
143 struct platform_device *pdev; 144 struct platform_device *pdev;
144 struct dw_mci_board *pdata; 145 struct dw_mci_board *pdata;
145 struct dw_mci_slot *slot[MAX_MCI_SLOTS]; 146 struct dw_mci_slot *slot[MAX_MCI_SLOTS];
@@ -151,6 +152,8 @@ struct dw_mci {
151 152
152 /* Workaround flags */ 153 /* Workaround flags */
153 u32 quirks; 154 u32 quirks;
155
156 struct regulator *vmmc; /* Power regulator */
154}; 157};
155 158
156/* DMA ops for Internal/External DMAC interface */ 159/* DMA ops for Internal/External DMAC interface */
@@ -165,14 +168,14 @@ struct dw_mci_dma_ops {
165}; 168};
166 169
167/* IP Quirks/flags. */ 170/* IP Quirks/flags. */
168/* No special quirks or flags to cater for */
169#define DW_MCI_QUIRK_NONE 0
170/* DTO fix for command transmission with IDMAC configured */ 171/* DTO fix for command transmission with IDMAC configured */
171#define DW_MCI_QUIRK_IDMAC_DTO 1 172#define DW_MCI_QUIRK_IDMAC_DTO BIT(0)
172/* delay needed between retries on some 2.11a implementations */ 173/* delay needed between retries on some 2.11a implementations */
173#define DW_MCI_QUIRK_RETRY_DELAY 2 174#define DW_MCI_QUIRK_RETRY_DELAY BIT(1)
174/* High Speed Capable - Supports HS cards (upto 50MHz) */ 175/* High Speed Capable - Supports HS cards (upto 50MHz) */
175#define DW_MCI_QUIRK_HIGHSPEED 4 176#define DW_MCI_QUIRK_HIGHSPEED BIT(2)
177/* Unreliable card detection */
178#define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3)
176 179
177 180
178struct dma_pdata; 181struct dma_pdata;
@@ -192,6 +195,8 @@ struct dw_mci_board {
192 u32 quirks; /* Workaround / Quirk flags */ 195 u32 quirks; /* Workaround / Quirk flags */
193 unsigned int bus_hz; /* Bus speed */ 196 unsigned int bus_hz; /* Bus speed */
194 197
198 unsigned int caps; /* Capabilities */
199
195 /* delay in mS before detecting cards after interrupt */ 200 /* delay in mS before detecting cards after interrupt */
196 u32 detect_delay_ms; 201 u32 detect_delay_ms;
197 202
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
index 612301f85d14..264ba5451e3b 100644
--- a/include/linux/mmc/mmc.h
+++ b/include/linux/mmc/mmc.h
@@ -253,6 +253,8 @@ struct _mmc_csd {
253 * EXT_CSD fields 253 * EXT_CSD fields
254 */ 254 */
255 255
256#define EXT_CSD_PARTITION_ATTRIBUTE 156 /* R/W */
257#define EXT_CSD_PARTITION_SUPPORT 160 /* RO */
256#define EXT_CSD_ERASE_GROUP_DEF 175 /* R/W */ 258#define EXT_CSD_ERASE_GROUP_DEF 175 /* R/W */
257#define EXT_CSD_ERASED_MEM_CONT 181 /* RO */ 259#define EXT_CSD_ERASED_MEM_CONT 181 /* RO */
258#define EXT_CSD_BUS_WIDTH 183 /* R/W */ 260#define EXT_CSD_BUS_WIDTH 183 /* R/W */
@@ -262,6 +264,7 @@ struct _mmc_csd {
262#define EXT_CSD_CARD_TYPE 196 /* RO */ 264#define EXT_CSD_CARD_TYPE 196 /* RO */
263#define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ 265#define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */
264#define EXT_CSD_S_A_TIMEOUT 217 /* RO */ 266#define EXT_CSD_S_A_TIMEOUT 217 /* RO */
267#define EXT_CSD_HC_WP_GRP_SIZE 221 /* RO */
265#define EXT_CSD_ERASE_TIMEOUT_MULT 223 /* RO */ 268#define EXT_CSD_ERASE_TIMEOUT_MULT 223 /* RO */
266#define EXT_CSD_HC_ERASE_GRP_SIZE 224 /* RO */ 269#define EXT_CSD_HC_ERASE_GRP_SIZE 224 /* RO */
267#define EXT_CSD_SEC_TRIM_MULT 229 /* RO */ 270#define EXT_CSD_SEC_TRIM_MULT 229 /* RO */