]> git.baikalelectronics.ru Git - kernel.git/commit
spi: dw: Detach SPI device specific CR0 config method
authorBaikal Electronics <support@baikalelectronics.ru>
Wed, 7 Oct 2020 23:54:52 +0000 (02:54 +0300)
committerMark Brown <broonie@kernel.org>
Thu, 8 Oct 2020 22:00:07 +0000 (23:00 +0100)
commit5e5914ff197b4f02a4360158fc0fa39f3de316ee
tree5c03bb38751ac5693acc5c04de4c477e91f5fd86
parent3636e10c49469b72ccc42c799b4f39f969f954a2
spi: dw: Detach SPI device specific CR0 config method

Indeed there is no point in detecting the SPI peripheral device parameters
and initializing the CR0 register fields each time an SPI transfer is
executed. Instead let's define a dedicated CR0 chip-data member, which
will be initialized in accordance with the SPI device settings at the
moment of setting it up.

By doing so we'll finally make the SPI device chip_data serving as it's
supposed to - to preserve the SPI device specific DW SPI configuration.
See spi-fsl-dspi.c, spi-pl022.c, spi-pxa2xx.c drivers for example of the
way the chip data is utilized.

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