diff options
Diffstat (limited to 'include/hw/char/sifive_uart.h')
-rw-r--r-- | include/hw/char/sifive_uart.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/hw/char/sifive_uart.h b/include/hw/char/sifive_uart.h index 6566882..3e962be 100644 --- a/include/hw/char/sifive_uart.h +++ b/include/hw/char/sifive_uart.h @@ -22,6 +22,7 @@ #include "chardev/char-fe.h" #include "hw/sysbus.h" +#include "qom/object.h" enum { SIFIVE_UART_TXFIFO = 0, @@ -51,10 +52,11 @@ enum { #define TYPE_SIFIVE_UART "riscv.sifive.uart" -#define SIFIVE_UART(obj) \ - OBJECT_CHECK(SiFiveUARTState, (obj), TYPE_SIFIVE_UART) +typedef struct SiFiveUARTState SiFiveUARTState; +DECLARE_INSTANCE_CHECKER(SiFiveUARTState, SIFIVE_UART, + TYPE_SIFIVE_UART) -typedef struct SiFiveUARTState { +struct SiFiveUARTState { /*< private >*/ SysBusDevice parent_obj; @@ -69,7 +71,7 @@ typedef struct SiFiveUARTState { uint32_t txctrl; uint32_t rxctrl; uint32_t div; -} SiFiveUARTState; +}; SiFiveUARTState *sifive_uart_create(MemoryRegion *address_space, hwaddr base, Chardev *chr, qemu_irq irq); |