aboutsummaryrefslogtreecommitdiff
path: root/sys/include/dev/pci
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-06-03 20:36:18 -0400
committerIan Moffett <ian@osmora.org>2024-06-03 20:36:18 -0400
commit214eadc62b5578f76c98a38a28f8b3d80ac4d6ad (patch)
tree9e104caa48a12511d11a0833afb8005f1fb65e0d /sys/include/dev/pci
parent46b556a8c7fdbfaa9a11306dea197b2d7363e97c (diff)
kernel: pci: Require mapping BAR using bus_map()
This commit gets rid of pci_map_bar() as some devices have their base address spanning mulitple BARs. This change also exposes PCI bar size logic through pci_bar_size() Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include/dev/pci')
-rw-r--r--sys/include/dev/pci/pci.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/include/dev/pci/pci.h b/sys/include/dev/pci/pci.h
index dbbd7ce..d6edf3b 100644
--- a/sys/include/dev/pci/pci.h
+++ b/sys/include/dev/pci/pci.h
@@ -75,9 +75,9 @@ struct pci_device {
int pci_init(void);
uint32_t pci_readl(struct pci_device *dev, uint32_t offset);
+uint32_t pci_bar_size(struct pci_device *dev, uint8_t bar);
void pci_writel(struct pci_device *dev, uint32_t offset, uint32_t val);
void pci_set_cmdreg(struct pci_device *dev, uint16_t bits);
-int pci_map_bar(struct pci_device *dev, uint8_t bar, void **vap);
struct pci_device *pci_get_device(struct pci_lookup lookup, uint16_t lookup_type);
#endif /* !_DEV_PCI_H_ */