[U-Boot] [PATCH] Davinci: SPI performance enhancements
Delio Brignoli
dbrignoli at audioscience.com
Mon Jun 21 20:38:42 CEST 2010
Hello Nick,
On 21/06/2010, at 11:27, Nick Thompson wrote:
> The following restructuring and optimisations increase the SPI
> read performance from 1.3MiB/s (on da850) to 2.87MiB/s (on da830):
Using this patch I get 2.21MiB/s on my L138 EVM (da850), quite
an improvement! I would like to see how much my original patch can
be improved using some of your changes without splitting the code
to handle the three cases. I will try later this week.
[...]
> + if (!dout)
> + return davinci_spi_read(slave, len, din, flags);
> + else if (!din)
> + return davinci_spi_write(slave, len, dout, flags);
> +#ifndef CONFIG_SPI_HALF_DUPLEX
> + else
> + return davinci_spi_read_write(slave, len, din, dout, flags);
> +#endif
I think there should always be an else branch at the end even if
CONFIG_SPI_HALF_DUPLEX is not defined. Something like:
#else
flags |= SPI_XFER_END;
#endif
to terminate the transfer instead of failing silently.
In fact it should signal the error condition somehow, but
I do not know enough about u-boot to provide an advice on this.
Thanks
--
Delio
More information about the U-Boot
mailing list