summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-03-05 07:54:28 +0200
committerNico Huber <nico.h@gmx.de>2019-03-06 11:54:17 +0000
commit503d3247e48d803ce36e98d2064cf22220bb0dfd (patch)
treef50d79bf985fdcf6489178ffdc9918d1f0759183 /src/include
parente079e5ccc2e707e5b6bd3b011e04c9138f159808 (diff)
downloadcoreboot-503d3247e48d803ce36e98d2064cf22220bb0dfd.tar.xz
Remove DEFAULT_PCIEXBAR alias
The other DEFAULT_ entries are just immediate constants. Change-Id: Iebf4266810b8210cebabc814bba2776638d9b74d Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31758 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/device/pci_mmio_cfg.h13
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);
}