]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
spi: dw: Introduce max mem-ops SPI bus frequency setting
authorSerge Semin <Sergey.Semin@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)
commit84ecaf4a7837e8c0957a59d77fd7e8e4926968cb
treeed78ba24895c4dff440107243b11f1556d4b0305
parent6423207e57ea53826eaae1a14c14fd6d22561b06
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