]> www.infradead.org Git - users/jedix/linux-maple.git/commit
spi: orion: Fix maximum baud rates for Armada 370/XP
authorGregory CLEMENT <gregory.clement@free-electrons.com>
Tue, 26 May 2015 09:44:42 +0000 (11:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Jul 2015 17:10:04 +0000 (10:10 -0700)
commit46afcceeebddd0f6e1d328c9c9c93059adffdf08
tree9cd20c457dc470a52a4d0e630447f176983124cf
parent927973d93be4524ad25518e0e3412cd27d425e29
spi: orion: Fix maximum baud rates for Armada 370/XP

commit ce2f6ea1cbd41d78224f703af980a6ceeb0eb56a upstream.

The commit df59fa7f4bca "spi: orion: support armada extended baud
rates" was too optimistic for the maximum baud rate that the Armada
SoCs can support. According to the hardware datasheet the maximum
frequency supported by the Armada 370 SoC is tclk/4. But for the
Armada XP, Armada 38x and Armada 39x SoCs the limitation is 50MHz and
for the Armada 375 it is tclk/15.

Currently the armada-370-spi compatible is only used by the Armada 370
and the Armada XP device tree. On Armada 370, tclk cannot be higher
than 200MHz. In order to be able to handle both SoCs, we can take the
minimum of 50MHz and tclk/4.

A proper solution is adding a compatible string for each SoC, but it
can't be done as a fix for compatibility reason (we can't modify
device tree that have been already released) and it will be part of a
separate patch.

Fixes: df59fa7f4bca (spi: orion: support armada extended baud rates)
Reported-by: Kostya Porotchkin <kostap@marvell.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-orion.c