summaryrefslogtreecommitdiff
path: root/firmware/drivers
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 /firmware/drivers
parentfddefdcee2836b75f314a92c73bdef224165ad92 (diff)
downloadrockbox-1023cedb79ed737464134e3f6acfaf1ffabadcda.tar.gz
rockbox-1023cedb79ed737464134e3f6acfaf1ffabadcda.zip
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
Diffstat (limited to 'firmware/drivers')
-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 fc9cc7ac25..79378cda48 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -121,7 +121,10 @@ static int ipod_4g_button_read(void)
121 int new_wheel_value; 121 int new_wheel_value;
122 int btn = BUTTON_NONE; 122 int btn = BUTTON_NONE;
123 123
124 udelay(250); 124 /* The ipodlinux source had a udelay(250) here, but testing has shown that
125 it is not needed - tested on Nano, Color/Photo and Video. */
126 /* udelay(250);*/
127
125 reg = 0x7000c104; 128 reg = 0x7000c104;
126 if ((inl(0x7000c104) & 0x4000000) != 0) { 129 if ((inl(0x7000c104) & 0x4000000) != 0) {
127 reg = reg + 0x3C; /* 0x7000c140 */ 130 reg = reg + 0x3C; /* 0x7000c140 */
@@ -204,7 +207,9 @@ static int ipod_4g_button_read(void)
204void ipod_4g_button_int(void) 207void ipod_4g_button_int(void)
205{ 208{
206 CPU_HI_INT_CLR = I2C_MASK; 209 CPU_HI_INT_CLR = I2C_MASK;
207 udelay(250); 210 /* The following delay was 250 in the ipodlinux source, but 10 seems to
211 work fine - tested on Nano, Color/Photo and Video. */
212 udelay(10);
208 outl(0x0, 0x7000c140); 213 outl(0x0, 0x7000c140);
209 int_btn = ipod_4g_button_read(); 214 int_btn = ipod_4g_button_read();
210 outl(inl(0x7000c104) | 0xC000000, 0x7000c104); 215 outl(inl(0x7000c104) | 0xC000000, 0x7000c104);