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

Mirza Krak mirza.krak at hostmobility.com
Sat Aug 13 11:09:49 CEST 2016


2016-08-13 10:51 GMT+02:00 Mirza Krak <mirza.krak at hostmobility.com>:
> 2016-08-12 23:06 GMT+02:00 Stephen Warren <swarren at wwwdotorg.org>:
>> 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().
>>
>> 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 :(.

-- 
Med Vänliga Hälsningar / Best Regards

*******************************************************************
Mirza Krak
Host Mobility AB
mirza.krak at hostmobility.com
Anders Personsgatan 12, 416 64 Göteborg
Sweden
http://www.hostmobility.com
Direct: +46 31 31 32 704
Phone: +46 31 31 32 700
Fax: +46 31 80 67 51
Mobile: +46 730 28 06 22
*******************************************************************


More information about the U-Boot mailing list