* [PATCH 0/2] dmaengine: intel_mid_dma: minor fixes
@ 2012-01-31 10:48 Adrian Hunter
2012-01-31 10:48 ` [PATCH 1/2] dmaengine: intel_mid_dma: fix error status mask Adrian Hunter
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Adrian Hunter @ 2012-01-31 10:48 UTC (permalink / raw)
To: Vinod Koul; +Cc: Dan Williams, LKML, Adrian Hunter
Hi
Here are 2 minor fixes for intel_mid_dma.
Adrian Hunter (2):
dmaengine: intel_mid_dma: fix error status mask
dmaengine: intel_mid_dma: move pm_runtime_put
drivers/dma/intel_mid_dma.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
Regards
Adrian Hunter
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] dmaengine: intel_mid_dma: fix error status mask
2012-01-31 10:48 [PATCH 0/2] dmaengine: intel_mid_dma: minor fixes Adrian Hunter
@ 2012-01-31 10:48 ` Adrian Hunter
2012-02-06 11:39 ` Vinod Koul
2012-01-31 10:49 ` [PATCH 2/2] dmaengine: intel_mid_dma: move pm_runtime_put Adrian Hunter
2012-02-22 12:44 ` [PATCH 0/2] dmaengine: intel_mid_dma: minor fixes Vinod Koul
2 siblings, 1 reply; 6+ messages in thread
From: Adrian Hunter @ 2012-01-31 10:48 UTC (permalink / raw)
To: Vinod Koul; +Cc: Dan Williams, LKML, Adrian Hunter
The error status mask (MASK_ERR) has the same format as the other
masks (MASK_TFR, MASK_BLOCK etc) and must be cleared the same way.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
drivers/dma/intel_mid_dma.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c
index 74f70aa..512e2ab 100644
--- a/drivers/dma/intel_mid_dma.c
+++ b/drivers/dma/intel_mid_dma.c
@@ -1056,7 +1056,8 @@ static irqreturn_t intel_mid_dma_interrupt(int irq, void *data)
}
err_status &= mid->intr_mask;
if (err_status) {
- iowrite32(MASK_INTR_REG(err_status), mid->dma_base + MASK_ERR);
+ iowrite32((err_status << INT_MASK_WE),
+ mid->dma_base + MASK_ERR);
call_tasklet = 1;
}
if (call_tasklet)
--
1.7.6.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] dmaengine: intel_mid_dma: move pm_runtime_put
2012-01-31 10:48 [PATCH 0/2] dmaengine: intel_mid_dma: minor fixes Adrian Hunter
2012-01-31 10:48 ` [PATCH 1/2] dmaengine: intel_mid_dma: fix error status mask Adrian Hunter
@ 2012-01-31 10:49 ` Adrian Hunter
2012-02-22 12:44 ` [PATCH 0/2] dmaengine: intel_mid_dma: minor fixes Vinod Koul
2 siblings, 0 replies; 6+ messages in thread
From: Adrian Hunter @ 2012-01-31 10:49 UTC (permalink / raw)
To: Vinod Koul; +Cc: Dan Williams, LKML, Adrian Hunter
Move pm_runtime_put() to the end of intel_mid_dma_free_chan_resources()
because there is no sense in allowing runtime suspend while the driver
is still accessing the device.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
drivers/dma/intel_mid_dma.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c
index 512e2ab..923476d 100644
--- a/drivers/dma/intel_mid_dma.c
+++ b/drivers/dma/intel_mid_dma.c
@@ -832,7 +832,6 @@ static void intel_mid_dma_free_chan_resources(struct dma_chan *chan)
/*trying to free ch in use!!!!!*/
pr_err("ERR_MDMA: trying to free ch in use\n");
}
- pm_runtime_put(&mid->pdev->dev);
spin_lock_bh(&midc->lock);
midc->descs_allocated = 0;
list_for_each_entry_safe(desc, _desc, &midc->active_list, desc_node) {
@@ -853,6 +852,7 @@ static void intel_mid_dma_free_chan_resources(struct dma_chan *chan)
/* Disable CH interrupts */
iowrite32(MASK_INTR_REG(midc->ch_id), mid->dma_base + MASK_BLOCK);
iowrite32(MASK_INTR_REG(midc->ch_id), mid->dma_base + MASK_ERR);
+ pm_runtime_put(&mid->pdev->dev);
}
/**
--
1.7.6.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] dmaengine: intel_mid_dma: fix error status mask
2012-01-31 10:48 ` [PATCH 1/2] dmaengine: intel_mid_dma: fix error status mask Adrian Hunter
@ 2012-02-06 11:39 ` Vinod Koul
2012-02-06 11:51 ` Adrian Hunter
0 siblings, 1 reply; 6+ messages in thread
From: Vinod Koul @ 2012-02-06 11:39 UTC (permalink / raw)
To: Adrian Hunter; +Cc: Dan Williams, LKML
On Tue, 2012-01-31 at 12:48 +0200, Adrian Hunter wrote:
> The error status mask (MASK_ERR) has the same format as the other
> masks (MASK_TFR, MASK_BLOCK etc) and must be cleared the same way.
>
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/dma/intel_mid_dma.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c
> index 74f70aa..512e2ab 100644
> --- a/drivers/dma/intel_mid_dma.c
> +++ b/drivers/dma/intel_mid_dma.c
> @@ -1056,7 +1056,8 @@ static irqreturn_t intel_mid_dma_interrupt(int irq, void *data)
> }
> err_status &= mid->intr_mask;
> if (err_status) {
> - iowrite32(MASK_INTR_REG(err_status), mid->dma_base + MASK_ERR);
> + iowrite32((err_status << INT_MASK_WE),
> + mid->dma_base + MASK_ERR);
why not use the macro?
> call_tasklet = 1;
> }
> if (call_tasklet)
--
~Vinod
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] dmaengine: intel_mid_dma: fix error status mask
2012-02-06 11:39 ` Vinod Koul
@ 2012-02-06 11:51 ` Adrian Hunter
0 siblings, 0 replies; 6+ messages in thread
From: Adrian Hunter @ 2012-02-06 11:51 UTC (permalink / raw)
To: Vinod Koul; +Cc: Dan Williams, LKML
On 06/02/12 13:39, Vinod Koul wrote:
> On Tue, 2012-01-31 at 12:48 +0200, Adrian Hunter wrote:
>> The error status mask (MASK_ERR) has the same format as the other
>> masks (MASK_TFR, MASK_BLOCK etc) and must be cleared the same way.
>>
>> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
>> ---
>> drivers/dma/intel_mid_dma.c | 3 ++-
>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c
>> index 74f70aa..512e2ab 100644
>> --- a/drivers/dma/intel_mid_dma.c
>> +++ b/drivers/dma/intel_mid_dma.c
>> @@ -1056,7 +1056,8 @@ static irqreturn_t intel_mid_dma_interrupt(int irq, void *data)
>> }
>> err_status &= mid->intr_mask;
>> if (err_status) {
>> - iowrite32(MASK_INTR_REG(err_status), mid->dma_base + MASK_ERR);
>> + iowrite32((err_status << INT_MASK_WE),
>> + mid->dma_base + MASK_ERR);
> why not use the macro?
The parameter to the macro MASK_INTR_REG is the channel number.
err_status is not a channel number.
This is the same as the way it is done for MASK_TFR a few lines up.
>> call_tasklet = 1;
>> }
>> if (call_tasklet)
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] dmaengine: intel_mid_dma: minor fixes
2012-01-31 10:48 [PATCH 0/2] dmaengine: intel_mid_dma: minor fixes Adrian Hunter
2012-01-31 10:48 ` [PATCH 1/2] dmaengine: intel_mid_dma: fix error status mask Adrian Hunter
2012-01-31 10:49 ` [PATCH 2/2] dmaengine: intel_mid_dma: move pm_runtime_put Adrian Hunter
@ 2012-02-22 12:44 ` Vinod Koul
2 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2012-02-22 12:44 UTC (permalink / raw)
To: Adrian Hunter; +Cc: Dan Williams, LKML
On Tue, 2012-01-31 at 12:48 +0200, Adrian Hunter wrote:
> Hi
>
> Here are 2 minor fixes for intel_mid_dma.
>
>
> Adrian Hunter (2):
> dmaengine: intel_mid_dma: fix error status mask
> dmaengine: intel_mid_dma: move pm_runtime_put
>
> drivers/dma/intel_mid_dma.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
Applied, Thanks
--
~Vinod
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-02-22 12:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-31 10:48 [PATCH 0/2] dmaengine: intel_mid_dma: minor fixes Adrian Hunter
2012-01-31 10:48 ` [PATCH 1/2] dmaengine: intel_mid_dma: fix error status mask Adrian Hunter
2012-02-06 11:39 ` Vinod Koul
2012-02-06 11:51 ` Adrian Hunter
2012-01-31 10:49 ` [PATCH 2/2] dmaengine: intel_mid_dma: move pm_runtime_put Adrian Hunter
2012-02-22 12:44 ` [PATCH 0/2] dmaengine: intel_mid_dma: minor fixes Vinod Koul
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).