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)
committerMark Brown <broonie@kernel.org>
Mon, 22 Jun 2015 15:19:31 +0000 (16:19 +0100)
commit6a806a214af42ac951e2d85e64d1bf4463482e16
tree7ad49fc3971861c2df6fb53fd863db1431a34417
parentb787f68c36d49bb1d9236f403813641efa74a031
spi: img-spfi: fix support for speeds up to 1/4th input clock

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>
Cc: <stable@vger.kernel.org>
drivers/spi/spi-img-spfi.c