From 503d3247e48d803ce36e98d2064cf22220bb0dfd Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Tue, 5 Mar 2019 07:54:28 +0200 Subject: Remove DEFAULT_PCIEXBAR alias MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The other DEFAULT_ entries are just immediate constants. Change-Id: Iebf4266810b8210cebabc814bba2776638d9b74d Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/31758 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Patrick Rudolph Reviewed-by: Nico Huber --- src/include/device/pci_mmio_cfg.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/include/device/pci_mmio_cfg.h') 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 #include -#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); } -- cgit v1.2.3