diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2008-01-02 14:14:36 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-01-16 22:57:15 -0500 |
commit | e25c47ffa97ca5e4602593b03ce6d21cff652864 (patch) | |
tree | 1bbd57e332fde97d5c801d881aee57aada56113e | |
parent | d518b71784c6fa4c8eafb334236883f763f8e296 (diff) |
[POWERPC] cell: Use machine_*_initcall() hooks in platform code
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | arch/powerpc/platforms/cell/io-workarounds.c | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/iommu.c | 7 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/pmu.c | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/setup.c | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/celleb/iommu.c | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/celleb/setup.c | 7 |
6 files changed, 8 insertions, 26 deletions
diff --git a/arch/powerpc/platforms/cell/io-workarounds.c b/arch/powerpc/platforms/cell/io-workarounds.c index b86076e3c09e..979d4b67efb4 100644 --- a/arch/powerpc/platforms/cell/io-workarounds.c +++ b/arch/powerpc/platforms/cell/io-workarounds.c | |||
@@ -309,9 +309,6 @@ static int __init spider_pci_workaround_init(void) | |||
309 | { | 309 | { |
310 | struct pci_controller *phb; | 310 | struct pci_controller *phb; |
311 | 311 | ||
312 | if (!machine_is(cell)) | ||
313 | return 0; | ||
314 | |||
315 | /* Find spider bridges. We assume they have been all probed | 312 | /* Find spider bridges. We assume they have been all probed |
316 | * in setup_arch(). If that was to change, we would need to | 313 | * in setup_arch(). If that was to change, we would need to |
317 | * update this code to cope with dynamically added busses | 314 | * update this code to cope with dynamically added busses |
@@ -343,4 +340,4 @@ static int __init spider_pci_workaround_init(void) | |||
343 | 340 | ||
344 | return 0; | 341 | return 0; |
345 | } | 342 | } |
346 | arch_initcall(spider_pci_workaround_init); | 343 | machine_arch_initcall(cell, spider_pci_workaround_init); |
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c index 1221c6d8650f..bceb5e13da5c 100644 --- a/arch/powerpc/platforms/cell/iommu.c +++ b/arch/powerpc/platforms/cell/iommu.c | |||
@@ -700,10 +700,6 @@ static int __init cell_iommu_init(void) | |||
700 | { | 700 | { |
701 | struct device_node *np; | 701 | struct device_node *np; |
702 | 702 | ||
703 | if (!machine_is(cell) && | ||
704 | !machine_is(celleb_native)) | ||
705 | return -ENODEV; | ||
706 | |||
707 | /* If IOMMU is disabled or we have little enough RAM to not need | 703 | /* If IOMMU is disabled or we have little enough RAM to not need |
708 | * to enable it, we setup a direct mapping. | 704 | * to enable it, we setup a direct mapping. |
709 | * | 705 | * |
@@ -746,5 +742,6 @@ static int __init cell_iommu_init(void) | |||
746 | 742 | ||
747 | return 0; | 743 | return 0; |
748 | } | 744 | } |
749 | arch_initcall(cell_iommu_init); | 745 | machine_arch_initcall(cell, cell_iommu_init); |
746 | machine_arch_initcall(celleb_native, cell_iommu_init); | ||
750 | 747 | ||
diff --git a/arch/powerpc/platforms/cell/pmu.c b/arch/powerpc/platforms/cell/pmu.c index 99d688e88cbe..69ed0d7f1646 100644 --- a/arch/powerpc/platforms/cell/pmu.c +++ b/arch/powerpc/platforms/cell/pmu.c | |||
@@ -381,9 +381,6 @@ static int __init cbe_init_pm_irq(void) | |||
381 | unsigned int irq; | 381 | unsigned int irq; |
382 | int rc, node; | 382 | int rc, node; |
383 | 383 | ||
384 | if (!machine_is(cell)) | ||
385 | return 0; | ||
386 | |||
387 | for_each_node(node) { | 384 | for_each_node(node) { |
388 | irq = irq_create_mapping(NULL, IIC_IRQ_IOEX_PMI | | 385 | irq = irq_create_mapping(NULL, IIC_IRQ_IOEX_PMI | |
389 | (node << IIC_IRQ_NODE_SHIFT)); | 386 | (node << IIC_IRQ_NODE_SHIFT)); |
@@ -404,7 +401,7 @@ static int __init cbe_init_pm_irq(void) | |||
404 | 401 | ||
405 | return 0; | 402 | return 0; |
406 | } | 403 | } |
407 | arch_initcall(cbe_init_pm_irq); | 404 | machine_arch_initcall(cell, cbe_init_pm_irq); |
408 | 405 | ||
409 | void cbe_sync_irq(int node) | 406 | void cbe_sync_irq(int node) |
410 | { | 407 | { |
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c index 4f6347c9fe68..e6534b519c9a 100644 --- a/arch/powerpc/platforms/cell/setup.c +++ b/arch/powerpc/platforms/cell/setup.c | |||
@@ -85,9 +85,6 @@ static int __init cell_publish_devices(void) | |||
85 | { | 85 | { |
86 | int node; | 86 | int node; |
87 | 87 | ||
88 | if (!machine_is(cell)) | ||
89 | return 0; | ||
90 | |||
91 | /* Publish OF platform devices for southbridge IOs */ | 88 | /* Publish OF platform devices for southbridge IOs */ |
92 | of_platform_bus_probe(NULL, NULL, NULL); | 89 | of_platform_bus_probe(NULL, NULL, NULL); |
93 | 90 | ||
@@ -101,7 +98,7 @@ static int __init cell_publish_devices(void) | |||
101 | } | 98 | } |
102 | return 0; | 99 | return 0; |
103 | } | 100 | } |
104 | device_initcall(cell_publish_devices); | 101 | machine_device_initcall(cell, cell_publish_devices); |
105 | 102 | ||
106 | static void cell_mpic_cascade(unsigned int irq, struct irq_desc *desc) | 103 | static void cell_mpic_cascade(unsigned int irq, struct irq_desc *desc) |
107 | { | 104 | { |
diff --git a/arch/powerpc/platforms/celleb/iommu.c b/arch/powerpc/platforms/celleb/iommu.c index fbe718d517a6..41e1e6f8e059 100644 --- a/arch/powerpc/platforms/celleb/iommu.c +++ b/arch/powerpc/platforms/celleb/iommu.c | |||
@@ -92,9 +92,6 @@ static struct notifier_block celleb_of_bus_notifier = { | |||
92 | 92 | ||
93 | static int __init celleb_init_iommu(void) | 93 | static int __init celleb_init_iommu(void) |
94 | { | 94 | { |
95 | if (!machine_is(celleb_beat)) | ||
96 | return -ENODEV; | ||
97 | |||
98 | celleb_init_direct_mapping(); | 95 | celleb_init_direct_mapping(); |
99 | set_pci_dma_ops(&dma_direct_ops); | 96 | set_pci_dma_ops(&dma_direct_ops); |
100 | bus_register_notifier(&of_platform_bus_type, &celleb_of_bus_notifier); | 97 | bus_register_notifier(&of_platform_bus_type, &celleb_of_bus_notifier); |
@@ -102,4 +99,4 @@ static int __init celleb_init_iommu(void) | |||
102 | return 0; | 99 | return 0; |
103 | } | 100 | } |
104 | 101 | ||
105 | arch_initcall(celleb_init_iommu); | 102 | machine_arch_initcall(celleb_beat, celleb_init_iommu); |
diff --git a/arch/powerpc/platforms/celleb/setup.c b/arch/powerpc/platforms/celleb/setup.c index 0f0c4680bf01..f27ae1e3fb58 100644 --- a/arch/powerpc/platforms/celleb/setup.c +++ b/arch/powerpc/platforms/celleb/setup.c | |||
@@ -111,10 +111,6 @@ static struct of_device_id celleb_bus_ids[] __initdata = { | |||
111 | 111 | ||
112 | static int __init celleb_publish_devices(void) | 112 | static int __init celleb_publish_devices(void) |
113 | { | 113 | { |
114 | if (!machine_is(celleb_beat) && | ||
115 | !machine_is(celleb_native)) | ||
116 | return -ENODEV; | ||
117 | |||
118 | /* Publish OF platform devices for southbridge IOs */ | 114 | /* Publish OF platform devices for southbridge IOs */ |
119 | of_platform_bus_probe(NULL, celleb_bus_ids, NULL); | 115 | of_platform_bus_probe(NULL, celleb_bus_ids, NULL); |
120 | 116 | ||
@@ -122,7 +118,8 @@ static int __init celleb_publish_devices(void) | |||
122 | 118 | ||
123 | return 0; | 119 | return 0; |
124 | } | 120 | } |
125 | device_initcall(celleb_publish_devices); | 121 | machine_device_initcall(celleb_beat, celleb_publish_devices); |
122 | machine_device_initcall(celleb_native, celleb_publish_devices); | ||
126 | 123 | ||
127 | 124 | ||
128 | /* | 125 | /* |