diff options
author | Emmanuel Vadot <manu@FreeBSD.org> | 2022-07-26 08:07:39 +0000 |
---|---|---|
committer | Emmanuel Vadot <manu@FreeBSD.org> | 2022-08-08 13:22:34 +0000 |
commit | 6890e327a86da0c268f2b21637bce4891626ada0 (patch) | |
tree | 1ef754b18cfe395926d61680de5fd97590fe61ab | |
parent | 885ab0dba28b799c5c70923c2cb0ee162b5b75b1 (diff) | |
download | src-6890e327a86da0c268f2b21637bce4891626ada0.tar.gz src-6890e327a86da0c268f2b21637bce4891626ada0.zip |
linuxkpi: pci: Add more functions needed by drm
Mostly stubs to satisfy building
Reviewed by: hselasky
Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D35938
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/pci.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 695965673050..0652a250c697 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -1514,4 +1514,34 @@ linuxkpi_pcim_want_to_use_bus_functions(struct pci_dev *pdev) pdev->want_iomap_res = true; } +static inline bool +pci_is_thunderbolt_attached(struct pci_dev *pdev) +{ + + return (false); +} + +static inline void * +pci_platform_rom(struct pci_dev *pdev, size_t *size) +{ + + return (NULL); +} + +static inline void +pci_ignore_hotplug(struct pci_dev *pdev) +{ +} + +static inline int +pcie_get_readrq(struct pci_dev *dev) +{ + u16 ctl; + + if (pcie_capability_read_word(dev, PCI_EXP_DEVCTL, &ctl)) + return (-EINVAL); + + return (128 << ((ctl & PCI_EXP_DEVCTL_READRQ) >> 12)); +} + #endif /* _LINUXKPI_LINUX_PCI_H_ */ |