]> git.baikalelectronics.ru Git - kernel.git/commit
spi: cadence: Fix busy cycles calculation
authorWitold Sadowski <wsadowski@marvell.com>
Mon, 19 Dec 2022 14:42:48 +0000 (06:42 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Feb 2023 07:34:28 +0000 (08:34 +0100)
commit09d867079a504c3b8ff289fd066b513caaaa72ce
treedfc2d4c213cfab344c18233cae416fe01546be7a
parent6e46f589b0900982a1676b7fbd9b5c5c77cc4b7f
spi: cadence: Fix busy cycles calculation

[ Upstream commit f19bad29aa63e6e15069de3d7cc686d7777f7422 ]

If xSPI is in x2/x4/x8 mode to calculate busy
cycles, busy bits count must be divided by the number
of lanes.
If opcommand is using 8 busy bits, but SPI is
in x4 mode, there will be only 2 busy cycles.

Signed-off-by: Witold Sadowski <wsadowski@marvell.com>
Reviewed-by: Chandrakala Chavva <cchavva@marvell.com>
Reviewed-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Link: https://lore.kernel.org/r/20221219144254.20883-2-wsadowski@marvell.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-cadence-xspi.c