aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c2
-rw-r--r--arch/arm/mach-omap2/hsmmc.c21
-rw-r--r--arch/arm/mach-omap2/hsmmc.h2
-rw-r--r--drivers/mmc/host/omap_hsmmc.c65
-rw-r--r--include/linux/platform_data/hsmmc-omap.h14
5 files changed, 40 insertions, 64 deletions
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 0a8ac844b75b..3d5040f82e90 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -484,7 +484,7 @@ static struct omap_mux_partition *partition;
484 * Current flows to eMMC when eMMC is off and the data lines are pulled up, 484 * Current flows to eMMC when eMMC is off and the data lines are pulled up,
485 * so pull them down. N.B. we pull 8 lines because we are using 8 lines. 485 * so pull them down. N.B. we pull 8 lines because we are using 8 lines.
486 */ 486 */
487static void rx51_mmc2_remux(struct device *dev, int slot, int power_on) 487static void rx51_mmc2_remux(struct device *dev, int power_on)
488{ 488{
489 if (power_on) 489 if (power_on)
490 omap_mux_write_array(partition, rx51_mmc2_on_mux); 490 omap_mux_write_array(partition, rx51_mmc2_on_mux);
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index 4e2896ad0119..dc6e79c4484a 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -33,14 +33,14 @@ static u16 control_devconf1_offset;
33 33
34#define HSMMC_NAME_LEN 9 34#define HSMMC_NAME_LEN 9
35 35
36static void omap_hsmmc1_before_set_reg(struct device *dev, int slot, 36static void omap_hsmmc1_before_set_reg(struct device *dev,
37 int power_on, int vdd) 37 int power_on, int vdd)
38{ 38{
39 u32 reg, prog_io; 39 u32 reg, prog_io;
40 struct omap_hsmmc_platform_data *mmc = dev->platform_data; 40 struct omap_hsmmc_platform_data *mmc = dev->platform_data;
41 41
42 if (mmc->remux) 42 if (mmc->remux)
43 mmc->remux(dev, slot, power_on); 43 mmc->remux(dev, power_on);
44 44
45 /* 45 /*
46 * Assume we power both OMAP VMMC1 (for CMD, CLK, DAT0..3) and the 46 * Assume we power both OMAP VMMC1 (for CMD, CLK, DAT0..3) and the
@@ -86,8 +86,7 @@ static void omap_hsmmc1_before_set_reg(struct device *dev, int slot,
86 } 86 }
87} 87}
88 88
89static void omap_hsmmc1_after_set_reg(struct device *dev, int slot, 89static void omap_hsmmc1_after_set_reg(struct device *dev, int power_on, int vdd)
90 int power_on, int vdd)
91{ 90{
92 u32 reg; 91 u32 reg;
93 92
@@ -122,20 +121,18 @@ static void hsmmc2_select_input_clk_src(struct omap_hsmmc_platform_data *mmc)
122 omap_ctrl_writel(reg, control_devconf1_offset); 121 omap_ctrl_writel(reg, control_devconf1_offset);
123} 122}
124 123
125static void hsmmc2_before_set_reg(struct device *dev, int slot, 124static void hsmmc2_before_set_reg(struct device *dev, int power_on, int vdd)
126 int power_on, int vdd)
127{ 125{
128 struct omap_hsmmc_platform_data *mmc = dev->platform_data; 126 struct omap_hsmmc_platform_data *mmc = dev->platform_data;
129 127
130 if (mmc->remux) 128 if (mmc->remux)
131 mmc->remux(dev, slot, power_on); 129 mmc->remux(dev, power_on);
132 130
133 if (power_on) 131 if (power_on)
134 hsmmc2_select_input_clk_src(mmc); 132 hsmmc2_select_input_clk_src(mmc);
135} 133}
136 134
137static int am35x_hsmmc2_set_power(struct device *dev, int slot, 135static int am35x_hsmmc2_set_power(struct device *dev, int power_on, int vdd)
138 int power_on, int vdd)
139{ 136{
140 struct omap_hsmmc_platform_data *mmc = dev->platform_data; 137 struct omap_hsmmc_platform_data *mmc = dev->platform_data;
141 138
@@ -145,8 +142,7 @@ static int am35x_hsmmc2_set_power(struct device *dev, int slot,
145 return 0; 142 return 0;
146} 143}
147 144
148static int nop_mmc_set_power(struct device *dev, int slot, int power_on, 145static int nop_mmc_set_power(struct device *dev, int power_on, int vdd)
149 int vdd)
150{ 146{
151 return 0; 147 return 0;
152} 148}
@@ -250,7 +246,6 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
250 snprintf(hc_name, (HSMMC_NAME_LEN + 1), "mmc%islot%i", 246 snprintf(hc_name, (HSMMC_NAME_LEN + 1), "mmc%islot%i",
251 c->mmc, 1); 247 c->mmc, 1);
252 mmc->name = hc_name; 248 mmc->name = hc_name;
253 mmc->nr_slots = 1;
254 mmc->caps = c->caps; 249 mmc->caps = c->caps;
255 mmc->internal_clock = !c->ext_clock; 250 mmc->internal_clock = !c->ext_clock;
256 mmc->reg_offset = 0; 251 mmc->reg_offset = 0;
diff --git a/arch/arm/mach-omap2/hsmmc.h b/arch/arm/mach-omap2/hsmmc.h
index 30c78c17eb7e..148cd9b15499 100644
--- a/arch/arm/mach-omap2/hsmmc.h
+++ b/arch/arm/mach-omap2/hsmmc.h
@@ -23,7 +23,7 @@ struct omap2_hsmmc_info {
23 struct platform_device *pdev; /* mmc controller instance */ 23 struct platform_device *pdev; /* mmc controller instance */
24 int ocr_mask; /* temporary HACK */ 24 int ocr_mask; /* temporary HACK */
25 /* Remux (pad configuration) when powering on/off */ 25 /* Remux (pad configuration) when powering on/off */
26 void (*remux)(struct device *dev, int slot, int power_on); 26 void (*remux)(struct device *dev, int power_on);
27 /* init some special card */ 27 /* init some special card */
28 void (*init_card)(struct mmc_card *card); 28 void (*init_card)(struct mmc_card *card);
29}; 29};
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index f4f1bcd632f3..82b40b85293f 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -207,7 +207,6 @@ struct omap_hsmmc_host {
207 int use_dma, dma_ch; 207 int use_dma, dma_ch;
208 struct dma_chan *tx_chan; 208 struct dma_chan *tx_chan;
209 struct dma_chan *rx_chan; 209 struct dma_chan *rx_chan;
210 int slot_id;
211 int response_busy; 210 int response_busy;
212 int context_loss; 211 int context_loss;
213 int protect_card; 212 int protect_card;
@@ -223,8 +222,8 @@ struct omap_hsmmc_host {
223 struct omap_hsmmc_platform_data *pdata; 222 struct omap_hsmmc_platform_data *pdata;
224 223
225 /* To handle board related suspend/resume functionality for MMC */ 224 /* To handle board related suspend/resume functionality for MMC */
226 int (*suspend)(struct device *dev, int slot); 225 int (*suspend)(struct device *dev);
227 int (*resume)(struct device *dev, int slot); 226 int (*resume)(struct device *dev);
228 227
229 /* return MMC cover switch state, can be NULL if not supported. 228 /* return MMC cover switch state, can be NULL if not supported.
230 * 229 *
@@ -232,13 +231,13 @@ struct omap_hsmmc_host {
232 * 0 - closed 231 * 0 - closed
233 * 1 - open 232 * 1 - open
234 */ 233 */
235 int (*get_cover_state)(struct device *dev, int slot); 234 int (*get_cover_state)(struct device *dev);
236 235
237 /* Card detection IRQs */ 236 /* Card detection IRQs */
238 int card_detect_irq; 237 int card_detect_irq;
239 238
240 int (*card_detect)(struct device *dev, int slot); 239 int (*card_detect)(struct device *dev);
241 int (*get_ro)(struct device *dev, int slot); 240 int (*get_ro)(struct device *dev);
242 241
243}; 242};
244 243
@@ -249,7 +248,7 @@ struct omap_mmc_of_data {
249 248
250static void omap_hsmmc_start_dma_transfer(struct omap_hsmmc_host *host); 249static void omap_hsmmc_start_dma_transfer(struct omap_hsmmc_host *host);
251 250
252static int omap_hsmmc_card_detect(struct device *dev, int slot) 251static int omap_hsmmc_card_detect(struct device *dev)
253{ 252{
254 struct omap_hsmmc_host *host = dev_get_drvdata(dev); 253 struct omap_hsmmc_host *host = dev_get_drvdata(dev);
255 struct omap_hsmmc_platform_data *mmc = host->pdata; 254 struct omap_hsmmc_platform_data *mmc = host->pdata;
@@ -258,7 +257,7 @@ static int omap_hsmmc_card_detect(struct device *dev, int slot)
258 return !gpio_get_value_cansleep(mmc->switch_pin); 257 return !gpio_get_value_cansleep(mmc->switch_pin);
259} 258}
260 259
261static int omap_hsmmc_get_wp(struct device *dev, int slot) 260static int omap_hsmmc_get_wp(struct device *dev)
262{ 261{
263 struct omap_hsmmc_host *host = dev_get_drvdata(dev); 262 struct omap_hsmmc_host *host = dev_get_drvdata(dev);
264 struct omap_hsmmc_platform_data *mmc = host->pdata; 263 struct omap_hsmmc_platform_data *mmc = host->pdata;
@@ -267,7 +266,7 @@ static int omap_hsmmc_get_wp(struct device *dev, int slot)
267 return gpio_get_value_cansleep(mmc->gpio_wp); 266 return gpio_get_value_cansleep(mmc->gpio_wp);
268} 267}
269 268
270static int omap_hsmmc_get_cover_state(struct device *dev, int slot)