aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-28 23:59:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-28 23:59:45 -0400
commitb5174fa3a7f4f8f150bfa3b917c92608953dfa0f (patch)
tree5efd32dd52fe55f760094e78f18acd3ff869751d /include
parentafb9bd704c7116076879352a2cc2c43aa12c1e14 (diff)
parent135111cc5595c6a24dd826d503e2d2bae92da1c4 (diff)
Merge tag 'mmc-merge-for-3.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
Pull MMC updates from Chris Ball: Core: * Support for MMC 4.5 Data Tag feature -- we tag REQ_META, so devices that support Data Tag will provide increased throughput for metadata. * Faster detection of card removal on I/O errors. Drivers: * dw_mmc now supports eMMC Power Off Notify, has PCI support, and implements pre_req and post_req for asynchronous requests. * omap_hsmmc now supports device tree. * esdhc now has power management support. * sdhci-tegra now supports Tegra30 devices. * sdhci-spear now supports hibernation. * tmio_mmc now supports using a GPIO for card detection. * Intel PCH now supports 8-bit bus transfers. * tag 'mmc-merge-for-3.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (53 commits) mmc: sh_mmcif: simplify bitmask macros mmc: sh_mobile_sdhi: support modular mmc-core with non-standard hotplug mmc: sh_mobile_sdhi: add a callback for board specific init code mmc: tmio: cosmetic: prettify the tmio_mmc_set_ios() function mmc: sh_mobile_sdhi: do not manage PM clocks manually mmc: tmio_mmc: remove unused sdio_irq_enabled flag mmc: tmio_mmc: power status flag doesn't have to be exposed in platform data mmc: sh_mobile_sdhi: pass card hotplug GPIO number to TMIO MMC mmc: tmio_mmc: support the generic MMC GPIO card hotplug helper mmc: tmio: calculate the native hotplug condition only once mmc: simplify mmc_cd_gpio_request() by removing two parameters mmc: sdhci-pci: allow 8-bit bus width for Intel PCH mmc: sdhci: check interrupt flags in ISR again mmc: sdhci-pci: Add MSI support mmc: core: warn when card doesn't support HPI mmc: davinci: Poll status for small size transfers mmc: davinci: Eliminate spurious interrupts mmc: omap_hsmmc: Avoid a regulator voltage change with dt mmc: omap_hsmmc: Convert hsmmc driver to use device tree mmc: sdhci-pci: add SDHCI_QUIRK2_HOST_OFF_CARD_ON for Medfield SDIO ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/tmio.h26
-rw-r--r--include/linux/mmc/card.h2
-rw-r--r--include/linux/mmc/cd-gpio.h3
-rw-r--r--include/linux/mmc/core.h1
-rw-r--r--include/linux/mmc/dw_mmc.h8
-rw-r--r--include/linux/mmc/host.h48
-rw-r--r--include/linux/mmc/mmc.h3
-rw-r--r--include/linux/mmc/sdhci.h2
-rw-r--r--include/linux/mmc/sh_mmcif.h21
-rw-r--r--include/linux/mmc/sh_mobile_sdhi.h14
10 files changed, 62 insertions, 66 deletions
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
index 0dc98044d8b7..f5171dbf8850 100644
--- a/include/linux/mfd/tmio.h
+++ b/include/linux/mfd/tmio.h
@@ -1,8 +1,10 @@
1#ifndef MFD_TMIO_H 1#ifndef MFD_TMIO_H
2#define MFD_TMIO_H 2#define MFD_TMIO_H
3 3
4#include <linux/device.h>
4#include <linux/fb.h> 5#include <linux/fb.h>
5#include <linux/io.h> 6#include <linux/io.h>
7#include <linux/jiffies.h>
6#include <linux/platform_device.h> 8#include <linux/platform_device.h>
7#include <linux/pm_runtime.h> 9#include <linux/pm_runtime.h>
8 10
@@ -64,8 +66,8 @@
64#define TMIO_MMC_SDIO_IRQ (1 << 2) 66#define TMIO_MMC_SDIO_IRQ (1 << 2)
65/* 67/*
66 * Some platforms can detect card insertion events with controller powered 68 * Some platforms can detect card insertion events with controller powered
67 * down, in which case they have to call tmio_mmc_cd_wakeup() to power up the 69 * down, using a GPIO IRQ, in which case they have to fill in cd_irq, cd_gpio,
68 * controller and report the event to the driver. 70 * and cd_flags fields of struct tmio_mmc_data.
69 */ 71 */
70#define TMIO_MMC_HAS_COLD_CD (1 << 3) 72#define TMIO_MMC_HAS_COLD_CD (1 << 3)
71/* 73/*
@@ -73,6 +75,12 @@
73 * idle before writing to some registers. 75 * idle before writing to some registers.
74 */ 76 */
75#define TMIO_MMC_HAS_IDLE_WAIT (1 << 4) 77#define TMIO_MMC_HAS_IDLE_WAIT (1 << 4)
78/*
79 * A GPIO is used for card hotplug detection. We need an extra flag for this,
80 * because 0 is a valid GPIO number too, and requiring users to specify
81 * cd_gpio < 0 to disable GPIO hotplug would break backwards compatibility.
82 */
83#define TMIO_MMC_USE_GPIO_CD (1 << 5)
76 84
77int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base); 85int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base);
78int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base); 86int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base);
@@ -97,19 +105,23 @@ struct tmio_mmc_data {
97 u32 ocr_mask; /* available voltages */ 105 u32 ocr_mask; /* available voltages */
98 struct tmio_mmc_dma *dma; 106 struct tmio_mmc_dma *dma;
99 struct device *dev; 107 struct device *dev;
100 bool power; 108 unsigned int cd_gpio;
101 void (*set_pwr)(struct platform_device *host, int state); 109 void (*set_pwr)(struct platform_device *host, int state);
102 void (*set_clk_div)(struct platform_device *host, int state); 110 void (*set_clk_div)(struct platform_device *host, int state);
103 int (*get_cd)(struct platform_device *host); 111 int (*get_cd)(struct platform_device *host);
104 int (*write16_hook)(struct tmio_mmc_host *host, int addr); 112 int (*write16_hook)(struct tmio_mmc_host *host, int addr);
105}; 113};
106 114
115/*
116 * This function is deprecated and will be removed soon. Please, convert your
117 * platform to use drivers/mmc/core/cd-gpio.c
118 */
119#include <linux/mmc/host.h>
107static inline void tmio_mmc_cd_wakeup(struct tmio_mmc_data *pdata) 120static inline void tmio_mmc_cd_wakeup(struct tmio_mmc_data *pdata)
108{ 121{
109 if (pdata && !pdata->power) { 122 if (pdata)
110 pdata->power = true; 123 mmc_detect_change(dev_get_drvdata(pdata->dev),
111 pm_runtime_get(pdata->dev); 124 msecs_to_jiffies(100));
112 }
113} 125}
114 126
115/* 127/*
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index 6faa145c81e3..01beae78f079 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -72,6 +72,8 @@ struct mmc_ext_csd {
72 bool hpi_en; /* HPI enablebit */ 72 bool hpi_en; /* HPI enablebit */
73 bool hpi; /* HPI support bit */ 73 bool hpi; /* HPI support bit */
74 unsigned int hpi_cmd; /* cmd used as HPI */ 74 unsigned int hpi_cmd; /* cmd used as HPI */
75 unsigned int data_sector_size; /* 512 bytes or 4KB */
76 unsigned int data_tag_unit_size; /* DATA TAG UNIT size */
75 unsigned int boot_ro_lock; /* ro lock support */ 77 unsigned int boot_ro_lock; /* ro lock support */
76 bool boot_ro_lockable; 78 bool boot_ro_lockable;
77 u8 raw_partition_support; /* 160 */ 79 u8 raw_partition_support; /* 160 */
diff --git a/include/linux/mmc/cd-gpio.h b/include/linux/mmc/cd-gpio.h
index a8e469783318..cefaba038ccb 100644
--- a/include/linux/mmc/cd-gpio.h
+++ b/include/linux/mmc/cd-gpio.h
@@ -12,8 +12,7 @@
12#define MMC_CD_GPIO_H 12#define MMC_CD_GPIO_H
13 13
14struct mmc_host; 14struct mmc_host;
15int mmc_cd_gpio_request(struct mmc_host *host, unsigned int gpio, 15int mmc_cd_gpio_request(struct mmc_host *host, unsigned int gpio);
16 unsigned int irq, unsigned long flags);
17void mmc_cd_gpio_free(struct mmc_host *host); 16void mmc_cd_gpio_free(struct mmc_host *host);
18 17
19#endif 18#endif
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index 2e6a681fceb2..1b431c728b9a 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -175,7 +175,6 @@ extern unsigned int mmc_align_data_size(struct mmc_card *, unsigned int);
175 175
176extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort); 176extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort);
177extern void mmc_release_host(struct mmc_host *host); 177extern void mmc_release_host(struct mmc_host *host);
178extern void mmc_do_release_host(struct mmc_host *host);
179extern int mmc_try_claim_host(struct mmc_host *host); 178extern int mmc_try_claim_host(struct mmc_host *host);
180 179
181extern int mmc_flush_cache(struct mmc_card *); 180extern int mmc_flush_cache(struct mmc_card *);
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
index aae5d1f1bb39..8f66e28f5a0f 100644
--- a/include/linux/mmc/dw_mmc.h
+++ b/include/linux/mmc/dw_mmc.h
@@ -76,7 +76,7 @@ struct mmc_data;
76 * @num_slots: Number of slots available. 76 * @num_slots: Number of slots available.
77 * @verid: Denote Version ID. 77 * @verid: Denote Version ID.
78 * @data_offset: Set the offset of DATA register according to VERID. 78 * @data_offset: Set the offset of DATA register according to VERID.
79 * @pdev: Platform device associated with the MMC controller. 79 * @dev: Device associated with the MMC controller.
80 * @pdata: Platform data associated with the MMC controller. 80 * @pdata: Platform data associated with the MMC controller.
81 * @slot: Slots sharing this MMC controller. 81 * @slot: Slots sharing this MMC controller.
82 * @fifo_depth: depth of FIFO. 82 * @fifo_depth: depth of FIFO.
@@ -87,6 +87,8 @@ struct mmc_data;
87 * @push_data: Pointer to FIFO push function. 87 * @push_data: Pointer to FIFO push function.
88 * @pull_data: Pointer to FIFO pull function. 88 * @pull_data: Pointer to FIFO pull function.
89 * @quirks: Set of quirks that apply to specific versions of the IP. 89 * @quirks: Set of quirks that apply to specific versions of the IP.
90 * @irq_flags: The flags to be passed to request_irq.
91 * @irq: The irq value to be passed to request_irq.
90 * 92 *
91 * Locking 93 * Locking
92 * ======= 94 * =======
@@ -153,7 +155,7 @@ struct dw_mci {
153 u32 fifoth_val; 155 u32 fifoth_val;
154 u16 verid; 156 u16 verid;
155 u16 data_offset; 157 u16 data_offset;
156 struct platform_device *pdev; 158 struct device dev;
157 struct dw_mci_board *pdata; 159 struct dw_mci_board *pdata;
158 struct dw_mci_slot *slot[MAX_MCI_SLOTS]; 160 struct dw_mci_slot *slot[MAX_MCI_SLOTS];
159 161
@@ -174,6 +176,8 @@ struct dw_mci {
174 u32 quirks; 176 u32 quirks;
175 177
176 struct regulator *vmmc; /* Power regulator */ 178 struct regulator *vmmc; /* Power regulator */
179 unsigned long irq_flags; /* IRQ flags */
180 unsigned int irq;
177}; 181};
178 182
179/* DMA ops for Internal/External DMAC interface */ 183/* DMA ops for Internal/External DMAC interface */
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 91924e8c642b..cbde4b7e675e 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -81,34 +81,11 @@ struct mmc_ios {
81 81
82struct mmc_host_ops { 82struct mmc_host_ops {
83 /* 83 /*
84 * Hosts that support power saving can use the 'enable' and 'disable' 84 * 'enable' is called when the host is claimed and 'disable' is called
85 * methods to exit and enter power saving states. 'enable' is called 85 * when the host is released. 'enable' and 'disable' are deprecated.
86 * when the host is claimed and 'disable' is called (or scheduled with
87 * a delay) when the host is released. The 'disable' is scheduled if
88 * the disable delay set by 'mmc_set_disable_delay()' is non-zero,
89 * otherwise 'disable' is called immediately. 'disable' may be
90 * scheduled repeatedly, to permit ever greater power saving at the
91 * expense of ever greater latency to re-enable. Rescheduling is
92 * determined by the return value of the 'disable' method. A positive
93 * value gives the delay in milliseconds.
94 *
95 * In the case where a host function (like set_ios) may be called
96 * with or without the host claimed, enabling and disabling can be
97 * done directly and will nest correctly. Call 'mmc_host_enable()' and
98 * 'mmc_host_lazy_disable()' for this purpose, but note that these
99 * functions must be paired.
100 *
101 * Alternatively, 'mmc_host_enable()' may be paired with
102 * 'mmc_host_disable()' which calls 'disable' immediately. In this
103 * case the 'disable' method will be called with 'lazy' set to 0.
104 * This is mainly useful for error paths.
105 *
106 * Because lazy disable may be called from a work queue, the 'disable'
107 * method must claim the host when 'lazy' != 0, which will work
108 * correctly because recursion is detected and handled.
109 */ 86 */
110 int (*enable)(struct mmc_host *host); 87 int (*enable)(struct mmc_host *host);
111 int (*disable)(struct mmc_host *host, int lazy); 88 int (*disable)(struct mmc_host *host);
112 /* 89 /*
113 * It is optional for the host to implement pre_req and post_req in 90 * It is optional for the host to implement pre_req and post_req in
114 * order to support double buffering of requests (prepare one 91 * order to support double buffering of requests (prepare one
@@ -219,7 +196,7 @@ struct mmc_host {
219#define MMC_CAP_SPI (1 << 4) /* Talks only SPI protocols */ 196#define MMC_CAP_SPI (1 << 4) /* Talks only SPI protocols */
220#define MMC_CAP_NEEDS_POLL (1 << 5) /* Needs polling for card-detection */ 197#define MMC_CAP_NEEDS_POLL (1 << 5) /* Needs polling for card-detection */
221#define MMC_CAP_8_BIT_DATA (1 << 6) /* Can the host do 8 bit transfers */ 198#define MMC_CAP_8_BIT_DATA (1 << 6) /* Can the host do 8 bit transfers */
222#define MMC_CAP_DISABLE (1 << 7) /* Can the host be disabled */ 199
223#define MMC_CAP_NONREMOVABLE (1 << 8) /* Nonremovable e.g. eMMC */ 200#define MMC_CAP_NONREMOVABLE (1 << 8) /* Nonremovable e.g. eMMC */
224#define MMC_CAP_WAIT_WHILE_BUSY (1 << 9) /* Waits while card is busy */ 201#define MMC_CAP_WAIT_WHILE_BUSY (1 << 9) /* Waits while card is busy */
225#define MMC_CAP_ERASE (1 << 10) /* Allow erase/trim commands */ 202#define MMC_CAP_ERASE (1 << 10) /* Allow erase/trim commands */
@@ -259,6 +236,8 @@ struct mmc_host {
259#define MMC_CAP2_HS200 (MMC_CAP2_HS200_1_8V_SDR | \ 236#define MMC_CAP2_HS200 (MMC_CAP2_HS200_1_8V_SDR | \
260 MMC_CAP2_HS200_1_2V_SDR) 237 MMC_CAP2_HS200_1_2V_SDR)
261#define MMC_CAP2_BROKEN_VOLTAGE (1 << 7) /* Use the broken voltage */ 238#define MMC_CAP2_BROKEN_VOLTAGE (1 << 7) /* Use the broken voltage */
239#define MMC_CAP2_DETECT_ON_ERR (1 << 8) /* On I/O err check card removal */
240#define MMC_CAP2_HC_ERASE_SZ (1 << 9) /* High-capacity erase size */
262 241
263 mmc_pm_flag_t pm_caps; /* supported pm features */ 242 mmc_pm_flag_t pm_caps; /* supported pm features */
264 unsigned int power_notify_type; 243 unsigned int power_notify_type;
@@ -301,13 +280,7 @@ struct mmc_host {
301 unsigned int removed:1; /* host is being removed */ 280 unsigned int removed:1; /* host is being removed */
302#endif 281#endif
303 282
304 /* Only used with MMC_CAP_DISABLE */
305 int enabled; /* host is enabled */
306 int rescan_disable; /* disable card detection */ 283 int rescan_disable; /* disable card detection */
307 int nesting_cnt; /* "enable" nesting count */
308 int en_dis_recurs; /* detect recursion */
309 unsigned int disable_delay; /* disable delay in msecs */
310 struct delayed_work disable; /* disabling work */
311 284
312 struct mmc_card *card; /* device attached to this host */ 285 struct mmc_card *card; /* device attached to this host */
313 286
@@ -407,17 +380,8 @@ int mmc_card_awake(struct mmc_host *host);
407int mmc_card_sleep(struct mmc_host *host); 380int mmc_card_sleep(struct mmc_host *host);
408int mmc_card_can_sleep(struct mmc_host *host); 381int mmc_card_can_sleep(struct mmc_host *host);
409 382
410int mmc_host_enable(struct mmc_host *host);
411int mmc_host_disable(struct mmc_host *host);
412int mmc_host_lazy_disable(struct mmc_host *host);
413int mmc_pm_notify(struct notifier_block *notify_block, unsigned long, void *); 383int mmc_pm_notify(struct notifier_block *notify_block, unsigned long, void *);
414 384
415static inline void mmc_set_disable_delay(struct mmc_host *host,
416 unsigned int disable_delay)
417{
418 host->disable_delay = disable_delay;
419}
420
421/* Module parameter */ 385/* Module parameter */
422extern bool mmc_assume_removable; 386extern bool mmc_assume_removable;
423 387
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
index fb9f6e116e1c..b822a2cb6008 100644
--- a/include/linux/mmc/mmc.h
+++ b/include/linux/mmc/mmc.h
@@ -274,6 +274,7 @@ struct _mmc_csd {
274#define EXT_CSD_FLUSH_CACHE 32 /* W */ 274#define EXT_CSD_FLUSH_CACHE 32 /* W */
275#define EXT_CSD_CACHE_CTRL 33 /* R/W */ 275#define EXT_CSD_CACHE_CTRL 33 /* R/W */
276#define EXT_CSD_POWER_OFF_NOTIFICATION 34 /* R/W */ 276#define EXT_CSD_POWER_OFF_NOTIFICATION 34 /* R/W */
277#define EXT_CSD_DATA_SECTOR_SIZE 61 /* R */
277#define EXT_CSD_GP_SIZE_MULT 143 /* R/W */ 278#define EXT_CSD_GP_SIZE_MULT 143 /* R/W */
278#define EXT_CSD_PARTITION_ATTRIBUTE 156 /* R/W */ 279#define EXT_CSD_PARTITION_ATTRIBUTE 156 /* R/W */
279#define EXT_CSD_PARTITION_SUPPORT 160 /* RO */ 280#define EXT_CSD_PARTITION_SUPPORT 160 /* RO */
@@ -315,6 +316,8 @@ struct _mmc_csd {
315#define EXT_CSD_POWER_OFF_LONG_TIME 247 /* RO */ 316#define EXT_CSD_POWER_OFF_LONG_TIME 247 /* RO */
316#define EXT_CSD_GENERIC_CMD6_TIME 248 /* RO */ 317#define EXT_CSD_GENERIC_CMD6_TIME 248 /* RO */
317#define EXT_CSD_CACHE_SIZE 249 /* RO, 4 bytes */ 318#define EXT_CSD_CACHE_SIZE 249 /* RO, 4 bytes */
319#define EXT_CSD_TAG_UNIT_SIZE 498 /* RO */
320#define EXT_CSD_DATA_TAG_SUPPORT 499 /* RO */
318#define EXT_CSD_HPI_FEATURES 503 /* RO */ 321#define EXT_CSD_HPI_FEATURES 503 /* RO */
319 322
320/* 323/*
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h
index c750f85177d9..e9051e1cb1ce 100644
--- a/include/linux/mmc/sdhci.h
+++ b/include/linux/mmc/sdhci.h
@@ -90,6 +90,8 @@ struct sdhci_host {
90 90
91 unsigned int quirks2; /* More deviations from spec. */ 91 unsigned int quirks2; /* More deviations from spec. */
92 92
93#define SDHCI_QUIRK2_HOST_OFF_CARD_ON (1<<0)
94
93 int irq; /* Device IRQ */ 95 int irq; /* Device IRQ */
94 void __iomem *ioaddr; /* Mapped address */ 96 void __iomem *ioaddr; /* Mapped address */
95 97
diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h
index 04ff452bf5c3..05f0e3db1c12 100644
--- a/include/linux/mmc/sh_mmcif.h
+++ b/include/linux/mmc/sh_mmcif.h
@@ -77,18 +77,15 @@ struct sh_mmcif_plat_data {
77 77
78/* CE_CLK_CTRL */ 78/* CE_CLK_CTRL */
79#define CLK_ENABLE (1 << 24) /* 1: output mmc clock */ 79#define CLK_ENABLE (1 << 24) /* 1: output mmc clock */
80#define CLK_CLEAR ((1 << 19) | (1 << 18) | (1 << 17) | (1 << 16)) 80#define CLK_CLEAR (0xf << 16)
81#define CLK_SUP_PCLK ((1 << 19) | (1 << 18) | (1 << 17) | (1 << 16)) 81#define CLK_SUP_PCLK (0xf << 16)
82#define CLKDIV_4 (1<<16) /* mmc clock frequency. 82#define CLKDIV_4 (1 << 16) /* mmc clock frequency.
83 * n: bus clock/(2^(n+1)) */ 83 * n: bus clock/(2^(n+1)) */
84#define CLKDIV_256 (7<<16) /* mmc clock frequency. (see above) */ 84#define CLKDIV_256 (7 << 16) /* mmc clock frequency. (see above) */
85#define SRSPTO_256 ((1 << 13) | (0 << 12)) /* resp timeout */ 85#define SRSPTO_256 (2 << 12) /* resp timeout */
86#define SRBSYTO_29 ((1 << 11) | (1 << 10) | \ 86#define SRBSYTO_29 (0xf << 8) /* resp busy timeout */
87 (1 << 9) | (1 << 8)) /* resp busy timeout */ 87#define SRWDTO_29 (0xf << 4) /* read/write timeout */
88#define SRWDTO_29 ((1 << 7) | (1 << 6) | \ 88#define SCCSTO_29 (0xf << 0) /* ccs timeout */
89 (1 << 5) | (1 << 4)) /* read/write timeout */
90#define SCCSTO_29 ((1 << 3) | (1 << 2) | \
91 (1 << 1) | (1 << 0)) /* ccs timeout */
92 89
93/* CE_VERSION */ 90/* CE_VERSION */
94#define SOFT_RST_ON (1 << 31) 91#define SOFT_RST_ON (1 << 31)
diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h
index 71b805451bd8..e94e620aeddc 100644
--- a/include/linux/mmc/sh_mobile_sdhi.h
+++ b/include/linux/mmc/sh_mobile_sdhi.h
@@ -10,15 +10,29 @@ struct tmio_mmc_data;
10#define SH_MOBILE_SDHI_IRQ_SDCARD "sdcard" 10#define SH_MOBILE_SDHI_IRQ_SDCARD "sdcard"
11#define SH_MOBILE_SDHI_IRQ_SDIO "sdio" 11#define SH_MOBILE_SDHI_IRQ_SDIO "sdio"
12 12
13/**
14 * struct sh_mobile_sdhi_ops - SDHI driver callbacks
15 * @cd_wakeup: trigger a card-detection run
16 */
17struct sh_mobile_sdhi_ops {
18 void (*cd_wakeup)(const struct platform_device *pdev);
19};
20
13struct sh_mobile_sdhi_info { 21struct sh_mobile_sdhi_info {
14 int dma_slave_tx; 22 int dma_slave_tx;
15 int dma_slave_rx; 23 int dma_slave_rx;
16 unsigned long tmio_flags; 24 unsigned long tmio_flags;
17 unsigned long tmio_caps; 25 unsigned long tmio_caps;
18 u32 tmio_ocr_mask; /* available MMC voltages */ 26 u32 tmio_ocr_mask; /* available MMC voltages */
27 unsigned int cd_gpio;
19 struct tmio_mmc_data *pdata; 28 struct tmio_mmc_data *pdata;
20 void (*set_pwr)(struct platform_device *pdev, int state); 29 void (*set_pwr)(struct platform_device *pdev, int state);
21 int (*get_cd)(struct platform_device *pdev); 30 int (*get_cd)(struct platform_device *pdev);
31
32 /* callbacks for board specific setup code */
33 int (*init)(struct platform_device *pdev,
34 const struct sh_mobile_sdhi_ops *ops);
35 void (*cleanup)(struct platform_device *pdev);
22}; 36};
23 37
24#endif /* LINUX_MMC_SH_MOBILE_SDHI_H */ 38#endif /* LINUX_MMC_SH_MOBILE_SDHI_H */