aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/intel_mid_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/intel_mid_dma.c')
-rw-r--r--drivers/dma/intel_mid_dma.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c
index 8a3fdd87db9..19a0c64d45d 100644
--- a/drivers/dma/intel_mid_dma.c
+++ b/drivers/dma/intel_mid_dma.c
@@ -27,6 +27,7 @@
27#include <linux/interrupt.h> 27#include <linux/interrupt.h>
28#include <linux/pm_runtime.h> 28#include <linux/pm_runtime.h>
29#include <linux/intel_mid_dma.h> 29#include <linux/intel_mid_dma.h>
30#include <linux/module.h>
30 31
31#define MAX_CHAN 4 /*max ch across controllers*/ 32#define MAX_CHAN 4 /*max ch across controllers*/
32#include "intel_mid_dma_regs.h" 33#include "intel_mid_dma_regs.h"
@@ -115,16 +116,15 @@ DMAC1 interrupt Functions*/
115 116
116/** 117/**
117 * dmac1_mask_periphral_intr - mask the periphral interrupt 118 * dmac1_mask_periphral_intr - mask the periphral interrupt
118 * @midc: dma channel for which masking is required 119 * @mid: dma device for which masking is required
119 * 120 *
120 * Masks the DMA periphral interrupt 121 * Masks the DMA periphral interrupt
121 * this is valid for DMAC1 family controllers only 122 * this is valid for DMAC1 family controllers only
122 * This controller should have periphral mask registers already mapped 123 * This controller should have periphral mask registers already mapped
123 */ 124 */
124static void dmac1_mask_periphral_intr(struct intel_mid_dma_chan *midc) 125static void dmac1_mask_periphral_intr(struct middma_device *mid)
125{ 126{
126 u32 pimr; 127 u32 pimr;
127 struct middma_device *mid = to_middma_device(midc->chan.device);
128 128
129 if (mid->pimr_mask) { 129 if (mid->pimr_mask) {
130 pimr = readl(mid->mask_reg + LNW_PERIPHRAL_MASK); 130 pimr = readl(mid->mask_reg + LNW_PERIPHRAL_MASK);
@@ -184,7 +184,6 @@ static void enable_dma_interrupt(struct intel_mid_dma_chan *midc)
184static void disable_dma_interrupt(struct intel_mid_dma_chan *midc) 184static void disable_dma_interrupt(struct intel_mid_dma_chan *midc)
185{ 185{
186 /*Check LPE PISR, make sure fwd is disabled*/ 186 /*Check LPE PISR, make sure fwd is disabled*/
187 dmac1_mask_periphral_intr(midc);
188 iowrite32(MASK_INTR_REG(midc->ch_id), midc->dma_base + MASK_BLOCK); 187 iowrite32(MASK_INTR_REG(midc->ch_id), midc->dma_base + MASK_BLOCK);
189 iowrite32(MASK_INTR_REG(midc->ch_id), midc->dma_base + MASK_TFR); 188 iowrite32(MASK_INTR_REG(midc->ch_id), midc->dma_base + MASK_TFR);
190 iowrite32(MASK_INTR_REG(midc->ch_id), midc->dma_base + MASK_ERR); 189 iowrite32(MASK_INTR_REG(midc->ch_id), midc->dma_base + MASK_ERR);
@@ -1114,7 +1113,6 @@ static int mid_setup_dma(struct pci_dev *pdev)
1114 1113
1115 midch->chan.device = &dma->common; 1114 midch->chan.device = &dma->common;
1116 midch->chan.cookie = 1; 1115 midch->chan.cookie = 1;
1117 midch->chan.chan_id = i;
1118 midch->ch_id = dma->chan_base + i; 1116 midch->ch_id = dma->chan_base + i;
1119 pr_debug("MDMA:Init CH %d, ID %d\n", i, midch->ch_id); 1117 pr_debug("MDMA:Init CH %d, ID %d\n", i, midch->ch_id);
1120 1118
@@ -1150,7 +1148,6 @@ static int mid_setup_dma(struct pci_dev *pdev)
1150 dma_cap_set(DMA_SLAVE, dma->common.cap_mask); 1148 dma_cap_set(DMA_SLAVE, dma->common.cap_mask);
1151 dma_cap_set(DMA_PRIVATE, dma->common.cap_mask); 1149 dma_cap_set(DMA_PRIVATE, dma->common.cap_mask);
1152 dma->common.dev = &pdev->dev; 1150 dma->common.dev = &pdev->dev;
1153 dma->common.chancnt = dma->max_chan;
1154 1151
1155 dma->common.device_alloc_chan_resources = 1152 dma->common.device_alloc_chan_resources =
1156 intel_mid_dma_alloc_chan_resources; 1153 intel_mid_dma_alloc_chan_resources;
@@ -1350,6 +1347,7 @@ int dma_suspend(struct pci_dev *pci, pm_message_t state)
1350 if (device->ch[i].in_use) 1347 if (device->ch[i].in_use)
1351 return -EAGAIN; 1348 return -EAGAIN;
1352 } 1349 }
1350 dmac1_mask_periphral_intr(device);
1353 device->state = SUSPENDED; 1351 device->state = SUSPENDED;
1354 pci_save_state(pci); 1352 pci_save_state(pci);
1355 pci_disable_device(pci); 1353 pci_disable_device(pci);