diff options
Diffstat (limited to 'drivers/usb/host/ehci.h')
-rw-r--r-- | drivers/usb/host/ehci.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index 2bfff30f4704..064e76821ff5 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h | |||
@@ -37,7 +37,7 @@ typedef __u16 __bitwise __hc16; | |||
37 | #define __hc16 __le16 | 37 | #define __hc16 __le16 |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | /* statistics can be kept for for tuning/monitoring */ | 40 | /* statistics can be kept for tuning/monitoring */ |
41 | struct ehci_stats { | 41 | struct ehci_stats { |
42 | /* irq usage */ | 42 | /* irq usage */ |
43 | unsigned long normal; | 43 | unsigned long normal; |
@@ -126,6 +126,7 @@ struct ehci_hcd { /* one per controller */ | |||
126 | unsigned big_endian_mmio:1; | 126 | unsigned big_endian_mmio:1; |
127 | unsigned big_endian_desc:1; | 127 | unsigned big_endian_desc:1; |
128 | unsigned has_amcc_usb23:1; | 128 | unsigned has_amcc_usb23:1; |
129 | unsigned need_io_watchdog:1; | ||
129 | 130 | ||
130 | /* required for usb32 quirk */ | 131 | /* required for usb32 quirk */ |
131 | #define OHCI_CTRL_HCFS (3 << 6) | 132 | #define OHCI_CTRL_HCFS (3 << 6) |
@@ -135,6 +136,7 @@ struct ehci_hcd { /* one per controller */ | |||
135 | #define OHCI_HCCTRL_OFFSET 0x4 | 136 | #define OHCI_HCCTRL_OFFSET 0x4 |
136 | #define OHCI_HCCTRL_LEN 0x4 | 137 | #define OHCI_HCCTRL_LEN 0x4 |
137 | __hc32 *ohci_hcctrl_reg; | 138 | __hc32 *ohci_hcctrl_reg; |
139 | unsigned has_hostpc:1; | ||
138 | 140 | ||
139 | u8 sbrn; /* packed release number */ | 141 | u8 sbrn; /* packed release number */ |
140 | 142 | ||
@@ -298,8 +300,8 @@ union ehci_shadow { | |||
298 | * These appear in both the async and (for interrupt) periodic schedules. | 300 | * These appear in both the async and (for interrupt) periodic schedules. |
299 | */ | 301 | */ |
300 | 302 | ||
301 | struct ehci_qh { | 303 | /* first part defined by EHCI spec */ |
302 | /* first part defined by EHCI spec */ | 304 | struct ehci_qh_hw { |
303 | __hc32 hw_next; /* see EHCI 3.6.1 */ | 305 | __hc32 hw_next; /* see EHCI 3.6.1 */ |
304 | __hc32 hw_info1; /* see EHCI 3.6.2 */ | 306 | __hc32 hw_info1; /* see EHCI 3.6.2 */ |
305 | #define QH_HEAD 0x00008000 | 307 | #define QH_HEAD 0x00008000 |
@@ -317,7 +319,10 @@ struct ehci_qh { | |||
317 | __hc32 hw_token; | 319 | __hc32 hw_token; |
318 | __hc32 hw_buf [5]; | 320 | __hc32 hw_buf [5]; |
319 | __hc32 hw_buf_hi [5]; | 321 | __hc32 hw_buf_hi [5]; |
322 | } __attribute__ ((aligned(32))); | ||
320 | 323 | ||
324 | struct ehci_qh { | ||
325 | struct ehci_qh_hw *hw; | ||
321 | /* the rest is HCD-private */ | 326 | /* the rest is HCD-private */ |
322 | dma_addr_t qh_dma; /* address of qh */ | 327 | dma_addr_t qh_dma; /* address of qh */ |
323 | union ehci_shadow qh_next; /* ptr to qh; or periodic */ | 328 | union ehci_shadow qh_next; /* ptr to qh; or periodic */ |
@@ -336,6 +341,7 @@ struct ehci_qh { | |||
336 | u32 refcount; | 341 | u32 refcount; |
337 | unsigned stamp; | 342 | unsigned stamp; |
338 | 343 | ||
344 | u8 needs_rescan; /* Dequeue during giveback */ | ||
339 | u8 qh_state; | 345 | u8 qh_state; |
340 | #define QH_STATE_LINKED 1 /* HC sees this */ | 346 | #define QH_STATE_LINKED 1 /* HC sees this */ |
341 | #define QH_STATE_UNLINK 2 /* HC may still see this */ | 347 | #define QH_STATE_UNLINK 2 /* HC may still see this */ |
@@ -357,7 +363,7 @@ struct ehci_qh { | |||
357 | 363 | ||
358 | struct usb_device *dev; /* access to TT */ | 364 | struct usb_device *dev; /* access to TT */ |
359 | unsigned clearing_tt:1; /* Clear-TT-Buf in progress */ | 365 | unsigned clearing_tt:1; /* Clear-TT-Buf in progress */ |
360 | } __attribute__ ((aligned (32))); | 366 | }; |
361 | 367 | ||
362 | /*-------------------------------------------------------------------------*/ | 368 | /*-------------------------------------------------------------------------*/ |
363 | 369 | ||
@@ -544,7 +550,7 @@ static inline unsigned int | |||
544 | ehci_port_speed(struct ehci_hcd *ehci, unsigned int portsc) | 550 | ehci_port_speed(struct ehci_hcd *ehci, unsigned int portsc) |
545 | { | 551 | { |
546 | if (ehci_is_TDI(ehci)) { | 552 | if (ehci_is_TDI(ehci)) { |
547 | switch ((portsc>>26)&3) { | 553 | switch ((portsc >> (ehci->has_hostpc ? 25 : 26)) & 3) { |
548 | case 0: | 554 | case 0: |
549 | return 0; | 555 | return 0; |
550 | case 1: | 556 | case 1: |