[U-Boot] [PATCH] spi: tegra20: fix mode selection logic

Jagan Teki jagannadh.teki at gmail.com
Sat Aug 13 17:56:26 CEST 2016


On 13 August 2016 at 02:36, Stephen Warren <swarren at wwwdotorg.org> wrote:
> From: Stephen Warren <swarren at nvidia.com>
>
> When the set_mode() function runs, the SPI bus is not active, and hence
> the clocks to the SPI controller are not running. Any register read/write
> at this time will hang the CPU. Remove the code from set_mode() that does
> this, and move it to the correct place in claim_bus().

The idea of claim_bus is just to enable the bus for any transaction to
start, since set_mode is running before claim (ex: spi_get_bus_and_cs
while 'sf probe') it's .probe which actual driver binding
responsibility to initialize the SPI bus so-that .set_mode and
.set_speed will set the mode and freq for that initialized bus based
on the inputs from user, drivers like zynq, exynos will follow the
same.

-- 
Jagan.


More information about the U-Boot mailing list