[coreboot] [PATCH] flashrom: Fix compilation of nic3com on 64bit
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Thu May 14 23:28:32 CEST 2009
Fix compilation of nic3com on 64bit.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
Index: flashrom-nic3com_compilefix/flash.h
===================================================================
--- flashrom-nic3com_compilefix/flash.h (Revision 511)
+++ flashrom-nic3com_compilefix/flash.h (Arbeitskopie)
@@ -585,6 +585,7 @@
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);
Index: flashrom-nic3com_compilefix/nic3com.c
===================================================================
--- flashrom-nic3com_compilefix/nic3com.c (Revision 511)
+++ flashrom-nic3com_compilefix/nic3com.c (Arbeitskopie)
@@ -158,7 +158,7 @@
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 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;
Index: flashrom-nic3com_compilefix/internal.c
===================================================================
--- flashrom-nic3com_compilefix/internal.c (Revision 511)
+++ flashrom-nic3com_compilefix/internal.c (Arbeitskopie)
@@ -83,7 +83,7 @@
return NULL;
}
-void get_io_perms(void)
+void get_io_perms()
{
#if defined (__sun) && (defined(__i386) || defined(__amd64))
if (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) != 0) {
@@ -102,7 +102,7 @@
{
int ret = 0;
- get_io_perms(void);
+ get_io_perms();
/* Initialize PCI access for flash enables */
pacc = pci_alloc(); /* Get the pci_access structure */
--
http://www.hailfinger.org/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: flashrom_nic3com_compilefix.diff
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20090514/f3d9f3d0/attachment.ksh>
More information about the coreboot
mailing list