diff options
author | Rafaël Carré <funman@videolan.org> | 2012-01-30 00:10:21 -0500 |
---|---|---|
committer | Rafaël Carré <funman@videolan.org> | 2012-01-30 00:13:51 -0500 |
commit | d1b47c2eeb091d8d45fc73049998d68f33d9c5c0 (patch) | |
tree | ffc0036de6fdf3850ccf4cd356999aab1d82f080 /rbutil/mkamsboot/dualboot | |
parent | e7892c9851da0f3506c380983fac0c019f773489 (diff) |
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
Diffstat (limited to 'rbutil/mkamsboot/dualboot')
-rw-r--r-- | rbutil/mkamsboot/dualboot/dualboot.S | 6 |
1 files changed, 6 insertions, 0 deletions
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] |