aboutsummaryrefslogtreecommitdiff
path: root/include/hw/char
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-10-22 12:52:51 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2016-10-24 15:27:20 +0200
commitbecdfa00cfa2995e859ccefa4b7d72a72eb96581 (patch)
tree8973236c181dcde0dbcd9fd36d122fc7a4bac6d7 /include/hw/char
parentecb672d14f092f481000ac9cd9d7dc0500692eba (diff)
char: replace PROP_CHR with CharBackend
Store the property in a CharBackend instead of CharDriverState*. This also replace systematically chr by chr.chr to access the CharDriverState*. The following patches will replace it with calls to qemu_chr_fe CharBackend functions. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20161022095318.17775-12-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/hw/char')
-rw-r--r--include/hw/char/bcm2835_aux.h2
-rw-r--r--include/hw/char/cadence_uart.h2
-rw-r--r--include/hw/char/digic-uart.h3
-rw-r--r--include/hw/char/imx_serial.h3
-rw-r--r--include/hw/char/serial.h3
-rw-r--r--include/hw/char/stm32f2xx_usart.h2
6 files changed, 9 insertions, 6 deletions
diff --git a/include/hw/char/bcm2835_aux.h b/include/hw/char/bcm2835_aux.h
index 42f0ee7a92..6865f154bc 100644
--- a/include/hw/char/bcm2835_aux.h
+++ b/include/hw/char/bcm2835_aux.h
@@ -22,7 +22,7 @@ typedef struct {
/*< public >*/
MemoryRegion iomem;
- CharDriverState *chr;
+ CharBackend chr;
qemu_irq irq;
uint8_t read_fifo[BCM2835_AUX_RX_FIFO_LEN];
diff --git a/include/hw/char/cadence_uart.h b/include/hw/char/cadence_uart.h
index a12773c076..ca75eb5e32 100644
--- a/include/hw/char/cadence_uart.h
+++ b/include/hw/char/cadence_uart.h
@@ -44,7 +44,7 @@ typedef struct {
uint32_t rx_count;
uint32_t tx_count;
uint64_t char_tx_time;
- CharDriverState *chr;
+ CharBackend chr;
qemu_irq irq;
QEMUTimer *fifo_trigger_handle;
} CadenceUARTState;
diff --git a/include/hw/char/digic-uart.h b/include/hw/char/digic-uart.h
index 7b3f145372..340c8e1111 100644
--- a/include/hw/char/digic-uart.h
+++ b/include/hw/char/digic-uart.h
@@ -19,6 +19,7 @@
#define HW_CHAR_DIGIC_UART_H
#include "hw/sysbus.h"
+#include "sysemu/char.h"
#define TYPE_DIGIC_UART "digic-uart"
#define DIGIC_UART(obj) \
@@ -37,7 +38,7 @@ typedef struct DigicUartState {
/*< public >*/
MemoryRegion regs_region;
- CharDriverState *chr;
+ CharBackend chr;
uint32_t reg_rx;
uint32_t reg_st;
diff --git a/include/hw/char/imx_serial.h b/include/hw/char/imx_serial.h
index 6cd75c0ba7..4cc3fbc395 100644
--- a/include/hw/char/imx_serial.h
+++ b/include/hw/char/imx_serial.h
@@ -19,6 +19,7 @@
#define IMX_SERIAL_H
#include "hw/sysbus.h"
+#include "sysemu/char.h"
#define TYPE_IMX_SERIAL "imx.serial"
#define IMX_SERIAL(obj) OBJECT_CHECK(IMXSerialState, (obj), TYPE_IMX_SERIAL)
@@ -96,7 +97,7 @@ typedef struct IMXSerialState {
uint32_t ucr3;
qemu_irq irq;
- CharDriverState *chr;
+ CharBackend chr;
} IMXSerialState;
#endif
diff --git a/include/hw/char/serial.h b/include/hw/char/serial.h
index 4f3b73c453..c3312fb9a6 100644
--- a/include/hw/char/serial.h
+++ b/include/hw/char/serial.h
@@ -30,6 +30,7 @@
#include "sysemu/sysemu.h"
#include "exec/memory.h"
#include "qemu/fifo8.h"
+#include "sysemu/char.h"
#define UART_FIFO_LENGTH 16 /* 16550A Fifo Length */
@@ -52,7 +53,7 @@ struct SerialState {
it can be reset while reading iir */
int thr_ipending;
qemu_irq irq;
- CharDriverState *chr;
+ CharBackend chr;
int last_break_enable;
int it_shift;
int baudbase;
diff --git a/include/hw/char/stm32f2xx_usart.h b/include/hw/char/stm32f2xx_usart.h
index b97f192a45..3267523270 100644
--- a/include/hw/char/stm32f2xx_usart.h
+++ b/include/hw/char/stm32f2xx_usart.h
@@ -67,7 +67,7 @@ typedef struct {
uint32_t usart_cr3;
uint32_t usart_gtpr;
- CharDriverState *chr;
+ CharBackend chr;
qemu_irq irq;
} STM32F2XXUsartState;
#endif /* HW_STM32F2XX_USART_H */