da7e6c5d173dd6a272c1fa133ba35c99cd9320d5
[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 #endif /* PCI_OPS_H */