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.h45
1 files changed, 29 insertions, 16 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index da07d98f7d1d..9dadc7118d68 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -143,7 +143,7 @@ struct ehci_hcd { /* one per controller */
143 struct ehci_qh *intr_unlink_last; 143 struct ehci_qh *intr_unlink_last;
144 unsigned intr_unlink_cycle; 144 unsigned intr_unlink_cycle;
145 unsigned now_frame; /* frame from HC hardware */ 145 unsigned now_frame; /* frame from HC hardware */
146 unsigned next_frame; /* scan periodic, start here */ 146 unsigned last_iso_frame; /* last frame scanned for iso */
147 unsigned intr_count; /* intr activity count */ 147 unsigned intr_count; /* intr activity count */
148 unsigned isoc_count; /* isoc activity count */ 148 unsigned isoc_count; /* isoc activity count */
149 unsigned periodic_count; /* periodic activity count */ 149 unsigned periodic_count; /* periodic activity count */
@@ -193,7 +193,6 @@ struct ehci_hcd { /* one per controller */
193 unsigned has_amcc_usb23:1; 193 unsigned has_amcc_usb23:1;
194 unsigned need_io_watchdog:1; 194 unsigned need_io_watchdog:1;
195 unsigned amd_pll_fix:1; 195 unsigned amd_pll_fix:1;
196 unsigned fs_i_thresh:1; /* Intel iso scheduling */
197 unsigned use_dummy_qh:1; /* AMD Frame List table quirk*/ 196 unsigned use_dummy_qh:1; /* AMD Frame List table quirk*/
198 unsigned has_synopsys_hc_bug:1; /* Synopsys HC */ 197 unsigned has_synopsys_hc_bug:1; /* Synopsys HC */
199 unsigned frame_index_bug:1; /* MosChip (AKA NetMos) */ 198 unsigned frame_index_bug:1; /* MosChip (AKA NetMos) */
@@ -207,7 +206,6 @@ struct ehci_hcd { /* one per controller */
207 #define OHCI_HCCTRL_LEN 0x4 206 #define OHCI_HCCTRL_LEN 0x4
208 __hc32 *ohci_hcctrl_reg; 207 __hc32 *ohci_hcctrl_reg;
209 unsigned has_hostpc:1; 208 unsigned has_hostpc:1;
210 unsigned has_lpm:1; /* support link power management */
211 unsigned has_ppcd:1; /* support per-port change bits */ 209 unsigned has_ppcd:1; /* support per-port change bits */
212 u8 sbrn; /* packed release number */ 210 u8 sbrn; /* packed release number */
213 211
@@ -762,26 +760,41 @@ static inline u32 hc32_to_cpup (const struct ehci_hcd *ehci, const __hc32 *x)
762 760
763/*-------------------------------------------------------------------------*/ 761/*-------------------------------------------------------------------------*/
764 762
765#ifdef CONFIG_PCI 763#define ehci_dbg(ehci, fmt, args...) \
766 764 dev_dbg(ehci_to_hcd(ehci)->self.controller , fmt , ## args)
767/* For working around the MosChip frame-index-register bug */ 765#define ehci_err(ehci, fmt, args...) \
768static unsigned ehci_read_frame_index(struct ehci_hcd *ehci); 766 dev_err(ehci_to_hcd(ehci)->self.controller , fmt , ## args)
769 767#define ehci_info(ehci, fmt, args...) \
768 dev_info(ehci_to_hcd(ehci)->self.controller , fmt , ## args)
769#define ehci_warn(ehci, fmt, args...) \
770 dev_warn(ehci_to_hcd(ehci)->self.controller , fmt , ## args)
771
772#ifdef VERBOSE_DEBUG
773# define ehci_vdbg ehci_dbg
770#else 774#else
771 775 static inline void ehci_vdbg(struct ehci_hcd *ehci, ...) {}
772static inline unsigned ehci_read_frame_index(struct ehci_hcd *ehci)
773{
774 return ehci_readl(ehci, &ehci->regs->frame_index);
775}
776
777#endif 776#endif
778 777
779/*-------------------------------------------------------------------------*/
780
781#ifndef DEBUG 778#ifndef DEBUG
782#define STUB_DEBUG_FILES 779#define STUB_DEBUG_FILES
783#endif /* DEBUG */ 780#endif /* DEBUG */
784 781
785/*-------------------------------------------------------------------------*/ 782/*-------------------------------------------------------------------------*/
786 783
784/* Declarations of things exported for use by ehci platform drivers */
785
786struct ehci_driver_overrides {
787 size_t extra_priv_size;
788 int (*reset)(struct usb_hcd *hcd);
789};
790
791extern void ehci_init_driver(struct hc_driver *drv,
792 const struct ehci_driver_overrides *over);
793extern int ehci_setup(struct usb_hcd *hcd);
794
795#ifdef CONFIG_PM
796extern int ehci_suspend(struct usb_hcd *hcd, bool do_wakeup);
797extern int ehci_resume(struct usb_hcd *hcd, bool hibernated);
798#endif /* CONFIG_PM */
799
787#endif /* __LINUX_EHCI_HCD_H */ 800#endif /* __LINUX_EHCI_HCD_H */