This source file includes following definitions.
- omap2420_n8x0_legacy_init
- omap3_gpio126_127_129
- hsmmc2_internal_input_clk
- omap3_sbc_t3730_twl_callback
- omap3_sbc_t3x_usb_hub_init
- omap3_sbc_t3730_twl_init
- omap3_sbc_t3730_legacy_init
- omap3_sbc_t3530_legacy_init
- omap3_igep0020_rev_f_legacy_init
- omap3_igep0030_rev_g_legacy_init
- omap3_evm_legacy_init
- am35xx_enable_emac_int
- am35xx_disable_emac_int
- am35xx_emac_reset
- omap3_sbc_t3517_wifi_init
- omap3_sbc_t3517_legacy_init
- am3517_evm_legacy_init
- nokia_n900_legacy_init
- omap3_tao3530_legacy_init
- omap3_logicpd_torpedo_init
- omap3_pandora_legacy_init
- omap5_uevm_legacy_init
- dra7x_evm_mmc_quirk
- ti_sysc_find_one_clockdomain
- ti_sysc_clkdm_init
- ti_sysc_clkdm_deny_idle
- ti_sysc_clkdm_allow_idle
- ti_sysc_enable_module
- ti_sysc_idle_module
- ti_sysc_shutdown_module
- omap_pcs_legacy_init
- omap_auxdata_legacy_init
- omap3_mcbsp_init
- omap3_mcbsp_init
- pdata_quirks_check
- pdata_quirks_init
1
2
3
4
5
6
7 #include <linux/clk.h>
8 #include <linux/davinci_emac.h>
9 #include <linux/gpio.h>
10 #include <linux/init.h>
11 #include <linux/kernel.h>
12 #include <linux/of_platform.h>
13 #include <linux/ti_wilink_st.h>
14 #include <linux/wl12xx.h>
15 #include <linux/mmc/card.h>
16 #include <linux/mmc/host.h>
17 #include <linux/power/smartreflex.h>
18 #include <linux/regulator/machine.h>
19 #include <linux/regulator/fixed.h>
20
21 #include <linux/platform_data/pinctrl-single.h>
22 #include <linux/platform_data/hsmmc-omap.h>
23 #include <linux/platform_data/iommu-omap.h>
24 #include <linux/platform_data/ti-sysc.h>
25 #include <linux/platform_data/wkup_m3.h>
26 #include <linux/platform_data/asoc-ti-mcbsp.h>
27
28 #include "clockdomain.h"
29 #include "common.h"
30 #include "common-board-devices.h"
31 #include "control.h"
32 #include "omap_device.h"
33 #include "omap-secure.h"
34 #include "soc.h"
35 #include "hsmmc.h"
36
37 static struct omap_hsmmc_platform_data __maybe_unused mmc_pdata[2];
38
39 struct pdata_init {
40 const char *compatible;
41 void (*fn)(void);
42 };
43
44 static struct of_dev_auxdata omap_auxdata_lookup[];
45 static struct twl4030_gpio_platform_data twl_gpio_auxdata;
46
47 #ifdef CONFIG_MACH_NOKIA_N8X0
48 static void __init omap2420_n8x0_legacy_init(void)
49 {
50 omap_auxdata_lookup[0].platform_data = n8x0_legacy_init();
51 }
52 #else
53 #define omap2420_n8x0_legacy_init NULL
54 #endif
55
56 #ifdef CONFIG_ARCH_OMAP3
57
58
59
60
61
62
63 static void __init omap3_gpio126_127_129(void)
64 {
65 u32 reg;
66
67 reg = omap_ctrl_readl(OMAP343X_CONTROL_PBIAS_LITE);
68 reg &= ~OMAP343X_PBIASLITEVMODE1;
69 reg |= OMAP343X_PBIASLITEPWRDNZ1;
70 omap_ctrl_writel(reg, OMAP343X_CONTROL_PBIAS_LITE);
71 if (cpu_is_omap3630()) {
72 reg = omap_ctrl_readl(OMAP34XX_CONTROL_WKUP_CTRL);
73 reg |= OMAP36XX_GPIO_IO_PWRDNZ;
74 omap_ctrl_writel(reg, OMAP34XX_CONTROL_WKUP_CTRL);
75 }
76 }
77
78 static void __init hsmmc2_internal_input_clk(void)
79 {
80 u32 reg;
81
82 reg = omap_ctrl_readl(OMAP343X_CONTROL_DEVCONF1);
83 reg |= OMAP2_MMCSDIO2ADPCLKISEL;
84 omap_ctrl_writel(reg, OMAP343X_CONTROL_DEVCONF1);
85 }
86
87 static struct iommu_platform_data omap3_iommu_pdata = {
88 .reset_name = "mmu",
89 .assert_reset = omap_device_assert_hardreset,
90 .deassert_reset = omap_device_deassert_hardreset,
91 .device_enable = omap_device_enable,
92 .device_idle = omap_device_idle,
93 };
94
95 static struct iommu_platform_data omap3_iommu_isp_pdata = {
96 .device_enable = omap_device_enable,
97 .device_idle = omap_device_idle,
98 };
99
100 static int omap3_sbc_t3730_twl_callback(struct device *dev,
101 unsigned gpio,
102 unsigned ngpio)
103 {
104 int res;
105
106 res = gpio_request_one(gpio + 2, GPIOF_OUT_INIT_HIGH,
107 "wlan pwr");
108 if (res)
109 return res;
110
111 gpio_export(gpio, 0);
112
113 return 0;
114 }
115
116 static void __init omap3_sbc_t3x_usb_hub_init(int gpio, char *hub_name)
117 {
118 int err = gpio_request_one(gpio, GPIOF_OUT_INIT_LOW, hub_name);
119
120 if (err) {
121 pr_err("SBC-T3x: %s reset gpio request failed: %d\n",
122 hub_name, err);
123 return;
124 }
125
126 gpio_export(gpio, 0);
127
128 udelay(10);
129 gpio_set_value(gpio, 1);
130 msleep(1);
131 }
132
133 static void __init omap3_sbc_t3730_twl_init(void)
134 {
135 twl_gpio_auxdata.setup = omap3_sbc_t3730_twl_callback;
136 }
137
138 static void __init omap3_sbc_t3730_legacy_init(void)
139 {
140 omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub");
141 }
142
143 static void __init omap3_sbc_t3530_legacy_init(void)
144 {
145 omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub");
146 }
147
148 static struct ti_st_plat_data wilink_pdata = {
149 .nshutdown_gpio = 137,
150 .dev_name = "/dev/ttyO1",
151 .flow_cntrl = 1,
152 .baud_rate = 300000,
153 };
154
155 static struct platform_device wl18xx_device = {
156 .name = "kim",
157 .id = -1,
158 .dev = {
159 .platform_data = &wilink_pdata,
160 }
161 };
162
163 static struct ti_st_plat_data wilink7_pdata = {
164 .nshutdown_gpio = 162,
165 .dev_name = "/dev/ttyO1",
166 .flow_cntrl = 1,
167 .baud_rate = 3000000,
168 };
169
170 static struct platform_device wl128x_device = {
171 .name = "kim",
172 .id = -1,
173 .dev = {
174 .platform_data = &wilink7_pdata,
175 }
176 };
177
178 static struct platform_device btwilink_device = {
179 .name = "btwilink",
180 .id = -1,
181 };
182
183 static void __init omap3_igep0020_rev_f_legacy_init(void)
184 {
185 platform_device_register(&wl18xx_device);
186 platform_device_register(&btwilink_device);
187 }
188
189 static void __init omap3_igep0030_rev_g_legacy_init(void)
190 {
191 platform_device_register(&wl18xx_device);
192 platform_device_register(&btwilink_device);
193 }
194
195 static void __init omap3_evm_legacy_init(void)
196 {
197 hsmmc2_internal_input_clk();
198 }
199
200 static void am35xx_enable_emac_int(void)
201 {
202 u32 v;
203
204 v = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
205 v |= (AM35XX_CPGMAC_C0_RX_PULSE_CLR | AM35XX_CPGMAC_C0_TX_PULSE_CLR |
206 AM35XX_CPGMAC_C0_MISC_PULSE_CLR | AM35XX_CPGMAC_C0_RX_THRESH_CLR);
207 omap_ctrl_writel(v, AM35XX_CONTROL_LVL_INTR_CLEAR);
208 omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
209 }
210
211 static void am35xx_disable_emac_int(void)
212 {
213 u32 v;
214
215 v = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
216 v |= (AM35XX_CPGMAC_C0_RX_PULSE_CLR | AM35XX_CPGMAC_C0_TX_PULSE_CLR);
217 omap_ctrl_writel(v, AM35XX_CONTROL_LVL_INTR_CLEAR);
218 omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
219 }
220
221 static struct emac_platform_data am35xx_emac_pdata = {
222 .interrupt_enable = am35xx_enable_emac_int,
223 .interrupt_disable = am35xx_disable_emac_int,
224 };
225
226 static void __init am35xx_emac_reset(void)
227 {
228 u32 v;
229
230 v = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
231 v &= ~AM35XX_CPGMACSS_SW_RST;
232 omap_ctrl_writel(v, AM35XX_CONTROL_IP_SW_RESET);
233 omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
234 }
235
236 static struct gpio cm_t3517_wlan_gpios[] __initdata = {
237 { 56, GPIOF_OUT_INIT_HIGH, "wlan pwr" },
238 { 4, GPIOF_OUT_INIT_HIGH, "xcvr noe" },
239 };
240
241 static void __init omap3_sbc_t3517_wifi_init(void)
242 {
243 int err = gpio_request_array(cm_t3517_wlan_gpios,
244 ARRAY_SIZE(cm_t3517_wlan_gpios));
245 if (err) {
246 pr_err("SBC-T3517: wl12xx gpios request failed: %d\n", err);
247 return;
248 }
249
250 gpio_export(cm_t3517_wlan_gpios[0].gpio, 0);
251 gpio_export(cm_t3517_wlan_gpios[1].gpio, 0);
252
253 msleep(100);
254 gpio_set_value(cm_t3517_wlan_gpios[1].gpio, 0);
255 }
256
257 static void __init omap3_sbc_t3517_legacy_init(void)
258 {
259 omap3_sbc_t3x_usb_hub_init(152, "cm-t3517 usb hub");
260 omap3_sbc_t3x_usb_hub_init(98, "sb-t35 usb hub");
261 am35xx_emac_reset();
262 hsmmc2_internal_input_clk();
263 omap3_sbc_t3517_wifi_init();
264 }
265
266 static void __init am3517_evm_legacy_init(void)
267 {
268 am35xx_emac_reset();
269 }
270
271 static void __init nokia_n900_legacy_init(void)
272 {
273 hsmmc2_internal_input_clk();
274 mmc_pdata[0].name = "external";
275 mmc_pdata[1].name = "internal";
276
277 if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
278 if (IS_ENABLED(CONFIG_ARM_ERRATA_430973)) {
279 pr_info("RX-51: Enabling ARM errata 430973 workaround\n");
280
281 rx51_secure_update_aux_cr(BIT(6), 0);
282 } else {
283 pr_warn("RX-51: Not enabling ARM errata 430973 workaround\n");
284 pr_warn("Thumb binaries may crash randomly without this workaround\n");
285 }
286 }
287 }
288
289 static void __init omap3_tao3530_legacy_init(void)
290 {
291 hsmmc2_internal_input_clk();
292 }
293
294 static void __init omap3_logicpd_torpedo_init(void)
295 {
296 omap3_gpio126_127_129();
297 platform_device_register(&wl128x_device);
298 platform_device_register(&btwilink_device);
299 }
300
301
302
303 static struct platform_device pandora_backlight = {
304 .name = "pandora-backlight",
305 .id = -1,
306 };
307
308 static void __init omap3_pandora_legacy_init(void)
309 {
310 platform_device_register(&pandora_backlight);
311 }
312 #endif
313
314 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
315 static struct iommu_platform_data omap4_iommu_pdata = {
316 .reset_name = "mmu_cache",
317 .assert_reset = omap_device_assert_hardreset,
318 .deassert_reset = omap_device_deassert_hardreset,
319 .device_enable = omap_device_enable,
320 .device_idle = omap_device_idle,
321 };
322 #endif
323
324 #if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
325 static struct wkup_m3_platform_data wkup_m3_data = {
326 .reset_name = "wkup_m3",
327 .assert_reset = omap_device_assert_hardreset,
328 .deassert_reset = omap_device_deassert_hardreset,
329 };
330 #endif
331
332 #ifdef CONFIG_SOC_OMAP5
333 static void __init omap5_uevm_legacy_init(void)
334 {
335 }
336 #endif
337
338 #ifdef CONFIG_SOC_DRA7XX
339 static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc1;
340 static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc2;
341 static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc3;
342
343 static void __init dra7x_evm_mmc_quirk(void)
344 {
345 if (omap_rev() == DRA752_REV_ES1_1 || omap_rev() == DRA752_REV_ES1_0) {
346 dra7_hsmmc_data_mmc1.version = "rev11";
347 dra7_hsmmc_data_mmc1.max_freq = 96000000;
348
349 dra7_hsmmc_data_mmc2.version = "rev11";
350 dra7_hsmmc_data_mmc2.max_freq = 48000000;
351
352 dra7_hsmmc_data_mmc3.version = "rev11";
353 dra7_hsmmc_data_mmc3.max_freq = 48000000;
354 }
355 }
356 #endif
357
358 static struct clockdomain *ti_sysc_find_one_clockdomain(struct clk *clk)
359 {
360 struct clk_hw *hw = __clk_get_hw(clk);
361 struct clockdomain *clkdm = NULL;
362 struct clk_hw_omap *hwclk;
363
364 hwclk = to_clk_hw_omap(hw);
365 if (!omap2_clk_is_hw_omap(hw))
366 return NULL;
367
368 if (hwclk && hwclk->clkdm_name)
369 clkdm = clkdm_lookup(hwclk->clkdm_name);
370
371 return clkdm;
372 }
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388 static int ti_sysc_clkdm_init(struct device *dev,
389 struct clk *fck, struct clk *ick,
390 struct ti_sysc_cookie *cookie)
391 {
392 if (!IS_ERR(fck))
393 cookie->clkdm = ti_sysc_find_one_clockdomain(fck);
394 if (cookie->clkdm)
395 return 0;
396 if (!IS_ERR(ick))
397 cookie->clkdm = ti_sysc_find_one_clockdomain(ick);
398 if (cookie->clkdm)
399 return 0;
400
401 return -ENODEV;
402 }
403
404 static void ti_sysc_clkdm_deny_idle(struct device *dev,
405 const struct ti_sysc_cookie *cookie)
406 {
407 if (cookie->clkdm)
408 clkdm_deny_idle(cookie->clkdm);
409 }
410
411 static void ti_sysc_clkdm_allow_idle(struct device *dev,
412 const struct ti_sysc_cookie *cookie)
413 {
414 if (cookie->clkdm)
415 clkdm_allow_idle(cookie->clkdm);
416 }
417
418 static int ti_sysc_enable_module(struct device *dev,
419 const struct ti_sysc_cookie *cookie)
420 {
421 if (!cookie->data)
422 return -EINVAL;
423
424 return omap_hwmod_enable(cookie->data);
425 }
426
427 static int ti_sysc_idle_module(struct device *dev,
428 const struct ti_sysc_cookie *cookie)
429 {
430 if (!cookie->data)
431 return -EINVAL;
432
433 return omap_hwmod_idle(cookie->data);
434 }
435
436 static int ti_sysc_shutdown_module(struct device *dev,
437 const struct ti_sysc_cookie *cookie)
438 {
439 if (!cookie->data)
440 return -EINVAL;
441
442 return omap_hwmod_shutdown(cookie->data);
443 }
444
445 static struct of_dev_auxdata omap_auxdata_lookup[];
446
447 static struct ti_sysc_platform_data ti_sysc_pdata = {
448 .auxdata = omap_auxdata_lookup,
449 .init_clockdomain = ti_sysc_clkdm_init,
450 .clkdm_deny_idle = ti_sysc_clkdm_deny_idle,
451 .clkdm_allow_idle = ti_sysc_clkdm_allow_idle,
452 .init_module = omap_hwmod_init_module,
453 .enable_module = ti_sysc_enable_module,
454 .idle_module = ti_sysc_idle_module,
455 .shutdown_module = ti_sysc_shutdown_module,
456 };
457
458 static struct pcs_pdata pcs_pdata;
459
460 void omap_pcs_legacy_init(int irq, void (*rearm)(void))
461 {
462 pcs_pdata.irq = irq;
463 pcs_pdata.rearm = rearm;
464 }
465
466
467
468
469
470 void omap_auxdata_legacy_init(struct device *dev)
471 {
472 if (dev->platform_data)
473 return;
474
475 if (strcmp("twl4030-gpio", dev_name(dev)))
476 return;
477
478 dev->platform_data = &twl_gpio_auxdata;
479 }
480
481 #if IS_ENABLED(CONFIG_SND_SOC_OMAP_MCBSP)
482 static struct omap_mcbsp_platform_data mcbsp_pdata;
483 static void __init omap3_mcbsp_init(void)
484 {
485 omap3_mcbsp_init_pdata_callback(&mcbsp_pdata);
486 }
487 #else
488 static void __init omap3_mcbsp_init(void) {}
489 #endif
490
491
492
493
494
495 static struct pdata_init auxdata_quirks[] __initdata = {
496 #ifdef CONFIG_SOC_OMAP2420
497 { "nokia,n800", omap2420_n8x0_legacy_init, },
498 { "nokia,n810", omap2420_n8x0_legacy_init, },
499 { "nokia,n810-wimax", omap2420_n8x0_legacy_init, },
500 #endif
501 #ifdef CONFIG_ARCH_OMAP3
502 { "compulab,omap3-sbc-t3730", omap3_sbc_t3730_twl_init, },
503 #endif
504 { },
505 };
506
507 struct omap_sr_data __maybe_unused omap_sr_pdata[OMAP_SR_NR];
508
509 static struct of_dev_auxdata omap_auxdata_lookup[] = {
510 #ifdef CONFIG_MACH_NOKIA_N8X0
511 OF_DEV_AUXDATA("ti,omap2420-mmc", 0x4809c000, "mmci-omap.0", NULL),
512 OF_DEV_AUXDATA("menelaus", 0x72, "1-0072", &n8x0_menelaus_platform_data),
513 OF_DEV_AUXDATA("tlv320aic3x", 0x18, "2-0018", &n810_aic33_data),
514 #endif
515 #ifdef CONFIG_ARCH_OMAP3
516 OF_DEV_AUXDATA("ti,omap2-iommu", 0x5d000000, "5d000000.mmu",
517 &omap3_iommu_pdata),
518 OF_DEV_AUXDATA("ti,omap2-iommu", 0x480bd400, "480bd400.mmu",
519 &omap3_iommu_isp_pdata),
520 OF_DEV_AUXDATA("ti,omap3-smartreflex-core", 0x480cb000,
521 "480cb000.smartreflex", &omap_sr_pdata[OMAP_SR_CORE]),
522 OF_DEV_AUXDATA("ti,omap3-smartreflex-mpu-iva", 0x480c9000,
523 "480c9000.smartreflex", &omap_sr_pdata[OMAP_SR_MPU]),
524 OF_DEV_AUXDATA("ti,omap3-hsmmc", 0x4809c000, "4809c000.mmc", &mmc_pdata[0]),
525 OF_DEV_AUXDATA("ti,omap3-hsmmc", 0x480b4000, "480b4000.mmc", &mmc_pdata[1]),
526
527 OF_DEV_AUXDATA("ti,davinci_mdio", 0x5c030000, "davinci_mdio.0", NULL),
528 OF_DEV_AUXDATA("ti,am3517-emac", 0x5c000000, "davinci_emac.0",
529 &am35xx_emac_pdata),
530 OF_DEV_AUXDATA("nokia,n900-rom-rng", 0, NULL, rx51_secure_rng_call),
531
532 #if IS_ENABLED(CONFIG_SND_SOC_OMAP_MCBSP)
533 OF_DEV_AUXDATA("ti,omap3-mcbsp", 0x49022000, "49022000.mcbsp", &mcbsp_pdata),
534 OF_DEV_AUXDATA("ti,omap3-mcbsp", 0x49024000, "49024000.mcbsp", &mcbsp_pdata),
535 #endif
536 #endif
537 #ifdef CONFIG_SOC_AM33XX
538 OF_DEV_AUXDATA("ti,am3352-wkup-m3", 0x44d00000, "44d00000.wkup_m3",
539 &wkup_m3_data),
540 #endif
541 #ifdef CONFIG_SOC_AM43XX
542 OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3",
543 &wkup_m3_data),
544 #endif
545 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
546 OF_DEV_AUXDATA("ti,omap4-iommu", 0x4a066000, "4a066000.mmu",
547 &omap4_iommu_pdata),
548 OF_DEV_AUXDATA("ti,omap4-iommu", 0x55082000, "55082000.mmu",
549 &omap4_iommu_pdata),
550 OF_DEV_AUXDATA("ti,omap4-smartreflex-iva", 0x4a0db000,
551 "4a0db000.smartreflex", &omap_sr_pdata[OMAP_SR_IVA]),
552 OF_DEV_AUXDATA("ti,omap4-smartreflex-core", 0x4a0dd000,
553 "4a0dd000.smartreflex", &omap_sr_pdata[OMAP_SR_CORE]),
554 OF_DEV_AUXDATA("ti,omap4-smartreflex-mpu", 0x4a0d9000,
555 "4a0d9000.smartreflex", &omap_sr_pdata[OMAP_SR_MPU]),
556 #endif
557 #ifdef CONFIG_SOC_DRA7XX
558 OF_DEV_AUXDATA("ti,dra7-hsmmc", 0x4809c000, "4809c000.mmc",
559 &dra7_hsmmc_data_mmc1),
560 OF_DEV_AUXDATA("ti,dra7-hsmmc", 0x480b4000, "480b4000.mmc",
561 &dra7_hsmmc_data_mmc2),
562 OF_DEV_AUXDATA("ti,dra7-hsmmc", 0x480ad000, "480ad000.mmc",
563 &dra7_hsmmc_data_mmc3),
564 #endif
565
566 OF_DEV_AUXDATA("ti,sysc", 0, NULL, &ti_sysc_pdata),
567 OF_DEV_AUXDATA("pinctrl-single", 0, NULL, &pcs_pdata),
568 { },
569 };
570
571
572
573
574
575 static struct pdata_init pdata_quirks[] __initdata = {
576 #ifdef CONFIG_ARCH_OMAP3
577 { "compulab,omap3-sbc-t3517", omap3_sbc_t3517_legacy_init, },
578 { "compulab,omap3-sbc-t3530", omap3_sbc_t3530_legacy_init, },
579 { "compulab,omap3-sbc-t3730", omap3_sbc_t3730_legacy_init, },
580 { "nokia,omap3-n900", nokia_n900_legacy_init, },
581 { "nokia,omap3-n9", hsmmc2_internal_input_clk, },
582 { "nokia,omap3-n950", hsmmc2_internal_input_clk, },
583 { "isee,omap3-igep0020-rev-f", omap3_igep0020_rev_f_legacy_init, },
584 { "isee,omap3-igep0030-rev-g", omap3_igep0030_rev_g_legacy_init, },
585 { "logicpd,dm3730-torpedo-devkit", omap3_logicpd_torpedo_init, },
586 { "ti,omap3-evm-37xx", omap3_evm_legacy_init, },
587 { "ti,am3517-evm", am3517_evm_legacy_init, },
588 { "technexion,omap3-tao3530", omap3_tao3530_legacy_init, },
589 { "openpandora,omap3-pandora-600mhz", omap3_pandora_legacy_init, },
590 { "openpandora,omap3-pandora-1ghz", omap3_pandora_legacy_init, },
591 #endif
592 #ifdef CONFIG_SOC_OMAP5
593 { "ti,omap5-uevm", omap5_uevm_legacy_init, },
594 #endif
595 #ifdef CONFIG_SOC_DRA7XX
596 { "ti,dra7-evm", dra7x_evm_mmc_quirk, },
597 #endif
598 { },
599 };
600
601 static void pdata_quirks_check(struct pdata_init *quirks)
602 {
603 while (quirks->compatible) {
604 if (of_machine_is_compatible(quirks->compatible)) {
605 if (quirks->fn)
606 quirks->fn();
607 }
608 quirks++;
609 }
610 }
611
612 void __init pdata_quirks_init(const struct of_device_id *omap_dt_match_table)
613 {
614
615
616
617
618 if (of_machine_is_compatible("ti,omap2420") ||
619 of_machine_is_compatible("ti,omap3"))
620 omap_sdrc_init(NULL, NULL);
621
622 if (of_machine_is_compatible("ti,omap3"))
623 omap3_mcbsp_init();
624 pdata_quirks_check(auxdata_quirks);
625 of_platform_populate(NULL, omap_dt_match_table,
626 omap_auxdata_lookup, NULL);
627 pdata_quirks_check(pdata_quirks);
628 }