xref: /qemu/include/hw/vfio/vfio-amd-xgbe.h (revision e3a6e0da)
1 /*
2  * VFIO AMD XGBE device
3  *
4  * Copyright Linaro Limited, 2015
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_AMD_XGBE_H
15 #define HW_VFIO_VFIO_AMD_XGBE_H
16 
17 #include "hw/vfio/vfio-platform.h"
18 #include "qom/object.h"
19 
20 #define TYPE_VFIO_AMD_XGBE "vfio-amd-xgbe"
21 
22 /**
23  * This device exposes:
24  * - 5 MMIO regions: MAC, PCS, SerDes Rx/Tx regs,
25      SerDes Integration Registers 1/2 & 2/2
26  * - 2 level sensitive IRQs and optional DMA channel IRQs
27  */
28 struct VFIOAmdXgbeDevice {
29     VFIOPlatformDevice vdev;
30 };
31 
32 typedef struct VFIOAmdXgbeDevice VFIOAmdXgbeDevice;
33 
34 struct VFIOAmdXgbeDeviceClass {
35     /*< private >*/
36     VFIOPlatformDeviceClass parent_class;
37     /*< public >*/
38     DeviceRealize parent_realize;
39 };
40 
41 typedef struct VFIOAmdXgbeDeviceClass VFIOAmdXgbeDeviceClass;
42 
43 DECLARE_OBJ_CHECKERS(VFIOAmdXgbeDevice, VFIOAmdXgbeDeviceClass,
44                      VFIO_AMD_XGBE_DEVICE, TYPE_VFIO_AMD_XGBE)
45 
46 #endif
47