diff mbox

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

Message ID 1297514825-10345-4-git-send-email-thomas.abraham@linaro.org
State New
Headers show

Commit Message

thomas.abraham@linaro.org Feb. 12, 2011, 12:47 p.m. UTC
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@linaro.org>
---
 arch/arm/mach-s5pv310/mach-s5pv310-dt.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
diff mbox

Patch

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@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,