From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Thompson Date: Thu, 17 Jun 2010 17:14:28 +0100 Subject: [U-Boot] [PATCH] DaVinci: Improve DaVinci SPI speed. In-Reply-To: <0554BEF07D437848AF01B9C9B5F0BC5D9E9C6C64@dlee01.ent.ti.com> References: <340415CA-622C-4B15-93B9-5F49E7842263@audioscience.com> <4C1A391F.1060307@ge.com> <0554BEF07D437848AF01B9C9B5F0BC5D9E9C6C64@dlee01.ent.ti.com> Message-ID: <4C1A49E4.4050309@ge.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 17/06/10 16:10, Paulraj, Sandeep 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] >>> >>> Reduce the number of reads per byte transferred on the BUF register from >> 2 to 1 and >>> take advantage of the TX buffer in the SPI module. On LogicPD OMAP-L138 >> EVM, >>> SPI read throughput goes up from ~0.8Mbyte/s to ~1.3Mbyte/s. Tested with >> a 2Mbyte image file. >>> Remove unused variables in the spi_xfer() function. >>> >>> Signed-off-by: Delio Brignoli >>> Tested-by: Ben Gardiner >> >> Sorry, I'm a bit late to the party on this. > > It is late. Pull request already sent to Wolfgang >> >> 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. > > Compare it on your platform. I believe you have the OMAP L137. > And post the results. I don't have a scope to get an accurate measure. The best I can do right now is use a serial snooper to time between me pressing return and the next prompt turning up. To try and drown out inaccuracies and delays, I ran: sf read 0xc0008000 0 0x800000 So 8MiB in a reasonably consistent 5.62 - 5.63 seconds, which is about 1.49MiB/s by my reckoning. A bit faster, but way short of 6.25MiB/s. Nick.