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

Nori, Sekhar nsekhar at ti.com
Tue May 18 14:25:58 CEST 2010


Hi Delio,

On Thu, May 13, 2010 at 18:27:51, Delio Brignoli wrote:
> 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.

The patch looks good to me.

Can you please publish some sort of numbers in the
patch description indicating the performance improvement
achieved?

A minor nit below:

>
> Signed-off-by: Delio Brignoli <dbrignoli at audioscience.com>
> ---
>  drivers/spi/davinci_spi.c |   67 +++++++++++++++++++++++---------------------
>  1 files changed, 35 insertions(+), 32 deletions(-)
>
> diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
> index 60ba007..b4a74de 100644
> --- a/drivers/spi/davinci_spi.c
> +++ b/drivers/spi/davinci_spi.c
> @@ -131,6 +131,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
>  {

[...]

> +                     /* write to DAT1 is required to keep the serial transfer going */
> +                     /* we just terminate when we reach the end */
> +                     if((o_cnt == (len -1)) && (flags & SPI_XFER_END)) {

Please include a space before the '-'

Thanks,
Sekhar



More information about the U-Boot mailing list