diff options
Diffstat (limited to 'arch/arm/mach-msm/dma.c')
-rw-r--r-- | arch/arm/mach-msm/dma.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-msm/dma.c b/arch/arm/mach-msm/dma.c index 3d725ae518e4..02cae5e2951c 100644 --- a/arch/arm/mach-msm/dma.c +++ b/arch/arm/mach-msm/dma.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/completion.h> | ||
20 | #include <mach/dma.h> | 21 | #include <mach/dma.h> |
21 | 22 | ||
22 | #define MSM_DMOV_CHANNEL_COUNT 16 | 23 | #define MSM_DMOV_CHANNEL_COUNT 16 |
@@ -69,6 +70,8 @@ void msm_dmov_enqueue_cmd(unsigned id, struct msm_dmov_cmd *cmd) | |||
69 | writel(DMOV_CONFIG_IRQ_EN, DMOV_CONFIG(id)); | 70 | writel(DMOV_CONFIG_IRQ_EN, DMOV_CONFIG(id)); |
70 | } | 71 | } |
71 | #endif | 72 | #endif |
73 | if (cmd->execute_func) | ||
74 | cmd->execute_func(cmd); | ||
72 | PRINT_IO("msm_dmov_enqueue_cmd(%d), start command, status %x\n", id, status); | 75 | PRINT_IO("msm_dmov_enqueue_cmd(%d), start command, status %x\n", id, status); |
73 | list_add_tail(&cmd->list, &active_commands[id]); | 76 | list_add_tail(&cmd->list, &active_commands[id]); |
74 | if (!channel_active) | 77 | if (!channel_active) |
@@ -116,6 +119,7 @@ int msm_dmov_exec_cmd(unsigned id, unsigned int cmdptr) | |||
116 | 119 | ||
117 | cmd.dmov_cmd.cmdptr = cmdptr; | 120 | cmd.dmov_cmd.cmdptr = cmdptr; |
118 | cmd.dmov_cmd.complete_func = dmov_exec_cmdptr_complete_func; | 121 | cmd.dmov_cmd.complete_func = dmov_exec_cmdptr_complete_func; |
122 | cmd.dmov_cmd.execute_func = NULL; | ||
119 | cmd.id = id; | 123 | cmd.id = id; |
120 | init_completion(&cmd.complete); | 124 | init_completion(&cmd.complete); |
121 | 125 | ||
@@ -221,6 +225,8 @@ static irqreturn_t msm_datamover_irq_handler(int irq, void *dev_id) | |||
221 | cmd = list_entry(ready_commands[id].next, typeof(*cmd), list); | 225 | cmd = list_entry(ready_commands[id].next, typeof(*cmd), list); |
222 | list_del(&cmd->list); | 226 | list_del(&cmd->list); |
223 | list_add_tail(&cmd->list, &active_commands[id]); | 227 | list_add_tail(&cmd->list, &active_commands[id]); |
228 | if (cmd->execute_func) | ||
229 | cmd->execute_func(cmd); | ||
224 | PRINT_FLOW("msm_datamover_irq_handler id %d, start command\n", id); | 230 | PRINT_FLOW("msm_datamover_irq_handler id %d, start command\n", id); |
225 | writel(cmd->cmdptr, DMOV_CMD_PTR(id)); | 231 | writel(cmd->cmdptr, DMOV_CMD_PTR(id)); |
226 | } | 232 | } |