1
2
3
4
5
6
7
8
9
10#ifndef HW_NET_NE2000_ISA_H
11#define HW_NET_NE2000_ISA_H
12
13#include "hw/isa/isa.h"
14#include "hw/qdev-properties.h"
15#include "net/net.h"
16
17#define TYPE_ISA_NE2000 "ne2k_isa"
18
19static inline ISADevice *isa_ne2000_init(ISABus *bus, int base, int irq,
20 NICInfo *nd)
21{
22 ISADevice *d;
23
24 qemu_check_nic_model(nd, "ne2k_isa");
25
26 d = isa_try_create(bus, TYPE_ISA_NE2000);
27 if (d) {
28 DeviceState *dev = DEVICE(d);
29
30 qdev_prop_set_uint32(dev, "iobase", base);
31 qdev_prop_set_uint32(dev, "irq", irq);
32 qdev_set_nic_properties(dev, nd);
33 qdev_init_nofail(dev);
34 }
35 return d;
36}
37
38#endif
39