aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci.h')
-rw-r--r--drivers/usb/host/ehci.h48
1 files changed, 43 insertions, 5 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index bd6ff489baf..e897262c6a6 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -75,6 +75,7 @@ struct ehci_hcd { /* one per controller */
75 struct ehci_qh *async; 75 struct ehci_qh *async;
76 struct ehci_qh *dummy; /* For AMD quirk use */ 76 struct ehci_qh *dummy; /* For AMD quirk use */
77 struct ehci_qh *reclaim; 77 struct ehci_qh *reclaim;
78 struct ehci_qh *qh_scan_next;
78 unsigned scanning : 1; 79 unsigned scanning : 1;
79 80
80 /* periodic schedule support */ 81 /* periodic schedule support */
@@ -87,6 +88,8 @@ struct ehci_hcd { /* one per controller */
87 union ehci_shadow *pshadow; /* mirror hw periodic table */ 88 union ehci_shadow *pshadow; /* mirror hw periodic table */
88 int next_uframe; /* scan periodic, start here */ 89 int next_uframe; /* scan periodic, start here */
89 unsigned periodic_sched; /* periodic activity count */ 90 unsigned periodic_sched; /* periodic activity count */
91 unsigned uframe_periodic_max; /* max periodic time per uframe */
92
90 93
91 /* list of itds & sitds completed while clock_frame was still active */ 94 /* list of itds & sitds completed while clock_frame was still active */
92 struct list_head cached_itd_list; 95 struct list_head cached_itd_list;
@@ -117,7 +120,6 @@ struct ehci_hcd { /* one per controller */
117 struct timer_list iaa_watchdog; 120 struct timer_list iaa_watchdog;
118 struct timer_list watchdog; 121 struct timer_list watchdog;
119 unsigned long actions; 122 unsigned long actions;
120 unsigned stamp;
121 unsigned periodic_stamp; 123 unsigned periodic_stamp;
122 unsigned random_frame; 124 unsigned random_frame;
123 unsigned long next_statechange; 125 unsigned long next_statechange;
@@ -137,6 +139,11 @@ struct ehci_hcd { /* one per controller */
137 unsigned fs_i_thresh:1; /* Intel iso scheduling */ 139 unsigned fs_i_thresh:1; /* Intel iso scheduling */
138 unsigned use_dummy_qh:1; /* AMD Frame List table quirk*/ 140 unsigned use_dummy_qh:1; /* AMD Frame List table quirk*/
139 unsigned has_synopsys_hc_bug:1; /* Synopsys HC */ 141 unsigned has_synopsys_hc_bug:1; /* Synopsys HC */
142 unsigned frame_index_bug:1; /* MosChip (AKA NetMos) */
143#ifdef CONFIG_USB_EHCI_TEGRA
144 unsigned controller_resets_phy:1;
145 unsigned controller_remote_wakeup:1;
146#endif
140 147
141 /* required for usb32 quirk */ 148 /* required for usb32 quirk */
142 #define OHCI_CTRL_HCFS (3 << 6) 149 #define OHCI_CTRL_HCFS (3 << 6)
@@ -163,10 +170,6 @@ struct ehci_hcd { /* one per controller */
163#ifdef DEBUG 170#ifdef DEBUG
164 struct dentry *debug_dir; 171 struct dentry *debug_dir;
165#endif 172#endif
166 /*
167 * OTG controllers and transceivers need software interaction
168 */
169 struct otg_transceiver *transceiver;
170}; 173};
171 174
172/* convert between an HCD pointer and the corresponding EHCI_HCD */ 175/* convert between an HCD pointer and the corresponding EHCI_HCD */
@@ -343,6 +346,7 @@ struct ehci_qh {
343 struct ehci_qh *reclaim; /* next to reclaim */ 346 struct ehci_qh *reclaim; /* next to reclaim */
344 347
345 struct ehci_hcd *ehci; 348 struct ehci_hcd *ehci;
349 unsigned long unlink_time;
346 350
347 /* 351 /*
348 * Do NOT use atomic operations for QH refcounting. On some CPUs 352 * Do NOT use atomic operations for QH refcounting. On some CPUs
@@ -374,6 +378,7 @@ struct ehci_qh {
374#define NO_FRAME ((unsigned short)~0) /* pick new start */ 378#define NO_FRAME ((unsigned short)~0) /* pick new start */
375 379
376 struct usb_device *dev; /* access to TT */ 380 struct usb_device *dev; /* access to TT */
381 unsigned is_out:1; /* bulk or intr OUT */
377 unsigned clearing_tt:1; /* Clear-TT-Buf in progress */ 382 unsigned clearing_tt:1; /* Clear-TT-Buf in progress */
378}; 383};
379 384
@@ -736,6 +741,39 @@ static inline u32 hc32_to_cpup (const struct ehci_hcd *ehci, const __hc32 *x)
736 741
737/*-------------------------------------------------------------------------*/ 742/*-------------------------------------------------------------------------*/
738 743
744#ifdef CONFIG_PCI
745
746/* For working around the MosChip frame-index-register bug */
747static unsigned ehci_read_frame_index(struct ehci_hcd *ehci);
748
749#else
750
751static inline unsigned ehci_read_frame_index(struct ehci_hcd *ehci)
752{
753 return ehci_readl(ehci, &ehci->regs->frame_index);
754}
755
756#endif
757
758/*
759 * Writing to dma coherent memory on ARM may be delayed via L2
760 * writing buffer, so introduce the helper which can flush L2 writing
761 * buffer into memory immediately, especially used to flush ehci
762 * descriptor to memory.
763 * */
764#ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE
765static inline void ehci_sync_mem()
766{
767 mb();
768}
769#else
770static inline void ehci_sync_mem()
771{
772}
773#endif
774
775/*-------------------------------------------------------------------------*/
776
739#ifndef DEBUG 777#ifndef DEBUG
740#define STUB_DEBUG_FILES 778#define STUB_DEBUG_FILES
741#endif /* DEBUG */ 779#endif /* DEBUG */