1*a8eac943SDong Jia Shi /* 2*a8eac943SDong Jia Shi * s390 CCW Assignment Support 3*a8eac943SDong Jia Shi * 4*a8eac943SDong Jia Shi * Copyright 2017 IBM Corp. 5*a8eac943SDong Jia Shi * Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> 6*a8eac943SDong Jia Shi * Xiao Feng Ren <renxiaof@linux.vnet.ibm.com> 7*a8eac943SDong Jia Shi * 8*a8eac943SDong Jia Shi * This work is licensed under the terms of the GNU GPL, version 2 or (at 9*a8eac943SDong Jia Shi * your option) any later version. See the COPYING file in the top-level 10*a8eac943SDong Jia Shi * directory. 11*a8eac943SDong Jia Shi */ 12*a8eac943SDong Jia Shi 13*a8eac943SDong Jia Shi #ifndef HW_S390_CCW_H 14*a8eac943SDong Jia Shi #define HW_S390_CCW_H 15*a8eac943SDong Jia Shi 16*a8eac943SDong Jia Shi #include "hw/s390x/ccw-device.h" 17*a8eac943SDong Jia Shi 18*a8eac943SDong Jia Shi #define TYPE_S390_CCW "s390-ccw" 19*a8eac943SDong Jia Shi #define S390_CCW_DEVICE(obj) \ 20*a8eac943SDong Jia Shi OBJECT_CHECK(S390CCWDevice, (obj), TYPE_S390_CCW) 21*a8eac943SDong Jia Shi #define S390_CCW_DEVICE_CLASS(klass) \ 22*a8eac943SDong Jia Shi OBJECT_CLASS_CHECK(S390CCWDeviceClass, (klass), TYPE_S390_CCW) 23*a8eac943SDong Jia Shi #define S390_CCW_DEVICE_GET_CLASS(obj) \ 24*a8eac943SDong Jia Shi OBJECT_GET_CLASS(S390CCWDeviceClass, (obj), TYPE_S390_CCW) 25*a8eac943SDong Jia Shi 26*a8eac943SDong Jia Shi typedef struct S390CCWDevice { 27*a8eac943SDong Jia Shi CcwDevice parent_obj; 28*a8eac943SDong Jia Shi CssDevId hostid; 29*a8eac943SDong Jia Shi char *mdevid; 30*a8eac943SDong Jia Shi } S390CCWDevice; 31*a8eac943SDong Jia Shi 32*a8eac943SDong Jia Shi typedef struct S390CCWDeviceClass { 33*a8eac943SDong Jia Shi CCWDeviceClass parent_class; 34*a8eac943SDong Jia Shi void (*realize)(S390CCWDevice *dev, char *sysfsdev, Error **errp); 35*a8eac943SDong Jia Shi void (*unrealize)(S390CCWDevice *dev, Error **errp); 36*a8eac943SDong Jia Shi } S390CCWDeviceClass; 37*a8eac943SDong Jia Shi 38*a8eac943SDong Jia Shi #endif 39