All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: spi-devel-general@lists.sourceforge.net, rob@landley.net,
	rob.herring@calxeda.com
Cc: devicetree-discuss@lists.ozlabs.org,
	Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Tony Lindgren <tony@atomide.com>, Felipe Balbi <balbi@ti.com>
Subject: Re: [PATCH 1/2] spi: omap2: disable DMA requests before complete()
Date: Sat, 15 Dec 2012 00:35:39 +0000	[thread overview]
Message-ID: <20121215003539.40B933E0BEF@localhost> (raw)
In-Reply-To: <1355301960-21523-1-git-send-email-balbi@ti.com>

On Wed, 12 Dec 2012 10:45:59 +0200, Felipe Balbi <balbi@ti.com> wrote:
> No actual errors have been found for completing
> before disabling DMA request lines, but it just
> looks more semantically correct that on our DMA
> callback we quiesce the whole thing before stating
> transfer is finished.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>

Applied, thanks.

g.

> ---
>  drivers/spi/spi-omap2-mcspi.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
> index b610f52..68446db 100644
> --- a/drivers/spi/spi-omap2-mcspi.c
> +++ b/drivers/spi/spi-omap2-mcspi.c
> @@ -298,10 +298,10 @@ static void omap2_mcspi_rx_callback(void *data)
>  	struct omap2_mcspi *mcspi = spi_master_get_devdata(spi->master);
>  	struct omap2_mcspi_dma *mcspi_dma = &mcspi->dma_channels[spi->chip_select];
>  
> -	complete(&mcspi_dma->dma_rx_completion);
> -
>  	/* We must disable the DMA RX request */
>  	omap2_mcspi_set_dma_req(spi, 1, 0);
> +
> +	complete(&mcspi_dma->dma_rx_completion);
>  }
>  
>  static void omap2_mcspi_tx_callback(void *data)
> @@ -310,10 +310,10 @@ static void omap2_mcspi_tx_callback(void *data)
>  	struct omap2_mcspi *mcspi = spi_master_get_devdata(spi->master);
>  	struct omap2_mcspi_dma *mcspi_dma = &mcspi->dma_channels[spi->chip_select];
>  
> -	complete(&mcspi_dma->dma_tx_completion);
> -
>  	/* We must disable the DMA TX request */
>  	omap2_mcspi_set_dma_req(spi, 0, 0);
> +
> +	complete(&mcspi_dma->dma_tx_completion);
>  }
>  
>  static void omap2_mcspi_tx_dma(struct spi_device *spi,
> -- 
> 1.8.1.rc1.5.g7e0651a
> 

-- 
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.

WARNING: multiple messages have this Message-ID (diff)
From: Grant Likely <grant.likely@secretlab.ca>
To: Felipe Balbi <balbi@ti.com>,
	spi-devel-general@lists.sourceforge.net, rob@landley.net,
	rob.herring@calxeda.com
Cc: devicetree-discuss@lists.ozlabs.org,
	Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Tony Lindgren <tony@atomide.com>, Felipe Balbi <balbi@ti.com>
Subject: Re: [PATCH 1/2] spi: omap2: disable DMA requests before complete()
Date: Sat, 15 Dec 2012 00:35:39 +0000	[thread overview]
Message-ID: <20121215003539.40B933E0BEF@localhost> (raw)
In-Reply-To: <1355301960-21523-1-git-send-email-balbi@ti.com>

On Wed, 12 Dec 2012 10:45:59 +0200, Felipe Balbi <balbi@ti.com> wrote:
> No actual errors have been found for completing
> before disabling DMA request lines, but it just
> looks more semantically correct that on our DMA
> callback we quiesce the whole thing before stating
> transfer is finished.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>

Applied, thanks.

g.

> ---
>  drivers/spi/spi-omap2-mcspi.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
> index b610f52..68446db 100644
> --- a/drivers/spi/spi-omap2-mcspi.c
> +++ b/drivers/spi/spi-omap2-mcspi.c
> @@ -298,10 +298,10 @@ static void omap2_mcspi_rx_callback(void *data)
>  	struct omap2_mcspi *mcspi = spi_master_get_devdata(spi->master);
>  	struct omap2_mcspi_dma *mcspi_dma = &mcspi->dma_channels[spi->chip_select];
>  
> -	complete(&mcspi_dma->dma_rx_completion);
> -
>  	/* We must disable the DMA RX request */
>  	omap2_mcspi_set_dma_req(spi, 1, 0);
> +
> +	complete(&mcspi_dma->dma_rx_completion);
>  }
>  
>  static void omap2_mcspi_tx_callback(void *data)
> @@ -310,10 +310,10 @@ static void omap2_mcspi_tx_callback(void *data)
>  	struct omap2_mcspi *mcspi = spi_master_get_devdata(spi->master);
>  	struct omap2_mcspi_dma *mcspi_dma = &mcspi->dma_channels[spi->chip_select];
>  
> -	complete(&mcspi_dma->dma_tx_completion);
> -
>  	/* We must disable the DMA TX request */
>  	omap2_mcspi_set_dma_req(spi, 0, 0);
> +
> +	complete(&mcspi_dma->dma_tx_completion);
>  }
>  
>  static void omap2_mcspi_tx_dma(struct spi_device *spi,
> -- 
> 1.8.1.rc1.5.g7e0651a
> 

-- 
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.

  parent reply	other threads:[~2012-12-15  0:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-12  8:45 [PATCH 1/2] spi: omap2: disable DMA requests before complete() Felipe Balbi
2012-12-12  8:45 ` Felipe Balbi
2012-12-12  8:45 ` Felipe Balbi
     [not found] ` <1355301960-21523-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2012-12-12  8:46   ` [PATCH 2/2] spi: devicetree: add support for loopback mode Felipe Balbi
2012-12-12  8:46     ` Felipe Balbi
2012-12-12  8:46     ` Felipe Balbi
2012-12-15  0:32     ` Grant Likely
2012-12-15  0:32       ` Grant Likely
2012-12-15 14:55       ` Felipe Balbi
2012-12-15 14:55         ` Felipe Balbi
2012-12-16 21:14         ` Grant Likely
2012-12-16 21:14           ` Grant Likely
2012-12-15  0:35 ` Grant Likely [this message]
2012-12-15  0:35   ` [PATCH 1/2] spi: omap2: disable DMA requests before complete() 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=20121215003539.40B933E0BEF@localhost \
    --to=grant.likely@secretlab.ca \
    --cc=balbi@ti.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.net \
    --cc=spi-devel-general@lists.sourceforge.net \
    --cc=tony@atomide.com \
    /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.