summaryrefslogtreecommitdiff
path: root/firmware/target
diff options
context:
space:
mode:
authorSteffen Butzer <steffen@howarts.info>2014-08-28 21:15:29 +0200
committerMarcin Bukat <marcin.bukat@gmail.com>2014-10-02 12:56:37 +0200
commitf5e2c25cb8e12df34b5c90adc93206d3fe8e31ba (patch)
treea7db1c3aea491f5e5a128c4b2bb7294a4c69ae67 /firmware/target
parent7c20d8f686992f0de2c7bf1db9339026f01a07ee (diff)
downloadrockbox-f5e2c25cb8e12df34b5c90adc93206d3fe8e31ba.tar.gz
rockbox-f5e2c25cb8e12df34b5c90adc93206d3fe8e31ba.zip
iPod Classic: Fix bidirectional clickwheel communication.
This restores functionality that was broken in g#194 and committed as revision 7ec426e497daa1b4a6082bf4e4e3df687b11db44. Bidirectional communication is required to ask the clickwheel controller for the initial button state during boot. Otherwise our driver would only know about pressed buttons when the first change event is received, which is too late for e.g. prevention of USB connection during boot. This fix is also required to support the selection of OF, Rockbox, Disk Mode, etc. in the iPod Classic Rockbox bootloader. Change-Id: I127d54cf9e630d8075dd6d66f95dacb2816bfbc8 Reviewed-on: http://gerrit.rockbox.org/938 Reviewed-by: Michael Sparmann <theseven@gmx.net> Tested: Michael Sparmann <theseven@gmx.net> Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/arm/ipod/button-clickwheel.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/firmware/target/arm/ipod/button-clickwheel.c b/firmware/target/arm/ipod/button-clickwheel.c
index 13c765c6db..3af50b5112 100644
--- a/firmware/target/arm/ipod/button-clickwheel.c
+++ b/firmware/target/arm/ipod/button-clickwheel.c
@@ -364,15 +364,13 @@ static void s5l_clickwheel_init(void)
364#elif CONFIG_CPU==S5L8702 364#elif CONFIG_CPU==S5L8702
365 /* enable and init internal (s5l8702) wheel controller */ 365 /* enable and init internal (s5l8702) wheel controller */
366 PWRCON(1) &= ~(1 << 1); 366 PWRCON(1) &= ~(1 << 1);
367 PCON(14) = (PCON(14) & ~0xffff0000) | 0x22220000;
367 WHEELINT = 7; 368 WHEELINT = 7;
368 WHEEL10 = 1; 369 WHEEL10 = 1;
369 WHEEL00 = 0x380000; 370 WHEEL00 = 0x380000;
370 WHEEL08 = 0x20000; 371 WHEEL08 = 0x20000;
371 WHEELTX = 0x8000023A; 372 WHEELTX = 0x8000023A;
372 WHEEL04 |= 1; 373 WHEEL04 |= 1;
373
374 /* enable external (CY8C21x34) wheel controller */
375 GPIOCMD = 0xe040f;
376#endif 374#endif
377} 375}
378 376
@@ -383,7 +381,6 @@ void button_init_device(void)
383 INTMSK |= (1<<26); 381 INTMSK |= (1<<26);
384#elif CONFIG_CPU==S5L8702 382#elif CONFIG_CPU==S5L8702
385 /* configure GPIO E2 as pull-up input */ 383 /* configure GPIO E2 as pull-up input */
386 GPIOCMD = 0xe0200;
387 PUNB(14) |= (1 << 2); 384 PUNB(14) |= (1 << 2);
388#endif 385#endif
389 s5l_clickwheel_init(); 386 s5l_clickwheel_init();