[v2] arm/dt: Add mx51 babbage devicetree support

Message ID 1301384166-20366-1-git-send-email-shawn.guo@linaro.org
State New
Headers show

Commit Message

Shawn Guo March 29, 2011, 7:36 a.m.
Enable basic device tree support on mx51 babbage

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
Changes since v1:
 * rename babbage.dts to mx51-babbage.dts for better aligning with
   other dts naming

 arch/arm/boot/dts/mx51-babbage.dts     |   19 +++++++++++++++++++
 arch/arm/mach-mx5/board-mx51_babbage.c |    6 ++++++
 2 files changed, 25 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/mx51-babbage.dts

Patch

diff --git a/arch/arm/boot/dts/mx51-babbage.dts b/arch/arm/boot/dts/mx51-babbage.dts
new file mode 100644
index 0000000..71410b2
--- /dev/null
+++ b/arch/arm/boot/dts/mx51-babbage.dts
@@ -0,0 +1,19 @@ 
+/dts-v1/;
+
+/ {
+	model = "Freescale i.MX51 Babbage";
+	compatible = "fsl,mx51-babbage";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	aliases {
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x90000000 0x20000000>;
+	};
+
+	chosen {
+	};
+};
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c
index b2ecd19..30b92ca 100644
--- a/arch/arm/mach-mx5/board-mx51_babbage.c
+++ b/arch/arm/mach-mx5/board-mx51_babbage.c
@@ -399,6 +399,11 @@  static struct sys_timer mx51_babbage_timer = {
 	.init = mx51_babbage_timer_init,
 };
 
+static const char *mx51_babbage_dt_match[] __initdata = {
+	"fsl,mx51-babbage",
+	NULL
+};
+
 MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board")
 	/* Maintainer: Amit Kucheria <amit.kucheria@canonical.com> */
 	.boot_params = MX51_PHYS_OFFSET + 0x100,
@@ -407,4 +412,5 @@  MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board")
 	.init_irq = mx51_init_irq,
 	.timer = &mx51_babbage_timer,
 	.init_machine = mx51_babbage_init,
+	.dt_compat = mx51_babbage_dt_match,
 MACHINE_END