« Previous | Next » 

Revision 61654c77

ID61654c77413d1bccb69b384d891d0c688a31430b

Added by Peter Crosthwaite over 10 years ago

char/cadence_uart: Fix can_receive logic

The can_receive logic was only taking into account the RxFIFO
occupancy. RxFIFO population is only used for the echo and normal modes
however. Improve the logic to correctly return the true number of
receivable characters based on the current mode:

Normal mode: RxFIFO vacancy.
Remote loopback: TxFIFO vacancy.
Echo mode: The min of the TxFIFO and RxFIFO vacancies.
Local Loopback: Return non-zero (to implement droppage)

Signed-off-by: Peter Crosthwaite <>
Message-id:
Signed-off-by: Peter Maydell <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences