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>
This commit is contained in:
parent
194eef09d0
commit
40061ac0bc
2 changed files with 22 additions and 5 deletions
|
|
@ -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) \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue