diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-10-21 07:00:00 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-10-21 07:00:00 -0700 |
commit | 55f4e4a5ec657a017e3bf75299ad71fd1c968dd3 (patch) | |
tree | 550ce922ea0e125ac6a9738210ce2939bf2fe901 /hw/smc91c111.c | |
parent | 413f05aaf54fa08c0ae7e997327a4f4a473c0a8d (diff) | |
download | external_qemu-55f4e4a5ec657a017e3bf75299ad71fd1c968dd3.zip external_qemu-55f4e4a5ec657a017e3bf75299ad71fd1c968dd3.tar.gz external_qemu-55f4e4a5ec657a017e3bf75299ad71fd1c968dd3.tar.bz2 |
Initial Contribution
Diffstat (limited to 'hw/smc91c111.c')
-rw-r--r-- | hw/smc91c111.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/hw/smc91c111.c b/hw/smc91c111.c index 214e92e..28b5c5d 100644 --- a/hw/smc91c111.c +++ b/hw/smc91c111.c @@ -8,6 +8,7 @@ */ #include "vl.h" +#include "irq.h" /* For crc32 */ #include <zlib.h> @@ -24,8 +25,7 @@ typedef struct { uint16_t gpr; uint16_t ptr; uint16_t ercv; - void *pic; - int irq; + qemu_irq irq; int bank; int packet_num; int tx_alloc; @@ -86,7 +86,7 @@ static void smc91c111_update(smc91c111_state *s) if (s->tx_fifo_done_len != 0) s->int_level |= INT_TX; level = (s->int_level & s->int_mask) != 0; - pic_set_irq_new(s->pic, s->irq, level); + qemu_set_irq(s->irq, level); } /* Try to allocate a packet. Returns 0x80 on failure. */ @@ -159,7 +159,6 @@ static void smc91c111_do_tx(smc91c111_state *s) int len; int control; int add_crc; - uint32_t crc; int packetnum; uint8_t *p; @@ -192,7 +191,7 @@ static void smc91c111_do_tx(smc91c111_state *s) about. */ add_crc = (control & 0x10) || (s->tcr & TCR_NOCRC) == 0; if (add_crc) { - crc = crc32(~0, p, len); + uint32_t crc = crc32(~0, p, len); memcpy(p + len, &crc, 4); len += 4; } @@ -692,7 +691,7 @@ static CPUWriteMemoryFunc *smc91c111_writefn[] = { smc91c111_writel }; -void smc91c111_init(NICInfo *nd, uint32_t base, void *pic, int irq) +void smc91c111_init(NICInfo *nd, uint32_t base, qemu_irq irq) { smc91c111_state *s; int iomemtype; @@ -702,7 +701,6 @@ void smc91c111_init(NICInfo *nd, uint32_t base, void *pic, int irq) smc91c111_writefn, s); cpu_register_physical_memory(base, 16, iomemtype); s->base = base; - s->pic = pic; s->irq = irq; memcpy(s->macaddr, nd->macaddr, 6); |