e1000: cleanup process_tx_desc
[qemu/ar7.git] / include / hw / cpu / icc_bus.h
blobb5500708dca7e34b3ad6feb9e8a824b747215b15
1 /* icc_bus.h
2 * emulate x86 ICC (Interrupt Controller Communications) bus
4 * Copyright (c) 2013 Red Hat, Inc
6 * Authors:
7 * Igor Mammedov <imammedo@redhat.com>
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, see <http://www.gnu.org/licenses/>
22 #ifndef ICC_BUS_H
23 #define ICC_BUS_H
25 #include "exec/memory.h"
26 #include "hw/qdev-core.h"
28 #define TYPE_ICC_BUS "icc-bus"
30 #ifndef CONFIG_USER_ONLY
32 /**
33 * ICCBus:
35 * ICC bus
37 typedef struct ICCBus {
38 /*< private >*/
39 BusState parent_obj;
40 /*< public >*/
42 MemoryRegion *apic_address_space;
43 } ICCBus;
45 #define ICC_BUS(obj) OBJECT_CHECK(ICCBus, (obj), TYPE_ICC_BUS)
47 /**
48 * ICCDevice:
50 * ICC device
52 typedef struct ICCDevice {
53 /*< private >*/
54 DeviceState qdev;
55 /*< public >*/
56 } ICCDevice;
58 /**
59 * ICCDeviceClass:
60 * @init: Initialization callback for derived classes.
62 * ICC device class
64 typedef struct ICCDeviceClass {
65 /*< private >*/
66 DeviceClass parent_class;
67 /*< public >*/
69 int (*init)(ICCDevice *dev); /* TODO replace with QOM realize */
70 } ICCDeviceClass;
72 #define TYPE_ICC_DEVICE "icc-device"
73 #define ICC_DEVICE(obj) OBJECT_CHECK(ICCDevice, (obj), TYPE_ICC_DEVICE)
74 #define ICC_DEVICE_CLASS(klass) \
75 OBJECT_CLASS_CHECK(ICCDeviceClass, (klass), TYPE_ICC_DEVICE)
76 #define ICC_DEVICE_GET_CLASS(obj) \
77 OBJECT_GET_CLASS(ICCDeviceClass, (obj), TYPE_ICC_DEVICE)
79 #define TYPE_ICC_BRIDGE "icc-bridge"
81 #endif /* CONFIG_USER_ONLY */
82 #endif