blob: dac242670d57da88513b6d7dfb6ef68da8e09fda [file] [log] [blame]
xjb04a4022021-11-25 15:01:52 +08001/* 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
6void uhci_reset_hc(struct pci_dev *pdev, unsigned long base);
7int uhci_check_and_reset_hc(struct pci_dev *pdev, unsigned long base);
8#endif /* CONFIG_USB_PCI */
9
10#if defined(CONFIG_USB_PCI) && !defined(CONFIG_PCI_DISABLE_COMMON_QUIRKS)
11int usb_amd_find_chipset_info(void);
12int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev);
13bool usb_amd_hang_symptom_quirk(void);
14bool usb_amd_prefetch_quirk(void);
15void usb_amd_dev_put(void);
16void usb_amd_quirk_pll_disable(void);
17void usb_amd_quirk_pll_enable(void);
18void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev);
19void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev);
20void usb_disable_xhci_ports(struct pci_dev *xhci_pdev);
21void sb800_prefetch(struct device *dev, int on);
22bool usb_amd_pt_check_port(struct device *device, int port);
23#else
24struct pci_dev;
25static inline int usb_amd_find_chipset_info(void)
26{
27 return 0;
28}
29static inline bool usb_amd_hang_symptom_quirk(void)
30{
31 return false;
32}
33static inline bool usb_amd_prefetch_quirk(void)
34{
35 return false;
36}
37static inline void usb_amd_quirk_pll_disable(void) {}
38static inline void usb_amd_quirk_pll_enable(void) {}
39static inline void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev) {}
40static inline void usb_amd_dev_put(void) {}
41static inline void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) {}
42static inline void sb800_prefetch(struct device *dev, int on) {}
43static inline bool usb_amd_pt_check_port(struct device *device, int port)
44{
45 return false;
46}
47static inline void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev) {}
48static inline bool usb_xhci_needs_pci_reset(struct pci_dev *pdev)
49{
50 return false;
51}
52#endif /* CONFIG_USB_PCI */
53
54#endif /* __LINUX_USB_PCI_QUIRKS_H */