Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/69389 )
Change subject: sb/intel/common/spi: Fix building for 64bit ......................................................................
sb/intel/common/spi: Fix building for 64bit
This avoids the warning of casting pointers to integers of different size.
Change-Id: I7bcb6dbf286438115c854d618eaa2da21c81400d Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/southbridge/intel/common/spi.c 1 file changed, 24 insertions(+), 12 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/69389/1
diff --git a/src/southbridge/intel/common/spi.c b/src/southbridge/intel/common/spi.c index 44d283c..c5c23c4 100644 --- a/src/southbridge/intel/common/spi.c +++ b/src/southbridge/intel/common/spi.c @@ -157,8 +157,8 @@ { u8 v = read8(addr);
- printk(BIOS_DEBUG, "read %2.2x from %4.4x\n", - v, ((unsigned int) addr & 0xffff) - 0xf020); + printk(BIOS_DEBUG, "read %2.2x from %4.4lx\n", + v, ((uintptr_t) addr & 0xffff) - 0xf020); return v; }
@@ -166,8 +166,8 @@ { u16 v = read16(addr);
- printk(BIOS_DEBUG, "read %4.4x from %4.4x\n", - v, ((unsigned int) addr & 0xffff) - 0xf020); + printk(BIOS_DEBUG, "read %4.4x from %4.4lx\n", + v, ((uintptr_t) addr & 0xffff) - 0xf020); return v; }
@@ -175,30 +175,30 @@ { u32 v = read32(addr);
- printk(BIOS_DEBUG, "read %8.8x from %4.4x\n", - v, ((unsigned int) addr & 0xffff) - 0xf020); + printk(BIOS_DEBUG, "read %8.8x from %4.4lx\n", + v, ((uintptr_t) addr & 0xffff) - 0xf020); return v; }
static void writeb_(u8 b, void *addr) { write8(addr, b); - printk(BIOS_DEBUG, "wrote %2.2x to %4.4x\n", - b, ((unsigned int) addr & 0xffff) - 0xf020); + printk(BIOS_DEBUG, "wrote %2.2x to %4.4lx\n", + b, ((uintptr_t) addr & 0xffff) - 0xf020); }
static void writew_(u16 b, void *addr) { write16(addr, b); - printk(BIOS_DEBUG, "wrote %4.4x to %4.4x\n", - b, ((unsigned int) addr & 0xffff) - 0xf020); + printk(BIOS_DEBUG, "wrote %4.4x to %4.4lx\n", + b, ((uintptr_t) addr & 0xffff) - 0xf020); }
static void writel_(u32 b, void *addr) { write32(addr, b); - printk(BIOS_DEBUG, "wrote %8.8x to %4.4x\n", - b, ((unsigned int) addr & 0xffff) - 0xf020); + printk(BIOS_DEBUG, "wrote %8.8x to %4.4lx\n", + b, ((uintptr_t) addr & 0xffff) - 0xf020); }
#else /* CONFIG_DEBUG_SPI_FLASH ^^^ enabled vvv NOT enabled */