diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/device/pci_mmio_cfg.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/include/device/pci_mmio_cfg.h b/src/include/device/pci_mmio_cfg.h index 147b630c0b..a13c18b2e1 100644 --- a/src/include/device/pci_mmio_cfg.h +++ b/src/include/device/pci_mmio_cfg.h @@ -20,13 +20,12 @@ #include <device/mmio.h> #include <device/pci_type.h> -#define DEFAULT_PCIEXBAR CONFIG_MMCONF_BASE_ADDRESS static __always_inline u8 pci_mmio_read_config8(pci_devfn_t dev, unsigned int where) { void *addr; - addr = (void *)(uintptr_t)(DEFAULT_PCIEXBAR | dev | where); + addr = (void *)(uintptr_t)(CONFIG_MMCONF_BASE_ADDRESS | dev | where); return read8(addr); } @@ -34,7 +33,7 @@ static __always_inline u16 pci_mmio_read_config16(pci_devfn_t dev, unsigned int where) { void *addr; - addr = (void *)(uintptr_t)(DEFAULT_PCIEXBAR | dev | (where & ~1)); + addr = (void *)(uintptr_t)(CONFIG_MMCONF_BASE_ADDRESS | dev | (where & ~1)); return read16(addr); } @@ -42,7 +41,7 @@ static __always_inline u32 pci_mmio_read_config32(pci_devfn_t dev, unsigned int where) { void *addr; - addr = (void *)(uintptr_t)(DEFAULT_PCIEXBAR | dev | (where & ~3)); + addr = (void *)(uintptr_t)(CONFIG_MMCONF_BASE_ADDRESS | dev | (where & ~3)); return read32(addr); } @@ -50,7 +49,7 @@ static __always_inline void pci_mmio_write_config8(pci_devfn_t dev, unsigned int where, u8 value) { void *addr; - addr = (void *)(uintptr_t)(DEFAULT_PCIEXBAR | dev | where); + addr = (void *)(uintptr_t)(CONFIG_MMCONF_BASE_ADDRESS | dev | where); write8(addr, value); } @@ -58,7 +57,7 @@ static __always_inline void pci_mmio_write_config16(pci_devfn_t dev, unsigned int where, u16 value) { void *addr; - addr = (void *)(uintptr_t)(DEFAULT_PCIEXBAR | dev | (where & ~1)); + addr = (void *)(uintptr_t)(CONFIG_MMCONF_BASE_ADDRESS | dev | (where & ~1)); write16(addr, value); } @@ -66,7 +65,7 @@ static __always_inline void pci_mmio_write_config32(pci_devfn_t dev, unsigned int where, u32 value) { void *addr; - addr = (void *)(uintptr_t)(DEFAULT_PCIEXBAR | dev | (where & ~3)); + addr = (void *)(uintptr_t)(CONFIG_MMCONF_BASE_ADDRESS | dev | (where & ~3)); write32(addr, value); } |