]> www.infradead.org Git - users/jedix/linux-maple.git/commit
spi: img-spfi: fix support for speeds up to 1/4th input clock
authorSifan Naeem <sifan.naeem@imgtec.com>
Thu, 18 Jun 2015 12:50:54 +0000 (13:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Aug 2015 19:21:56 +0000 (12:21 -0700)
commit19ea7491d0b3555c333ceacaf489c51fa3d6e89e
tree64c7316951ed1bbf2ed9d6fa84c9e0702f7df792
parent4731b65de6b30b7a8e771c51e4fb4a53846f158e
spi: img-spfi: fix support for speeds up to 1/4th input clock

commit 6a806a214af42ac951e2d85e64d1bf4463482e16 upstream.

Setting the Same Edge bit indicates to the spfi block to receive and
transmit data on the same edge of the spfi clock, which in turn
doubles the operating frequency of spfi.

The maximum supported frequency is limited to 1/4th of the spfi input
clock, but without this bit set the maximum would be 1/8th of the
input clock.

The current driver calculates the divisor with maximum speed at 1/4th
of the input clock, this would fail if the requested frequency is
higher than 1/8 of the input clock. Any requests for 1/8th of the
input clock would still pass.

Fixes: 8543d0e72d43 ("spi: img-spfi: Limit bit clock to 1/4th of input clock")
Signed-off-by: Sifan Naeem <sifan.naeem@imgtec.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-img-spfi.c