aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/include/plat/mmc.h
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@nokia.com>2010-02-15 13:03:34 -0500
committerTony Lindgren <tony@atomide.com>2010-02-15 13:03:34 -0500
commitdb0fefc5119e2cfaa8f57565331e0abe47f0801e (patch)
tree367d86d4784322e3b8156f187f68667680ce497a /arch/arm/plat-omap/include/plat/mmc.h
parent88c8460ac32283e2a25e36e4670ff5ab02f3b521 (diff)
omap_hsmmc: Move gpio and regulator control from board file
This patch moves the setup code for GPIO's and Voltage Regulators from the board file mmc-twl4030.c to the driver omap_hsmmc.c. PBIAS and other system control configuration remains in the board file. Moving GPIO code to the driver makes the board initialisation code independent of when GPIO's are defined. That makes the board initialisation now entirely independent of its original twl4030 roots. Moving Voltage Regulator code to the driver allows for further development of regulator support in the core MMC code. It also permits the MMC core to be compiled as a module, because the board code no longer calls MMC core functions. Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/include/plat/mmc.h')
-rw-r--r--arch/arm/plat-omap/include/plat/mmc.h28
1 files changed, 18 insertions, 10 deletions
diff --git a/arch/arm/plat-omap/include/plat/mmc.h b/arch/arm/plat-omap/include/plat/mmc.h
index 29937137bf3e..515701bb47d2 100644
--- a/arch/arm/plat-omap/include/plat/mmc.h
+++ b/arch/arm/plat-omap/include/plat/mmc.h
@@ -55,12 +55,12 @@ struct omap_mmc_platform_data {
55 unsigned int max_freq; 55 unsigned int max_freq;
56 56
57 /* switch the bus to a new slot */ 57 /* switch the bus to a new slot */
58 int (* switch_slot)(struct device *dev, int slot); 58 int (*switch_slot)(struct device *dev, int slot);
59 /* initialize board-specific MMC functionality, can be NULL if 59 /* initialize board-specific MMC functionality, can be NULL if
60 * not supported */ 60 * not supported */
61 int (* init)(struct device *dev); 61 int (*init)(struct device *dev);
62 void (* cleanup)(struct device *dev); 62 void (*cleanup)(struct device *dev);
63 void (* shutdown)(struct device *dev); 63 void (*shutdown)(struct device *dev);
64 64
65 /* To handle board related suspend/resume functionality for MMC */ 65 /* To handle board related suspend/resume functionality for MMC */
66 int (*suspend)(struct device *dev, int slot); 66 int (*suspend)(struct device *dev, int slot);
@@ -99,11 +99,18 @@ struct omap_mmc_platform_data {
99 int switch_pin; /* gpio (card detect) */ 99 int switch_pin; /* gpio (card detect) */
100 int gpio_wp; /* gpio (write protect) */ 100 int gpio_wp; /* gpio (write protect) */
101 101
102 int (* set_bus_mode)(struct device *dev, int slot, int bus_mode); 102 int (*set_bus_mode)(struct device *dev, int slot, int bus_mode);
103 int (* set_power)(struct device *dev, int slot, int power_on, int vdd); 103 int (*set_power)(struct device *dev, int slot,
104 int (* get_ro)(struct device *dev, int slot); 104 int power_on, int vdd);
105 int (*get_ro)(struct device *dev, int slot);
105 int (*set_sleep)(struct device *dev, int slot, int sleep, 106 int (*set_sleep)(struct device *dev, int slot, int sleep,
106 int vdd, int cardsleep); 107 int vdd, int cardsleep);
108 /* Call back before enabling / disabling regulators */
109 void (*before_set_reg)(struct device *dev, int slot,
110 int power_on, int vdd);
111 /* Call back after enabling / disabling regulators */
112 void (*after_set_reg)(struct device *dev, int slot,
113 int power_on, int vdd);
107 114
108 /* return MMC cover switch state, can be NULL if not supported. 115 /* return MMC cover switch state, can be NULL if not supported.
109 * 116 *
@@ -111,14 +118,14 @@ struct omap_mmc_platform_data {
111 * 0 - closed 118 * 0 - closed
112 * 1 - open 119 * 1 - open
113 */ 120 */
114 int (* get_cover_state)(struct device *dev, int slot); 121 int (*get_cover_state)(struct device *dev, int slot);
115 122
116 const char *name; 123 const char *name;
117 u32 ocr_mask; 124 u32 ocr_mask;
118 125
119 /* Card detection IRQs */ 126 /* Card detection IRQs */
120 int card_detect_irq; 127 int card_detect_irq;
121 int (* card_detect)(int irq); 128 int (*card_detect)(struct device *dev, int slot);
122 129
123 unsigned int ban_openended:1; 130 unsigned int ban_openended:1;
124 131
@@ -126,7 +133,8 @@ struct omap_mmc_platform_data {
126}; 133};
127 134
128/* called from board-specific card detection service routine */ 135/* called from board-specific card detection service routine */
129extern void omap_mmc_notify_cover_event(struct device *dev, int slot, int is_closed); 136extern void omap_mmc_notify_cover_event(struct device *dev, int slot,
137 int is_closed);
130 138
131#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \ 139#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \
132 defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) 140 defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)