aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/uhci-hcd.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/uhci-hcd.h')
-rw-r--r--drivers/usb/host/uhci-hcd.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/host/uhci-hcd.h b/drivers/usb/host/uhci-hcd.h
index e576db57a926..e43282e4e806 100644
--- a/drivers/usb/host/uhci-hcd.h
+++ b/drivers/usb/host/uhci-hcd.h
@@ -71,8 +71,6 @@
71#define USBLEGSUP_RWC 0x8f00 /* the R/WC bits */ 71#define USBLEGSUP_RWC 0x8f00 /* the R/WC bits */
72#define USBLEGSUP_RO 0x5040 /* R/O and reserved bits */ 72#define USBLEGSUP_RO 0x5040 /* R/O and reserved bits */
73 73
74#define UHCI_NULL_DATA_SIZE 0x7FF /* for UHCI controller TD */
75
76#define UHCI_PTR_BITS cpu_to_le32(0x000F) 74#define UHCI_PTR_BITS cpu_to_le32(0x000F)
77#define UHCI_PTR_TERM cpu_to_le32(0x0001) 75#define UHCI_PTR_TERM cpu_to_le32(0x0001)
78#define UHCI_PTR_QH cpu_to_le32(0x0002) 76#define UHCI_PTR_QH cpu_to_le32(0x0002)
@@ -168,9 +166,11 @@ static __le32 inline qh_element(struct uhci_qh *qh) {
168#define TD_TOKEN_EXPLEN_MASK 0x7FF /* expected length, encoded as n - 1 */ 166#define TD_TOKEN_EXPLEN_MASK 0x7FF /* expected length, encoded as n - 1 */
169#define TD_TOKEN_PID_MASK 0xFF 167#define TD_TOKEN_PID_MASK 0xFF
170 168
171#define uhci_explen(len) ((len) << TD_TOKEN_EXPLEN_SHIFT) 169#define uhci_explen(len) ((((len) - 1) & TD_TOKEN_EXPLEN_MASK) << \
170 TD_TOKEN_EXPLEN_SHIFT)
172 171
173#define uhci_expected_length(token) ((((token) >> 21) + 1) & TD_TOKEN_EXPLEN_MASK) 172#define uhci_expected_length(token) ((((token) >> TD_TOKEN_EXPLEN_SHIFT) + \
173 1) & TD_TOKEN_EXPLEN_MASK)
174#define uhci_toggle(token) (((token) >> TD_TOKEN_TOGGLE_SHIFT) & 1) 174#define uhci_toggle(token) (((token) >> TD_TOKEN_TOGGLE_SHIFT) & 1)
175#define uhci_endpoint(token) (((token) >> 15) & 0xf) 175#define uhci_endpoint(token) (((token) >> 15) & 0xf)
176#define uhci_devaddr(token) (((token) >> TD_TOKEN_DEVADDR_SHIFT) & 0x7f) 176#define uhci_devaddr(token) (((token) >> TD_TOKEN_DEVADDR_SHIFT) & 0x7f)