ARM: s5pv310-dt: Add support for probing platform bus on s5pv310 dt-enabled machine

Started by Thomas Abraham on Feb 12, 2011

Subsystems (2)

Maintainers (2)

DORMANTno replies

open the first message on its own page

Message details and related content
This patch adds support for probing devices from device tree
for Samsung's s5pv310 device-tree enabled machine.

Signed-off-by: Thomas Abraham <redacted>
---
 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-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> */
 	.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
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help