sifive_uart: Implement interrupt pending register
authorNathaniel Graff <nathaniel.graff@sifive.com>
Fri, 14 Dec 2018 00:19:12 +0000 (00:19 +0000)
committerPalmer Dabbelt <palmer@sifive.com>
Thu, 20 Dec 2018 20:08:43 +0000 (12:08 -0800)
commit40061ac0bc5bdfcfa1234dbf8e2a880fd9fc4c2e
tree3c7115f4b802338996e5925858f2fc8d145abe4c
parent194eef09d06358ea50b52340df853e9beeccce15
sifive_uart: Implement interrupt pending register

The watermark bits are set in the interrupt pending register according
to the configuration of txcnt and rxcnt in the txctrl and rxctrl
registers.

Since the UART TX does not implement a FIFO, the txwm bit is set as long
as the TX watermark level is greater than zero.

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
Reviewed-by: Michael Clark <mjc@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
hw/riscv/sifive_uart.c
include/hw/riscv/sifive_uart.h