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
This commit is contained in:
Emmanuel Vadot 2022-07-26 10:07:39 +02:00
parent 885ab0dba2
commit 6890e327a8

View File

@ -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_ */