diff options
-rw-r--r-- | Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt | 1 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/mmc/img-dw-mshc.txt | 1 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt | 2 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt | 16 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/mmc/zx-dw-mshc.txt | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/hsmmc.c | 239 | ||||
-rw-r--r-- | arch/arm/mach-omap2/hsmmc.h | 9 | ||||
-rw-r--r-- | drivers/mmc/host/dw_mmc.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/omap_hsmmc.c | 11 | ||||
-rw-r--r-- | drivers/mmc/host/sunxi-mmc.c | 8 | ||||
-rw-r--r-- | include/linux/platform_data/hsmmc-omap.h | 10 |
11 files changed, 16 insertions, 284 deletions
diff --git a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt index aad98442788b..a58c173b7ab9 100644 --- a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt +++ b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt | |||
@@ -78,7 +78,6 @@ Example: | |||
78 | }; | 78 | }; |
79 | 79 | ||
80 | dwmmc0@12200000 { | 80 | dwmmc0@12200000 { |
81 | num-slots = <1>; | ||
82 | cap-mmc-highspeed; | 81 | cap-mmc-highspeed; |
83 | cap-sd-highspeed; | 82 | cap-sd-highspeed; |
84 | broken-cd; | 83 | broken-cd; |
diff --git a/Documentation/devicetree/bindings/mmc/img-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/img-dw-mshc.txt index 85de99fcaa2f..c54e577eea07 100644 --- a/Documentation/devicetree/bindings/mmc/img-dw-mshc.txt +++ b/Documentation/devicetree/bindings/mmc/img-dw-mshc.txt | |||
@@ -24,6 +24,5 @@ Example: | |||
24 | 24 | ||
25 | fifo-depth = <0x20>; | 25 | fifo-depth = <0x20>; |
26 | bus-width = <4>; | 26 | bus-width = <4>; |
27 | num-slots = <1>; | ||
28 | disable-wp; | 27 | disable-wp; |
29 | }; | 28 | }; |
diff --git a/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt index 8af1afcb86dc..07242d141773 100644 --- a/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt +++ b/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt | |||
@@ -36,7 +36,6 @@ Example: | |||
36 | 36 | ||
37 | /* Board portion */ | 37 | /* Board portion */ |
38 | dwmmc0@fcd03000 { | 38 | dwmmc0@fcd03000 { |
39 | num-slots = <1>; | ||
40 | vmmc-supply = <&ldo12>; | 39 | vmmc-supply = <&ldo12>; |
41 | fifo-depth = <0x100>; | 40 | fifo-depth = <0x100>; |
42 | pinctrl-names = "default"; | 41 | pinctrl-names = "default"; |
@@ -52,7 +51,6 @@ Example: | |||
52 | 51 | ||
53 | dwmmc_1: dwmmc1@f723e000 { | 52 | dwmmc_1: dwmmc1@f723e000 { |
54 | compatible = "hisilicon,hi6220-dw-mshc"; | 53 | compatible = "hisilicon,hi6220-dw-mshc"; |
55 | num-slots = <0x1>; | ||
56 | bus-width = <0x4>; | 54 | bus-width = <0x4>; |
57 | disable-wp; | 55 | disable-wp; |
58 | cap-sd-highspeed; | 56 | cap-sd-highspeed; |
diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt index 9cb55ca57461..ef3e5f14067a 100644 --- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt +++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt | |||
@@ -12,12 +12,12 @@ Required Properties: | |||
12 | * #address-cells: should be 1. | 12 | * #address-cells: should be 1. |
13 | * #size-cells: should be 0. | 13 | * #size-cells: should be 0. |
14 | 14 | ||
15 | # Slots: The slot specific information are contained within child-nodes with | 15 | # Slots (DEPRECATED): The slot specific information are contained within |
16 | each child-node representing a supported slot. There should be atleast one | 16 | child-nodes with each child-node representing a supported slot. There should |
17 | child node representing a card slot. The name of the child node representing | 17 | be atleast one child node representing a card slot. The name of the child node |
18 | the slot is recommended to be slot@n where n is the unique number of the slot | 18 | representing the slot is recommended to be slot@n where n is the unique number |
19 | connected to the controller. The following are optional properties which | 19 | of the slot connected to the controller. The following are optional properties |
20 | can be included in the slot child node. | 20 | which can be included in the slot child node. |
21 | 21 | ||
22 | * reg: specifies the physical slot number. The valid values of this | 22 | * reg: specifies the physical slot number. The valid values of this |
23 | property is 0 to (num-slots -1), where num-slots is the value | 23 | property is 0 to (num-slots -1), where num-slots is the value |
@@ -63,7 +63,7 @@ Optional properties: | |||
63 | clock(cclk_out). If it's not specified, max is 200MHZ and min is 400KHz by default. | 63 | clock(cclk_out). If it's not specified, max is 200MHZ and min is 400KHz by default. |
64 | (Use the "max-frequency" instead of "clock-freq-min-max".) | 64 | (Use the "max-frequency" instead of "clock-freq-min-max".) |
65 | 65 | ||
66 | * num-slots: specifies the number of slots supported by the controller. | 66 | * num-slots (DEPRECATED): specifies the number of slots supported by the controller. |
67 | The number of physical slots actually used could be equal or less than the | 67 | The number of physical slots actually used could be equal or less than the |
68 | value specified by num-slots. If this property is not specified, the value | 68 | value specified by num-slots. If this property is not specified, the value |
69 | of num-slot property is assumed to be 1. | 69 | of num-slot property is assumed to be 1. |
@@ -124,7 +124,6 @@ board specific portions as listed below. | |||
124 | dwmmc0@12200000 { | 124 | dwmmc0@12200000 { |
125 | clock-frequency = <400000000>; | 125 | clock-frequency = <400000000>; |
126 | clock-freq-min-max = <400000 200000000>; | 126 | clock-freq-min-max = <400000 200000000>; |
127 | num-slots = <1>; | ||
128 | broken-cd; | 127 | broken-cd; |
129 | fifo-depth = <0x80>; | 128 | fifo-depth = <0x80>; |
130 | card-detect-delay = <200>; | 129 | card-detect-delay = <200>; |
@@ -139,7 +138,6 @@ board specific portions as listed below. | |||
139 | dwmmc0@12200000 { | 138 | dwmmc0@12200000 { |
140 | clock-frequency = <400000000>; | 139 | clock-frequency = <400000000>; |
141 | clock-freq-min-max = <400000 200000000>; | 140 | clock-freq-min-max = <400000 200000000>; |
142 | num-slots = <1>; | ||
143 | broken-cd; | 141 | broken-cd; |
144 | fifo-depth = <0x80>; | 142 | fifo-depth = <0x80>; |
145 | card-detect-delay = <200>; | 143 | card-detect-delay = <200>; |
diff --git a/Documentation/devicetree/bindings/mmc/zx-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/zx-dw-mshc.txt index eaade0e5adeb..906819a90c2b 100644 --- a/Documentation/devicetree/bindings/mmc/zx-dw-mshc.txt +++ b/Documentation/devicetree/bindings/mmc/zx-dw-mshc.txt | |||
@@ -25,7 +25,6 @@ Example: | |||
25 | clock-frequency = <50000000>; | 25 | clock-frequency = <50000000>; |
26 | clocks = <&topcrm SD0_AHB>, <&topcrm SD0_WCLK>; | 26 | clocks = <&topcrm SD0_AHB>, <&topcrm SD0_WCLK>; |
27 | clock-names = "biu", "ciu"; | 27 | clock-names = "biu", "ciu"; |
28 | num-slots = <1>; | ||
29 | max-frequency = <50000000>; | 28 | max-frequency = <50000000>; |
30 | cap-sdio-irq; | 29 | cap-sdio-irq; |
31 | cap-sd-highspeed; | 30 | cap-sd-highspeed; |
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index be517b048762..5b614388d72f 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -32,120 +32,6 @@ static u16 control_devconf1_offset; | |||
32 | 32 | ||
33 | #define HSMMC_NAME_LEN 9 | 33 | #define HSMMC_NAME_LEN 9 |
34 | 34 | ||
35 | static void omap_hsmmc1_before_set_reg(struct device *dev, | ||
36 | int power_on, int vdd) | ||
37 | { | ||
38 | u32 reg, prog_io; | ||
39 | struct omap_hsmmc_platform_data *mmc = dev->platform_data; | ||
40 | |||
41 | if (mmc->remux) | ||
42 | mmc->remux(dev, power_on); | ||
43 | |||
44 | /* | ||
45 | * Assume we power both OMAP VMMC1 (for CMD, CLK, DAT0..3) and the | ||
46 | * card with Vcc regulator (from twl4030 or whatever). OMAP has both | ||
47 | * 1.8V and 3.0V modes, controlled by the PBIAS register. | ||
48 | * | ||
49 | * In 8-bit modes, OMAP VMMC1A (for DAT4..7) needs a supply, which | ||
50 | * is most naturally TWL VSIM; those pins also use PBIAS. | ||
51 | * | ||
52 | * FIXME handle VMMC1A as needed ... | ||
53 | */ | ||
54 | if (power_on) { | ||
55 | if (cpu_is_omap2430()) { | ||
56 | reg = omap_ctrl_readl(OMAP243X_CONTROL_DEVCONF1); | ||
57 | if ((1 << vdd) >= MMC_VDD_30_31) | ||
58 | reg |= OMAP243X_MMC1_ACTIVE_OVERWRITE; | ||
59 | else | ||
60 | reg &= ~OMAP243X_MMC1_ACTIVE_OVERWRITE; | ||
61 | omap_ctrl_writel(reg, OMAP243X_CONTROL_DEVCONF1); | ||
62 | } | ||
63 | |||
64 | if (mmc->internal_clock) { | ||
65 | reg = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0); | ||
66 | reg |= OMAP2_MMCSDIO1ADPCLKISEL; | ||
67 | omap_ctrl_writel(reg, OMAP2_CONTROL_DEVCONF0); | ||
68 | } | ||
69 | |||
70 | reg = omap_ctrl_readl(control_pbias_offset); | ||
71 | if (cpu_is_omap3630()) { | ||
72 | /* Set MMC I/O to 52MHz */ | ||
73 | prog_io = omap_ctrl_readl(OMAP343X_CONTROL_PROG_IO1); | ||
74 | prog_io |= OMAP3630_PRG_SDMMC1_SPEEDCTRL; | ||
75 | omap_ctrl_writel(prog_io, OMAP343X_CONTROL_PROG_IO1); | ||
76 | } else { | ||
77 | reg |= OMAP2_PBIASSPEEDCTRL0; | ||
78 | } | ||
79 | reg &= ~OMAP2_PBIASLITEPWRDNZ0; | ||
80 | omap_ctrl_writel(reg, control_pbias_offset); | ||
81 | } else { | ||
82 | reg = omap_ctrl_readl(control_pbias_offset); | ||
83 | reg &= ~OMAP2_PBIASLITEPWRDNZ0; | ||
84 | omap_ctrl_writel(reg, control_pbias_offset); | ||
85 | } | ||
86 | } | ||
87 | |||
88 | static void omap_hsmmc1_after_set_reg(struct device *dev, int power_on, int vdd) | ||
89 | { | ||
90 | u32 reg; | ||
91 | |||
92 | /* 100ms delay required for PBIAS configuration */ | ||
93 | msleep(100); | ||
94 | |||
95 | if (power_on) { | ||
96 | reg = omap_ctrl_readl(control_pbias_offset); | ||
97 | reg |= (OMAP2_PBIASLITEPWRDNZ0 | OMAP2_PBIASSPEEDCTRL0); | ||
98 | if ((1 << vdd) <= MMC_VDD_165_195) | ||
99 | reg &= ~OMAP2_PBIASLITEVMODE0; | ||
100 | else | ||
101 | reg |= OMAP2_PBIASLITEVMODE0; | ||
102 | omap_ctrl_writel(reg, control_pbias_offset); | ||
103 | } else { | ||
104 | reg = omap_ctrl_readl(control_pbias_offset); | ||
105 | reg |= (OMAP2_PBIASSPEEDCTRL0 | OMAP2_PBIASLITEPWRDNZ0 | | ||
106 | OMAP2_PBIASLITEVMODE0); | ||
107 | omap_ctrl_writel(reg, control_pbias_offset); | ||
108 | } | ||
109 | } | ||
110 | |||
111 | static void hsmmc2_select_input_clk_src(struct omap_hsmmc_platform_data *mmc) | ||
112 | { | ||
113 | u32 reg; | ||
114 | |||
115 | reg = omap_ctrl_readl(control_devconf1_offset); | ||
116 | if (mmc->internal_clock) | ||
117 | reg |= OMAP2_MMCSDIO2ADPCLKISEL; | ||
118 | else | ||
119 | reg &= ~OMAP2_MMCSDIO2ADPCLKISEL; | ||
120 | omap_ctrl_writel(reg, control_devconf1_offset); | ||
121 | } | ||
122 | |||
123 | static void hsmmc2_before_set_reg(struct device *dev, int power_on, int vdd) | ||
124 | { | ||
125 | struct omap_hsmmc_platform_data *mmc = dev->platform_data; | ||
126 | |||
127 | if (mmc->remux) | ||
128 | mmc->remux(dev, power_on); | ||
129 | |||
130 | if (power_on) | ||
131 | hsmmc2_select_input_clk_src(mmc); | ||
132 | } | ||
133 | |||
134 | static int am35x_hsmmc2_set_power(struct device *dev, int power_on, int vdd) | ||
135 | { | ||
136 | struct omap_hsmmc_platform_data *mmc = dev->platform_data; | ||
137 | |||
138 | if (power_on) | ||
139 | hsmmc2_select_input_clk_src(mmc); | ||
140 | |||
141 | return 0; | ||
142 | } | ||
143 | |||
144 | static int nop_mmc_set_power(struct device *dev, int power_on, int vdd) | ||
145 | { | ||
146 | return 0; | ||
147 | } | ||
148 | |||
149 | static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, | 35 | static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, |
150 | struct omap_hsmmc_platform_data *mmc) | 36 | struct omap_hsmmc_platform_data *mmc) |
151 | { | 37 | { |
@@ -157,101 +43,11 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, | |||
157 | return -ENOMEM; | 43 | return -ENOMEM; |
158 | } | 44 | } |
159 | 45 | ||
160 | if (c->name) | 46 | snprintf(hc_name, (HSMMC_NAME_LEN + 1), "mmc%islot%i", c->mmc, 1); |
161 | strncpy(hc_name, c->name, HSMMC_NAME_LEN); | ||
162 | else | ||
163 | snprintf(hc_name, (HSMMC_NAME_LEN + 1), "mmc%islot%i", | ||
164 | c->mmc, 1); | ||
165 | mmc->name = hc_name; | 47 | mmc->name = hc_name; |
166 | mmc->caps = c->caps; | 48 | mmc->caps = c->caps; |
167 | mmc->internal_clock = !c->ext_clock; | ||
168 | mmc->reg_offset = 0; | 49 | mmc->reg_offset = 0; |
169 | 50 | ||
170 | if (c->cover_only) { | ||
171 | /* detect if mobile phone cover removed */ | ||
172 | mmc->gpio_cd = -EINVAL; | ||
173 | mmc->gpio_cod = c->gpio_cd; | ||
174 | } else { | ||
175 | /* card detect pin on the mmc socket itself */ | ||
176 | mmc->gpio_cd = c->gpio_cd; | ||
177 | mmc->gpio_cod = -EINVAL; | ||
178 | } | ||
179 | mmc->gpio_wp = c->gpio_wp; | ||
180 | |||
181 | mmc->remux = c->remux; | ||
182 | mmc->init_card = c->init_card; | ||
183 | |||
184 | if (c->nonremovable) | ||
185 | mmc->nonremovable = 1; | ||
186 | |||
187 | /* | ||
188 | * NOTE: MMC slots should have a Vcc regulator set up. | ||
189 | * This may be from a TWL4030-family chip, another | ||
190 | * controllable regulator, or a fixed supply. | ||
191 | * | ||
192 | * temporary HACK: ocr_mask instead of fixed supply | ||
193 | */ | ||
194 | if (soc_is_am35xx()) | ||
195 | mmc->ocr_mask = MMC_VDD_165_195 | | ||
196 | MMC_VDD_26_27 | | ||
197 | MMC_VDD_27_28 | | ||
198 | MMC_VDD_29_30 | | ||
199 | MMC_VDD_30_31 | | ||
200 | MMC_VDD_31_32; | ||
201 | else | ||
202 | mmc->ocr_mask = c->ocr_mask; | ||
203 | |||
204 | if (!soc_is_am35xx()) | ||
205 | mmc->features |= HSMMC_HAS_PBIAS; | ||
206 | |||
207 | switch (c->mmc) { | ||
208 | case 1: | ||
209 | if (mmc->features & HSMMC_HAS_PBIAS) { | ||
210 | /* on-chip level shifting via PBIAS0/PBIAS1 */ | ||
211 | mmc->before_set_reg = | ||
212 | omap_hsmmc1_before_set_reg; | ||
213 | mmc->after_set_reg = | ||
214 | omap_hsmmc1_after_set_reg; | ||
215 | } | ||
216 | |||
217 | if (soc_is_am35xx()) | ||
218 | mmc->set_power = nop_mmc_set_power; | ||
219 | |||
220 | /* OMAP3630 HSMMC1 supports only 4-bit */ | ||
221 | if (cpu_is_omap3630() && | ||
222 | (c->caps & MMC_CAP_8_BIT_DATA)) { | ||
223 | c->caps &= ~MMC_CAP_8_BIT_DATA; | ||
224 | c->caps |= MMC_CAP_4_BIT_DATA; | ||
225 | mmc->caps = c->caps; | ||
226 | } | ||
227 | break; | ||
228 | case 2: | ||
229 | if (soc_is_am35xx()) | ||
230 | mmc->set_power = am35x_hsmmc2_set_power; | ||
231 | |||
232 | if (c->ext_clock) | ||
233 | c->transceiver = 1; | ||
234 | if (c->transceiver && (c->caps & MMC_CAP_8_BIT_DATA)) { | ||
235 | c->caps &= ~MMC_CAP_8_BIT_DATA; | ||
236 | c->caps |= MMC_CAP_4_BIT_DATA; | ||
237 | } | ||
238 | if (mmc->features & HSMMC_HAS_PBIAS) { | ||
239 | /* off-chip level shifting, or none */ | ||
240 | mmc->before_set_reg = hsmmc2_before_set_reg; | ||
241 | mmc->after_set_reg = NULL; | ||
242 | } | ||
243 | break; | ||
244 | case 3: | ||
245 | case 4: | ||
246 | case 5: | ||
247 | mmc->before_set_reg = NULL; | ||
248 | mmc->after_set_reg = NULL; | ||
249 | break; | ||
250 | default: | ||
251 | pr_err("MMC%d configuration not supported!\n", c->mmc); | ||
252 | kfree(hc_name); | ||
253 | return -ENODEV; | ||
254 | } | ||
255 | return 0; | 51 | return 0; |
256 | } | 52 | } |
257 | 53 | ||
@@ -260,7 +56,6 @@ static int omap_hsmmc_done; | |||
260 | void omap_hsmmc_late_init(struct omap2_hsmmc_info *c) | 56 | void omap_hsmmc_late_init(struct omap2_hsmmc_info *c) |
261 | { | 57 | { |
262 | struct platform_device *pdev; | 58 | struct platform_device *pdev; |
263 | struct omap_hsmmc_platform_data *mmc_pdata; | ||
264 | int res; | 59 | int res; |
265 | 60 | ||
266 | if (omap_hsmmc_done != 1) | 61 | if (omap_hsmmc_done != 1) |
@@ -269,32 +64,12 @@ void omap_hsmmc_late_init(struct omap2_hsmmc_info *c) | |||
269 | omap_hsmmc_done++; | 64 | omap_hsmmc_done++; |
270 | 65 | ||
271 | for (; c->mmc; c++) { | 66 | for (; c->mmc; c++) { |
272 | if (!c->deferred) | ||
273 | continue; | ||
274 | |||
275 | pdev = c->pdev; | 67 | pdev = c->pdev; |
276 | if (!pdev) | 68 | if (!pdev) |
277 | continue; | 69 | continue; |
278 | |||
279 | mmc_pdata = pdev->dev.platform_data; | ||
280 | if (!mmc_pdata) | ||
281 | continue; | ||
282 | |||
283 | if (c->cover_only) { | ||
284 | /* detect if mobile phone cover removed */ | ||
285 | mmc_pdata->gpio_cd = -EINVAL; | ||
286 | mmc_pdata->gpio_cod = c->gpio_cd; | ||
287 | } else { | ||
288 | /* card detect pin on the mmc socket itself */ | ||
289 | mmc_pdata->gpio_cd = c->gpio_cd; | ||
290 | mmc_pdata->gpio_cod = -EINVAL; | ||
291 | } | ||
292 | mmc_pdata->gpio_wp = c->gpio_wp; | ||
293 | |||
294 | res = omap_device_register(pdev); | 70 | res = omap_device_register(pdev); |
295 | if (res) | 71 | if (res) |
296 | pr_err("Could not late init MMC %s\n", | 72 | pr_err("Could not late init MMC\n"); |
297 | c->name); | ||
298 | } | 73 | } |
299 | } | 74 | } |
300 | 75 | ||
@@ -336,13 +111,6 @@ static void __init omap_hsmmc_init_one(struct omap2_hsmmc_info *hsmmcinfo, | |||
336 | if (oh->dev_attr != NULL) { | 111 | if (oh->dev_attr != NULL) { |
337 | mmc_dev_attr = oh->dev_attr; | 112 | mmc_dev_attr = oh->dev_attr; |
338 | mmc_data->controller_flags = mmc_dev_attr->flags; | 113 | mmc_data->controller_flags = mmc_dev_attr->flags; |
339 | /* | ||
340 | * erratum 2.1.1.128 doesn't apply if board has | ||
341 | * a transceiver is attached | ||
342 | */ | ||
343 | if (hsmmcinfo->transceiver) | ||
344 | mmc_data->controller_flags &= | ||
345 | ~OMAP_HSMMC_BROKEN_MULTIBLOCK_READ; | ||
346 | } | 114 | } |
347 | 115 | ||
348 | pdev = platform_device_alloc(name, ctrl_nr - 1); | 116 | pdev = platform_device_alloc(name, ctrl_nr - 1); |
@@ -367,9 +135,6 @@ static void __init omap_hsmmc_init_one(struct omap2_hsmmc_info *hsmmcinfo, | |||
367 | 135 | ||
368 | hsmmcinfo->pdev = pdev; | 136 | hsmmcinfo->pdev = pdev; |
369 | 137 | ||
370 | if (hsmmcinfo->deferred) | ||
371 | goto free_mmc; | ||
372 | |||
373 | res = omap_device_register(pdev); | 138 | res = omap_device_register(pdev); |
374 | if (res) { | 139 | if (res) { |
375 | pr_err("Could not register od for %s\n", name); | 140 | pr_err("Could not register od for %s\n", name); |
diff --git a/arch/arm/mach-omap2/hsmmc.h b/arch/arm/mach-omap2/hsmmc.h index 69b619ddc765..af9af5094ec3 100644 --- a/arch/arm/mach-omap2/hsmmc.h +++ b/arch/arm/mach-omap2/hsmmc.h | |||
@@ -12,18 +12,9 @@ struct omap2_hsmmc_info { | |||
12 | u8 mmc; /* controller 1/2/3 */ | 12 | u8 mmc; /* controller 1/2/3 */ |
13 | u32 caps; /* 4/8 wires and any additional host | 13 | u32 caps; /* 4/8 wires and any additional host |
14 | * capabilities OR'd (ref. linux/mmc/host.h) */ | 14 | * capabilities OR'd (ref. linux/mmc/host.h) */ |
15 | bool transceiver; /* MMC-2 option */ | ||
16 | bool ext_clock; /* use external pin for input clock */ | ||
17 | bool cover_only; /* No card detect - just cover switch */ | ||
18 | bool nonremovable; /* Nonremovable e.g. eMMC */ | ||
19 | bool deferred; /* mmc needs a deferred probe */ | ||
20 | int gpio_cd; /* or -EINVAL */ | 15 | int gpio_cd; /* or -EINVAL */ |
21 | int gpio_wp; /* or -EINVAL */ | 16 | int gpio_wp; /* or -EINVAL */ |
22 | char *name; /* or NULL for default */ | ||
23 | struct platform_device *pdev; /* mmc controller instance */ | 17 | struct platform_device *pdev; /* mmc controller instance */ |
24 | int ocr_mask; /* temporary HACK */ | ||
25 | /* Remux (pad configuration) when powering on/off */ | ||
26 | void (*remux)(struct device *dev, int power_on); | ||
27 | /* init some special card */ | 18 | /* init some special card */ |
28 | void (*init_card)(struct mmc_card *card); | 19 | void (*init_card)(struct mmc_card *card); |
29 | }; | 20 | }; |
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index a9dfb26972f2..250dc6ec4c82 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c | |||
@@ -2957,7 +2957,7 @@ static struct dw_mci_board *dw_mci_parse_dt(struct dw_mci *host) | |||
2957 | } | 2957 | } |
2958 | 2958 | ||
2959 | /* find out number of slots supported */ | 2959 | /* find out number of slots supported */ |
2960 | if (device_property_read_u32(dev, "num-slots", &pdata->num_slots)) | 2960 | if (!device_property_read_u32(dev, "num-slots", &pdata->num_slots)) |
2961 | dev_info(dev, "'num-slots' was deprecated.\n"); | 2961 | dev_info(dev, "'num-slots' was deprecated.\n"); |
2962 | 2962 | ||
2963 | if (device_property_read_u32(dev, "fifo-depth", &pdata->fifo_depth)) | 2963 | if (device_property_read_u32(dev, "fifo-depth", &pdata->fifo_depth)) |
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 7c12f3715676..04ff3c97a535 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c | |||
@@ -356,9 +356,6 @@ static int omap_hsmmc_set_power(struct omap_hsmmc_host *host, int power_on, | |||
356 | struct mmc_host *mmc = host->mmc; | 356 | struct mmc_host *mmc = host->mmc; |
357 | int ret = 0; | 357 | int ret = 0; |
358 | 358 | ||
359 | if (mmc_pdata(host)->set_power) | ||
360 | return mmc_pdata(host)->set_power(host->dev, power_on, vdd); | ||
361 | |||
362 | /* | 359 | /* |
363 | * If we don't see a Vcc regulator, assume it's a fixed | 360 | * If we don't see a Vcc regulator, assume it's a fixed |
364 | * voltage always-on regulator. | 361 | * voltage always-on regulator. |
@@ -366,9 +363,6 @@ static int omap_hsmmc_set_power(struct omap_hsmmc_host *host, int power_on, | |||
366 | if (IS_ERR(mmc->supply.vmmc)) | 363 | if (IS_ERR(mmc->supply.vmmc)) |
367 | return 0; | 364 | return 0; |
368 | 365 | ||
369 | if (mmc_pdata(host)->before_set_reg) | ||
370 | mmc_pdata(host)->before_set_reg(host->dev, power_on, vdd); | ||
371 | |||
372 | ret = omap_hsmmc_set_pbias(host, false, 0); | 366 | ret = omap_hsmmc_set_pbias(host, false, 0); |
373 | if (ret) | 367 | if (ret) |
374 | return ret; | 368 | return ret; |
@@ -400,9 +394,6 @@ static int omap_hsmmc_set_power(struct omap_hsmmc_host *host, int power_on, | |||
400 | return ret; | 394 | return ret; |
401 | } | 395 | } |
402 | 396 | ||
403 | if (mmc_pdata(host)->after_set_reg) | ||
404 | mmc_pdata(host)->after_set_reg(host->dev, power_on, vdd); | ||
405 | |||
406 | return 0; | 397 | return 0; |
407 | 398 | ||
408 | err_set_voltage: | 399 | err_set_voltage: |
@@ -469,8 +460,6 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host) | |||
469 | int ret; | 460 | int ret; |
470 | struct mmc_host *mmc = host->mmc; | 461 | struct mmc_host *mmc = host->mmc; |
471 | 462 | ||
472 | if (mmc_pdata(host)->set_power) | ||
473 | return 0; | ||
474 | 463 | ||
475 | ret = mmc_regulator_get_supply(mmc); | 464 | ret = mmc_regulator_get_supply(mmc); |
476 | if (ret == -EPROBE_DEFER) | 465 | if (ret == -EPROBE_DEFER) |
diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c index d6fa2214aaae..0fb4e4c119e1 100644 --- a/drivers/mmc/host/sunxi-mmc.c +++ b/drivers/mmc/host/sunxi-mmc.c | |||
@@ -793,8 +793,12 @@ static int sunxi_mmc_clk_set_rate(struct sunxi_mmc_host *host, | |||
793 | } | 793 | } |
794 | mmc_writel(host, REG_CLKCR, rval); | 794 | mmc_writel(host, REG_CLKCR, rval); |
795 | 795 | ||
796 | if (host->cfg->needs_new_timings) | 796 | if (host->cfg->needs_new_timings) { |
797 | mmc_writel(host, REG_SD_NTSR, SDXC_2X_TIMING_MODE); | 797 | /* Don't touch the delay bits */ |
798 | rval = mmc_readl(host, REG_SD_NTSR); | ||
799 | rval |= SDXC_2X_TIMING_MODE; | ||
800 | mmc_writel(host, REG_SD_NTSR, rval); | ||
801 | } | ||
798 | 802 | ||
799 | ret = sunxi_mmc_clk_set_phase(host, ios, rate); | 803 | ret = sunxi_mmc_clk_set_phase(host, ios, rate); |
800 | if (ret) | 804 | if (ret) |
diff --git a/include/linux/platform_data/hsmmc-omap.h b/include/linux/platform_data/hsmmc-omap.h index 8e981be2e2c2..0ff1e0dba720 100644 --- a/include/linux/platform_data/hsmmc-omap.h +++ b/include/linux/platform_data/hsmmc-omap.h | |||
@@ -55,9 +55,6 @@ struct omap_hsmmc_platform_data { | |||
55 | u32 caps; /* Used for the MMC driver on 2430 and later */ | 55 | u32 caps; /* Used for the MMC driver on 2430 and later */ |
56 | u32 pm_caps; /* PM capabilities of the mmc */ | 56 | u32 pm_caps; /* PM capabilities of the mmc */ |
57 | 57 | ||
58 | /* use the internal clock */ | ||
59 | unsigned internal_clock:1; | ||
60 | |||
61 | /* nonremovable e.g. eMMC */ | 58 | /* nonremovable e.g. eMMC */ |
62 | unsigned nonremovable:1; | 59 | unsigned nonremovable:1; |
63 | 60 | ||
@@ -73,13 +70,6 @@ struct omap_hsmmc_platform_data { | |||
73 | int gpio_cd; /* gpio (card detect) */ | 70 | int gpio_cd; /* gpio (card detect) */ |
74 | int gpio_cod; /* gpio (cover detect) */ | 71 | int gpio_cod; /* gpio (cover detect) */ |
75 | int gpio_wp; /* gpio (write protect) */ | 72 | int gpio_wp; /* gpio (write protect) */ |
76 | |||
77 | int (*set_power)(struct device *dev, int power_on, int vdd); | ||
78 | void (*remux)(struct device *dev, int power_on); | ||
79 | /* Call back before enabling / disabling regulators */ | ||
80 | void (*before_set_reg)(struct device *dev, int power_on, int vdd); | ||
81 | /* Call back after enabling / disabling regulators */ | ||
82 | void (*after_set_reg)(struct device *dev, int power_on, int vdd); | ||
83 | /* if we have special card, init it using this callback */ | 73 | /* if we have special card, init it using this callback */ |
84 | void (*init_card)(struct mmc_card *card); | 74 | void (*init_card)(struct mmc_card *card); |
85 | 75 | ||