spi: dw: Detach SPI device specific CR0 config method
authorSerge Semin <Sergey.Semin@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)
commita3577bd8cba554f962b6af082eb43dde7fe7cd09
tree5c03bb38751ac5693acc5c04de4c477e91f5fd86
parentd6bbd1193fe93b7ee037724553b3574dcb48e6da
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