Skip to content
Snippets Groups Projects
Commit f7dd5370 authored by Marcin Wojtas's avatar Marcin Wojtas Committed by Jagan Teki
Browse files

spi: prevent overriding established bus settings


The SPI stack relies on a proper bus speed/mode configuration
by calling dm_spi_claim_bus(). However the hitherto code
allowed to accidentally override those settings in
the spi_get_bus_and_cs() routine.

The initially established speed could be discarded by using
the slave platdata, which turned out to be an issue on
the platforms whose slave maximum supported frequency
is not on par with the maximum frequency of the bus controller.

This patch fixes above issue by configuring the bus from
spi_get_bus_and_cs() only in case it was not done before.

Signed-off-by: default avatarMarcin Wojtas <mw@semihalf.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
Acked-by: default avatarJagan Teki <jagan@amarulasolutions.com>
parent 6954756a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment