summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2006-02-02 11:24:32 +0000
committerDave Chapman <dave@dchapman.com>2006-02-02 11:24:32 +0000
commit1023cedb79ed737464134e3f6acfaf1ffabadcda (patch)
treed273cbbffb304825b21b1d31ed44ff6e92a00489
parentfddefdcee2836b75f314a92c73bdef224165ad92 (diff)
downloadrockbox-1023cedb79ed737464134e3f6acfaf1ffabadcda.zip
rockbox-1023cedb79ed737464134e3f6acfaf1ffabadcda.tar.gz
rockbox-1023cedb79ed737464134e3f6acfaf1ffabadcda.tar.bz2
rockbox-1023cedb79ed737464134e3f6acfaf1ffabadcda.tar.xz
iPod: Remove/reduce the udelay()s in the button driver. They were in the IPL source, but do not appear to be needed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8530 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/button.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index fc9cc7a..79378cd 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -121,7 +121,10 @@ static int ipod_4g_button_read(void)
int new_wheel_value;
int btn = BUTTON_NONE;
- udelay(250);
+ /* The ipodlinux source had a udelay(250) here, but testing has shown that
+ it is not needed - tested on Nano, Color/Photo and Video. */
+ /* udelay(250);*/
+
reg = 0x7000c104;
if ((inl(0x7000c104) & 0x4000000) != 0) {
reg = reg + 0x3C; /* 0x7000c140 */
@@ -204,7 +207,9 @@ static int ipod_4g_button_read(void)
void ipod_4g_button_int(void)
{
CPU_HI_INT_CLR = I2C_MASK;
- udelay(250);
+ /* The following delay was 250 in the ipodlinux source, but 10 seems to
+ work fine - tested on Nano, Color/Photo and Video. */
+ udelay(10);
outl(0x0, 0x7000c140);
int_btn = ipod_4g_button_read();
outl(inl(0x7000c104) | 0xC000000, 0x7000c104);