
On 13 August 2016 at 02:36, Stephen Warren swarren@wwwdotorg.org wrote:
From: Stephen Warren swarren@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.