[ARM] Kirkwood: register internal devices in a common place
authorNicolas Pitre <nico@cam.org>
Fri, 27 Feb 2009 03:55:59 +0000 (22:55 -0500)
committerNicolas Pitre <nico@cam.org>
Fri, 27 Feb 2009 03:55:59 +0000 (22:55 -0500)
The RTC and the two XOR engines are internal to the chip, and therefore
always available since they don't depend on a particular board layout.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
arch/arm/mach-kirkwood/common.c
arch/arm/mach-kirkwood/common.h
arch/arm/mach-kirkwood/db88f6281-bp-setup.c
arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
arch/arm/mach-kirkwood/rd88f6281-setup.c

index e5076aae1c6bc0d484cd0f351b993897b518ebbd..9f012551794de7a58cfd593ebd7ae11fe4e7d49a 100644 (file)
@@ -255,7 +255,7 @@ static struct resource kirkwood_rtc_resource = {
        .flags  = IORESOURCE_MEM,
 };
 
-void __init kirkwood_rtc_init(void)
+static void __init kirkwood_rtc_init(void)
 {
        platform_device_register_simple("rtc-mv", -1, &kirkwood_rtc_resource, 1);
 }
@@ -547,7 +547,7 @@ static struct platform_device kirkwood_xor01_channel = {
        },
 };
 
-void __init kirkwood_xor0_init(void)
+static void __init kirkwood_xor0_init(void)
 {
        platform_device_register(&kirkwood_xor0_shared);
 
@@ -645,7 +645,7 @@ static struct platform_device kirkwood_xor11_channel = {
        },
 };
 
-void __init kirkwood_xor1_init(void)
+static void __init kirkwood_xor1_init(void)
 {
        platform_device_register(&kirkwood_xor1_shared);
 
@@ -753,4 +753,9 @@ void __init kirkwood_init(void)
 #ifdef CONFIG_CACHE_FEROCEON_L2
        kirkwood_l2_init();
 #endif
+
+       /* internal devices that every board has */
+       kirkwood_rtc_init();
+       kirkwood_xor0_init();
+       kirkwood_xor1_init();
 }
index 58279400cf7c59c1bc5bbf014f795a582743309e..9e5282684d58d3270c532082d20fc1fb6b8e0f71 100644 (file)
@@ -34,14 +34,11 @@ void kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data);
 void kirkwood_ge01_init(struct mv643xx_eth_platform_data *eth_data);
 void kirkwood_ge00_switch_init(struct dsa_platform_data *d, int irq);
 void kirkwood_pcie_init(void);
-void kirkwood_rtc_init(void);
 void kirkwood_sata_init(struct mv_sata_platform_data *sata_data);
 void kirkwood_sdio_init(struct mvsdio_platform_data *mvsdio_data);
 void kirkwood_spi_init(void);
 void kirkwood_uart0_init(void);
 void kirkwood_uart1_init(void);
-void kirkwood_xor0_init(void);
-void kirkwood_xor1_init(void);
 
 extern struct sys_timer kirkwood_timer;
 
index d7b3bf86c632a3a09a92c0acb897d84663ea9a2f..5505d58377524d6c45ed8a42fbe9794d90215a53 100644 (file)
@@ -94,7 +94,6 @@ static void __init db88f6281_init(void)
 
        kirkwood_ehci_init();
        kirkwood_ge00_init(&db88f6281_ge00_data);
-       kirkwood_rtc_init();
        kirkwood_sata_init(&db88f6281_sata_data);
        kirkwood_uart0_init();
        kirkwood_sdio_init(&db88f6281_mvsdio_data);
index c33d895cc6eb1f183512d8dd1f8d31a896874e35..2f0e4ef3db0f44bd6766af9db41402f5c87617a2 100644 (file)
@@ -57,14 +57,11 @@ static void __init rd88f6192_init(void)
 
        kirkwood_ehci_init();
        kirkwood_ge00_init(&rd88f6192_ge00_data);
-       kirkwood_rtc_init();
        kirkwood_sata_init(&rd88f6192_sata_data);
        spi_register_board_info(rd88F6192_spi_slave_info,
                                ARRAY_SIZE(rd88F6192_spi_slave_info));
        kirkwood_spi_init();
        kirkwood_uart0_init();
-       kirkwood_xor0_init();
-       kirkwood_xor1_init();
 }
 
 static int __init rd88f6192_pci_init(void)
index d08904680245f470461436bfee4e248e11572114..c3deea5e3cadb2b6f870324bb6a6f6e242d64e46 100644 (file)
@@ -121,12 +121,9 @@ static void __init rd88f6281_init(void)
        }
        kirkwood_ge00_switch_init(&rd88f6281_switch_data, NO_IRQ);
 
-       kirkwood_rtc_init();
        kirkwood_sata_init(&rd88f6281_sata_data);
        kirkwood_sdio_init(&rd88f6281_mvsdio_data);
        kirkwood_uart0_init();
-       kirkwood_xor0_init();
-       kirkwood_xor1_init();
 
        platform_device_register(&rd88f6281_nand_flash);
 }