[RFC PATCH 04/14] ARM: r1 DT mach id init

Lorenzo Pieralisi lorenzo.pieralisi at arm.com
Thu Aug 19 04:59:50 EST 2010


Device tree ARM machine desc has been allocated id 0xffffffff temporarily.
This machine id should be passed in r1 upon kernel booting.
Legacy code requires code stubs to update r1 accordingly when
booting from legacy boot loaders that do not necessarily pass DT
mach id on r1.

This patch adds code in the dtb stub to automatically generate and move
the required DT machine id into r1 before jumping to kernel code.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi at arm.com>
---
 arch/arm/boot/dt/dtb.S |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dt/dtb.S b/arch/arm/boot/dt/dtb.S
index e678db2..7d56289 100644
--- a/arch/arm/boot/dt/dtb.S
+++ b/arch/arm/boot/dt/dtb.S
@@ -35,6 +35,9 @@ setup_dtb:
 	cmp	r4, r5
 	blo	2b
 
+	/* update r1 with DT id  */
+	mvn	r1, #0x0
+
 	b	zimage_start
 
 	.ltorg
-- 
1.6.3.3



More information about the devicetree-discuss mailing list