]> www.infradead.org Git - users/jedix/linux-maple.git/commit
spi: davinci: Adapt transfer's timeout to transfer's length
authorBastien Curutchet <bastien.curutchet@bootlin.com>
Wed, 28 Aug 2024 06:31:31 +0000 (08:31 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 28 Aug 2024 12:38:02 +0000 (13:38 +0100)
commit2fe6102bf01a5f4f48f211c2e5c8a274342fccb1
treee3ee95ef5653013ecf71750e89ae57088b3477bc
parent91232b00b1a5d2486770c72c51a752a77c7601b2
spi: davinci: Adapt transfer's timeout to transfer's length

The timeout used when waiting for transfer's completion is always set to
HZ. This isn't enough if a transfer is too large or if the bus speed is
too low.

Use the bus speed and the transfer length to calculate an appropriate
timeout

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Link: https://patch.msgid.link/20240828063131.10507-1-bastien.curutchet@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-davinci.c