linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Add a device_initcall to call of_platform_bus_probe on all fsl SoCs
@ 2006-12-19 21:31 Kim Phillips
  2006-12-19 23:00 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 6+ messages in thread
From: Kim Phillips @ 2006-12-19 21:31 UTC (permalink / raw)
  To: linuxppc-dev

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 <kim.phillips@freescale.com>
---
 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;
-- 
1.4.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-12-20  0:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-19 21:31 [PATCH] powerpc: Add a device_initcall to call of_platform_bus_probe on all fsl SoCs Kim Phillips
2006-12-19 23:00 ` Benjamin Herrenschmidt
2006-12-19 23:22   ` Kim Phillips
2006-12-19 23:40     ` Benjamin Herrenschmidt
2006-12-20  0:10       ` Scott Wood
2006-12-20  0:19         ` Benjamin Herrenschmidt

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).