]> git.baikalelectronics.ru Git - uboot.git/commit
spi: dw: Force set K210 fifo length to 31
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Tue, 1 Mar 2022 10:35:43 +0000 (10:35 +0000)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Tue, 15 Mar 2022 09:43:11 +0000 (17:43 +0800)
commitf0493dfa9fe9c098b973e0ac722c78d61df9fd1a
tree41e261643fec37e1a4aed96fb1b9f0721894a38a
parenta16430ba923045c667f75861932496ce5299bc10
spi: dw: Force set K210 fifo length to 31

The Canaan Kendryte K210 SoC DW apb_ssi v4 spi controller is documented
to have a 32 word deep TX and RX FIFO, which spi_hw_init() detects.
However, when the RX FIFO is filled up to 32 entries (RXFLR = 32), an
RX FIFO overrun error occurs. Avoid this problem by force setting
fifo_len to 31.

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
drivers/spi/designware_spi.c