xref: /linux/drivers/usb/host/pci-quirks.h (revision 4b911a9690d72641879ea6d13cce1de31d346d79)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __LINUX_USB_PCI_QUIRKS_H
3 #define __LINUX_USB_PCI_QUIRKS_H
4 
5 #ifdef CONFIG_USB_PCI_AMD
6 int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev);
7 bool usb_amd_hang_symptom_quirk(void);
8 bool usb_amd_prefetch_quirk(void);
9 void usb_amd_dev_put(void);
10 bool usb_amd_quirk_pll_check(void);
11 void usb_amd_quirk_pll_disable(void);
12 void usb_amd_quirk_pll_enable(void);
13 void sb800_prefetch(struct device *dev, int on);
14 bool usb_amd_pt_check_port(struct device *device, int port);
15 #else
16 static inline bool usb_amd_hang_symptom_quirk(void)
17 {
18 	return false;
19 };
20 static inline bool usb_amd_prefetch_quirk(void)
21 {
22 	return false;
23 }
24 static inline void usb_amd_quirk_pll_disable(void) {}
25 static inline void usb_amd_quirk_pll_enable(void) {}
26 static inline void usb_amd_dev_put(void) {}
27 static inline bool usb_amd_quirk_pll_check(void)
28 {
29 	return false;
30 }
31 static inline void sb800_prefetch(struct device *dev, int on) {}
32 static inline bool usb_amd_pt_check_port(struct device *device, int port)
33 {
34 	return false;
35 }
36 #endif /* CONFIG_USB_PCI_AMD */
37 
38 #ifdef CONFIG_USB_PCI
39 void uhci_reset_hc(struct pci_dev *pdev, unsigned long base);
40 int uhci_check_and_reset_hc(struct pci_dev *pdev, unsigned long base);
41 void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev);
42 void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev);
43 void usb_disable_xhci_ports(struct pci_dev *xhci_pdev);
44 #else
45 struct pci_dev;
46 static inline void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev) {}
47 static inline void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) {}
48 #endif  /* CONFIG_USB_PCI */
49 
50 #endif  /*  __LINUX_USB_PCI_QUIRKS_H  */
51