From 1023cedb79ed737464134e3f6acfaf1ffabadcda Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Thu, 2 Feb 2006 11:24:32 +0000 Subject: 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 --- firmware/drivers/button.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index fc9cc7ac25..79378cda48 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); -- cgit v1.2.3