summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/isp1760-hcd.h
diff options
context:
space:
mode:
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>2008-07-17 20:09:30 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2008-08-14 02:32:53 +0200
commit3f02a957d5eb0eeb01207a799086f2b347077f71 (patch)
tree1e163aaabe6b260a168ab3c4744066d471f75fb4 /drivers/usb/host/isp1760-hcd.h
parentusb: return error code instead of 0 in the enqueue function. (diff)
downloadlinux-3f02a957d5eb0eeb01207a799086f2b347077f71.tar.xz
linux-3f02a957d5eb0eeb01207a799086f2b347077f71.zip
usb: ISP1760: improve pre-fetch timing
ISP1760 requires a delay of 90ns between programming the address and reading the data. Current driver solves this by a mdelay(1) which is very heavy weighted and slow. This patch applies the workaround from the ISP1760 FAQ by using two different banks for PTD and payload data and using a common wait for them. This wait is done by an additional ISP1760 access (whose timing constraints guarantee the 90ns delay). This improves speed when reading from an USB stick from: $ time dd if=/dev/sda of=/dev/zero bs=65536 count=1638 real 1m 15.43s user 0m 0.44s sys 0m 39.46s to $ time dd if=/dev/sda of=/dev/zero bs=65536 count=1638 real 0m 18.53s user 0m 0.16s sys 0m 12.97s [bigeasy@linutronix.de: fixed comment formating, moved define into header file, obey 80 char rule] Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to '')
-rw-r--r--drivers/usb/host/isp1760-hcd.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/host/isp1760-hcd.h b/drivers/usb/host/isp1760-hcd.h
index 6473dd86993c..3c61cd51cbb8 100644
--- a/drivers/usb/host/isp1760-hcd.h
+++ b/drivers/usb/host/isp1760-hcd.h
@@ -54,6 +54,8 @@ void deinit_kmem_cache(void);
#define BUFFER_MAP 0x7
#define HC_MEMORY_REG 0x33c
+#define ISP_BANK(x) ((x) << 16)
+
#define HC_PORT1_CTRL 0x374
#define PORT1_POWER (3 << 3)
#define PORT1_INIT1 (1 << 7)