soc/intel: Fix SPI driver compilation with CONFIG_DEBUG_SPI

write[8|16|32] wants volatile pointers, not const pointers.

Change-Id: I92010516e8e01c870b60107e20a576a75d491e4e
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/13566
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
Stefan Reinauer 2017-07-13 22:25:15 +02:00 committed by Martin Roth
parent 6dc125f0e3
commit 935ff1b208
2 changed files with 6 additions and 6 deletions

View File

@ -189,21 +189,21 @@ static u32 readl_(const void *addr)
return v; return v;
} }
static void writeb_(u8 b, const void *addr) static void writeb_(u8 b, void *addr)
{ {
write8(addr, b); write8(addr, b);
printk(BIOS_DEBUG, "wrote %2.2x to %4.4x\n", printk(BIOS_DEBUG, "wrote %2.2x to %4.4x\n",
b, ((unsigned) addr & 0xffff) - 0xf020); b, ((unsigned) addr & 0xffff) - 0xf020);
} }
static void writew_(u16 b, const void *addr) static void writew_(u16 b, void *addr)
{ {
write16(addr, b); write16(addr, b);
printk(BIOS_DEBUG, "wrote %4.4x to %4.4x\n", printk(BIOS_DEBUG, "wrote %4.4x to %4.4x\n",
b, ((unsigned) addr & 0xffff) - 0xf020); b, ((unsigned) addr & 0xffff) - 0xf020);
} }
static void writel_(u32 b, const void *addr) static void writel_(u32 b, void *addr)
{ {
write32(addr, b); write32(addr, b);
printk(BIOS_DEBUG, "wrote %8.8x to %4.4x\n", printk(BIOS_DEBUG, "wrote %8.8x to %4.4x\n",

View File

@ -188,21 +188,21 @@ static u32 readl_(const void *addr)
return v; return v;
} }
static void writeb_(u8 b, const void *addr) static void writeb_(u8 b, void *addr)
{ {
write8(addr, b); write8(addr, b);
printk(BIOS_DEBUG, "wrote %2.2x to %4.4x\n", printk(BIOS_DEBUG, "wrote %2.2x to %4.4x\n",
b, ((unsigned int) addr & 0xffff) - 0xf020); b, ((unsigned int) addr & 0xffff) - 0xf020);
} }
static void writew_(u16 b, const void *addr) static void writew_(u16 b, void *addr)
{ {
write16(addr, b); write16(addr, b);
printk(BIOS_DEBUG, "wrote %4.4x to %4.4x\n", printk(BIOS_DEBUG, "wrote %4.4x to %4.4x\n",
b, ((unsigned int) addr & 0xffff) - 0xf020); b, ((unsigned int) addr & 0xffff) - 0xf020);
} }
static void writel_(u32 b, const void *addr) static void writel_(u32 b, void *addr)
{ {
write32(addr, b); write32(addr, b);
printk(BIOS_DEBUG, "wrote %8.8x to %4.4x\n", printk(BIOS_DEBUG, "wrote %8.8x to %4.4x\n",