Re: [PATCH 1/2] spi: omap2: disable DMA requests before complete()

2012-12-14 Thread Grant Likely
On Wed, 12 Dec 2012 10:45:59 +0200, Felipe Balbi  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 

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 = 
> >dma_channels[spi->chip_select];
>  
> - complete(_dma->dma_rx_completion);
> -
>   /* We must disable the DMA RX request */
>   omap2_mcspi_set_dma_req(spi, 1, 0);
> +
> + complete(_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 = 
> >dma_channels[spi->chip_select];
>  
> - complete(_dma->dma_tx_completion);
> -
>   /* We must disable the DMA TX request */
>   omap2_mcspi_set_dma_req(spi, 0, 0);
> +
> + complete(_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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/2] spi: omap2: disable DMA requests before complete()

2012-12-14 Thread Grant Likely
On Wed, 12 Dec 2012 10:45:59 +0200, Felipe Balbi ba...@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 ba...@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.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/2] spi: omap2: disable DMA requests before complete()

2012-12-12 Thread Felipe Balbi
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 
---
 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 = 
>dma_channels[spi->chip_select];
 
-   complete(_dma->dma_rx_completion);
-
/* We must disable the DMA RX request */
omap2_mcspi_set_dma_req(spi, 1, 0);
+
+   complete(_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 = 
>dma_channels[spi->chip_select];
 
-   complete(_dma->dma_tx_completion);
-
/* We must disable the DMA TX request */
omap2_mcspi_set_dma_req(spi, 0, 0);
+
+   complete(_dma->dma_tx_completion);
 }
 
 static void omap2_mcspi_tx_dma(struct spi_device *spi,
-- 
1.8.1.rc1.5.g7e0651a

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/2] spi: omap2: disable DMA requests before complete()

2012-12-12 Thread Felipe Balbi
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 ba...@ti.com
---
 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

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/