aboutsummaryrefslogtreecommitdiffstats
path: root/usb
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2009-07-31 09:54:53 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2009-07-31 09:54:53 -0700
commit2f6934c1a5b93267d2793111f6565a69a5bbb514 (patch)
treec0d2ea497d54e80b428e56bd3ccf76d631653cf7 /usb
parent6eef0a9c043e8c2cdef32d54a4b83d61981a9b50 (diff)
downloadpatches-2f6934c1a5b93267d2793111f6565a69a5bbb514.tar.gz
more patches
Diffstat (limited to 'usb')
-rw-r--r--usb/usb-add-nuvoton-ehci-driver-for-w90p910-platform.patch2
-rw-r--r--usb/usb-at91-add-usb-ehci-driver-for-at91sam9g45-series.patch2
-rw-r--r--usb/usb-ehci-split-ehci_qh-into-hw-and-sw-parts.patch38
-rw-r--r--usb/usb-ohci-pxa27x-allow-nocp-and-ocpm-to-be-cleared.patch39
-rw-r--r--usb/usb-ohci-pxa27x-reconfigure-power-settings-on-resume.patch49
5 files changed, 109 insertions, 21 deletions
diff --git a/usb/usb-add-nuvoton-ehci-driver-for-w90p910-platform.patch b/usb/usb-add-nuvoton-ehci-driver-for-w90p910-platform.patch
index d1dfe894fe65a4..1a36cc1d68b020 100644
--- a/usb/usb-add-nuvoton-ehci-driver-for-w90p910-platform.patch
+++ b/usb/usb-add-nuvoton-ehci-driver-for-w90p910-platform.patch
@@ -22,7 +22,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
-@@ -1116,6 +1116,11 @@ MODULE_LICENSE ("GPL");
+@@ -1117,6 +1117,11 @@ MODULE_LICENSE ("GPL");
#define PLATFORM_DRIVER ixp4xx_ehci_driver
#endif
diff --git a/usb/usb-at91-add-usb-ehci-driver-for-at91sam9g45-series.patch b/usb/usb-at91-add-usb-ehci-driver-for-at91sam9g45-series.patch
index f1dc844f75124e..9e4ba1ecd81fe5 100644
--- a/usb/usb-at91-add-usb-ehci-driver-for-at91sam9g45-series.patch
+++ b/usb/usb-at91-add-usb-ehci-driver-for-at91sam9g45-series.patch
@@ -258,7 +258,7 @@ Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+};
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
-@@ -1135,6 +1135,11 @@ MODULE_LICENSE ("GPL");
+@@ -1136,6 +1136,11 @@ MODULE_LICENSE ("GPL");
#define PLATFORM_DRIVER ehci_hcd_w90x900_driver
#endif
diff --git a/usb/usb-ehci-split-ehci_qh-into-hw-and-sw-parts.patch b/usb/usb-ehci-split-ehci_qh-into-hw-and-sw-parts.patch
index 7824533cd48938..f2744ee64655be 100644
--- a/usb/usb-ehci-split-ehci_qh-into-hw-and-sw-parts.patch
+++ b/usb/usb-ehci-split-ehci_qh-into-hw-and-sw-parts.patch
@@ -203,7 +203,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* clear interrupt enables, set irq latency */
if (log2_irq_thresh < 0 || log2_irq_thresh > 6)
-@@ -984,7 +986,7 @@ rescan:
+@@ -985,7 +987,7 @@ rescan:
/* endpoints can be iso streams. for now, we don't
* accelerate iso completions ... so spin a while.
*/
@@ -339,7 +339,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (unlikely (list_empty (&qh->qtd_list)))
return count;
-@@ -393,7 +396,8 @@ qh_completions (struct ehci_hcd *ehci, s
+@@ -392,7 +395,8 @@ qh_completions (struct ehci_hcd *ehci, s
qtd->hw_token = cpu_to_hc32(ehci,
token);
wmb();
@@ -349,7 +349,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto retry_xacterr;
}
stopped = 1;
-@@ -436,8 +440,8 @@ qh_completions (struct ehci_hcd *ehci, s
+@@ -435,8 +439,8 @@ qh_completions (struct ehci_hcd *ehci, s
/* qh unlinked; token in overlay may be most current */
if (state == QH_STATE_IDLE
&& cpu_to_hc32(ehci, qtd->qtd_dma)
@@ -360,7 +360,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* An unlink may leave an incomplete
* async transaction in the TT buffer.
-@@ -450,9 +454,9 @@ qh_completions (struct ehci_hcd *ehci, s
+@@ -449,9 +453,9 @@ qh_completions (struct ehci_hcd *ehci, s
* patch the qh later and so that completions can't
* activate it while we "know" it's stopped.
*/
@@ -372,7 +372,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
wmb ();
}
}
-@@ -511,7 +515,7 @@ halt:
+@@ -510,7 +514,7 @@ halt:
* it after fault cleanup, or recovering from silicon wrongly
* overlaying the dummy qtd (which reduces DMA chatter).
*/
@@ -381,7 +381,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
switch (state) {
case QH_STATE_IDLE:
qh_refresh(ehci, qh);
-@@ -529,7 +533,7 @@ halt:
+@@ -528,7 +532,7 @@ halt:
* except maybe high bandwidth ...
*/
if ((cpu_to_hc32(ehci, QH_SMASK)
@@ -390,7 +390,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
intr_deschedule (ehci, qh);
(void) qh_schedule (ehci, qh);
} else
-@@ -650,7 +654,7 @@ qh_urb_transaction (
+@@ -649,7 +653,7 @@ qh_urb_transaction (
* (this will usually be overridden later.)
*/
if (is_input)
@@ -399,7 +399,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* qh makes control packets use qtd toggle; maybe switch it */
if ((maxpacket & (this_qtd_len + (maxpacket - 1))) == 0)
-@@ -745,6 +749,7 @@ qh_make (
+@@ -744,6 +748,7 @@ qh_make (
int is_input, type;
int maxp = 0;
struct usb_tt *tt = urb->dev->tt;
@@ -407,7 +407,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (!qh)
return qh;
-@@ -891,8 +896,9 @@ done:
+@@ -890,8 +895,9 @@ done:
/* init as live, toggle clear, advance to dummy */
qh->qh_state = QH_STATE_IDLE;
@@ -419,7 +419,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe), !is_input, 1);
qh_refresh (ehci, qh);
return qh;
-@@ -934,11 +940,11 @@ static void qh_link_async (struct ehci_h
+@@ -933,11 +939,11 @@ static void qh_link_async (struct ehci_h
/* splice right after start */
qh->qh_next = head->qh_next;
@@ -431,8 +431,8 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
- head->hw_next = dma;
+ head->hw->hw_next = dma;
- qh->xacterrs = QH_XACTERR_MAX;
- qh->qh_state = QH_STATE_LINKED;
+ qh_get(qh);
+ qh->xacterrs = 0;
@@ -984,7 +990,7 @@ static struct ehci_qh *qh_append_tds (
/* usb_reset_device() briefly reverts to address 0 */
@@ -442,7 +442,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
/* just one way to queue requests: swap with the dummy qtd.
-@@ -1170,7 +1176,7 @@ static void start_unlink_async (struct e
+@@ -1169,7 +1175,7 @@ static void start_unlink_async (struct e
while (prev->qh_next.qh != qh)
prev = prev->qh_next.qh;
@@ -595,7 +595,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
wmb ();
prev->qh = qh;
*hw_p = QH_NEXT (ehci, qh->qh_dma);
-@@ -580,7 +600,7 @@ static int qh_unlink_periodic(struct ehc
+@@ -581,7 +601,7 @@ static int qh_unlink_periodic(struct ehc
dev_dbg (&qh->dev->dev,
"unlink qh%d-%04x/%p start %d [%d/%d us]\n",
qh->period,
@@ -604,7 +604,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
qh, qh->start, qh->usecs, qh->c_usecs);
/* qh->qh_next still "live" to HC */
-@@ -595,6 +615,7 @@ static int qh_unlink_periodic(struct ehc
+@@ -596,6 +616,7 @@ static int qh_unlink_periodic(struct ehc
static void intr_deschedule (struct ehci_hcd *ehci, struct ehci_qh *qh)
{
unsigned wait;
@@ -612,7 +612,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
qh_unlink_periodic (ehci, qh);
-@@ -605,14 +626,14 @@ static void intr_deschedule (struct ehci
+@@ -606,14 +627,14 @@ static void intr_deschedule (struct ehci
*/
if (list_empty (&qh->qtd_list)
|| (cpu_to_hc32(ehci, QH_CMASK)
@@ -629,7 +629,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
wmb ();
}
-@@ -738,14 +759,15 @@ static int qh_schedule(struct ehci_hcd *
+@@ -739,14 +760,15 @@ static int qh_schedule(struct ehci_hcd *
unsigned uframe;
__hc32 c_mask;
unsigned frame; /* 0..(qh->period - 1), or NO_FRAME */
@@ -647,7 +647,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
status = check_intr_schedule (ehci, frame, --uframe,
qh, &c_mask);
} else {
-@@ -783,11 +805,11 @@ static int qh_schedule(struct ehci_hcd *
+@@ -784,11 +806,11 @@ static int qh_schedule(struct ehci_hcd *
qh->start = frame;
/* reset S-frame and (maybe) C-frame masks */
@@ -662,7 +662,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
} else
ehci_dbg (ehci, "reused qh %p schedule\n", qh);
-@@ -2187,7 +2209,7 @@ restart:
+@@ -2188,7 +2210,7 @@ restart:
case Q_TYPE_QH:
/* handle any completions */
temp.qh = qh_get (q.qh);
diff --git a/usb/usb-ohci-pxa27x-allow-nocp-and-ocpm-to-be-cleared.patch b/usb/usb-ohci-pxa27x-allow-nocp-and-ocpm-to-be-cleared.patch
new file mode 100644
index 00000000000000..0c9e02fba588e2
--- /dev/null
+++ b/usb/usb-ohci-pxa27x-allow-nocp-and-ocpm-to-be-cleared.patch
@@ -0,0 +1,39 @@
+From aric@sdgsystems.com Fri Jul 31 09:07:19 2009
+From: Aric Blumer <aric@sdgsystems.com>
+Date: Thu, 30 Jul 2009 13:26:58 -0400
+Subject: USB: ohci-pxa27x: Allow NOCP and OCPM to be cleared
+To: linux-usb@vger.kernel.org
+Message-ID: <4A71D7E2.1020703@sdgsystems.com>
+
+From: Aric Blumer <aric@sdgsystems.com>
+
+Some ohci-pxa27x platforms may require OCPM and NOCP in UHCRHDA to be
+clear, but the existing code was only allowing setting. This patch
+ensures that these bits are clear if the respective flags are not set.
+This is particularly important for the PXA3xx family where the
+documentation says OCPM must be cleared, but it is set after reset.
+
+Signed-off-by: Aric Blumer <aric@sdgsystems.com>
+Cc: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ohci-pxa27x.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/usb/host/ohci-pxa27x.c
++++ b/drivers/usb/host/ohci-pxa27x.c
+@@ -177,9 +177,13 @@ static inline void pxa27x_setup_hc(struc
+
+ if (inf->flags & NO_OC_PROTECTION)
+ uhcrhda |= UHCRHDA_NOCP;
++ else
++ uhcrhda &= ~UHCRHDA_NOCP;
+
+ if (inf->flags & OC_MODE_PERPORT)
+ uhcrhda |= UHCRHDA_OCPM;
++ else
++ uhcrhda &= ~UHCRHDA_OCPM;
+
+ if (inf->power_on_delay) {
+ uhcrhda &= ~UHCRHDA_POTPGT(0xff);
diff --git a/usb/usb-ohci-pxa27x-reconfigure-power-settings-on-resume.patch b/usb/usb-ohci-pxa27x-reconfigure-power-settings-on-resume.patch
new file mode 100644
index 00000000000000..493863845c0478
--- /dev/null
+++ b/usb/usb-ohci-pxa27x-reconfigure-power-settings-on-resume.patch
@@ -0,0 +1,49 @@
+From aric@sdgsystems.com Fri Jul 31 09:08:46 2009
+From: "Aric D. Blumer" <aric@sdgsystems.com>
+Date: Thu, 30 Jul 2009 13:42:30 -0400
+Subject: USB: ohci-pxa27x: Reconfigure power settings on resume
+To: linux-usb@vger.kernel.org
+Message-ID: <4A71DB86.8050701@sdgsystems.com>
+
+
+From: Aric D. Blumer <aric@sdgsystems.com>
+
+On resume, the power-related bits in UHCRHDA were not being set, so
+they would default to the reset state. For PXA3xx devices, OCPM must
+be cleared, but it was remaining set from resume reset.
+
+Signed-off-by: Aric D. Blumer <aric@sdgsystems.com>
+Cc: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/usb/host/ohci-pxa27x.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+--- a/drivers/usb/host/ohci-pxa27x.c
++++ b/drivers/usb/host/ohci-pxa27x.c
+@@ -502,6 +502,9 @@ static int ohci_hcd_pxa27x_drv_resume(st
+ struct usb_hcd *hcd = platform_get_drvdata(pdev);
+ struct pxa27x_ohci *ohci = to_pxa27x_ohci(hcd);
+ int status;
++ struct pxaohci_platform_data *inf;
++
++ inf = pdev->dev.platform_data;
+
+ if (time_before(jiffies, ohci->ohci.next_statechange))
+ msleep(5);
+@@ -510,6 +513,13 @@ static int ohci_hcd_pxa27x_drv_resume(st
+ if ((status = pxa27x_start_hc(ohci, &pdev->dev)) < 0)
+ return status;
+
++ if (inf) {
++ /* Select Power Management Mode */
++ pxa27x_ohci_select_pmm(ohci, inf->port_mode);
++ } else {
++ pr_err("No platform info on resume");
++ }
++
+ ohci_finish_controller_resume(hcd);
+ return 0;
+ }