spi: dw: Set xfer effective_speed_hz
authorSerge Semin <Sergey.Semin@baikalelectronics.ru>
Fri, 29 May 2020 13:11:50 +0000 (16:11 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 29 May 2020 14:55:42 +0000 (15:55 +0100)
commitde4c2875a5ff2c886df60f2086c6affca83f890a
treeb579db09868ce0b958a2ab88e5a38a7958a6a2ff
parentb7d73cb63cbac70746ee0d506aa2fa16b5dc75a0
spi: dw: Set xfer effective_speed_hz

Seeing DW APB SSI controller doesn't support setting the exactly
requested SPI bus frequency, but only a rounded frequency determined
by means of the odd-numbered half-worded reference clock divider,
it would be good to tune the SPI core up and initialize the current
transfer effective_speed_hz. By doing so the core will be able to
execute the xfer-related delays with better accuracy.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Cc: Georgy Vlasov <Georgy.Vlasov@baikalelectronics.ru>
Cc: Ramil Zaripov <Ramil.Zaripov@baikalelectronics.ru>
Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Feng Tang <feng.tang@intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: devicetree@vger.kernel.org
Link: https://lore.kernel.org/r/20200529131205.31838-2-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-dw.c