• P
    char/cadence_uart: Fix can_receive logic · d0ac820f
    Peter Crosthwaite 提交于
    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: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
    Message-id: 36a58440c9ca5080151e95765c2c81342de8a8df.1388626249.git.peter.crosthwaite@xilinx.com
    Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
    d0ac820f
cadence_uart.c 13.3 KB