Fix compilation of nic3com on 64bit.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@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 */
I think one aspect of this is right, one is wrong
-void get_io_perms(void) +void get_io_perms()
The void should be left in here I think.
{ #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();
removing it here is the right thing.
ron
On Thu, May 14, 2009 at 11:28:32PM +0200, Carl-Daniel Hailfinger wrote:
Fix compilation of nic3com on 64bit.
Thanks, I screwed up my last commit.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Acked-by: Uwe Hermann uwe@hermann-uwe.de
with the change below.
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()
Please drop this.
Uwe.
On 14.05.2009 23:36, Uwe Hermann wrote:
On Thu, May 14, 2009 at 11:28:32PM +0200, Carl-Daniel Hailfinger wrote:
Fix compilation of nic3com on 64bit.
Thanks, I screwed up my last commit.
Mistakes happen.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Acked-by: Uwe Hermann uwe@hermann-uwe.de
Thanks, committed in r512.
with the change below.
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()
Please drop this.
Done. Ron wanted to drop this as well.
Regards, Carl-Daniel