summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFei Li2016-11-25 07:45:14 +0100
committerCornelia Huck2017-04-21 09:32:09 +0200
commit5b00bef270e8bca9c1906cbc2a49eb376505db34 (patch)
tree3fbdae52a314c202bd06dbae900941888f77bcef /include
parents390x/css: consolidate the devno property for ccw devices (diff)
downloadqemu-5b00bef270e8bca9c1906cbc2a49eb376505db34.tar.gz
qemu-5b00bef270e8bca9c1906cbc2a49eb376505db34.tar.xz
qemu-5b00bef270e8bca9c1906cbc2a49eb376505db34.zip
s390x: use enum for adapter type and standardize its naming
Let's use an enum for io adapter type, and standardize its naming to CSS_IO_ADAPTER_* by changing S390_PCIPT_ADAPTER to CSS_IO_ADAPTER_PCI. Signed-off-by: Fei Li <sherrylf@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/s390x/css.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h
index e88f24b868..cdc73fe0aa 100644
--- a/include/hw/s390x/css.h
+++ b/include/hw/s390x/css.h
@@ -124,8 +124,13 @@ void css_generate_css_crws(uint8_t cssid);
void css_clear_sei_pending(void);
void css_adapter_interrupt(uint8_t isc);
-#define CSS_IO_ADAPTER_VIRTIO 1
-int css_register_io_adapter(uint8_t type, uint8_t isc, bool swap,
+typedef enum {
+ CSS_IO_ADAPTER_VIRTIO = 0,
+ CSS_IO_ADAPTER_PCI = 1,
+ CSS_IO_ADAPTER_TYPE_NUMS,
+} CssIoAdapterType;
+
+int css_register_io_adapter(CssIoAdapterType type, uint8_t isc, bool swap,
bool maskable, uint32_t *id);
#ifndef CONFIG_USER_ONLY