From: Sergei Shtylyov <sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
To: Michael Williamson
<michael.williamson-wZX4cNJlHJ2sVWG7oymsAA@public.gmane.org>
Cc: grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org,
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org,
dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH] spi: davinci: Support DMA transfers larger than 65535 words
Date: Mon, 14 Mar 2011 13:25:11 +0300 [thread overview]
Message-ID: <4D7DED07.7020000@mvista.com> (raw)
In-Reply-To: <1300026862-1179-2-git-send-email-michael.williamson-wZX4cNJlHJ2sVWG7oymsAA@public.gmane.org>
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<michael.williamson-wZX4cNJlHJ2sVWG7oymsAA@public.gmane.org>
[...]
> 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
next prev parent reply other threads:[~2011-03-14 10:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-13 14:34 [PATCH] spi: davinci: Use correct length parameter to dma_map_single calls Michael Williamson
[not found] ` <1300026862-1179-1-git-send-email-michael.williamson-wZX4cNJlHJ2sVWG7oymsAA@public.gmane.org>
2011-03-13 14:34 ` [PATCH] spi: davinci: Support DMA transfers larger than 65535 words Michael Williamson
[not found] ` <1300026862-1179-2-git-send-email-michael.williamson-wZX4cNJlHJ2sVWG7oymsAA@public.gmane.org>
2011-03-14 9:33 ` Stefano Babic
2011-03-14 10:25 ` Sergei Shtylyov [this message]
[not found] ` <4D7DED07.7020000-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
2011-03-14 11:06 ` Michael Williamson
2011-03-14 19:18 ` [PATCH] spi: davinci: Use correct length parameter to dma_map_single calls Grant Likely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D7DED07.7020000@mvista.com \
--to=sshtylyov-igf4poytycdqt0dzr+alfa@public.gmane.org \
--cc=davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org \
--cc=dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=michael.williamson-wZX4cNJlHJ2sVWG7oymsAA@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).