spi: fsi: Fix clock running too fast
authorBrad Bishop <bradleyb@fuzziesquirrel.com>
Wed, 9 Sep 2020 22:28:53 +0000 (17:28 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 17 Sep 2020 18:31:40 +0000 (19:31 +0100)
commit0b546bbe9474ff23e6843916ad6d567f703b2396
treee9b67d7872b62b23f6109f7109b7c92ab2fe34ac
parent2b3cef0fc757bd06ed9b83bd4c436bfa55f47370
spi: fsi: Fix clock running too fast

Use a clock divider tuned to a 200MHz FSI bus frequency (the maximum). Use
of the previous divider at 200MHz results in corrupt data from endpoint
devices. Ideally the clock divider would be calculated from the FSI clock,
but that would require some significant work on the FSI driver. With FSI
frequencies slower than 200MHz, the SPI clock will simply run slower, but
safely.

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Link: https://lore.kernel.org/r/20200909222857.28653-3-eajames@linux.ibm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsi.c