mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
spi: rockchip: Set rx_fifo interrupt waterline base on transfer item
Change-Id: Ia141ce99b14f8728302535d0748af66d597a2fdc Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
@@ -569,8 +569,8 @@ static void rockchip_spi_config(struct rockchip_spi *rs,
|
||||
* interrupt exactly when the fifo is full doesn't seem to work,
|
||||
* so we need the strict inequality here
|
||||
*/
|
||||
if (xfer->len < rs->fifo_len)
|
||||
writel_relaxed(xfer->len - 1, rs->regs + ROCKCHIP_SPI_RXFTLR);
|
||||
if ((xfer->len / rs->n_bytes) < rs->fifo_len)
|
||||
writel_relaxed(xfer->len / rs->n_bytes - 1, rs->regs + ROCKCHIP_SPI_RXFTLR);
|
||||
else
|
||||
writel_relaxed(rs->fifo_len / 2 - 1, rs->regs + ROCKCHIP_SPI_RXFTLR);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user