aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/oxu210hp-hcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/oxu210hp-hcd.c')
-rw-r--r--drivers/usb/host/oxu210hp-hcd.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c
index 75548f7c716b..5ac489ee3dab 100644
--- a/drivers/usb/host/oxu210hp-hcd.c
+++ b/drivers/usb/host/oxu210hp-hcd.c
@@ -845,14 +845,14 @@ static inline void qh_update(struct oxu_hcd *oxu,
845 is_out = !(qtd->hw_token & cpu_to_le32(1 << 8)); 845 is_out = !(qtd->hw_token & cpu_to_le32(1 << 8));
846 epnum = (le32_to_cpup(&qh->hw_info1) >> 8) & 0x0f; 846 epnum = (le32_to_cpup(&qh->hw_info1) >> 8) & 0x0f;
847 if (unlikely(!usb_gettoggle(qh->dev, epnum, is_out))) { 847 if (unlikely(!usb_gettoggle(qh->dev, epnum, is_out))) {
848 qh->hw_token &= ~__constant_cpu_to_le32(QTD_TOGGLE); 848 qh->hw_token &= ~cpu_to_le32(QTD_TOGGLE);
849 usb_settoggle(qh->dev, epnum, is_out, 1); 849 usb_settoggle(qh->dev, epnum, is_out, 1);
850 } 850 }
851 } 851 }
852 852
853 /* HC must see latest qtd and qh data before we clear ACTIVE+HALT */ 853 /* HC must see latest qtd and qh data before we clear ACTIVE+HALT */
854 wmb(); 854 wmb();
855 qh->hw_token &= __constant_cpu_to_le32(QTD_TOGGLE | QTD_STS_PING); 855 qh->hw_token &= cpu_to_le32(QTD_TOGGLE | QTD_STS_PING);
856} 856}
857 857
858/* If it weren't for a common silicon quirk (writing the dummy into the qh 858/* If it weren't for a common silicon quirk (writing the dummy into the qh
@@ -937,7 +937,7 @@ __acquires(oxu->lock)
937 struct ehci_qh *qh = (struct ehci_qh *) urb->hcpriv; 937 struct ehci_qh *qh = (struct ehci_qh *) urb->hcpriv;
938 938
939 /* S-mask in a QH means it's an interrupt urb */ 939 /* S-mask in a QH means it's an interrupt urb */
940 if ((qh->hw_info2 & __constant_cpu_to_le32(QH_SMASK)) != 0) { 940 if ((qh->hw_info2 & cpu_to_le32(QH_SMASK)) != 0) {
941 941
942 /* ... update hc-wide periodic stats (for usbfs) */ 942 /* ... update hc-wide periodic stats (for usbfs) */
943 oxu_to_hcd(oxu)->self.bandwidth_int_reqs--; 943 oxu_to_hcd(oxu)->self.bandwidth_int_reqs--;
@@ -981,7 +981,7 @@ static void unlink_async(struct oxu_hcd *oxu, struct ehci_qh *qh);
981static void intr_deschedule(struct oxu_hcd *oxu, struct ehci_qh *qh); 981static void intr_deschedule(struct oxu_hcd *oxu, struct ehci_qh *qh);
982static int qh_schedule(struct oxu_hcd *oxu, struct ehci_qh *qh); 982static int qh_schedule(struct oxu_hcd *oxu, struct ehci_qh *qh);
983 983
984#define HALT_BIT __constant_cpu_to_le32(QTD_STS_HALT) 984#define HALT_BIT cpu_to_le32(QTD_STS_HALT)
985 985
986/* Process and free completed qtds for a qh, returning URBs to drivers. 986/* Process and free completed qtds for a qh, returning URBs to drivers.
987 * Chases up to qh->hw_current. Returns number of completions called, 987 * Chases up to qh->hw_current. Returns number of completions called,
@@ -1160,7 +1160,7 @@ halt:
1160 /* should be rare for periodic transfers, 1160 /* should be rare for periodic transfers,
1161 * except maybe high bandwidth ... 1161 * except maybe high bandwidth ...
1162 */ 1162 */
1163 if ((__constant_cpu_to_le32(QH_SMASK) 1163 if ((cpu_to_le32(QH_SMASK)
1164 & qh->hw_info2) != 0) { 1164 & qh->hw_info2) != 0) {
1165 intr_deschedule(oxu, qh); 1165 intr_deschedule(oxu, qh);
1166 (void) qh_schedule(oxu, qh); 1166 (void) qh_schedule(oxu, qh);
@@ -1350,7 +1350,7 @@ static struct list_head *qh_urb_transaction(struct oxu_hcd *oxu,
1350 } 1350 }
1351 1351
1352 /* by default, enable interrupt on urb completion */ 1352 /* by default, enable interrupt on urb completion */
1353 qtd->hw_token |= __constant_cpu_to_le32(QTD_IOC); 1353 qtd->hw_token |= cpu_to_le32(QTD_IOC);
1354 return head; 1354 return head;
1355 1355
1356cleanup: 1356cleanup:
@@ -1539,7 +1539,7 @@ static void qh_link_async(struct oxu_hcd *oxu, struct ehci_qh *qh)
1539 /* qtd completions reported later by interrupt */ 1539 /* qtd completions reported later by interrupt */
1540} 1540}
1541 1541
1542#define QH_ADDR_MASK __constant_cpu_to_le32(0x7f) 1542#define QH_ADDR_MASK cpu_to_le32(0x7f)
1543 1543
1544/* 1544/*
1545 * For control/bulk/interrupt, return QH with these TDs appended. 1545 * For control/bulk/interrupt, return QH with these TDs appended.
@@ -2012,7 +2012,7 @@ static void qh_unlink_periodic(struct oxu_hcd *oxu, struct ehci_qh *qh)
2012 * and this qh is active in the current uframe 2012 * and this qh is active in the current uframe
2013 * (and overlay token SplitXstate is false?) 2013 * (and overlay token SplitXstate is false?)
2014 * THEN 2014 * THEN
2015 * qh->hw_info1 |= __constant_cpu_to_le32(1 << 7 "ignore"); 2015 * qh->hw_info1 |= cpu_to_le32(1 << 7 "ignore");
2016 */ 2016 */
2017 2017
2018 /* high bandwidth, or otherwise part of every microframe */ 2018 /* high bandwidth, or otherwise part of every microframe */
@@ -2057,7 +2057,7 @@ static void intr_deschedule(struct oxu_hcd *oxu, struct ehci_qh *qh)
2057 * active high speed queues may need bigger delays... 2057 * active high speed queues may need bigger delays...
2058 */ 2058 */
2059 if (list_empty(&qh->qtd_list) 2059 if (list_empty(&qh->qtd_list)
2060 || (__constant_cpu_to_le32(QH_CMASK) & qh->hw_info2) != 0) 2060 || (cpu_to_le32(QH_CMASK) & qh->hw_info2) != 0)
2061 wait = 2; 2061 wait = 2;
2062 else 2062 else
2063 wait = 55; /* worst case: 3 * 1024 */ 2063 wait = 55; /* worst case: 3 * 1024 */
@@ -2183,10 +2183,10 @@ static int qh_schedule(struct oxu_hcd *oxu, struct ehci_qh *qh)
2183 qh->start = frame; 2183 qh->start = frame;
2184 2184
2185 /* reset S-frame and (maybe) C-frame masks */ 2185 /* reset S-frame and (maybe) C-frame masks */
2186 qh->hw_info2 &= __constant_cpu_to_le32(~(QH_CMASK | QH_SMASK)); 2186 qh->hw_info2 &= cpu_to_le32(~(QH_CMASK | QH_SMASK));
2187 qh->hw_info2 |= qh->period 2187 qh->hw_info2 |= qh->period
2188 ? cpu_to_le32(1 << uframe) 2188 ? cpu_to_le32(1 << uframe)
2189 : __constant_cpu_to_le32(QH_SMASK); 2189 : cpu_to_le32(QH_SMASK);
2190 qh->hw_info2 |= c_mask; 2190 qh->hw_info2 |= c_mask;
2191 } else 2191 } else
2192 oxu_dbg(oxu, "reused qh %p schedule\n", qh); 2192 oxu_dbg(oxu, "reused qh %p schedule\n", qh);
@@ -2684,7 +2684,7 @@ static int oxu_reset(struct usb_hcd *hcd)
2684 oxu->urb_len = 0; 2684 oxu->urb_len = 0;
2685 2685
2686 /* FIMXE */ 2686 /* FIMXE */
2687 hcd->self.controller->dma_mask = 0UL; 2687 hcd->self.controller->dma_mask = NULL;
2688 2688
2689 if (oxu->is_otg) { 2689 if (oxu->is_otg) {
2690 oxu->caps = hcd->regs + OXU_OTG_CAP_OFFSET; 2690 oxu->caps = hcd->regs + OXU_OTG_CAP_OFFSET;