summaryrefslogtreecommitdiffstats
path: root/rbutil/mkamsboot
diff options
context:
space:
mode:
authorRafaël Carré <funman@videolan.org>2012-01-30 00:10:21 -0500
committerRafaël Carré <funman@videolan.org>2012-01-30 00:13:51 -0500
commitd1b47c2eeb091d8d45fc73049998d68f33d9c5c0 (patch)
treeffc0036de6fdf3850ccf4cd356999aab1d82f080 /rbutil/mkamsboot
parente7892c9851da0f3506c380983fac0c019f773489 (diff)
downloadrockbox-d1b47c2eeb091d8d45fc73049998d68f33d9c5c0.tar.gz
rockbox-d1b47c2eeb091d8d45fc73049998d68f33d9c5c0.tar.bz2
rockbox-d1b47c2eeb091d8d45fc73049998d68f33d9c5c0.zip
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')
-rw-r--r--rbutil/mkamsboot/dualboot.c13
-rw-r--r--rbutil/mkamsboot/dualboot.h2
-rw-r--r--rbutil/mkamsboot/dualboot/dualboot.S6
3 files changed, 14 insertions, 7 deletions
diff --git a/rbutil/mkamsboot/dualboot.c b/rbutil/mkamsboot/dualboot.c
index 050e114ef8..d97ab0e95b 100644
--- a/rbutil/mkamsboot/dualboot.c
+++ b/rbutil/mkamsboot/dualboot.c
@@ -89,21 +89,22 @@ unsigned char dualboot_fuze[176] = {
0x01, 0x20, 0x43, 0xe4, 0x04, 0x00, 0x53, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x01, 0x00, 0x83, 0xe2,
0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, 0x14, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x0d, 0xc8
};
-unsigned char dualboot_clipv2[220] = {
+unsigned char dualboot_clipv2[240] = {
0x06, 0x00, 0x00, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x24, 0x00, 0x1f, 0xe5, 0x24, 0x10, 0x1f, 0xe5, 0x01, 0x20, 0x40, 0xe0, 0x18, 0x30, 0x1f, 0xe5,
0x01, 0x40, 0x50, 0xe4, 0x01, 0x40, 0x43, 0xe4, 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a,
- 0x2c, 0x30, 0x0f, 0xe5, 0x88, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3,
- 0x00, 0x10, 0x80, 0xe5, 0x7c, 0x00, 0x9f, 0xe5, 0x38, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5,
+ 0x2c, 0x30, 0x0f, 0xe5, 0x98, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3,
+ 0x00, 0x10, 0x80, 0xe5, 0x8c, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0x90, 0xe5, 0x0c, 0x10, 0xc1, 0xe3,
+ 0x00, 0x10, 0x80, 0xe5, 0x80, 0x00, 0x9f, 0xe5, 0x38, 0x10, 0xa0, 0xe3, 0x00, 0x14, 0x80, 0xe5,
0x08, 0x10, 0xa0, 0xe3, 0x20, 0x10, 0x80, 0xe5, 0x10, 0x10, 0xa0, 0xe3, 0x40, 0x10, 0x80, 0xe5,
0x20, 0x10, 0xa0, 0xe3, 0x80, 0x10, 0x80, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x40, 0x10, 0x80, 0xe5,
0x05, 0x10, 0xa0, 0xe3, 0x01, 0x10, 0x51, 0xe2, 0xfd, 0xff, 0xff, 0x1a, 0x04, 0x10, 0x90, 0xe5,
- 0x00, 0x00, 0x51, 0xe3, 0x02, 0x00, 0x00, 0x0a, 0x8c, 0x00, 0x1f, 0xe5, 0x8c, 0x10, 0x1f, 0xe5,
- 0x01, 0x00, 0x00, 0xea, 0xa0, 0x00, 0x1f, 0xe5, 0xa0, 0x10, 0x1f, 0xe5, 0x98, 0x30, 0x1f, 0xe5,
+ 0x00, 0x00, 0x51, 0xe3, 0x02, 0x00, 0x00, 0x0a, 0x9c, 0x00, 0x1f, 0xe5, 0x9c, 0x10, 0x1f, 0xe5,
+ 0x01, 0x00, 0x00, 0xea, 0xb0, 0x00, 0x1f, 0xe5, 0xb0, 0x10, 0x1f, 0xe5, 0xa8, 0x30, 0x1f, 0xe5,
0x02, 0x50, 0x83, 0xe2, 0x01, 0x40, 0x43, 0xe0, 0x01, 0x20, 0x50, 0xe4, 0x01, 0x20, 0x43, 0xe4,
0x04, 0x00, 0x53, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3,
- 0x15, 0xff, 0x2f, 0xe1, 0x14, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x0e, 0xc8
+ 0x15, 0xff, 0x2f, 0xe1, 0x14, 0x00, 0x0f, 0xc8, 0x0c, 0x00, 0x10, 0xc8, 0x00, 0x00, 0x0e, 0xc8
};
unsigned char dualboot_clipplus[184] = {
0x06, 0x00, 0x00, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
diff --git a/rbutil/mkamsboot/dualboot.h b/rbutil/mkamsboot/dualboot.h
index 2a470d3a03..774c35c119 100644
--- a/rbutil/mkamsboot/dualboot.h
+++ b/rbutil/mkamsboot/dualboot.h
@@ -6,7 +6,7 @@ extern unsigned char dualboot_e200v2[176];
extern unsigned char dualboot_c200v2[272];
extern unsigned char dualboot_m200v4[180];
extern unsigned char dualboot_fuze[176];
-extern unsigned char dualboot_clipv2[220];
+extern unsigned char dualboot_clipv2[240];
extern unsigned char dualboot_clipplus[184];
extern unsigned char dualboot_fuzev2[176];
extern unsigned char dualboot_clipzip[232];
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]