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
19#define TYPE_VFIO_AMD_XGBE "vfio-amd-xgbe"
20
21/**
22 * This device exposes:
23 * - 5 MMIO regions: MAC, PCS, SerDes Rx/Tx regs,
24 SerDes Integration Registers 1/2 & 2/2
25 * - 2 level sensitive IRQs and optional DMA channel IRQs
26 */
27struct VFIOAmdXgbeDevice {
28 VFIOPlatformDevice vdev;
29};
30
31typedef struct VFIOAmdXgbeDevice VFIOAmdXgbeDevice;
32
33struct VFIOAmdXgbeDeviceClass {
34 /*< private >*/
35 VFIOPlatformDeviceClass parent_class;
36 /*< public >*/
37 DeviceRealize parent_realize;
38};
39
40typedef struct VFIOAmdXgbeDeviceClass VFIOAmdXgbeDeviceClass;
41
42#define VFIO_AMD_XGBE_DEVICE(obj) \
43 OBJECT_CHECK(VFIOAmdXgbeDevice, (obj), TYPE_VFIO_AMD_XGBE)
44#define VFIO_AMD_XGBE_DEVICE_CLASS(klass) \
45 OBJECT_CLASS_CHECK(VFIOAmdXgbeDeviceClass, (klass), \
46 TYPE_VFIO_AMD_XGBE)
47#define VFIO_AMD_XGBE_DEVICE_GET_CLASS(obj) \
48 OBJECT_GET_CLASS(VFIOAmdXgbeDeviceClass, (obj), \
49 TYPE_VFIO_AMD_XGBE)
50
51#endif
52