From: Grant Likely <grant.likely@secretlab.ca>
To: linuxppc-dev@ozlabs.org, benh@kernel.crashing.org,
vitb@kernel.crashing.org, galak@kernel.crashing.org,
olof@lixom.net
Subject: [PATCH 2/5] [POWERPC] cell: Use machine_*_initcall() hooks in platform code
Date: Wed, 02 Jan 2008 12:14:36 -0700 [thread overview]
Message-ID: <20080102191433.24178.68793.stgit@trillian.secretlab.ca> (raw)
In-Reply-To: <20080102191135.24178.99973.stgit@trillian.secretlab.ca>
From: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/powerpc/platforms/cell/io-workarounds.c | 5 +----
arch/powerpc/platforms/cell/iommu.c | 7 ++-----
arch/powerpc/platforms/cell/pmu.c | 5 +----
arch/powerpc/platforms/cell/setup.c | 5 +----
arch/powerpc/platforms/celleb/iommu.c | 5 +----
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 b86076e..979d4b6 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)
{
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);
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index 1221c6d..bceb5e1 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)
{
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);
diff --git a/arch/powerpc/platforms/cell/pmu.c b/arch/powerpc/platforms/cell/pmu.c
index 99d688e..69ed0d7 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)
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)
{
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index 4f6347c..e6534b5 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)
{
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)
{
diff --git a/arch/powerpc/platforms/celleb/iommu.c b/arch/powerpc/platforms/celleb/iommu.c
index fbe718d..41e1e6f 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 = {
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);
diff --git a/arch/powerpc/platforms/celleb/setup.c b/arch/powerpc/platforms/celleb/setup.c
index 0f0c468..f27ae1e 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 = {
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);
/*
next prev parent reply other threads:[~2008-01-02 19:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-02 19:14 [PATCH 0/5] Make platform code use machine_*_initcall() macros Grant Likely
2008-01-02 19:14 ` [PATCH 1/5] [POWERPC] powermac: Use machine_*_initcall() hooks in platform code Grant Likely
2008-01-02 20:20 ` Benjamin Herrenschmidt
2008-01-02 19:14 ` Grant Likely [this message]
2008-01-02 19:25 ` [PATCH 2/5] [POWERPC] cell: " Arnd Bergmann
2008-01-02 19:32 ` [PATCH 3/5] [POWERPC] pasemi: " Grant Likely
2008-01-02 20:30 ` Olof Johansson
2008-01-02 19:32 ` [PATCH 4/5] [POWERPC] 8xx: " Grant Likely
2008-01-03 17:37 ` Scott Wood
2008-01-03 17:52 ` Grant Likely
2008-01-02 19:33 ` [PATCH 5/5] [POWERPC] 8xxx and embedded6xx: " Grant Likely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080102191433.24178.68793.stgit@trillian.secretlab.ca \
--to=grant.likely@secretlab.ca \
--cc=benh@kernel.crashing.org \
--cc=galak@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=olof@lixom.net \
--cc=vitb@kernel.crashing.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).