From: Sergei Shtylyov <sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
To: Michael Williamson
<michael.williamson-wZX4cNJlHJ2sVWG7oymsAA@public.gmane.org>
Cc: khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org,
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org,
grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 1/3] davinci: spi: move event_q parameter to platform data
Date: Fri, 04 Feb 2011 15:03:43 +0300 [thread overview]
Message-ID: <4D4BEB1F.6060200@mvista.com> (raw)
In-Reply-To: <1296779690-9723-2-git-send-email-michael.williamson-wZX4cNJlHJ2sVWG7oymsAA@public.gmane.org>
Hello.
On 04-02-2011 3:34, Michael Williamson wrote:
> For DMA operation, the davinci spi driver needs an eventq number.
> Currently, this number is passed as a IORESOURCE_DMA. This is not
> correct, as the eventq is not a DMA channel. Pass the eventq
> via the platform data structure instead.
> Signed-off-by: Michael Williamson<michael.williamson-wZX4cNJlHJ2sVWG7oymsAA@public.gmane.org>
[...]
> diff --git a/arch/arm/mach-davinci/include/mach/spi.h b/arch/arm/mach-davinci/include/mach/spi.h
> index 38f4da5..0853a5f 100644
> --- a/arch/arm/mach-davinci/include/mach/spi.h
> +++ b/arch/arm/mach-davinci/include/mach/spi.h
[...]
> @@ -39,13 +41,16 @@ enum {
> * to populate if all chip-selects are internal.
> * @cshold_bug: set this to true if the SPI controller on your chip requires
> * a write to CSHOLD bit in between transfers (like in DM355).
> + * @dma_event_q: DMA event_q to use if SPI_IO_TYPE_DMA is used for any device
s/event_q/event queue/?
> + * on the bus.
> */
> struct davinci_spi_platform_data {
> - u8 version;
> - u8 num_chipselect;
> - u8 intr_line;
> - u8 *chip_sel;
> - bool cshold_bug;
> + u8 version;
> + u8 num_chipselect;
> + u8 intr_line;
> + u8 *chip_sel;
> + bool cshold_bug;
> + enum dma_event_q dma_event_q;
> };
>
> /**
> diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
> index 6beab99..166a879 100644
> --- a/drivers/spi/davinci_spi.c
> +++ b/drivers/spi/davinci_spi.c
[...]
> @@ -878,17 +877,13 @@ static int davinci_spi_probe(struct platform_device *pdev)
> r = platform_get_resource(pdev, IORESOURCE_DMA, 1);
> if (r)
> dma_tx_chan = r->start;
> - r = platform_get_resource(pdev, IORESOURCE_DMA, 2);
> - if (r)
> - dma_eventq = r->start;
>
> dspi->bitbang.txrx_bufs = davinci_spi_bufs;
> if (dma_rx_chan != SPI_NO_RESOURCE&&
> - dma_tx_chan != SPI_NO_RESOURCE&&
> - dma_eventq != SPI_NO_RESOURCE) {
> + dma_tx_chan != SPI_NO_RESOURCE) {
> dspi->dma.rx_channel = dma_rx_chan;
> dspi->dma.tx_channel = dma_tx_chan;
> - dspi->dma.eventq = dma_eventq;
> + dspi->dma.eventq = pdata->dma_event_q;
It makes sense to merge this patch with the patches 2 and 3 as otherwise
the bisectability is prevented for DM3[56]5 -- their 'dma_event_q' field will
be anonymously initialized to 0 after this patch but should be 1 and 3 instead
correspondingly. Although, this doesn't seem to be a fatal defect, so the
patches can be kept separate... Don't know what's better.
WBR, Sergei
WARNING: multiple messages have this Message-ID (diff)
From: sshtylyov@mvista.com (Sergei Shtylyov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] davinci: spi: move event_q parameter to platform data
Date: Fri, 04 Feb 2011 15:03:43 +0300 [thread overview]
Message-ID: <4D4BEB1F.6060200@mvista.com> (raw)
In-Reply-To: <1296779690-9723-2-git-send-email-michael.williamson@criticallink.com>
Hello.
On 04-02-2011 3:34, Michael Williamson wrote:
> For DMA operation, the davinci spi driver needs an eventq number.
> Currently, this number is passed as a IORESOURCE_DMA. This is not
> correct, as the eventq is not a DMA channel. Pass the eventq
> via the platform data structure instead.
> Signed-off-by: Michael Williamson<michael.williamson@criticallink.com>
[...]
> diff --git a/arch/arm/mach-davinci/include/mach/spi.h b/arch/arm/mach-davinci/include/mach/spi.h
> index 38f4da5..0853a5f 100644
> --- a/arch/arm/mach-davinci/include/mach/spi.h
> +++ b/arch/arm/mach-davinci/include/mach/spi.h
[...]
> @@ -39,13 +41,16 @@ enum {
> * to populate if all chip-selects are internal.
> * @cshold_bug: set this to true if the SPI controller on your chip requires
> * a write to CSHOLD bit in between transfers (like in DM355).
> + * @dma_event_q: DMA event_q to use if SPI_IO_TYPE_DMA is used for any device
s/event_q/event queue/?
> + * on the bus.
> */
> struct davinci_spi_platform_data {
> - u8 version;
> - u8 num_chipselect;
> - u8 intr_line;
> - u8 *chip_sel;
> - bool cshold_bug;
> + u8 version;
> + u8 num_chipselect;
> + u8 intr_line;
> + u8 *chip_sel;
> + bool cshold_bug;
> + enum dma_event_q dma_event_q;
> };
>
> /**
> diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
> index 6beab99..166a879 100644
> --- a/drivers/spi/davinci_spi.c
> +++ b/drivers/spi/davinci_spi.c
[...]
> @@ -878,17 +877,13 @@ static int davinci_spi_probe(struct platform_device *pdev)
> r = platform_get_resource(pdev, IORESOURCE_DMA, 1);
> if (r)
> dma_tx_chan = r->start;
> - r = platform_get_resource(pdev, IORESOURCE_DMA, 2);
> - if (r)
> - dma_eventq = r->start;
>
> dspi->bitbang.txrx_bufs = davinci_spi_bufs;
> if (dma_rx_chan != SPI_NO_RESOURCE&&
> - dma_tx_chan != SPI_NO_RESOURCE&&
> - dma_eventq != SPI_NO_RESOURCE) {
> + dma_tx_chan != SPI_NO_RESOURCE) {
> dspi->dma.rx_channel = dma_rx_chan;
> dspi->dma.tx_channel = dma_tx_chan;
> - dspi->dma.eventq = dma_eventq;
> + dspi->dma.eventq = pdata->dma_event_q;
It makes sense to merge this patch with the patches 2 and 3 as otherwise
the bisectability is prevented for DM3[56]5 -- their 'dma_event_q' field will
be anonymously initialized to 0 after this patch but should be 1 and 3 instead
correspondingly. Although, this doesn't seem to be a fatal defect, so the
patches can be kept separate... Don't know what's better.
WBR, Sergei
next prev parent reply other threads:[~2011-02-04 12:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-04 0:34 [PATCH 0/3] spi: davinci: move eventq parameter to platform data Michael Williamson
2011-02-04 0:34 ` Michael Williamson
2011-02-04 0:34 ` [PATCH 1/3] davinci: spi: move event_q " Michael Williamson
2011-02-04 0:34 ` Michael Williamson
[not found] ` <1296779690-9723-2-git-send-email-michael.williamson-wZX4cNJlHJ2sVWG7oymsAA@public.gmane.org>
2011-02-04 12:03 ` Sergei Shtylyov [this message]
2011-02-04 12:03 ` Sergei Shtylyov
[not found] ` <4D4BEB1F.6060200-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
2011-02-04 12:27 ` Michael Williamson
2011-02-04 12:27 ` Michael Williamson
2011-02-04 0:34 ` [PATCH 2/3] davinci: dm355: move spi0 eventq assignment from resources " Michael Williamson
2011-02-04 0:34 ` Michael Williamson
2011-02-04 0:34 ` [PATCH 3/3] davinci: dm365: " Michael Williamson
2011-02-04 0:34 ` Michael Williamson
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=4D4BEB1F.6060200@mvista.com \
--to=sshtylyov-igf4poytycdqt0dzr+alfa@public.gmane.org \
--cc=davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.