
2016-08-13 10:51 GMT+02:00 Mirza Krak mirza.krak@hostmobility.com:
2016-08-12 23:06 GMT+02:00 Stephen Warren swarren@wwwdotorg.org:
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().
This essentially reverts and re-implements the patch mentioned in the fixes tag below. I'm not sure how the original could ever have worked on any Tegra platform; it certainly breaks the only Tegra board I have that uses SPI.
Hi Stephen.
This has most definitely worked for me on both Tegra2 (colibri_t20) and Tegra3(colibri_t30). Though I am using a 2015.04 u-boot which was the release when I wrote this patch, and I haven't actually tried any later releases. Something happened along the way that "broke" it?
Looked in my u-boot source tree, and I see that I actually do the mode selection in claim_bus and not in set_mode, where I only cache the value (like your patch does).
I probably sent out the wrong patch file back then resulting in broken driver :(.