summaryrefslogtreecommitdiffstats
path: root/include/hw/riscv/opentitan.h
diff options
context:
space:
mode:
authorAlistair Francis2020-04-23 23:08:45 +0200
committerAlistair Francis2020-06-19 17:24:07 +0200
commitcc4112605eaf5aebbe186469eba790ac1562b3ef (patch)
tree7ff0d2eea4162ed2fbc532367aaaba4035de179c /include/hw/riscv/opentitan.h
parentriscv/opentitan: Connect the PLIC device (diff)
downloadqemu-cc4112605eaf5aebbe186469eba790ac1562b3ef.tar.gz
qemu-cc4112605eaf5aebbe186469eba790ac1562b3ef.tar.xz
qemu-cc4112605eaf5aebbe186469eba790ac1562b3ef.zip
riscv/opentitan: Connect the UART device
Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'include/hw/riscv/opentitan.h')
-rw-r--r--include/hw/riscv/opentitan.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/hw/riscv/opentitan.h b/include/hw/riscv/opentitan.h
index 76f72905a8..8f29b9cbbf 100644
--- a/include/hw/riscv/opentitan.h
+++ b/include/hw/riscv/opentitan.h
@@ -21,6 +21,7 @@
#include "hw/riscv/riscv_hart.h"
#include "hw/intc/ibex_plic.h"
+#include "hw/char/ibex_uart.h"
#define TYPE_RISCV_IBEX_SOC "riscv.lowrisc.ibex.soc"
#define RISCV_IBEX_SOC(obj) \
@@ -33,6 +34,7 @@ typedef struct LowRISCIbexSoCState {
/*< public >*/
RISCVHartArrayState cpus;
IbexPlicState plic;
+ IbexUartState uart;
MemoryRegion flash_mem;
MemoryRegion rom;
@@ -68,4 +70,15 @@ enum {
IBEX_PADCTRL,
};
+enum {
+ IBEX_UART_RX_PARITY_ERR_IRQ = 0x28,
+ IBEX_UART_RX_TIMEOUT_IRQ = 0x27,
+ IBEX_UART_RX_BREAK_ERR_IRQ = 0x26,
+ IBEX_UART_RX_FRAME_ERR_IRQ = 0x25,
+ IBEX_UART_RX_OVERFLOW_IRQ = 0x24,
+ IBEX_UART_TX_EMPTY_IRQ = 0x23,
+ IBEX_UART_RX_WATERMARK_IRQ = 0x22,
+ IBEX_UART_TX_WATERMARK_IRQ = 0x21,
+};
+
#endif