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>
This commit is contained in:
committed by
Nico Huber
parent
e079e5ccc2
commit
503d3247e4
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user