diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-10-21 15:25:33 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-27 12:28:40 -0500 |
commit | 94e1a912b278381b6f900cad29e5ec3a02238c2e (patch) | |
tree | aa86a5ee92340e331778b4543329eaabb0196ce4 /hw/pcnet.h | |
parent | 7622483395ef0e6c415af74bc9e7b0edf59cfe6c (diff) |
pcnet: split away lance.c (sparc32 code).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pcnet.h')
-rw-r--r-- | hw/pcnet.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/hw/pcnet.h b/hw/pcnet.h new file mode 100644 index 0000000000..a94b6054aa --- /dev/null +++ b/hw/pcnet.h @@ -0,0 +1,39 @@ +#define PCNET_IOPORT_SIZE 0x20 +#define PCNET_PNPMMIO_SIZE 0x20 + +#define PCNET_LOOPTEST_CRC 1 +#define PCNET_LOOPTEST_NOCRC 2 + + +typedef struct PCNetState_st PCNetState; + +struct PCNetState_st { + VLANClientState *vc; + NICConf conf; + QEMUTimer *poll_timer; + int rap, isr, lnkst; + uint32_t rdra, tdra; + uint8_t prom[16]; + uint16_t csr[128]; + uint16_t bcr[32]; + uint64_t timer; + int mmio_index, xmit_pos; + uint8_t buffer[4096]; + int tx_busy; + qemu_irq irq; + void (*phys_mem_read)(void *dma_opaque, target_phys_addr_t addr, + uint8_t *buf, int len, int do_bswap); + void (*phys_mem_write)(void *dma_opaque, target_phys_addr_t addr, + uint8_t *buf, int len, int do_bswap); + void *dma_opaque; + int looptest; +}; + +void pcnet_h_reset(void *opaque); +void pcnet_ioport_writew(void *opaque, uint32_t addr, uint32_t val); +uint32_t pcnet_ioport_readw(void *opaque, uint32_t addr); +void pcnet_common_cleanup(PCNetState *d); +int pcnet_common_init(DeviceState *dev, PCNetState *s, + NetCleanup *cleanup); +void pcnet_save(QEMUFile *f, void *opaque); +int pcnet_load(QEMUFile *f, void *opaque, int version_id); |