]> git.baikalelectronics.ru Git - kernel.git/commit
spi: dw: Introduce max mem-ops SPI bus frequency setting
authorBaikal Electronics <support@baikalelectronics.ru>
Wed, 7 Oct 2020 23:55:07 +0000 (02:55 +0300)
committerMark Brown <broonie@kernel.org>
Thu, 8 Oct 2020 22:00:20 +0000 (23:00 +0100)
commit5c33511e2cb35fc29e118abb38b2529901eab5af
treeed78ba24895c4dff440107243b11f1556d4b0305
parent7c1c11540afd49caeccc8063716bb2f7c2cf3947
spi: dw: Introduce max mem-ops SPI bus frequency setting

In some circumstances the current implementation of the SPI memory
operations may occasionally fail even though they are executed in the
atomic context. This may happen if the system bus is relatively slow in
comparison to the SPI bus frequency, or there is a concurrent access to
it, which makes the MMIO-operations occasionally stalling before
push-pulling data from the DW APB SPI FIFOs. These two problems we've
discovered on the Baikal-T1 SoC. In order to fix them we have no choice
but to set an artificial limitation on the SPI bus speed.

Note currently this limitation will be only applicable for the memory
operations, since the standard SPI core interface is implemented with an
assumption that there is no problem with the automatic CS toggling.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Link: https://lore.kernel.org/r/20201007235511.4935-19-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-dw-core.c
drivers/spi/spi-dw.h