From 3b7e75a23e0d9f812e7e7792734846720dbfd648 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Thu, 14 May 2009 21:41:10 +0000 Subject: Fix compilation of nic3com on 64bit Corresponding to flashrom svn r512. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Uwe Hermann --- flash.h | 1 + internal.c | 2 +- nic3com.c | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/flash.h b/flash.h index 27b6328..e25f31e 100644 --- a/flash.h +++ b/flash.h @@ -585,6 +585,7 @@ void *physmap(const char *descr, unsigned long phys_addr, size_t len); void physunmap(void *virt_addr, size_t len); /* internal.c */ +void get_io_perms(void); int internal_init(void); int internal_shutdown(void); void internal_chip_writeb(uint8_t val, volatile void *addr); diff --git a/internal.c b/internal.c index 2f9ba17..bbbf58b 100644 --- a/internal.c +++ b/internal.c @@ -102,7 +102,7 @@ int internal_init(void) { int ret = 0; - get_io_perms(void); + get_io_perms(); /* Initialize PCI access for flash enables */ pacc = pci_alloc(); /* Get the pci_access structure */ diff --git a/nic3com.c b/nic3com.c index a60f594..a982267 100644 --- a/nic3com.c +++ b/nic3com.c @@ -158,7 +158,7 @@ void nic3com_unmap(void *virt_addr, size_t len) void nic3com_chip_writeb(uint8_t val, volatile void *addr) { - OUTL((uint32_t)addr, io_base_addr + BIOS_ROM_ADDR); + OUTL((uint32_t)(intptr_t)addr, io_base_addr + BIOS_ROM_ADDR); OUTB(val, io_base_addr + BIOS_ROM_DATA); } @@ -174,7 +174,7 @@ uint8_t nic3com_chip_readb(const volatile void *addr) { uint8_t val; - OUTL((uint32_t)addr, io_base_addr + BIOS_ROM_ADDR); + OUTL((uint32_t)(intptr_t)addr, io_base_addr + BIOS_ROM_ADDR); val = INB(io_base_addr + BIOS_ROM_DATA); return val; -- cgit v1.1