Thread (6 messages) 6 messages, 3 authors, 2006-12-20

Re: [PATCH] powerpc: Add a device_initcall to call of_platform_bus_probe on all fsl SoCs

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2006-12-19 23:01:12

On Tue, 2006-12-19 at 15:31 -0600, Kim Phillips wrote:
Utilize of_platform_bus_probe() in lieu of manually
calling of_platform_device_create for each ucc_geth device
(consequently, the QE is added to of_default_bus_ids).

This has been extended outside mpc83xx platform code,
since other fsl SoCs are going to need it (thanks Kumar).

Signed-off-by: Kim Phillips <redacted>
Big NACK

The effect of this patch is that of_platform_bus_probe() will be
unconditionally called on anything if a paltform using fsl_soc.c is
included in the build.

I want that called by the platform code or by something called by the
platform code for FSL boards, not totally unconditional like that.

Ben.
 
quoted hunk ↗ jump to hunk
---
 arch/powerpc/kernel/of_platform.c |    1 +
 arch/powerpc/sysdev/fsl_soc.c     |    9 +++++++++
 2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index 3002ea3..72da78b 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -50,6 +50,7 @@ static struct of_device_id of_default_bu
 	{ .type = "plb5", },
 	{ .type = "plb4", },
 	{ .type = "opb", },
+	{ .type = "qe", },
 	{},
 };
 
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index ad31e56..c41b851 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -28,6 +28,7 @@
 #include <linux/fs_uart_pd.h>
 
 #include <asm/system.h>
+#include <asm/of_platform.h>
 #include <asm/atomic.h>
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -63,6 +64,14 @@ phys_addr_t get_immrbase(void)
 
 EXPORT_SYMBOL(get_immrbase);
 
+static int __init fsl_publish_devices(void)
+{
+	of_platform_bus_probe(NULL, NULL, NULL);
+
+	return 0;
+}
+device_initcall(fsl_publish_devices);
+
 #ifdef CONFIG_CPM2
 
 static u32 brgfreq = -1;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help