]> git.neil.brown.name Git - history.git/commitdiff
[ARM] Convert Integrator AP and Assabet to new machine init method
authorRussell King <rmk@flint.arm.linux.org.uk>
Fri, 6 Feb 2004 14:41:10 +0000 (14:41 +0000)
committerRussell King <rmk@flint.arm.linux.org.uk>
Fri, 6 Feb 2004 14:41:10 +0000 (14:41 +0000)
This makes use of David Brownell's INIT_MACHINE support.

arch/arm/mach-integrator/integrator_ap.c
arch/arm/mach-sa1100/assabet.c

index bc4831852c76b775fcdbb8747582eacd4d6346f1..a803e80ecafbef49e9197c2d98e1ca2f6a9c1d24 100644 (file)
@@ -251,7 +251,7 @@ static struct platform_device cfi_flash_device = {
        .resource       = &cfi_flash_resource,
 };
 
-static int __init ap_init(void)
+static void __init ap_init(void)
 {
        unsigned long sc_dec;
        int i;
@@ -279,16 +279,13 @@ static int __init ap_init(void)
 
                lm_device_register(lmdev);
        }
-
-       return 0;
 }
 
-arch_initcall(ap_init);
-
 MACHINE_START(INTEGRATOR, "ARM-Integrator")
        MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd")
        BOOT_MEM(0x00000000, 0x16000000, 0xf1600000)
        BOOT_PARAMS(0x00000100)
        MAPIO(ap_map_io)
        INITIRQ(ap_init_irq)
+       INIT_MACHINE(ap_init)
 MACHINE_END
index b8312f498f6330f627c58c2cc1019b6ad9d79448..dcd32454e6061ad418e8f5b7c55ad1f68940831b 100644 (file)
@@ -92,11 +92,8 @@ static void assabet_lcd_power(int on)
                ASSABET_BCR_clear(ASSABET_BCR_LCD_ON);
 }
 
-static int __init assabet_init(void)
+static void __init assabet_init(void)
 {
-       if (!machine_is_assabet())
-               return -EINVAL;
-
        /*
         * Ensure that the power supply is in "high power" mode.
         */
@@ -139,13 +136,8 @@ static int __init assabet_init(void)
                        "hasn't been configured in the kernel\n" );
 #endif
        }
-
-       return 0;
 }
 
-arch_initcall(assabet_init);
-
-
 /*
  * On Assabet, we must probe for the Neponset board _before_
  * paging_init() has occurred to actually determine the amount
@@ -332,4 +324,5 @@ MACHINE_START(ASSABET, "Intel-Assabet")
        FIXUP(fixup_assabet)
        MAPIO(assabet_map_io)
        INITIRQ(sa1100_init_irq)
+       INIT_MACHINE(assabet_init)
 MACHINE_END