summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2015-06-17 16:12:17 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-06-22 07:34:28 +0200
commitb0bb8a1bb46ec2a9d24f6ae7b6a8a6ee0d5dbf91 (patch)
treebe0d5415b4da30f22d5e765a82dd4208ca42354d
parenta412d399e951860a1b7913d568d390bf5ce47a5a (diff)
downloadcoreboot-b0bb8a1bb46ec2a9d24f6ae7b6a8a6ee0d5dbf91.tar.xz
x86: make PCI MMIO CFG functions 64bit proof
Change-Id: Ife94f5324971f4fa03e9139f458b985f6fed9d87 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Signed-off-by: Scott Duplichan <scott@notabs.org> Reviewed-on: http://review.coreboot.org/10577 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones <marc.jones@se-eng.com>
-rw-r--r--src/arch/x86/include/arch/pci_mmio_cfg.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/arch/x86/include/arch/pci_mmio_cfg.h b/src/arch/x86/include/arch/pci_mmio_cfg.h
index fb582dd3a0..eec9d97a4c 100644
--- a/src/arch/x86/include/arch/pci_mmio_cfg.h
+++ b/src/arch/x86/include/arch/pci_mmio_cfg.h
@@ -29,7 +29,7 @@ static inline __attribute__ ((always_inline))
u8 pcie_read_config8(pci_devfn_t dev, unsigned int where)
{
void *addr;
- addr = (void *)(DEFAULT_PCIEXBAR | dev | where);
+ addr = (void *)(uintptr_t)(DEFAULT_PCIEXBAR | dev | where);
return read8(addr);
}
@@ -37,7 +37,7 @@ static inline __attribute__ ((always_inline))
u16 pcie_read_config16(pci_devfn_t dev, unsigned int where)
{
void *addr;
- addr = (void *)(DEFAULT_PCIEXBAR | dev | (where & ~1));
+ addr = (void *)(uintptr_t)(DEFAULT_PCIEXBAR | dev | (where & ~1));
return read16(addr);
}
@@ -45,7 +45,7 @@ static inline __attribute__ ((always_inline))
u32 pcie_read_config32(pci_devfn_t dev, unsigned int where)
{
void *addr;
- addr = (void *)(DEFAULT_PCIEXBAR | dev | (where & ~3));
+ addr = (void *)(uintptr_t)(DEFAULT_PCIEXBAR | dev | (where & ~3));
return read32(addr);
}
@@ -53,7 +53,7 @@ static inline __attribute__ ((always_inline))
void pcie_write_config8(pci_devfn_t dev, unsigned int where, u8 value)
{
void *addr;
- addr = (void *)(DEFAULT_PCIEXBAR | dev | where);
+ addr = (void *)(uintptr_t)(DEFAULT_PCIEXBAR | dev | where);
write8(addr, value);
}
@@ -61,7 +61,7 @@ static inline __attribute__ ((always_inline))
void pcie_write_config16(pci_devfn_t dev, unsigned int where, u16 value)
{
void *addr;
- addr = (void *)(DEFAULT_PCIEXBAR | dev | (where & ~1));
+ addr = (void *)(uintptr_t)(DEFAULT_PCIEXBAR | dev | (where & ~1));
write16(addr, value);
}
@@ -69,7 +69,7 @@ static inline __attribute__ ((always_inline))
void pcie_write_config32(pci_devfn_t dev, unsigned int where, u32 value)
{
void *addr;
- addr = (void *)(DEFAULT_PCIEXBAR | dev | (where & ~3));
+ addr = (void *)(uintptr_t)(DEFAULT_PCIEXBAR | dev | (where & ~3));
write32(addr, value);
}