Commit e25c47ff authored by Grant Likely's avatar Grant Likely Committed by Paul Mackerras

[POWERPC] cell: Use machine_*_initcall() hooks in platform code

Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent d518b717
...@@ -309,9 +309,6 @@ static int __init spider_pci_workaround_init(void) ...@@ -309,9 +309,6 @@ static int __init spider_pci_workaround_init(void)
{ {
struct pci_controller *phb; struct pci_controller *phb;
if (!machine_is(cell))
return 0;
/* Find spider bridges. We assume they have been all probed /* Find spider bridges. We assume they have been all probed
* in setup_arch(). If that was to change, we would need to * in setup_arch(). If that was to change, we would need to
* update this code to cope with dynamically added busses * update this code to cope with dynamically added busses
...@@ -343,4 +340,4 @@ static int __init spider_pci_workaround_init(void) ...@@ -343,4 +340,4 @@ static int __init spider_pci_workaround_init(void)
return 0; return 0;
} }
arch_initcall(spider_pci_workaround_init); machine_arch_initcall(cell, spider_pci_workaround_init);
...@@ -700,10 +700,6 @@ static int __init cell_iommu_init(void) ...@@ -700,10 +700,6 @@ static int __init cell_iommu_init(void)
{ {
struct device_node *np; 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 /* If IOMMU is disabled or we have little enough RAM to not need
* to enable it, we setup a direct mapping. * to enable it, we setup a direct mapping.
* *
...@@ -746,5 +742,6 @@ static int __init cell_iommu_init(void) ...@@ -746,5 +742,6 @@ static int __init cell_iommu_init(void)
return 0; return 0;
} }
arch_initcall(cell_iommu_init); machine_arch_initcall(cell, cell_iommu_init);
machine_arch_initcall(celleb_native, cell_iommu_init);
...@@ -381,9 +381,6 @@ static int __init cbe_init_pm_irq(void) ...@@ -381,9 +381,6 @@ static int __init cbe_init_pm_irq(void)
unsigned int irq; unsigned int irq;
int rc, node; int rc, node;
if (!machine_is(cell))
return 0;
for_each_node(node) { for_each_node(node) {
irq = irq_create_mapping(NULL, IIC_IRQ_IOEX_PMI | irq = irq_create_mapping(NULL, IIC_IRQ_IOEX_PMI |
(node << IIC_IRQ_NODE_SHIFT)); (node << IIC_IRQ_NODE_SHIFT));
...@@ -404,7 +401,7 @@ static int __init cbe_init_pm_irq(void) ...@@ -404,7 +401,7 @@ static int __init cbe_init_pm_irq(void)
return 0; return 0;
} }
arch_initcall(cbe_init_pm_irq); machine_arch_initcall(cell, cbe_init_pm_irq);
void cbe_sync_irq(int node) void cbe_sync_irq(int node)
{ {
......
...@@ -85,9 +85,6 @@ static int __init cell_publish_devices(void) ...@@ -85,9 +85,6 @@ static int __init cell_publish_devices(void)
{ {
int node; int node;
if (!machine_is(cell))
return 0;
/* Publish OF platform devices for southbridge IOs */ /* Publish OF platform devices for southbridge IOs */
of_platform_bus_probe(NULL, NULL, NULL); of_platform_bus_probe(NULL, NULL, NULL);
...@@ -101,7 +98,7 @@ static int __init cell_publish_devices(void) ...@@ -101,7 +98,7 @@ static int __init cell_publish_devices(void)
} }
return 0; 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) static void cell_mpic_cascade(unsigned int irq, struct irq_desc *desc)
{ {
......
...@@ -92,9 +92,6 @@ static struct notifier_block celleb_of_bus_notifier = { ...@@ -92,9 +92,6 @@ static struct notifier_block celleb_of_bus_notifier = {
static int __init celleb_init_iommu(void) static int __init celleb_init_iommu(void)
{ {
if (!machine_is(celleb_beat))
return -ENODEV;
celleb_init_direct_mapping(); celleb_init_direct_mapping();
set_pci_dma_ops(&dma_direct_ops); set_pci_dma_ops(&dma_direct_ops);
bus_register_notifier(&of_platform_bus_type, &celleb_of_bus_notifier); bus_register_notifier(&of_platform_bus_type, &celleb_of_bus_notifier);
...@@ -102,4 +99,4 @@ static int __init celleb_init_iommu(void) ...@@ -102,4 +99,4 @@ static int __init celleb_init_iommu(void)
return 0; return 0;
} }
arch_initcall(celleb_init_iommu); machine_arch_initcall(celleb_beat, celleb_init_iommu);
...@@ -111,10 +111,6 @@ static struct of_device_id celleb_bus_ids[] __initdata = { ...@@ -111,10 +111,6 @@ static struct of_device_id celleb_bus_ids[] __initdata = {
static int __init celleb_publish_devices(void) 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 */ /* Publish OF platform devices for southbridge IOs */
of_platform_bus_probe(NULL, celleb_bus_ids, NULL); of_platform_bus_probe(NULL, celleb_bus_ids, NULL);
...@@ -122,7 +118,8 @@ static int __init celleb_publish_devices(void) ...@@ -122,7 +118,8 @@ static int __init celleb_publish_devices(void)
return 0; return 0;
} }
device_initcall(celleb_publish_devices); machine_device_initcall(celleb_beat, celleb_publish_devices);
machine_device_initcall(celleb_native, celleb_publish_devices);
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment