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 #define VFIO_AMD_XGBE_DEVICE(obj) \ 44 OBJECT_CHECK(VFIOAmdXgbeDevice, (obj), TYPE_VFIO_AMD_XGBE) 45 #define VFIO_AMD_XGBE_DEVICE_CLASS(klass) \ 46 OBJECT_CLASS_CHECK(VFIOAmdXgbeDeviceClass, (klass), \ 47 TYPE_VFIO_AMD_XGBE) 48 #define VFIO_AMD_XGBE_DEVICE_GET_CLASS(obj) \ 49 OBJECT_GET_CLASS(VFIOAmdXgbeDeviceClass, (obj), \ 50 TYPE_VFIO_AMD_XGBE) 51 52 #endif 53