2 * emulate x86 ICC (Interrupt Controller Communications) bus
4 * Copyright (c) 2013 Red Hat, Inc
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/>
25 #include "hw/qdev-core.h"
27 #define TYPE_ICC_BUS "icc-bus"
29 #ifndef CONFIG_USER_ONLY
36 typedef struct ICCBus
{
42 #define ICC_BUS(obj) OBJECT_CHECK(ICCBus, (obj), TYPE_ICC_BUS)
49 typedef struct ICCDevice
{
57 * @init: Initialization callback for derived classes.
61 typedef struct ICCDeviceClass
{
63 DeviceClass parent_class
;
66 int (*init
)(ICCDevice
*dev
); /* TODO replace with QOM realize */
69 #define TYPE_ICC_DEVICE "icc-device"
70 #define ICC_DEVICE(obj) OBJECT_CHECK(ICCDevice, (obj), TYPE_ICC_DEVICE)
71 #define ICC_DEVICE_CLASS(klass) \
72 OBJECT_CLASS_CHECK(ICCDeviceClass, (klass), TYPE_ICC_DEVICE)
73 #define ICC_DEVICE_GET_CLASS(obj) \
74 OBJECT_GET_CLASS(ICCDeviceClass, (obj), TYPE_ICC_DEVICE)
76 #define TYPE_ICC_BRIDGE "icc-bridge"
78 #endif /* CONFIG_USER_ONLY */