[PATCH v2 5/6] spi: davinci: do not use DMA if transfer length is less than 16
Arnd Bergmann
arnd at arndb.de
Fri Feb 17 08:37:07 PST 2017
On Fri, Feb 17, 2017 at 11:38 AM, Frode Isaksen <fisaksen at baylibre.com> wrote:
> Higher bitrate and lower CPU load if using PIO in this case.
>
> Signed-off-by: Frode Isaksen <fisaksen at baylibre.com>
> ---
> drivers/spi/spi-davinci.c | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c
> index b69a370..826bff1 100644
> --- a/drivers/spi/spi-davinci.c
> +++ b/drivers/spi/spi-davinci.c
> @@ -110,6 +110,8 @@
> #define SPIDEF 0x4c
> #define SPIFMT0 0x50
>
> +#define DMA_MIN_BYTES 16
16 seems low as the cutoff. Have you found this experimentally and
tested that for e.g. 32
bytes there is actually an advantage in using DMA?
Arnd
More information about the linux-arm-kernel
mailing list