summary refs log tree commit diff stats
path: root/include/hw/s390x/css.h
diff options
context:
space:
mode:
authorFei Li <sherrylf@linux.vnet.ibm.com>2016-11-25 07:45:14 +0100
committerCornelia Huck <cornelia.huck@de.ibm.com>2017-04-21 09:32:09 +0200
commit5b00bef270e8bca9c1906cbc2a49eb376505db34 (patch)
tree3fbdae52a314c202bd06dbae900941888f77bcef /include/hw/s390x/css.h
parent2a78ac660f460edd60eb514c589c512c0f491c46 (diff)
downloadfocaccia-qemu-5b00bef270e8bca9c1906cbc2a49eb376505db34.tar.gz
focaccia-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/hw/s390x/css.h')
-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