
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?
Fixes: 5cb1b7b395c0 ("spi: tegra20: Add support for mode selection") Cc: Mirza Krak mirza.krak@hostmobility.com Signed-off-by: Stephen Warren swarren@nvidia.com
As far as I can tell, the fixed patch was never CC'd to any Tegra maintainer:-(
This patch was one of my first contributions to an open-source project and I might have missed a few steps, like CC the Tegra maintainers.
I know better now, sorry for any inconvenience caused by this.