]> Pileus Git - ~andy/linux/commitdiff
powerpc/85xx: don't call of_platform_bus_probe() twice
authorTimur Tabi <timur@freescale.com>
Wed, 30 Nov 2011 16:19:17 +0000 (10:19 -0600)
committerKumar Gala <galak@kernel.crashing.org>
Thu, 19 Apr 2012 19:43:27 +0000 (14:43 -0500)
Commit 46d026ac ("powerpc/85xx: consolidate of_platform_bus_probe calls")
replaced platform-specific of_device_id tables with a single function
that probes the most of the busses in 85xx device trees.  If a specific
platform needed additional busses probed, then it could call
of_platform_bus_probe() again.  Typically, the additional platform-specific
busses are children of existing busses that have already been probed.
of_platform_bus_probe() does not handle those child busses automatically.

Unfortunately, this doesn't actually work.  The second (platform-specific)
call to of_platform_bus_probe() never finds any of the busses it's asked
to find.

To remedy this, the platform-specific of_device_id tables are eliminated,
and their entries are merged into mpc85xx_common_ids[], so that all busses
are probed at once.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/platforms/85xx/common.c
arch/powerpc/platforms/85xx/mpc85xx_mds.c
arch/powerpc/platforms/85xx/p1022_ds.c

index 9fef5302adc127468d821f8335c0ef007e416270..67dac22b4363c07f5add4b0c56c06af0d3225ba9 100644 (file)
@@ -21,6 +21,12 @@ static struct of_device_id __initdata mpc85xx_common_ids[] = {
        { .compatible = "fsl,qe", },
        { .compatible = "fsl,cpm2", },
        { .compatible = "fsl,srio", },
+       /* So that the DMA channel nodes can be probed individually: */
+       { .compatible = "fsl,eloplus-dma", },
+       /* For the PMC driver */
+       { .compatible = "fsl,mpc8548-guts", },
+       /* Probably unnecessary? */
+       { .compatible = "gpio-leds", },
        {},
 };
 
index 9a6f04406e0d63ebee34841a15ebd665a50ad3cd..d208ebccb91cc5f5db92bee1cf47e82e0e0c4b31 100644 (file)
@@ -399,12 +399,6 @@ static int __init board_fixups(void)
 machine_arch_initcall(mpc8568_mds, board_fixups);
 machine_arch_initcall(mpc8569_mds, board_fixups);
 
-static struct of_device_id mpc85xx_ids[] = {
-       { .compatible = "fsl,mpc8548-guts", },
-       { .compatible = "gpio-leds", },
-       {},
-};
-
 static int __init mpc85xx_publish_devices(void)
 {
        if (machine_is(mpc8568_mds))
@@ -412,10 +406,7 @@ static int __init mpc85xx_publish_devices(void)
        if (machine_is(mpc8569_mds))
                simple_gpiochip_init("fsl,mpc8569mds-bcsr-gpio");
 
-       mpc85xx_common_publish_devices();
-       of_platform_bus_probe(NULL, mpc85xx_ids, NULL);
-
-       return 0;
+       return mpc85xx_common_publish_devices();
 }
 
 machine_device_initcall(mpc8568_mds, mpc85xx_publish_devices);
index e74b7cde9aee77482f27c739af6dad8cf024d725..f700c81a1321ca2de222b6f1561408e454094204 100644 (file)
@@ -460,18 +460,7 @@ static void __init p1022_ds_setup_arch(void)
        pr_info("Freescale P1022 DS reference board\n");
 }
 
-static struct of_device_id __initdata p1022_ds_ids[] = {
-       /* So that the DMA channel nodes can be probed individually: */
-       { .compatible = "fsl,eloplus-dma", },
-       {},
-};
-
-static int __init p1022_ds_publish_devices(void)
-{
-       mpc85xx_common_publish_devices();
-       return of_platform_bus_probe(NULL, p1022_ds_ids, NULL);
-}
-machine_device_initcall(p1022_ds, p1022_ds_publish_devices);
+machine_device_initcall(p1022_ds, mpc85xx_common_publish_devices);
 
 machine_arch_initcall(p1022_ds, swiotlb_setup_bus_notifier);