]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: fsi: Fix clock running too fast
authorBrad Bishop <bradleyb@fuzziesquirrel.com>
Wed, 9 Sep 2020 22:28:53 +0000 (17:28 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:08:19 +0000 (10:08 +0100)
commit9300f536c77e5bf7085e75fc0ba940942dcab1b2
tree028040e3e580a4bf55d932548e94fede9e7e0db9
parent75d927fc55874b3098d6be8be0b4790a490bbe8f
spi: fsi: Fix clock running too fast

[ Upstream commit 0b546bbe9474ff23e6843916ad6d567f703b2396 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-fsi.c