[U-Boot] [PATCH] DaVinci: Improve DaVinci SPI speed.

Delio Brignoli dbrignoli at audioscience.com
Thu Jun 17 19:38:31 CEST 2010


Hello Nick,

On 17/06/2010, at 17:02, Nick Thompson wrote:
> On 01/06/10 12:36, Delio Brignoli wrote:
>> I have updated this patch based on the comments [1] by Wolfgang Denk and 
>> removed unused variables.
>> [1][http://lists.denx.de/pipermail/u-boot/2010-May/071728.html]
[...]
> I have an alternative patch that tries to be even quicker, but I
> don't have the same platform as Delio, so can't compare like with
> like.

I will test your patch on my L138 and let you know.

> In essence, it splits up read and write operations to avoid testing
> pointers in every loop iteration. It also unrolls the last iteration
> so that it doesn't have to test for loop ending twice each time
> round. Finally it avoids bit setting/clearing on each iteration when
> the results would only turn out to be the same anyway.

I am wondering if it is OK to split reading and writing: when I wrote
the patch I assumed that spi_xfer() was supposed to be able to read and
write to two distinct buffers at the same time. As I understand it, your
patch allows spi_xfer() to be either a read or a write operation but not both 
and I do not know if this semantic change is acceptable. Maybe Sekhar or 
Sandeep can clarify this.

Thanks
--
Delio




More information about the U-Boot mailing list