On 08/13/2016 09:56 AM, Jagan Teki wrote:
On 13 August 2016 at 02:36, Stephen Warren <swar...@wwwdotorg.org> wrote:
From: Stephen Warren <swar...@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.

I'd rather not re-structure the driver, and to be honest I see no point in mandating that drivers activate their clocks/resets in probe rather than solely during the actual SPI transaction.

Anyway, if the patch I sent isn't acceptable, please can you simply revert the patch it fixes so that SPI on Tegra works again? Thanks.

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to