]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
omap1: Add initcall checks for omap1 and booted board
authorTony Lindgren <tony@atomide.com>
Fri, 10 Dec 2010 17:46:24 +0000 (09:46 -0800)
committerTony Lindgren <tony@atomide.com>
Fri, 10 Dec 2010 17:46:24 +0000 (09:46 -0800)
Otherwise multi-omap1 configurations will fail.

Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap1/board-ams-delta.c
arch/arm/mach-omap1/board-voiceblue.c
arch/arm/mach-omap1/devices.c
arch/arm/mach-omap1/lcd_dma.c
arch/arm/mach-omap1/leds.c
arch/arm/mach-omap1/mcbsp.c
arch/arm/mach-omap1/pm.c
arch/arm/mach-omap1/pm_bus.c
arch/arm/mach-omap1/serial.c

index 9d97a72c5393c6a4a0a5ec18d1c0ba84c97944c9..dc82f3d028b584229bf4ef3a61b9b536340ca799 100644 (file)
@@ -339,6 +339,9 @@ static int __init ams_delta_modem_init(void)
 {
        int err;
 
+       if (!machine_is_ams_delta())
+               return -ENODEV;
+
        omap_cfg_reg(M14_1510_GPIO2);
        ams_delta_modem_ports[0].irq =
                        gpio_to_irq(AMS_DELTA_GPIO_PIN_MODEM_IRQ);
index f5992c239bcd18b3a773b732fc6787b804acd7e3..b2838bfeab867ae16d69f5c0cc91c36d48645b38 100644 (file)
@@ -83,6 +83,9 @@ static struct platform_device serial_device = {
 
 static int __init ext_uart_init(void)
 {
+       if (!machine_is_voiceblue())
+               return -ENODEV;
+
        return platform_device_register(&serial_device);
 }
 arch_initcall(ext_uart_init);
@@ -236,6 +239,9 @@ static struct notifier_block panic_block = {
 
 static int __init voiceblue_setup(void)
 {
+       if (!machine_is_voiceblue())
+               return -ENODEV;
+
        /* Setup panic notifier */
        atomic_notifier_chain_register(&panic_notifier_list, &panic_block);
 
index 86ad38a20c3eea94c0b3c5d1296e6eded242dce0..b0f4c231595f58225d022d9317293fe38c11637b 100644 (file)
@@ -288,6 +288,9 @@ static inline void omap_init_audio(void) {}
  */
 static int __init omap1_init_devices(void)
 {
+       if (!cpu_class_is_omap1())
+               return -ENODEV;
+
        /* please keep these calls, and their implementations above,
         * in alphabetical order so they're easier to sort through.
         */
index 3be11af687bb26652be53303b17d7d5265568e03..c9088d85da0464520c328733b39107795c9e0fbc 100644 (file)
@@ -424,6 +424,9 @@ static int __init omap_init_lcd_dma(void)
 {
        int r;
 
+       if (!cpu_class_is_omap1())
+               return -ENODEV;
+
        if (cpu_is_omap16xx()) {
                u16 w;
 
index 277f356d4cd09a217f25fdd481494333d177317a..22eb11dde9e7ac5408c5d8353614e66c8f147dcd 100644 (file)
@@ -17,6 +17,9 @@
 static int __init
 omap_leds_init(void)
 {
+       if (!cpu_class_is_omap1())
+               return -ENODEV;
+
        if (machine_is_omap_innovator())
                leds_event = innovator_leds_event;
 
index 372ea711faeeea2391b79a3607ad02a7f0c27899..820973666f34c0bf83997444d1cc30a2afab50f4 100644 (file)
@@ -176,6 +176,9 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = {
 
 static int __init omap1_mcbsp_init(void)
 {
+       if (!cpu_class_is_omap1())
+               return -ENODEV;
+
        if (cpu_is_omap7xx()) {
                omap_mcbsp_count = OMAP7XX_MCBSP_PDATA_SZ;
                omap_mcbsp_cache_size = OMAP7XX_MCBSP_REG_NUM * sizeof(u16);
index b1d3f9fade2327e2f523000a7e95a782af45ab05..0cca23a85175ab77155eb56651d73a5a6ed473bd 100644 (file)
@@ -661,6 +661,9 @@ static int __init omap_pm_init(void)
        int error;
 #endif
 
+       if (!cpu_class_is_omap1())
+               return -ENODEV;
+
        printk("Power Management for TI OMAP.\n");
 
        /*
index 8b66392be745f5ef7fb3dae31daf99f0895a3960..326644770ea80eef021fc97abc6fe8eda9b8b69d 100644 (file)
@@ -73,6 +73,9 @@ static int __init omap1_pm_runtime_init(void)
        const struct dev_pm_ops *pm;
        struct dev_pm_ops *omap_pm;
 
+       if (!cpu_class_is_omap1())
+               return -ENODEV;
+
        pm = platform_bus_get_pm_ops();
        if (!pm) {
                pr_err("%s: unable to get dev_pm_ops from platform_bus\n",
index 9e1c4d442d3ea46c0c6f2785b486a53c6a4f7f49..550ca9d9991d5b1fe1994ddd3c8871c800ae918c 100644 (file)
@@ -258,6 +258,9 @@ late_initcall(omap_serial_wakeup_init);
 
 static int __init omap_init(void)
 {
+       if (!cpu_class_is_omap1())
+               return -ENODEV;
+
        return platform_device_register(&serial_device);
 }
 arch_initcall(omap_init);