Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[POWERPC] Create of_buses for MV64x60 devices

For each mv64360 entry in the OpenFirmware database, add the
registration of an of_bus to take care of devices connected to
the MV64x60 asynchronous devices controller.
This change makes it possible for those devices to be detected by
drivers that support the of_platform without having a custom call
for each of them in the board file.

Signed-off-by: Remi Machet <rmachet@slac.stanford.edu>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

Remi Machet and committed by
Paul Mackerras
683307da 663276b7

+10
+10
arch/powerpc/sysdev/mv64x60_dev.c
··· 15 15 #include <linux/console.h> 16 16 #include <linux/mv643xx.h> 17 17 #include <linux/platform_device.h> 18 + #include <linux/of_platform.h> 18 19 19 20 #include <asm/prom.h> 20 21 ··· 25 24 * architectures. Because of that, the drivers do not support the normal 26 25 * PowerPC of_platform_bus_type. They support platform_bus_type instead. 27 26 */ 27 + 28 + static struct of_device_id __initdata of_mv64x60_devices[] = { 29 + { .compatible = "marvell,mv64306-devctrl", }, 30 + {} 31 + }; 28 32 29 33 /* 30 34 * Create MPSC platform devices ··· 489 483 np->full_name, err); 490 484 of_node_put(np); 491 485 } 486 + 487 + /* Now add every node that is on the device bus */ 488 + for_each_compatible_node(np, NULL, "marvell,mv64360") 489 + of_platform_bus_probe(np, of_mv64x60_devices, NULL); 492 490 493 491 return 0; 494 492 }