]> git.proxmox.com Git - mirror_qemu.git/blob - include/hw/s390x/3270-ccw.h
s390x/3270: Add abstract emulated ccw-attached 3270 device
[mirror_qemu.git] / include / hw / s390x / 3270-ccw.h
1 /*
2 * Emulated ccw-attached 3270 definitions
3 *
4 * Copyright 2017 IBM Corp.
5 * Author(s): Yang Chen <bjcyang@linux.vnet.ibm.com>
6 * Jing Liu <liujbjl@linux.vnet.ibm.com>
7 *
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
10 * directory.
11 */
12
13 #ifndef HW_S390X_3270_CCW_H
14 #define HW_S390X_3270_CCW_H
15
16 #include "hw/sysbus.h"
17 #include "hw/s390x/css.h"
18 #include "hw/s390x/ccw-device.h"
19
20 #define EMULATED_CCW_3270_CU_TYPE 0x3270
21 #define EMULATED_CCW_3270_CHPID_TYPE 0x1a
22
23 #define TYPE_EMULATED_CCW_3270 "emulated-ccw-3270"
24 #define EMULATED_CCW_3270(obj) \
25 OBJECT_CHECK(EmulatedCcw3270Device, (obj), TYPE_EMULATED_CCW_3270)
26 #define EMULATED_CCW_3270_CLASS(klass) \
27 OBJECT_CLASS_CHECK(EmulatedCcw3270Class, (klass), TYPE_EMULATED_CCW_3270)
28 #define EMULATED_CCW_3270_GET_CLASS(obj) \
29 OBJECT_GET_CLASS(EmulatedCcw3270Class, (obj), TYPE_EMULATED_CCW_3270)
30
31 typedef struct EmulatedCcw3270Device {
32 CcwDevice parent_obj;
33 } EmulatedCcw3270Device;
34
35 typedef struct EmulatedCcw3270Class {
36 CCWDeviceClass parent_class;
37
38 void (*init)(EmulatedCcw3270Device *, Error **);
39 int (*read_payload_3270)(EmulatedCcw3270Device *, uint32_t, uint16_t);
40 int (*write_payload_3270)(EmulatedCcw3270Device *, uint8_t, uint32_t,
41 uint16_t);
42 } EmulatedCcw3270Class;
43
44 #endif