aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-12-10 12:46:24 -0500
committerTony Lindgren <tony@atomide.com>2010-12-10 12:46:24 -0500
commit7f9187c26fd120bd2f0ce089e5f46c4bd3c4193b (patch)
tree5077dcdafcf3281b94ef31eee399c35e7bfadf4b /arch/arm
parentdf1e9d1c218ba696e376cad371b57c0109fe98c9 (diff)
omap1: Add initcall checks for omap1 and booted board
Otherwise multi-omap1 configurations will fail. Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap1/board-ams-delta.c3
-rw-r--r--arch/arm/mach-omap1/board-voiceblue.c6
-rw-r--r--arch/arm/mach-omap1/devices.c3
-rw-r--r--arch/arm/mach-omap1/lcd_dma.c3
-rw-r--r--arch/arm/mach-omap1/leds.c3
-rw-r--r--arch/arm/mach-omap1/mcbsp.c3
-rw-r--r--arch/arm/mach-omap1/pm.c3
-rw-r--r--arch/arm/mach-omap1/pm_bus.c3
-rw-r--r--arch/arm/mach-omap1/serial.c3
9 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 9d97a72c5393..dc82f3d028b5 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -339,6 +339,9 @@ static int __init ams_delta_modem_init(void)
339{ 339{
340 int err; 340 int err;
341 341
342 if (!machine_is_ams_delta())
343 return -ENODEV;
344
342 omap_cfg_reg(M14_1510_GPIO2); 345 omap_cfg_reg(M14_1510_GPIO2);
343 ams_delta_modem_ports[0].irq = 346 ams_delta_modem_ports[0].irq =
344 gpio_to_irq(AMS_DELTA_GPIO_PIN_MODEM_IRQ); 347 gpio_to_irq(AMS_DELTA_GPIO_PIN_MODEM_IRQ);
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index f5992c239bcd..b2838bfeab86 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -83,6 +83,9 @@ static struct platform_device serial_device = {
83 83
84static int __init ext_uart_init(void) 84static int __init ext_uart_init(void)
85{ 85{
86 if (!machine_is_voiceblue())
87 return -ENODEV;
88
86 return platform_device_register(&serial_device); 89 return platform_device_register(&serial_device);
87} 90}
88arch_initcall(ext_uart_init); 91arch_initcall(ext_uart_init);
@@ -236,6 +239,9 @@ static struct notifier_block panic_block = {
236 239
237static int __init voiceblue_setup(void) 240static int __init voiceblue_setup(void)
238{ 241{
242 if (!machine_is_voiceblue())
243 return -ENODEV;
244
239 /* Setup panic notifier */ 245 /* Setup panic notifier */
240 atomic_notifier_chain_register(&panic_notifier_list, &panic_block); 246 atomic_notifier_chain_register(&panic_notifier_list, &panic_block);
241 247
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index 86ad38a20c3e..b0f4c231595f 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -288,6 +288,9 @@ static inline void omap_init_audio(void) {}
288 */ 288 */
289static int __init omap1_init_devices(void) 289static int __init omap1_init_devices(void)
290{ 290{
291 if (!cpu_class_is_omap1())
292 return -ENODEV;
293
291 /* please keep these calls, and their implementations above, 294 /* please keep these calls, and their implementations above,
292 * in alphabetical order so they're easier to sort through. 295 * in alphabetical order so they're easier to sort through.
293 */ 296 */
diff --git a/arch/arm/mach-omap1/lcd_dma.c b/arch/arm/mach-omap1/lcd_dma.c
index 3be11af687bb..c9088d85da04 100644
--- a/arch/arm/mach-omap1/lcd_dma.c
+++ b/arch/arm/mach-omap1/lcd_dma.c
@@ -424,6 +424,9 @@ static int __init omap_init_lcd_dma(void)
424{ 424{
425 int r; 425 int r;
426 426
427 if (!cpu_class_is_omap1())
428 return -ENODEV;
429
427 if (cpu_is_omap16xx()) { 430 if (cpu_is_omap16xx()) {
428 u16 w; 431 u16 w;
429 432
diff --git a/arch/arm/mach-omap1/leds.c b/arch/arm/mach-omap1/leds.c
index 277f356d4cd0..22eb11dde9e7 100644
--- a/arch/arm/mach-omap1/leds.c
+++ b/arch/arm/mach-omap1/leds.c
@@ -17,6 +17,9 @@
17static int __init 17static int __init
18omap_leds_init(void) 18omap_leds_init(void)
19{ 19{
20 if (!cpu_class_is_omap1())
21 return -ENODEV;
22
20 if (machine_is_omap_innovator()) 23 if (machine_is_omap_innovator())
21 leds_event = innovator_leds_event; 24 leds_event = innovator_leds_event;
22 25
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c
index 372ea711faee..820973666f34 100644
--- a/arch/arm/mach-omap1/mcbsp.c
+++ b/arch/arm/mach-omap1/mcbsp.c
@@ -176,6 +176,9 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = {
176 176
177static int __init omap1_mcbsp_init(void) 177static int __init omap1_mcbsp_init(void)
178{ 178{
179 if (!cpu_class_is_omap1())
180 return -ENODEV;
181
179 if (cpu_is_omap7xx()) { 182 if (cpu_is_omap7xx()) {
180 omap_mcbsp_count = OMAP7XX_MCBSP_PDATA_SZ; 183 omap_mcbsp_count = OMAP7XX_MCBSP_PDATA_SZ;
181 omap_mcbsp_cache_size = OMAP7XX_MCBSP_REG_NUM * sizeof(u16); 184 omap_mcbsp_cache_size = OMAP7XX_MCBSP_REG_NUM * sizeof(u16);
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index b1d3f9fade23..0cca23a85175 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -661,6 +661,9 @@ static int __init omap_pm_init(void)
661 int error; 661 int error;
662#endif 662#endif
663 663
664 if (!cpu_class_is_omap1())
665 return -ENODEV;
666
664 printk("Power Management for TI OMAP.\n"); 667 printk("Power Management for TI OMAP.\n");
665 668
666 /* 669 /*
diff --git a/arch/arm/mach-omap1/pm_bus.c b/arch/arm/mach-omap1/pm_bus.c
index 8b66392be745..326644770ea8 100644
--- a/arch/arm/mach-omap1/pm_bus.c
+++ b/arch/arm/mach-omap1/pm_bus.c
@@ -73,6 +73,9 @@ static int __init omap1_pm_runtime_init(void)
73 const struct dev_pm_ops *pm; 73 const struct dev_pm_ops *pm;
74 struct dev_pm_ops *omap_pm; 74 struct dev_pm_ops *omap_pm;
75 75
76 if (!cpu_class_is_omap1())
77 return -ENODEV;
78
76 pm = platform_bus_get_pm_ops(); 79 pm = platform_bus_get_pm_ops();
77 if (!pm) { 80 if (!pm) {
78 pr_err("%s: unable to get dev_pm_ops from platform_bus\n", 81 pr_err("%s: unable to get dev_pm_ops from platform_bus\n",
diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c
index 9e1c4d442d3e..550ca9d9991d 100644
--- a/arch/arm/mach-omap1/serial.c
+++ b/arch/arm/mach-omap1/serial.c
@@ -258,6 +258,9 @@ late_initcall(omap_serial_wakeup_init);
258 258
259static int __init omap_init(void) 259static int __init omap_init(void)
260{ 260{
261 if (!cpu_class_is_omap1())
262 return -ENODEV;
263
261 return platform_device_register(&serial_device); 264 return platform_device_register(&serial_device);
262} 265}
263arch_initcall(omap_init); 266arch_initcall(omap_init);