aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorBrian Swetland <swetland@google.com>2009-08-19 21:49:45 -0400
committerDaniel Walker <dwalker@codeaurora.org>2010-05-12 12:14:17 -0400
commit9f68fcdb8f9b0f55830f58b02cecc5c26b0ba17b (patch)
treee3b4bae4afbaeefe6352675e51d12a57623929c4 /arch/arm
parentc5541079da3cd19626410d59455d3e0f34d65943 (diff)
msm: add dsb() syncronization to datamover driver
Avoids problems on the scorpion core. Signed-off-by: Brian Swetland <swetland@google.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-msm/dma.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-msm/dma.c b/arch/arm/mach-msm/dma.c
index e80cad468925..3d725ae518e4 100644
--- a/arch/arm/mach-msm/dma.c
+++ b/arch/arm/mach-msm/dma.c
@@ -59,6 +59,7 @@ void msm_dmov_enqueue_cmd(unsigned id, struct msm_dmov_cmd *cmd)
59 spin_lock_irqsave(&msm_dmov_lock, irq_flags); 59 spin_lock_irqsave(&msm_dmov_lock, irq_flags);
60 if (!channel_active) 60 if (!channel_active)
61 clk_enable(msm_dmov_clk); 61 clk_enable(msm_dmov_clk);
62 dsb();
62 status = readl(DMOV_STATUS(id)); 63 status = readl(DMOV_STATUS(id));
63 if (list_empty(&ready_commands[id]) && 64 if (list_empty(&ready_commands[id]) &&
64 (status & DMOV_STATUS_CMD_PTR_RDY)) { 65 (status & DMOV_STATUS_CMD_PTR_RDY)) {
@@ -172,6 +173,7 @@ static irqreturn_t msm_datamover_irq_handler(int irq, void *dev_id)
172 "for %p, result %x\n", id, cmd, ch_result); 173 "for %p, result %x\n", id, cmd, ch_result);
173 if (cmd) { 174 if (cmd) {
174 list_del(&cmd->list); 175 list_del(&cmd->list);
176 dsb();
175 cmd->complete_func(cmd, ch_result, NULL); 177 cmd->complete_func(cmd, ch_result, NULL);
176 } 178 }
177 } 179 }
@@ -188,6 +190,7 @@ static irqreturn_t msm_datamover_irq_handler(int irq, void *dev_id)
188 PRINT_FLOW("msm_datamover_irq_handler id %d, flush, result %x, flush0 %x\n", id, ch_result, errdata.flush[0]); 190 PRINT_FLOW("msm_datamover_irq_handler id %d, flush, result %x, flush0 %x\n", id, ch_result, errdata.flush[0]);
189 if (cmd) { 191 if (cmd) {
190 list_del(&cmd->list); 192 list_del(&cmd->list);
193 dsb();
191 cmd->complete_func(cmd, ch_result, &errdata); 194 cmd->complete_func(cmd, ch_result, &errdata);
192 } 195 }
193 } 196 }
@@ -205,6 +208,7 @@ static irqreturn_t msm_datamover_irq_handler(int irq, void *dev_id)
205 PRINT_ERROR("msm_datamover_irq_handler id %d, error, result %x, flush0 %x\n", id, ch_result, errdata.flush[0]); 208 PRINT_ERROR("msm_datamover_irq_handler id %d, error, result %x, flush0 %x\n", id, ch_result, errdata.flush[0]);
206 if (cmd) { 209 if (cmd) {
207 list_del(&cmd->list); 210 list_del(&cmd->list);
211 dsb();
208 cmd->complete_func(cmd, ch_result, &errdata); 212 cmd->complete_func(cmd, ch_result, &errdata);
209 } 213 }
210 /* this does not seem to work, once we get an error */ 214 /* this does not seem to work, once we get an error */