2 * Legacy platform_data quirks
4 * Copyright (C) 2013 Texas Instruments
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.
10 #include <linux/clk.h>
11 #include <linux/init.h>
12 #include <linux/kernel.h>
15 #include "common-board-devices.h"
16 #include "dss-common.h"
19 const char *compatible;
24 * Create alias for USB host PHY clock.
25 * Remove this when clock phandle can be provided via DT
27 static void __init __used legacy_init_ehci_clk(char *clkname)
31 ret = clk_add_alias("main_clk", NULL, clkname, NULL);
33 pr_err("%s:Failed to add main_clk alias to %s :%d\n",
34 __func__, clkname, ret);
37 #ifdef CONFIG_ARCH_OMAP4
38 static void __init omap4_sdp_legacy_init(void)
40 omap_4430sdp_display_init_of();
43 static void __init omap4_panda_legacy_init(void)
45 omap4_panda_display_init_of();
46 legacy_init_ehci_clk("auxclk3_ck");
50 #ifdef CONFIG_SOC_OMAP5
51 static void __init omap5_uevm_legacy_init(void)
53 legacy_init_ehci_clk("auxclk1_ck");
57 static struct pdata_init pdata_quirks[] __initdata = {
58 #ifdef CONFIG_ARCH_OMAP4
59 { "ti,omap4-sdp", omap4_sdp_legacy_init, },
60 { "ti,omap4-panda", omap4_panda_legacy_init, },
62 #ifdef CONFIG_SOC_OMAP5
63 { "ti,omap5-uevm", omap5_uevm_legacy_init, },
68 void __init pdata_quirks_init(void)
70 struct pdata_init *quirks = pdata_quirks;
72 while (quirks->compatible) {
73 if (of_machine_is_compatible(quirks->compatible)) {