Hello.

On 13-03-2011 17:34, Michael Williamson wrote:

> The current davinci SPI driver, in DMA mode, is limited to 65535
> words for a single transfer.  Modify the driver by configuring a
> 3 dimensional EDMA transfer to support up to 65535x65535
> words.

> Signed-off-by: Michael Williamson<[email protected]>
[...]

> diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
> index 037ba82..411cc32 100644
> --- a/drivers/spi/davinci_spi.c
> +++ b/drivers/spi/davinci_spi.c
[...]
> @@ -599,14 +600,30 @@ static int davinci_spi_bufs(struct spi_device *spi, 
> struct spi_transfer *t)
>                       }
>               }
>
> +             /*
> +              * If number of words is greater than 65535, then we need
> +              * to configure a 3 dimension transfer.  Use the BCNTRLD
> +              * feature to allow for transfers that aren't even multiples
> +              * of 65535 (or any other possible b size) by first transferring
> +              * the remainder amount then grabbing the next N blocks of
> +              * 65535 words.
> +              */
> +
> +             c = dspi->wcount/(SZ_64K-1);    /* N 65535 count Blocks */
> +             b = dspi->wcount-c*(SZ_64K-1);  /* Remainder */

    The driver style (and general Linux kernel style) assumes spaces around 
operators.

WRB, Sergei

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to