2 * s390 CCW Assignment Support
4 * Copyright 2017 IBM Corp.
5 * Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
6 * Xiao Feng Ren <renxiaof@linux.vnet.ibm.com>
8 * This work is licensed under the terms of the GNU GPL, version 2 or (at
9 * your option) any later version. See the COPYING file in the top-level
16 #include "hw/s390x/ccw-device.h"
18 #define TYPE_S390_CCW "s390-ccw"
19 #define S390_CCW_DEVICE(obj) \
20 OBJECT_CHECK(S390CCWDevice, (obj), TYPE_S390_CCW)
21 #define S390_CCW_DEVICE_CLASS(klass) \
22 OBJECT_CLASS_CHECK(S390CCWDeviceClass, (klass), TYPE_S390_CCW)
23 #define S390_CCW_DEVICE_GET_CLASS(obj) \
24 OBJECT_GET_CLASS(S390CCWDeviceClass, (obj), TYPE_S390_CCW)
26 typedef struct S390CCWDevice
{
33 typedef struct S390CCWDeviceClass
{
34 CCWDeviceClass parent_class
;
35 void (*realize
)(S390CCWDevice
*dev
, char *sysfsdev
, Error
**errp
);
36 void (*unrealize
)(S390CCWDevice
*dev
);
37 IOInstEnding (*handle_request
) (SubchDev
*sch
);
38 int (*handle_halt
) (SubchDev
*sch
);
39 int (*handle_clear
) (SubchDev
*sch
);