aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2012-03-05 16:47:59 -0500
committerTony Lindgren <tony@atomide.com>2012-03-05 16:47:59 -0500
commit6510e13ee28eaac27b219e9be15edb15a674a580 (patch)
tree8012d11d45fc32bdb66196cbacd8054904063994 /arch
parent75a57fe9cb77e3d3062127cb72d18314f00674d1 (diff)
ARM: OMAP2+: Remove extra ifdefs for board-generic
We need just one ifdef for each ARCH_OMAP2/3/4. Also remove the comment about i2c & twl driver as it's pretty obvious that we still need some platform data until drivers are converted to device tree. Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/board-generic.c76
1 files changed, 32 insertions, 44 deletions
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 25d195ff1cb1..74e1687b5170 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -43,34 +43,6 @@ static void __init omap_init_irq(void)
43 of_irq_init(irq_match); 43 of_irq_init(irq_match);
44} 44}
45 45
46/*
47 * XXX: Still needed to boot until the i2c & twl driver is adapted to
48 * device-tree
49 */
50#ifdef CONFIG_ARCH_OMAP4
51static struct twl4030_platform_data sdp4430_twldata = {
52 .irq_base = TWL6030_IRQ_BASE,
53 .irq_end = TWL6030_IRQ_END,
54};
55
56static void __init omap4_i2c_init(void)
57{
58 omap4_pmic_init("twl6030", &sdp4430_twldata);
59}
60#endif
61
62#ifdef CONFIG_ARCH_OMAP3
63static struct twl4030_platform_data beagle_twldata = {
64 .irq_base = TWL4030_IRQ_BASE,
65 .irq_end = TWL4030_IRQ_END,
66};
67
68static void __init omap3_i2c_init(void)
69{
70 omap3_pmic_init("twl4030", &beagle_twldata);
71}
72#endif
73
74static struct of_device_id omap_dt_match_table[] __initdata = { 46static struct of_device_id omap_dt_match_table[] __initdata = {
75 { .compatible = "simple-bus", }, 47 { .compatible = "simple-bus", },
76 { .compatible = "ti,omap-infra", }, 48 { .compatible = "ti,omap-infra", },
@@ -84,22 +56,6 @@ static void __init omap_generic_init(void)
84 of_platform_populate(NULL, omap_dt_match_table, NULL, NULL); 56 of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
85} 57}
86 58
87#ifdef CONFIG_ARCH_OMAP4
88static void __init omap4_init(void)
89{
90 omap4_i2c_init();
91 omap_generic_init();
92}
93#endif
94
95#ifdef CONFIG_ARCH_OMAP3
96static void __init omap3_init(void)
97{
98 omap3_i2c_init();
99 omap_generic_init();
100}
101#endif
102
103#ifdef CONFIG_SOC_OMAP2420 59#ifdef CONFIG_SOC_OMAP2420
104static const char *omap242x_boards_compat[] __initdata = { 60static const char *omap242x_boards_compat[] __initdata = {
105 "ti,omap2420", 61 "ti,omap2420",
@@ -139,6 +95,22 @@ MACHINE_END
139#endif 95#endif
140 96
141#ifdef CONFIG_ARCH_OMAP3 97#ifdef CONFIG_ARCH_OMAP3
98static struct twl4030_platform_data beagle_twldata = {
99 .irq_base = TWL4030_IRQ_BASE,
100 .irq_end = TWL4030_IRQ_END,
101};
102
103static void __init omap3_i2c_init(void)
104{
105 omap3_pmic_init("twl4030", &beagle_twldata);
106}
107
108static void __init omap3_init(void)
109{
110 omap3_i2c_init();
111 omap_generic_init();
112}
113
142static const char *omap3_boards_compat[] __initdata = { 114static const char *omap3_boards_compat[] __initdata = {
143 "ti,omap3", 115 "ti,omap3",
144 NULL, 116 NULL,
@@ -158,6 +130,22 @@ MACHINE_END
158#endif 130#endif
159 131
160#ifdef CONFIG_ARCH_OMAP4 132#ifdef CONFIG_ARCH_OMAP4
133static struct twl4030_platform_data sdp4430_twldata = {
134 .irq_base = TWL6030_IRQ_BASE,
135 .irq_end = TWL6030_IRQ_END,
136};
137
138static void __init omap4_i2c_init(void)
139{
140 omap4_pmic_init("twl6030", &sdp4430_twldata);
141}
142
143static void __init omap4_init(void)
144{
145 omap4_i2c_init();
146 omap_generic_init();
147}
148
161static const char *omap4_boards_compat[] __initdata = { 149static const char *omap4_boards_compat[] __initdata = {
162 "ti,omap4", 150 "ti,omap4",
163 NULL, 151 NULL,