tests: Fixes test-io-channel-file by mask only owner file state mask bits
[qemu/ar7.git] / include / hw / net / ne2000-isa.h
blobaf59ee0b028ba980c8ffa3aa326105b7f0ee03ee
1 /*
2 * QEMU NE2000 emulation -- isa bus windup
4 * Copyright (c) 2003-2004 Fabrice Bellard
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
8 */
10 #ifndef HW_NET_NE2000_ISA_H
11 #define HW_NET_NE2000_ISA_H
13 #include "hw/isa/isa.h"
14 #include "hw/qdev-properties.h"
15 #include "net/net.h"
16 #include "qapi/error.h"
18 #define TYPE_ISA_NE2000 "ne2k_isa"
20 static inline ISADevice *isa_ne2000_init(ISABus *bus, int base, int irq,
21 NICInfo *nd)
23 ISADevice *d;
25 qemu_check_nic_model(nd, "ne2k_isa");
27 d = isa_try_new(TYPE_ISA_NE2000);
28 if (d) {
29 DeviceState *dev = DEVICE(d);
31 qdev_prop_set_uint32(dev, "iobase", base);
32 qdev_prop_set_uint32(dev, "irq", irq);
33 qdev_set_nic_properties(dev, nd);
34 isa_realize_and_unref(d, bus, &error_fatal);
36 return d;
39 #endif