pdata-quirks.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. /*
  2. * Legacy platform_data quirks
  3. *
  4. * Copyright (C) 2013 Texas Instruments
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #include <linux/clk.h>
  11. #include <linux/davinci_emac.h>
  12. #include <linux/gpio.h>
  13. #include <linux/init.h>
  14. #include <linux/kernel.h>
  15. #include <linux/of_platform.h>
  16. #include <linux/ti_wilink_st.h>
  17. #include <linux/wl12xx.h>
  18. #include <linux/mmc/card.h>
  19. #include <linux/mmc/host.h>
  20. #include <linux/regulator/machine.h>
  21. #include <linux/regulator/fixed.h>
  22. #include <linux/platform_data/pinctrl-single.h>
  23. #include <linux/platform_data/iommu-omap.h>
  24. #include <linux/platform_data/wkup_m3.h>
  25. #include <asm/siginfo.h>
  26. #include <asm/signal.h>
  27. #include "common.h"
  28. #include "common-board-devices.h"
  29. #include "dss-common.h"
  30. #include "control.h"
  31. #include "omap_device.h"
  32. #include "omap-secure.h"
  33. #include "soc.h"
  34. #include "hsmmc.h"
  35. struct pdata_init {
  36. const char *compatible;
  37. void (*fn)(void);
  38. };
  39. static struct of_dev_auxdata omap_auxdata_lookup[];
  40. static struct twl4030_gpio_platform_data twl_gpio_auxdata;
  41. #ifdef CONFIG_MACH_NOKIA_N8X0
  42. static void __init omap2420_n8x0_legacy_init(void)
  43. {
  44. omap_auxdata_lookup[0].platform_data = n8x0_legacy_init();
  45. }
  46. #else
  47. #define omap2420_n8x0_legacy_init NULL
  48. #endif
  49. #ifdef CONFIG_ARCH_OMAP3
  50. /*
  51. * Configures GPIOs 126, 127 and 129 to 1.8V mode instead of 3.0V
  52. * mode for MMC1 in case bootloader did not configure things.
  53. * Note that if the pins are used for MMC1, pbias-regulator
  54. * manages the IO voltage.
  55. */
  56. static void __init omap3_gpio126_127_129(void)
  57. {
  58. u32 reg;
  59. reg = omap_ctrl_readl(OMAP343X_CONTROL_PBIAS_LITE);
  60. reg &= ~OMAP343X_PBIASLITEVMODE1;
  61. reg |= OMAP343X_PBIASLITEPWRDNZ1;
  62. omap_ctrl_writel(reg, OMAP343X_CONTROL_PBIAS_LITE);
  63. if (cpu_is_omap3630()) {
  64. reg = omap_ctrl_readl(OMAP34XX_CONTROL_WKUP_CTRL);
  65. reg |= OMAP36XX_GPIO_IO_PWRDNZ;
  66. omap_ctrl_writel(reg, OMAP34XX_CONTROL_WKUP_CTRL);
  67. }
  68. }
  69. static void __init hsmmc2_internal_input_clk(void)
  70. {
  71. u32 reg;
  72. reg = omap_ctrl_readl(OMAP343X_CONTROL_DEVCONF1);
  73. reg |= OMAP2_MMCSDIO2ADPCLKISEL;
  74. omap_ctrl_writel(reg, OMAP343X_CONTROL_DEVCONF1);
  75. }
  76. static struct iommu_platform_data omap3_iommu_pdata = {
  77. .reset_name = "mmu",
  78. .assert_reset = omap_device_assert_hardreset,
  79. .deassert_reset = omap_device_deassert_hardreset,
  80. };
  81. static int omap3_sbc_t3730_twl_callback(struct device *dev,
  82. unsigned gpio,
  83. unsigned ngpio)
  84. {
  85. int res;
  86. res = gpio_request_one(gpio + 2, GPIOF_OUT_INIT_HIGH,
  87. "wlan pwr");
  88. if (res)
  89. return res;
  90. gpio_export(gpio, 0);
  91. return 0;
  92. }
  93. static void __init omap3_sbc_t3x_usb_hub_init(int gpio, char *hub_name)
  94. {
  95. int err = gpio_request_one(gpio, GPIOF_OUT_INIT_LOW, hub_name);
  96. if (err) {
  97. pr_err("SBC-T3x: %s reset gpio request failed: %d\n",
  98. hub_name, err);
  99. return;
  100. }
  101. gpio_export(gpio, 0);
  102. udelay(10);
  103. gpio_set_value(gpio, 1);
  104. msleep(1);
  105. }
  106. static void __init omap3_sbc_t3730_twl_init(void)
  107. {
  108. twl_gpio_auxdata.setup = omap3_sbc_t3730_twl_callback;
  109. }
  110. static void __init omap3_sbc_t3730_legacy_init(void)
  111. {
  112. omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub");
  113. }
  114. static void __init omap3_sbc_t3530_legacy_init(void)
  115. {
  116. omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub");
  117. }
  118. static struct ti_st_plat_data wilink_pdata = {
  119. .nshutdown_gpio = 137,
  120. .dev_name = "/dev/ttyO1",
  121. .flow_cntrl = 1,
  122. .baud_rate = 300000,
  123. };
  124. static struct platform_device wl18xx_device = {
  125. .name = "kim",
  126. .id = -1,
  127. .dev = {
  128. .platform_data = &wilink_pdata,
  129. }
  130. };
  131. static struct platform_device btwilink_device = {
  132. .name = "btwilink",
  133. .id = -1,
  134. };
  135. static void __init omap3_igep0020_rev_f_legacy_init(void)
  136. {
  137. platform_device_register(&wl18xx_device);
  138. platform_device_register(&btwilink_device);
  139. }
  140. static void __init omap3_igep0030_rev_g_legacy_init(void)
  141. {
  142. platform_device_register(&wl18xx_device);
  143. platform_device_register(&btwilink_device);
  144. }
  145. static void __init omap3_evm_legacy_init(void)
  146. {
  147. hsmmc2_internal_input_clk();
  148. }
  149. static void am35xx_enable_emac_int(void)
  150. {
  151. u32 v;
  152. v = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
  153. v |= (AM35XX_CPGMAC_C0_RX_PULSE_CLR | AM35XX_CPGMAC_C0_TX_PULSE_CLR |
  154. AM35XX_CPGMAC_C0_MISC_PULSE_CLR | AM35XX_CPGMAC_C0_RX_THRESH_CLR);
  155. omap_ctrl_writel(v, AM35XX_CONTROL_LVL_INTR_CLEAR);
  156. omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); /* OCP barrier */
  157. }
  158. static void am35xx_disable_emac_int(void)
  159. {
  160. u32 v;
  161. v = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
  162. v |= (AM35XX_CPGMAC_C0_RX_PULSE_CLR | AM35XX_CPGMAC_C0_TX_PULSE_CLR);
  163. omap_ctrl_writel(v, AM35XX_CONTROL_LVL_INTR_CLEAR);
  164. omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); /* OCP barrier */
  165. }
  166. static struct emac_platform_data am35xx_emac_pdata = {
  167. .interrupt_enable = am35xx_enable_emac_int,
  168. .interrupt_disable = am35xx_disable_emac_int,
  169. };
  170. static void __init am35xx_emac_reset(void)
  171. {
  172. u32 v;
  173. v = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
  174. v &= ~AM35XX_CPGMACSS_SW_RST;
  175. omap_ctrl_writel(v, AM35XX_CONTROL_IP_SW_RESET);
  176. omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); /* OCP barrier */
  177. }
  178. static struct gpio cm_t3517_wlan_gpios[] __initdata = {
  179. { 56, GPIOF_OUT_INIT_HIGH, "wlan pwr" },
  180. { 4, GPIOF_OUT_INIT_HIGH, "xcvr noe" },
  181. };
  182. static void __init omap3_sbc_t3517_wifi_init(void)
  183. {
  184. int err = gpio_request_array(cm_t3517_wlan_gpios,
  185. ARRAY_SIZE(cm_t3517_wlan_gpios));
  186. if (err) {
  187. pr_err("SBC-T3517: wl12xx gpios request failed: %d\n", err);
  188. return;
  189. }
  190. gpio_export(cm_t3517_wlan_gpios[0].gpio, 0);
  191. gpio_export(cm_t3517_wlan_gpios[1].gpio, 0);
  192. msleep(100);
  193. gpio_set_value(cm_t3517_wlan_gpios[1].gpio, 0);
  194. }
  195. static void __init omap3_sbc_t3517_legacy_init(void)
  196. {
  197. omap3_sbc_t3x_usb_hub_init(152, "cm-t3517 usb hub");
  198. omap3_sbc_t3x_usb_hub_init(98, "sb-t35 usb hub");
  199. am35xx_emac_reset();
  200. hsmmc2_internal_input_clk();
  201. omap3_sbc_t3517_wifi_init();
  202. }
  203. static void __init am3517_evm_legacy_init(void)
  204. {
  205. am35xx_emac_reset();
  206. }
  207. static struct platform_device omap3_rom_rng_device = {
  208. .name = "omap3-rom-rng",
  209. .id = -1,
  210. .dev = {
  211. .platform_data = rx51_secure_rng_call,
  212. },
  213. };
  214. static void __init nokia_n900_legacy_init(void)
  215. {
  216. hsmmc2_internal_input_clk();
  217. if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
  218. if (IS_ENABLED(CONFIG_ARM_ERRATA_430973)) {
  219. pr_info("RX-51: Enabling ARM errata 430973 workaround\n");
  220. /* set IBE to 1 */
  221. rx51_secure_update_aux_cr(BIT(6), 0);
  222. } else {
  223. pr_warn("RX-51: Not enabling ARM errata 430973 workaround\n");
  224. pr_warn("Thumb binaries may crash randomly without this workaround\n");
  225. }
  226. pr_info("RX-51: Registring OMAP3 HWRNG device\n");
  227. platform_device_register(&omap3_rom_rng_device);
  228. }
  229. }
  230. static void __init omap3_tao3530_legacy_init(void)
  231. {
  232. hsmmc2_internal_input_clk();
  233. }
  234. /* omap3pandora legacy devices */
  235. #define PANDORA_WIFI_IRQ_GPIO 21
  236. #define PANDORA_WIFI_NRESET_GPIO 23
  237. static struct platform_device pandora_backlight = {
  238. .name = "pandora-backlight",
  239. .id = -1,
  240. };
  241. static struct regulator_consumer_supply pandora_vmmc3_supply[] = {
  242. REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"),
  243. };
  244. static struct regulator_init_data pandora_vmmc3 = {
  245. .constraints = {
  246. .valid_ops_mask = REGULATOR_CHANGE_STATUS,
  247. },
  248. .num_consumer_supplies = ARRAY_SIZE(pandora_vmmc3_supply),
  249. .consumer_supplies = pandora_vmmc3_supply,
  250. };
  251. static struct fixed_voltage_config pandora_vwlan = {
  252. .supply_name = "vwlan",
  253. .microvolts = 1800000, /* 1.8V */
  254. .gpio = PANDORA_WIFI_NRESET_GPIO,
  255. .startup_delay = 50000, /* 50ms */
  256. .enable_high = 1,
  257. .init_data = &pandora_vmmc3,
  258. };
  259. static struct platform_device pandora_vwlan_device = {
  260. .name = "reg-fixed-voltage",
  261. .id = 1,
  262. .dev = {
  263. .platform_data = &pandora_vwlan,
  264. },
  265. };
  266. static void pandora_wl1251_init_card(struct mmc_card *card)
  267. {
  268. /*
  269. * We have TI wl1251 attached to MMC3. Pass this information to
  270. * SDIO core because it can't be probed by normal methods.
  271. */
  272. if (card->type == MMC_TYPE_SDIO || card->type == MMC_TYPE_SD_COMBO) {
  273. card->quirks |= MMC_QUIRK_NONSTD_SDIO;
  274. card->cccr.wide_bus = 1;
  275. card->cis.vendor = 0x104c;
  276. card->cis.device = 0x9066;
  277. card->cis.blksize = 512;
  278. card->cis.max_dtr = 24000000;
  279. card->ocr = 0x80;
  280. }
  281. }
  282. static struct omap2_hsmmc_info pandora_mmc3[] = {
  283. {
  284. .mmc = 3,
  285. .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
  286. .gpio_cd = -EINVAL,
  287. .gpio_wp = -EINVAL,
  288. .init_card = pandora_wl1251_init_card,
  289. },
  290. {} /* Terminator */
  291. };
  292. static void __init pandora_wl1251_init(void)
  293. {
  294. struct wl1251_platform_data pandora_wl1251_pdata;
  295. int ret;
  296. memset(&pandora_wl1251_pdata, 0, sizeof(pandora_wl1251_pdata));
  297. pandora_wl1251_pdata.power_gpio = -1;
  298. ret = gpio_request_one(PANDORA_WIFI_IRQ_GPIO, GPIOF_IN, "wl1251 irq");
  299. if (ret < 0)
  300. goto fail;
  301. pandora_wl1251_pdata.irq = gpio_to_irq(PANDORA_WIFI_IRQ_GPIO);
  302. if (pandora_wl1251_pdata.irq < 0)
  303. goto fail_irq;
  304. pandora_wl1251_pdata.use_eeprom = true;
  305. ret = wl1251_set_platform_data(&pandora_wl1251_pdata);
  306. if (ret < 0)
  307. goto fail_irq;
  308. return;
  309. fail_irq:
  310. gpio_free(PANDORA_WIFI_IRQ_GPIO);
  311. fail:
  312. pr_err("wl1251 board initialisation failed\n");
  313. }
  314. static void __init omap3_pandora_legacy_init(void)
  315. {
  316. platform_device_register(&pandora_backlight);
  317. platform_device_register(&pandora_vwlan_device);
  318. omap_hsmmc_init(pandora_mmc3);
  319. omap_hsmmc_late_init(pandora_mmc3);
  320. pandora_wl1251_init();
  321. }
  322. #endif /* CONFIG_ARCH_OMAP3 */
  323. #ifdef CONFIG_SOC_TI81XX
  324. static int fault_fixed_up;
  325. static int t410_abort_handler(unsigned long addr, unsigned int fsr,
  326. struct pt_regs *regs)
  327. {
  328. if ((fsr == 0x406 || fsr == 0xc06) && !fault_fixed_up) {
  329. pr_warn("External imprecise Data abort at addr=%#lx, fsr=%#x ignored.\n",
  330. addr, fsr);
  331. fault_fixed_up = 1;
  332. return 0;
  333. }
  334. return 1;
  335. }
  336. static void __init t410_abort_init(void)
  337. {
  338. hook_fault_code(16 + 6, t410_abort_handler, SIGBUS, BUS_OBJERR,
  339. "imprecise external abort");
  340. }
  341. #endif
  342. #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
  343. static struct iommu_platform_data omap4_iommu_pdata = {
  344. .reset_name = "mmu_cache",
  345. .assert_reset = omap_device_assert_hardreset,
  346. .deassert_reset = omap_device_deassert_hardreset,
  347. };
  348. #endif
  349. #if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
  350. static struct wkup_m3_platform_data wkup_m3_data = {
  351. .reset_name = "wkup_m3",
  352. .assert_reset = omap_device_assert_hardreset,
  353. .deassert_reset = omap_device_deassert_hardreset,
  354. };
  355. #endif
  356. #ifdef CONFIG_SOC_OMAP5
  357. static void __init omap5_uevm_legacy_init(void)
  358. {
  359. }
  360. #endif
  361. static struct pcs_pdata pcs_pdata;
  362. void omap_pcs_legacy_init(int irq, void (*rearm)(void))
  363. {
  364. pcs_pdata.irq = irq;
  365. pcs_pdata.rearm = rearm;
  366. }
  367. /*
  368. * GPIOs for TWL are initialized by the I2C bus and need custom
  369. * handing until DSS has device tree bindings.
  370. */
  371. void omap_auxdata_legacy_init(struct device *dev)
  372. {
  373. if (dev->platform_data)
  374. return;
  375. if (strcmp("twl4030-gpio", dev_name(dev)))
  376. return;
  377. dev->platform_data = &twl_gpio_auxdata;
  378. }
  379. /*
  380. * Few boards still need auxdata populated before we populate
  381. * the dev entries in of_platform_populate().
  382. */
  383. static struct pdata_init auxdata_quirks[] __initdata = {
  384. #ifdef CONFIG_SOC_OMAP2420
  385. { "nokia,n800", omap2420_n8x0_legacy_init, },
  386. { "nokia,n810", omap2420_n8x0_legacy_init, },
  387. { "nokia,n810-wimax", omap2420_n8x0_legacy_init, },
  388. #endif
  389. #ifdef CONFIG_ARCH_OMAP3
  390. { "compulab,omap3-sbc-t3730", omap3_sbc_t3730_twl_init, },
  391. #endif
  392. { /* sentinel */ },
  393. };
  394. static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
  395. #ifdef CONFIG_MACH_NOKIA_N8X0
  396. OF_DEV_AUXDATA("ti,omap2420-mmc", 0x4809c000, "mmci-omap.0", NULL),
  397. OF_DEV_AUXDATA("menelaus", 0x72, "1-0072", &n8x0_menelaus_platform_data),
  398. OF_DEV_AUXDATA("tlv320aic3x", 0x18, "2-0018", &n810_aic33_data),
  399. #endif
  400. #ifdef CONFIG_ARCH_OMAP3
  401. OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002030, "48002030.pinmux", &pcs_pdata),
  402. OF_DEV_AUXDATA("ti,omap3-padconf", 0x480025a0, "480025a0.pinmux", &pcs_pdata),
  403. OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002a00, "48002a00.pinmux", &pcs_pdata),
  404. OF_DEV_AUXDATA("ti,omap2-iommu", 0x5d000000, "5d000000.mmu",
  405. &omap3_iommu_pdata),
  406. /* Only on am3517 */
  407. OF_DEV_AUXDATA("ti,davinci_mdio", 0x5c030000, "davinci_mdio.0", NULL),
  408. OF_DEV_AUXDATA("ti,am3517-emac", 0x5c000000, "davinci_emac.0",
  409. &am35xx_emac_pdata),
  410. #endif
  411. #ifdef CONFIG_SOC_AM33XX
  412. OF_DEV_AUXDATA("ti,am3352-wkup-m3", 0x44d00000, "44d00000.wkup_m3",
  413. &wkup_m3_data),
  414. #endif
  415. #ifdef CONFIG_ARCH_OMAP4
  416. OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a100040, "4a100040.pinmux", &pcs_pdata),
  417. OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a31e040, "4a31e040.pinmux", &pcs_pdata),
  418. #endif
  419. #ifdef CONFIG_SOC_OMAP5
  420. OF_DEV_AUXDATA("ti,omap5-padconf", 0x4a002840, "4a002840.pinmux", &pcs_pdata),
  421. OF_DEV_AUXDATA("ti,omap5-padconf", 0x4ae0c840, "4ae0c840.pinmux", &pcs_pdata),
  422. #endif
  423. #ifdef CONFIG_SOC_DRA7XX
  424. OF_DEV_AUXDATA("ti,dra7-padconf", 0x4a003400, "4a003400.pinmux", &pcs_pdata),
  425. #endif
  426. #ifdef CONFIG_SOC_AM43XX
  427. OF_DEV_AUXDATA("ti,am437-padconf", 0x44e10800, "44e10800.pinmux", &pcs_pdata),
  428. OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3",
  429. &wkup_m3_data),
  430. #endif
  431. #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
  432. OF_DEV_AUXDATA("ti,omap4-iommu", 0x4a066000, "4a066000.mmu",
  433. &omap4_iommu_pdata),
  434. OF_DEV_AUXDATA("ti,omap4-iommu", 0x55082000, "55082000.mmu",
  435. &omap4_iommu_pdata),
  436. #endif
  437. { /* sentinel */ },
  438. };
  439. /*
  440. * Few boards still need to initialize some legacy devices with
  441. * platform data until the drivers support device tree.
  442. */
  443. static struct pdata_init pdata_quirks[] __initdata = {
  444. #ifdef CONFIG_ARCH_OMAP3
  445. { "compulab,omap3-sbc-t3517", omap3_sbc_t3517_legacy_init, },
  446. { "compulab,omap3-sbc-t3530", omap3_sbc_t3530_legacy_init, },
  447. { "compulab,omap3-sbc-t3730", omap3_sbc_t3730_legacy_init, },
  448. { "nokia,omap3-n900", nokia_n900_legacy_init, },
  449. { "nokia,omap3-n9", hsmmc2_internal_input_clk, },
  450. { "nokia,omap3-n950", hsmmc2_internal_input_clk, },
  451. { "isee,omap3-igep0020-rev-f", omap3_igep0020_rev_f_legacy_init, },
  452. { "isee,omap3-igep0030-rev-g", omap3_igep0030_rev_g_legacy_init, },
  453. { "logicpd,dm3730-torpedo-devkit", omap3_gpio126_127_129, },
  454. { "ti,omap3-evm-37xx", omap3_evm_legacy_init, },
  455. { "ti,am3517-evm", am3517_evm_legacy_init, },
  456. { "technexion,omap3-tao3530", omap3_tao3530_legacy_init, },
  457. { "openpandora,omap3-pandora-600mhz", omap3_pandora_legacy_init, },
  458. { "openpandora,omap3-pandora-1ghz", omap3_pandora_legacy_init, },
  459. #endif
  460. #ifdef CONFIG_SOC_TI81XX
  461. { "hp,t410", t410_abort_init, },
  462. #endif
  463. #ifdef CONFIG_SOC_OMAP5
  464. { "ti,omap5-uevm", omap5_uevm_legacy_init, },
  465. #endif
  466. { /* sentinel */ },
  467. };
  468. static void pdata_quirks_check(struct pdata_init *quirks)
  469. {
  470. while (quirks->compatible) {
  471. if (of_machine_is_compatible(quirks->compatible)) {
  472. if (quirks->fn)
  473. quirks->fn();
  474. break;
  475. }
  476. quirks++;
  477. }
  478. }
  479. void __init pdata_quirks_init(const struct of_device_id *omap_dt_match_table)
  480. {
  481. omap_sdrc_init(NULL, NULL);
  482. pdata_quirks_check(auxdata_quirks);
  483. of_platform_populate(NULL, omap_dt_match_table,
  484. omap_auxdata_lookup, NULL);
  485. pdata_quirks_check(pdata_quirks);
  486. }