From d1b47c2eeb091d8d45fc73049998d68f33d9c5c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Mon, 30 Jan 2012 00:10:21 -0500 Subject: Clipv2: fix button reading on some models We neet to setup the XPD to work as GPIO storage unaffected Tested on working-already Clipv2 and on a 'brickable' clipv2 Change-Id: Idcbdfb6bd50d51b7f6f7e00b21df24fac9b3a6d8 --- rbutil/mkamsboot/dualboot/dualboot.S | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'rbutil/mkamsboot/dualboot') diff --git a/rbutil/mkamsboot/dualboot/dualboot.S b/rbutil/mkamsboot/dualboot/dualboot.S index 932e91a4a3..4e4dbe5505 100644 --- a/rbutil/mkamsboot/dualboot/dualboot.S +++ b/rbutil/mkamsboot/dualboot/dualboot.S @@ -29,6 +29,7 @@ .set CGU_PROC, 0xC80F0010 .set CGU_PERI, 0xC80F0014 .set CGU_DBOP, 0xC80F0038 +.set CCU_IO, 0xC810000C .set DBOP, 0xC8120000 .set I2C_BASE, 0xC8070000 .set I2C_DATA, 0x00 @@ -111,6 +112,11 @@ uclcopy: .set row, (1<<4) /* enable output on D4 */ .set col, (1<<0) /* read keyscan column D0 */ + ldr r0, =CCU_IO + ldr r1, [r0] + bic r1, r1, #(3<<2) @ XPD works as general purpose IO + str r1, [r0] + ldr r0, =GPIOD mov r1, #((1<<5)|(1<<4)|(1<<3)) /* all rows as output */ str r1, [r0, #0x400] -- cgit v1.2.3