[PATCH 3/7] ARM: s5pv310-dt: Add support for probing platform bus on s5pv310 dt-enabled machine

Thomas Abraham thomas.abraham at linaro.org
Sat Feb 12 23:47:01 EST 2011


This patch adds support for probing devices from device tree
for Samsung's s5pv310 device-tree enabled machine.

Signed-off-by: Thomas Abraham <thomas.abraham at linaro.org>
---
 arch/arm/mach-s5pv310/mach-s5pv310-dt.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s5pv310/mach-s5pv310-dt.c b/arch/arm/mach-s5pv310/mach-s5pv310-dt.c
index a5e33ff..2578d73 100644
--- a/arch/arm/mach-s5pv310/mach-s5pv310-dt.c
+++ b/arch/arm/mach-s5pv310/mach-s5pv310-dt.c
@@ -57,6 +57,16 @@ static void s5pv310_dt_init_early(void)
 	s3c24xx_init_uarts(uartcfgs, ARRAY_SIZE(uartcfgs));
 }
 
+static struct of_device_id s5pv310_dt_match_table[] __initdata = {
+	{ .compatible = "simple-bus", },
+	{},
+};
+
+static void __init s5pv310_dt_machine_init(void)
+{
+	of_platform_bus_probe(NULL, s5pv310_dt_match_table, NULL);
+}
+
 static char const *s5pv310_dt_compat[] = {
 	"samsung,s5pv310",
 	NULL
@@ -67,6 +77,7 @@ MACHINE_START(S5PV310_DT, "Samsung's S5PV310 with flattened device tree")
 	/* Maintainer: Changhwan Youn <chaos.youn at samsung.com> */
 	.init_irq	= s5pv310_init_irq,
 	.map_io		= s5pv310_dt_map_io,
+	.init_machine	= s5pv310_dt_machine_init,
 	.timer		= &s5pv310_timer,
 	.dt_compat	= s5pv310_dt_compat,
 	.init_early	= s5pv310_dt_init_early,
-- 
1.6.6.rc2



More information about the devicetree-discuss mailing list