aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/isp1760-hcd.c
diff options
context:
space:
mode:
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;