aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/isp1760-hcd.c
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-03-23 12:38:16 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2009-03-24 16:20:46 -0700
commite6bdfe36e52f0e552b50acf49a82851eeb122fde (patch)
tree42dcc7d86734cb10a9f8010ceb9ec4f54698229d /drivers/usb/host/isp1760-hcd.c
parentb7af0bb26899bb47ae16fb41d2296111b0784a56 (diff)
downloadkernel_samsung_smdk4412-e6bdfe36e52f0e552b50acf49a82851eeb122fde.zip
kernel_samsung_smdk4412-e6bdfe36e52f0e552b50acf49a82851eeb122fde.tar.gz
kernel_samsung_smdk4412-e6bdfe36e52f0e552b50acf49a82851eeb122fde.tar.bz2
USB: isp1760: Add a delay before reading the SKIPMAP registers in isp1760-hcd.c
The data read from the SKIPMAP registers is not immediately available after writing and the driver panics when a packet is enqueued from the interrupt handler. This patch adds an ndelay(195) before these registers are read (delay value mentioned in section 15.1.1.3 of the ISP1760 data sheet). Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/isp1760-hcd.c')
-rw-r--r--drivers/usb/host/isp1760-hcd.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
index 3172c0f..cd07ea3 100644
--- a/drivers/usb/host/isp1760-hcd.c
+++ b/drivers/usb/host/isp1760-hcd.c
@@ -819,6 +819,13 @@ static void enqueue_an_ATL_packet(struct usb_hcd *hcd, struct isp1760_qh *qh,
u32 atl_regs, payload;
u32 buffstatus;
+ /*
+ * When this function is called from the interrupt handler to enqueue
+ * a follow-up packet, the SKIP register gets written and read back
+ * almost immediately. With ISP1761, this register requires a delay of
+ * 195ns between a write and subsequent read (see section 15.1.1.3).
+ */
+ ndelay(195);
skip_map = isp1760_readl(hcd->regs + HC_ATL_PTD_SKIPMAP_REG);
BUG_ON(!skip_map);
@@ -853,6 +860,13 @@ static void enqueue_an_INT_packet(struct usb_hcd *hcd, struct isp1760_qh *qh,
u32 int_regs, payload;
u32 buffstatus;
+ /*
+ * When this function is called from the interrupt handler to enqueue
+ * a follow-up packet, the SKIP register gets written and read back
+ * almost immediately. With ISP1761, this register requires a delay of
+ * 195ns between a write and subsequent read (see section 15.1.1.3).
+ */
+ ndelay(195);
skip_map = isp1760_readl(hcd->regs + HC_INT_PTD_SKIPMAP_REG);
BUG_ON(!skip_map);