HomeFreeBSD

aw_spi: improve I/O stability

Description

aw_spi: improve I/O stability

This driver does not use DMA at the moment, so some care is needed to
prevent TX FIFO underruns and RX FIFO overflows.
Several improvements are done in oder to minimize chances of those.

First, the interrupt handling is moved to a filter to minimize latency.
Second, FIFO trigger thresholds are configured for both FIFOs.
The TX FIFO threshold is set to 3/4-th of its size and the RX FIFO
threshold is set to 1/4-th of its size.
The interrupt conditions are changed from the empty FIFO and full FIFO
for the TX and RX correspondingly to going below and above the thresholds.

While here I renamed AW_SPI_IER_RF_ERQ to AW_SPI_IER_RF_RDY which is
closer to what the documentation uses, RF_RDY_INT_EN in the interrupt
control register and RX_RDY in the interrupt status register.

(cherry picked from commit 08ff54dc5b5de85580044167e1714fb75df8e44f)

Details

Provenance
avgAuthored on Dec 20 2021, 10:40 AM
Parents
rG374e8226d225: nfs: don't truncate directory cookies to 32-bits in the NFS server
Branches
Unknown
Tags
Unknown