Thread (5 messages) flat view 5 messages, 4 authors, 2008-02-13

Re: [PATCH 1/2] powerpc: publish 85xx soc dts entries as of_device

From: Stephen Rothwell <hidden>
Date: 2008-02-11 23:36:54

Hi Dave,

On Mon, 11 Feb 2008 13:32:43 -0700 Dave Jiang [off-list ref] wrote:
quoted hunk ↗ jump to hunk
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -26,6 +26,8 @@
 #include <asm/mpic.h>
 #include <mm/mmu_decl.h>
 #include <asm/udbg.h>
+#include <asm/of_device.h>
+#include <asm/of_platform.h>
Like Jon said ...
+static struct of_device_id mpc85xx_ids[] = {
make this __initdata
+static int __init mpc85xx_publish_devices(void)
+{
+	if (!machine_is(mpc85xx_ads))
+		return 0;
You don't need this if you make the change below.
+	of_platform_bus_probe(NULL, mpc85xx_ids, NULL);
+
+	return 0;
+}
+device_initcall(mpc85xx_publish_devices);
machine_devce_initcall(mpc85xx_ads, mpc85xx_publish_devices);
quoted hunk ↗ jump to hunk
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+static struct of_device_id mpc85xx_ids[] = {
__initdata
+static int __init mpc85xx_publish_devices(void)
+{
+	if (!machine_is(mpc85xx_cds))
+		return 0;
+
+	of_platform_bus_probe(NULL, mpc85xx_ids, NULL);
+
+	return 0;
+}
+device_initcall(mpc85xx_publish_devices);
Same as above.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help