[POWERPC] cell: Use machine_*_initcall() hooks in platform code
authorGrant Likely <grant.likely@secretlab.ca>
Wed, 2 Jan 2008 19:14:36 +0000 (06:14 +1100)
committerPaul Mackerras <paulus@samba.org>
Thu, 17 Jan 2008 03:57:15 +0000 (14:57 +1100)
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/cell/io-workarounds.c
arch/powerpc/platforms/cell/iommu.c
arch/powerpc/platforms/cell/pmu.c
arch/powerpc/platforms/cell/setup.c
arch/powerpc/platforms/celleb/iommu.c
arch/powerpc/platforms/celleb/setup.c

index b86076e3c09e402a6e74b880a8d23a8160143b33..979d4b67efb45dcb6562133d2d977ebed6de14e4 100644 (file)
@@ -309,9 +309,6 @@ static int __init spider_pci_workaround_init(void)
 {
        struct pci_controller *phb;
 
-       if (!machine_is(cell))
-               return 0;
-
        /* Find spider bridges. We assume they have been all probed
         * in setup_arch(). If that was to change, we would need to
         * update this code to cope with dynamically added busses
@@ -343,4 +340,4 @@ static int __init spider_pci_workaround_init(void)
 
        return 0;
 }
-arch_initcall(spider_pci_workaround_init);
+machine_arch_initcall(cell, spider_pci_workaround_init);
index 1221c6d8650f09014b8ffcdbb947576a3140523c..bceb5e13da5c7d0cf502eed6aee71fde4ae9a152 100644 (file)
@@ -700,10 +700,6 @@ static int __init cell_iommu_init(void)
 {
        struct device_node *np;
 
-       if (!machine_is(cell) &&
-           !machine_is(celleb_native))
-               return -ENODEV;
-
        /* If IOMMU is disabled or we have little enough RAM to not need
         * to enable it, we setup a direct mapping.
         *
@@ -746,5 +742,6 @@ static int __init cell_iommu_init(void)
 
        return 0;
 }
-arch_initcall(cell_iommu_init);
+machine_arch_initcall(cell, cell_iommu_init);
+machine_arch_initcall(celleb_native, cell_iommu_init);
 
index 99d688e88cbe1e51888f7fc6ec3b9f900a518ffe..69ed0d7f164673f069073231bed32e3ba72bd014 100644 (file)
@@ -381,9 +381,6 @@ static int __init cbe_init_pm_irq(void)
        unsigned int irq;
        int rc, node;
 
-       if (!machine_is(cell))
-               return 0;
-
        for_each_node(node) {
                irq = irq_create_mapping(NULL, IIC_IRQ_IOEX_PMI |
                                               (node << IIC_IRQ_NODE_SHIFT));
@@ -404,7 +401,7 @@ static int __init cbe_init_pm_irq(void)
 
        return 0;
 }
-arch_initcall(cbe_init_pm_irq);
+machine_arch_initcall(cell, cbe_init_pm_irq);
 
 void cbe_sync_irq(int node)
 {
index 4f6347c9fe68266d4d88638fa33b18d61f6fb7d1..e6534b519c9abb71267299eb313c1b9535571634 100644 (file)
@@ -85,9 +85,6 @@ static int __init cell_publish_devices(void)
 {
        int node;
 
-       if (!machine_is(cell))
-               return 0;
-
        /* Publish OF platform devices for southbridge IOs */
        of_platform_bus_probe(NULL, NULL, NULL);
 
@@ -101,7 +98,7 @@ static int __init cell_publish_devices(void)
        }
        return 0;
 }
-device_initcall(cell_publish_devices);
+machine_device_initcall(cell, cell_publish_devices);
 
 static void cell_mpic_cascade(unsigned int irq, struct irq_desc *desc)
 {
index fbe718d517a65e6c91ea83633a2eb5240f0de205..41e1e6f8e05915fa14b558886ab9a4d2b58b6637 100644 (file)
@@ -92,9 +92,6 @@ static struct notifier_block celleb_of_bus_notifier = {
 
 static int __init celleb_init_iommu(void)
 {
-       if (!machine_is(celleb_beat))
-               return -ENODEV;
-
        celleb_init_direct_mapping();
        set_pci_dma_ops(&dma_direct_ops);
        bus_register_notifier(&of_platform_bus_type, &celleb_of_bus_notifier);
@@ -102,4 +99,4 @@ static int __init celleb_init_iommu(void)
        return 0;
 }
 
-arch_initcall(celleb_init_iommu);
+machine_arch_initcall(celleb_beat, celleb_init_iommu);
index 0f0c4680bf013071dd11ba50c13e50e73acbe0c3..f27ae1e3fb58d010f79735822cf9b297c6407e5f 100644 (file)
@@ -111,10 +111,6 @@ static struct of_device_id celleb_bus_ids[] __initdata = {
 
 static int __init celleb_publish_devices(void)
 {
-       if (!machine_is(celleb_beat) &&
-           !machine_is(celleb_native))
-               return -ENODEV;
-
        /* Publish OF platform devices for southbridge IOs */
        of_platform_bus_probe(NULL, celleb_bus_ids, NULL);
 
@@ -122,7 +118,8 @@ static int __init celleb_publish_devices(void)
 
        return 0;
 }
-device_initcall(celleb_publish_devices);
+machine_device_initcall(celleb_beat, celleb_publish_devices);
+machine_device_initcall(celleb_native, celleb_publish_devices);
 
 
 /*