13eee9d4a91570962725f5eaff6a4015f771043f
[coreboot.git] / src / include / device / pci_ops.h
1 #ifndef PCI_OPS_H
2 #define PCI_OPS_H
3
4 #include <stdint.h>
5 #include <device/device.h>
6 #include <arch/pci_ops.h>
7
8 uint8_t  pci_read_config8(device_t dev, unsigned where);
9 uint16_t pci_read_config16(device_t dev, unsigned where);
10 uint32_t pci_read_config32(device_t dev, unsigned where);
11 void pci_write_config8(device_t dev, unsigned where, uint8_t val);
12 void pci_write_config16(device_t dev, unsigned where, uint16_t val);
13 void pci_write_config32(device_t dev, unsigned where, uint32_t val);
14
15 #if CONFIG_MMCONF_SUPPORT
16 uint8_t  pci_mmio_read_config8(device_t dev, unsigned where);
17 uint16_t pci_mmio_read_config16(device_t dev, unsigned where);
18 uint32_t pci_mmio_read_config32(device_t dev, unsigned where);
19 void pci_mmio_write_config8(device_t dev, unsigned where, uint8_t val);
20 void pci_mmio_write_config16(device_t dev, unsigned where, uint16_t val);
21 void pci_mmio_write_config32(device_t dev, unsigned where, uint32_t val);
22 #endif
23
24 /* This function lives in pci_ops_auto.c */
25 const struct pci_bus_operations *pci_remember_direct(void);
26
27 #endif /* PCI_OPS_H */