]>
Commit | Line | Data |
---|---|---|
7a8d15d7 EA |
1 | /* |
2 | * VFIO calxeda xgmac device | |
3 | * | |
4 | * Copyright Linaro Limited, 2014 | |
5 | * | |
6 | * Authors: | |
7 | * Eric Auger <eric.auger@linaro.org> | |
8 | * | |
9 | * This work is licensed under the terms of the GNU GPL, version 2. See | |
10 | * the COPYING file in the top-level directory. | |
11 | * | |
12 | */ | |
13 | ||
14 | #ifndef HW_VFIO_VFIO_CALXEDA_XGMAC_H | |
15 | #define HW_VFIO_VFIO_CALXEDA_XGMAC_H | |
16 | ||
17 | #include "hw/vfio/vfio-platform.h" | |
db1015e9 | 18 | #include "qom/object.h" |
7a8d15d7 EA |
19 | |
20 | #define TYPE_VFIO_CALXEDA_XGMAC "vfio-calxeda-xgmac" | |
21 | ||
22 | /** | |
23 | * This device exposes: | |
24 | * - a single MMIO region corresponding to its register space | |
25 | * - 3 IRQS (main and 2 power related IRQs) | |
26 | */ | |
db1015e9 | 27 | struct VFIOCalxedaXgmacDevice { |
7a8d15d7 | 28 | VFIOPlatformDevice vdev; |
db1015e9 EH |
29 | }; |
30 | typedef struct VFIOCalxedaXgmacDevice VFIOCalxedaXgmacDevice; | |
7a8d15d7 | 31 | |
db1015e9 | 32 | struct VFIOCalxedaXgmacDeviceClass { |
7a8d15d7 EA |
33 | /*< private >*/ |
34 | VFIOPlatformDeviceClass parent_class; | |
35 | /*< public >*/ | |
36 | DeviceRealize parent_realize; | |
db1015e9 EH |
37 | }; |
38 | typedef struct VFIOCalxedaXgmacDeviceClass VFIOCalxedaXgmacDeviceClass; | |
7a8d15d7 EA |
39 | |
40 | #define VFIO_CALXEDA_XGMAC_DEVICE(obj) \ | |
41 | OBJECT_CHECK(VFIOCalxedaXgmacDevice, (obj), TYPE_VFIO_CALXEDA_XGMAC) | |
42 | #define VFIO_CALXEDA_XGMAC_DEVICE_CLASS(klass) \ | |
43 | OBJECT_CLASS_CHECK(VFIOCalxedaXgmacDeviceClass, (klass), \ | |
44 | TYPE_VFIO_CALXEDA_XGMAC) | |
45 | #define VFIO_CALXEDA_XGMAC_DEVICE_GET_CLASS(obj) \ | |
46 | OBJECT_GET_CLASS(VFIOCalxedaXgmacDeviceClass, (obj), \ | |
47 | TYPE_VFIO_CALXEDA_XGMAC) | |
48 | ||
49 | #endif |