2 * VFIO calxeda xgmac device
4 * Copyright Linaro Limited, 2014
7 * Eric Auger <eric.auger@linaro.org>
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
14 #ifndef HW_VFIO_VFIO_CALXEDA_XGMAC_H
15 #define HW_VFIO_VFIO_CALXEDA_XGMAC_H
17 #include "hw/vfio/vfio-platform.h"
19 #define TYPE_VFIO_CALXEDA_XGMAC "vfio-calxeda-xgmac"
22 * This device exposes:
23 * - a single MMIO region corresponding to its register space
24 * - 3 IRQS (main and 2 power related IRQs)
26 typedef struct VFIOCalxedaXgmacDevice
{
27 VFIOPlatformDevice vdev
;
28 } VFIOCalxedaXgmacDevice
;
30 typedef struct VFIOCalxedaXgmacDeviceClass
{
32 VFIOPlatformDeviceClass parent_class
;
34 DeviceRealize parent_realize
;
35 } VFIOCalxedaXgmacDeviceClass
;
37 #define VFIO_CALXEDA_XGMAC_DEVICE(obj) \
38 OBJECT_CHECK(VFIOCalxedaXgmacDevice, (obj), TYPE_VFIO_CALXEDA_XGMAC)
39 #define VFIO_CALXEDA_XGMAC_DEVICE_CLASS(klass) \
40 OBJECT_CLASS_CHECK(VFIOCalxedaXgmacDeviceClass, (klass), \
41 TYPE_VFIO_CALXEDA_XGMAC)
42 #define VFIO_CALXEDA_XGMAC_DEVICE_GET_CLASS(obj) \
43 OBJECT_GET_CLASS(VFIOCalxedaXgmacDeviceClass, (obj), \
44 TYPE_VFIO_CALXEDA_XGMAC)