aboutsummaryrefslogtreecommitdiff
path: root/include/hw/riscv/sifive_uart.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/riscv/sifive_uart.h')
-rw-r--r--include/hw/riscv/sifive_uart.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/riscv/sifive_uart.h b/include/hw/riscv/sifive_uart.h
index 504f18a60f..c8dc1c57fd 100644
--- a/include/hw/riscv/sifive_uart.h
+++ b/include/hw/riscv/sifive_uart.h
@@ -43,6 +43,9 @@ enum {
SIFIVE_UART_IP_RXWM = 2 /* Receive watermark interrupt pending */
};
+#define SIFIVE_UART_GET_TXCNT(txctrl) ((txctrl >> 16) & 0x7)
+#define SIFIVE_UART_GET_RXCNT(rxctrl) ((rxctrl >> 16) & 0x7)
+
#define TYPE_SIFIVE_UART "riscv.sifive.uart"
#define SIFIVE_UART(obj) \