commit "dm: spi: Avoid setting the speed with every transfer"

Rasmus Villemoes rasmus.villemoes at prevas.dk
Sun Dec 15 00:27:11 CET 2019


Hi

I'm wondering how commit 60e2809a84 (dm: spi: Avoid setting the speed
with every transfer) works. AFAIU, the currently selected speed is a
property of the SPI master, so suppose we have two slaves, A which has
max_hz = 10MHz and B which has max_hz = 20MHz. Now suppose we do
transfers to A, then B, then A again. The third time we still compute
speed = 10MHz, but since that matches what we cached in slave->speed, we
don't call spi_set_speed_mode(), hence we proceed to do the xfer with a
too large speed?

I'm probably missing something obvious here since the commit is more
than 4 years old.

Thanks,
Rasmus


More information about the U-Boot mailing list