aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/isp1760-hcd.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 14:17:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 14:17:39 -0400
commit61a091827e273650b39eb87c799a6d260913fa0b (patch)
tree19f0a4840fc90da6ca3787ee7efacb5bb0c6c7a2 /drivers/usb/host/isp1760-hcd.c
parent0c93ea4064a209cdc36de8a9a3003d43d08f46f7 (diff)
parentfd8345f8dea93691b0ceba55146088d8c05415f6 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (97 commits) USB: qcserial: add device id for HP devices USB: isp1760: Add a delay before reading the SKIPMAP registers in isp1760-hcd.c USB: allow malformed LANGID descriptors USB: pxa27x_udc: typo fixes and code cleanups USB: gadget: gadget zero uses new suspend/resume hooks USB: gadget: composite device-level suspend/resume hooks USB: r8a66597-hcd: suspend/resume support USB: more u32 conversion after transfer_buffer_length and actual_length USB: Fix cp2101 USB serial device driver termios functions for console use USB: CP2101 New Device ID USB: ipaq: handle 4 endpoint devices USB: S3C: Move usb-control.h to platform include USB: ohci-hcd: Add ARCH_S3C24XX to the ohci-s3c2410.c glue USB: pedantic: spelling correction in comment for ch9.h USB: host: fix sparse warning: Using plain integer as NULL pointer USB: ohci-s3c2410: fix name of bus clock USB: ohci-s3c2410: remove <mach/hardware.h> include USB: serial: rename cp2101 driver to cp210x USB: CP2101 Reduce Error Logging USB: CP2101 Support AN205 baud rates ...
Diffstat (limited to 'drivers/usb/host/isp1760-hcd.c')
-rw-r--r--drivers/usb/host/isp1760-hcd.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
index b899f1a59c26..cd07ea3f0c63 100644
--- a/drivers/usb/host/isp1760-hcd.c
+++ b/drivers/usb/host/isp1760-hcd.c
@@ -644,7 +644,7 @@ static void transform_add_int(struct isp1760_hcd *priv, struct isp1760_qh *qh,
644 644
645 if (urb->dev->speed != USB_SPEED_HIGH) { 645 if (urb->dev->speed != USB_SPEED_HIGH) {
646 /* split */ 646 /* split */
647 ptd->dw5 = __constant_cpu_to_le32(0x1c); 647 ptd->dw5 = cpu_to_le32(0x1c);
648 648
649 if (qh->period >= 32) 649 if (qh->period >= 32)
650 period = qh->period / 2; 650 period = qh->period / 2;
@@ -819,6 +819,13 @@ static void enqueue_an_ATL_packet(struct usb_hcd *hcd, struct isp1760_qh *qh,
819 u32 atl_regs, payload; 819 u32 atl_regs, payload;
820 u32 buffstatus; 820 u32 buffstatus;
821 821
822 /*
823 * When this function is called from the interrupt handler to enqueue
824 * a follow-up packet, the SKIP register gets written and read back
825 * almost immediately. With ISP1761, this register requires a delay of
826 * 195ns between a write and subsequent read (see section 15.1.1.3).
827 */
828 ndelay(195);
822 skip_map = isp1760_readl(hcd->regs + HC_ATL_PTD_SKIPMAP_REG); 829 skip_map = isp1760_readl(hcd->regs + HC_ATL_PTD_SKIPMAP_REG);
823 830
824 BUG_ON(!skip_map); 831 BUG_ON(!skip_map);
@@ -853,6 +860,13 @@ static void enqueue_an_INT_packet(struct usb_hcd *hcd, struct isp1760_qh *qh,
853 u32 int_regs, payload; 860 u32 int_regs, payload;
854 u32 buffstatus; 861 u32 buffstatus;
855 862
863 /*
864 * When this function is called from the interrupt handler to enqueue
865 * a follow-up packet, the SKIP register gets written and read back
866 * almost immediately. With ISP1761, this register requires a delay of
867 * 195ns between a write and subsequent read (see section 15.1.1.3).
868 */
869 ndelay(195);
856 skip_map = isp1760_readl(hcd->regs + HC_INT_PTD_SKIPMAP_REG); 870 skip_map = isp1760_readl(hcd->regs + HC_INT_PTD_SKIPMAP_REG);
857 871
858 BUG_ON(!skip_map); 872 BUG_ON(!skip_map);
@@ -1054,7 +1068,7 @@ static void do_atl_int(struct usb_hcd *usb_hcd)
1054 priv_write_copy(priv, (u32 *)&ptd, usb_hcd->regs + 1068 priv_write_copy(priv, (u32 *)&ptd, usb_hcd->regs +
1055 atl_regs, sizeof(ptd)); 1069 atl_regs, sizeof(ptd));
1056 1070
1057 ptd.dw0 |= __constant_cpu_to_le32(PTD_VALID); 1071 ptd.dw0 |= cpu_to_le32(PTD_VALID);
1058 priv_write_copy(priv, (u32 *)&ptd, usb_hcd->regs + 1072 priv_write_copy(priv, (u32 *)&ptd, usb_hcd->regs +
1059 atl_regs, sizeof(ptd)); 1073 atl_regs, sizeof(ptd));
1060 1074
@@ -2235,9 +2249,10 @@ void deinit_kmem_cache(void)
2235 kmem_cache_destroy(qh_cachep); 2249 kmem_cache_destroy(qh_cachep);
2236} 2250}
2237 2251
2238struct usb_hcd *isp1760_register(u64 res_start, u64 res_len, int irq, 2252struct usb_hcd *isp1760_register(phys_addr_t res_start, resource_size_t res_len,
2239 u64 irqflags, struct device *dev, const char *busname, 2253 int irq, unsigned long irqflags,
2240 unsigned int devflags) 2254 struct device *dev, const char *busname,
2255 unsigned int devflags)
2241{ 2256{
2242 struct usb_hcd *hcd; 2257 struct usb_hcd *hcd;
2243 struct isp1760_hcd *priv; 2258 struct isp1760_hcd *priv;