Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 1 | /* linux/arch/arm/mach-msm/dma.c |
| 2 | * |
| 3 | * Copyright (C) 2007 Google, Inc. |
| 4 | * |
| 5 | * This software is licensed under the terms of the GNU General Public |
| 6 | * License version 2, as published by the Free Software Foundation, and |
| 7 | * may be copied, distributed, and modified under those terms. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | */ |
| 15 | |
Arve Hjønnevåg | c554107 | 2009-06-25 17:03:14 -0700 | [diff] [blame] | 16 | #include <linux/clk.h> |
| 17 | #include <linux/err.h> |
Russell King | fced80c | 2008-09-06 12:10:45 +0100 | [diff] [blame] | 18 | #include <linux/io.h> |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 19 | #include <linux/interrupt.h> |
Daniel Walker | 6d7b7d5 | 2010-05-20 15:39:33 -0700 | [diff] [blame] | 20 | #include <linux/completion.h> |
Arnd Bergmann | 404ed59 | 2014-03-19 18:29:36 +0100 | [diff] [blame] | 21 | #include <linux/module.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 22 | #include <mach/dma.h> |
Stephen Boyd | 430f1ee | 2013-03-04 15:08:25 -0800 | [diff] [blame] | 23 | #include <mach/msm_iomap.h> |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 24 | |
| 25 | #define MSM_DMOV_CHANNEL_COUNT 16 |
| 26 | |
Stephen Boyd | 430f1ee | 2013-03-04 15:08:25 -0800 | [diff] [blame] | 27 | #define DMOV_SD0(off, ch) (MSM_DMOV_BASE + 0x0000 + (off) + ((ch) << 2)) |
| 28 | #define DMOV_SD1(off, ch) (MSM_DMOV_BASE + 0x0400 + (off) + ((ch) << 2)) |
| 29 | #define DMOV_SD2(off, ch) (MSM_DMOV_BASE + 0x0800 + (off) + ((ch) << 2)) |
| 30 | #define DMOV_SD3(off, ch) (MSM_DMOV_BASE + 0x0C00 + (off) + ((ch) << 2)) |
| 31 | |
| 32 | #if defined(CONFIG_ARCH_MSM7X30) |
| 33 | #define DMOV_SD_AARM DMOV_SD2 |
| 34 | #else |
| 35 | #define DMOV_SD_AARM DMOV_SD3 |
| 36 | #endif |
| 37 | |
| 38 | #define DMOV_CMD_PTR(ch) DMOV_SD_AARM(0x000, ch) |
| 39 | #define DMOV_RSLT(ch) DMOV_SD_AARM(0x040, ch) |
| 40 | #define DMOV_FLUSH0(ch) DMOV_SD_AARM(0x080, ch) |
| 41 | #define DMOV_FLUSH1(ch) DMOV_SD_AARM(0x0C0, ch) |
| 42 | #define DMOV_FLUSH2(ch) DMOV_SD_AARM(0x100, ch) |
| 43 | #define DMOV_FLUSH3(ch) DMOV_SD_AARM(0x140, ch) |
| 44 | #define DMOV_FLUSH4(ch) DMOV_SD_AARM(0x180, ch) |
| 45 | #define DMOV_FLUSH5(ch) DMOV_SD_AARM(0x1C0, ch) |
| 46 | |
| 47 | #define DMOV_STATUS(ch) DMOV_SD_AARM(0x200, ch) |
| 48 | #define DMOV_ISR DMOV_SD_AARM(0x380, 0) |
| 49 | |
| 50 | #define DMOV_CONFIG(ch) DMOV_SD_AARM(0x300, ch) |
| 51 | |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 52 | enum { |
| 53 | MSM_DMOV_PRINT_ERRORS = 1, |
| 54 | MSM_DMOV_PRINT_IO = 2, |
| 55 | MSM_DMOV_PRINT_FLOW = 4 |
| 56 | }; |
| 57 | |
| 58 | static DEFINE_SPINLOCK(msm_dmov_lock); |
Arve Hjønnevåg | c554107 | 2009-06-25 17:03:14 -0700 | [diff] [blame] | 59 | static struct clk *msm_dmov_clk; |
Brian Swetland | 8a0f6f1 | 2008-09-10 14:58:25 -0700 | [diff] [blame] | 60 | static unsigned int channel_active; |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 61 | static struct list_head ready_commands[MSM_DMOV_CHANNEL_COUNT]; |
| 62 | static struct list_head active_commands[MSM_DMOV_CHANNEL_COUNT]; |
| 63 | unsigned int msm_dmov_print_mask = MSM_DMOV_PRINT_ERRORS; |
| 64 | |
| 65 | #define MSM_DMOV_DPRINTF(mask, format, args...) \ |
| 66 | do { \ |
| 67 | if ((mask) & msm_dmov_print_mask) \ |
| 68 | printk(KERN_ERR format, args); \ |
| 69 | } while (0) |
| 70 | #define PRINT_ERROR(format, args...) \ |
| 71 | MSM_DMOV_DPRINTF(MSM_DMOV_PRINT_ERRORS, format, args); |
| 72 | #define PRINT_IO(format, args...) \ |
| 73 | MSM_DMOV_DPRINTF(MSM_DMOV_PRINT_IO, format, args); |
| 74 | #define PRINT_FLOW(format, args...) \ |
| 75 | MSM_DMOV_DPRINTF(MSM_DMOV_PRINT_FLOW, format, args); |
| 76 | |
Brian Swetland | 8a0f6f1 | 2008-09-10 14:58:25 -0700 | [diff] [blame] | 77 | void msm_dmov_stop_cmd(unsigned id, struct msm_dmov_cmd *cmd, int graceful) |
| 78 | { |
| 79 | writel((graceful << 31), DMOV_FLUSH0(id)); |
| 80 | } |
Arnd Bergmann | b25a791 | 2014-03-15 11:39:30 +0100 | [diff] [blame] | 81 | EXPORT_SYMBOL_GPL(msm_dmov_stop_cmd); |
Brian Swetland | 8a0f6f1 | 2008-09-10 14:58:25 -0700 | [diff] [blame] | 82 | |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 83 | void msm_dmov_enqueue_cmd(unsigned id, struct msm_dmov_cmd *cmd) |
| 84 | { |
| 85 | unsigned long irq_flags; |
| 86 | unsigned int status; |
| 87 | |
| 88 | spin_lock_irqsave(&msm_dmov_lock, irq_flags); |
Arve Hjønnevåg | c554107 | 2009-06-25 17:03:14 -0700 | [diff] [blame] | 89 | if (!channel_active) |
| 90 | clk_enable(msm_dmov_clk); |
Brian Swetland | 9f68fcd | 2009-08-19 18:49:45 -0700 | [diff] [blame] | 91 | dsb(); |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 92 | status = readl(DMOV_STATUS(id)); |
| 93 | if (list_empty(&ready_commands[id]) && |
| 94 | (status & DMOV_STATUS_CMD_PTR_RDY)) { |
| 95 | #if 0 |
| 96 | if (list_empty(&active_commands[id])) { |
| 97 | PRINT_FLOW("msm_dmov_enqueue_cmd(%d), enable interrupt\n", id); |
| 98 | writel(DMOV_CONFIG_IRQ_EN, DMOV_CONFIG(id)); |
| 99 | } |
| 100 | #endif |
San Mehat | 5b00f40 | 2009-11-21 09:22:14 -0800 | [diff] [blame] | 101 | if (cmd->execute_func) |
| 102 | cmd->execute_func(cmd); |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 103 | PRINT_IO("msm_dmov_enqueue_cmd(%d), start command, status %x\n", id, status); |
| 104 | list_add_tail(&cmd->list, &active_commands[id]); |
Brian Swetland | 8a0f6f1 | 2008-09-10 14:58:25 -0700 | [diff] [blame] | 105 | if (!channel_active) |
| 106 | enable_irq(INT_ADM_AARM); |
| 107 | channel_active |= 1U << id; |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 108 | writel(cmd->cmdptr, DMOV_CMD_PTR(id)); |
| 109 | } else { |
Arve Hjønnevåg | c554107 | 2009-06-25 17:03:14 -0700 | [diff] [blame] | 110 | if (!channel_active) |
| 111 | clk_disable(msm_dmov_clk); |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 112 | if (list_empty(&active_commands[id])) |
| 113 | PRINT_ERROR("msm_dmov_enqueue_cmd(%d), error datamover stalled, status %x\n", id, status); |
| 114 | |
| 115 | PRINT_IO("msm_dmov_enqueue_cmd(%d), enqueue command, status %x\n", id, status); |
| 116 | list_add_tail(&cmd->list, &ready_commands[id]); |
| 117 | } |
| 118 | spin_unlock_irqrestore(&msm_dmov_lock, irq_flags); |
| 119 | } |
Arnd Bergmann | b25a791 | 2014-03-15 11:39:30 +0100 | [diff] [blame] | 120 | EXPORT_SYMBOL_GPL(msm_dmov_enqueue_cmd); |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 121 | |
| 122 | struct msm_dmov_exec_cmdptr_cmd { |
| 123 | struct msm_dmov_cmd dmov_cmd; |
| 124 | struct completion complete; |
| 125 | unsigned id; |
| 126 | unsigned int result; |
Brian Swetland | 8a0f6f1 | 2008-09-10 14:58:25 -0700 | [diff] [blame] | 127 | struct msm_dmov_errdata err; |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 128 | }; |
| 129 | |
Brian Swetland | 8a0f6f1 | 2008-09-10 14:58:25 -0700 | [diff] [blame] | 130 | static void |
| 131 | dmov_exec_cmdptr_complete_func(struct msm_dmov_cmd *_cmd, |
| 132 | unsigned int result, |
| 133 | struct msm_dmov_errdata *err) |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 134 | { |
| 135 | struct msm_dmov_exec_cmdptr_cmd *cmd = container_of(_cmd, struct msm_dmov_exec_cmdptr_cmd, dmov_cmd); |
| 136 | cmd->result = result; |
Brian Swetland | 8a0f6f1 | 2008-09-10 14:58:25 -0700 | [diff] [blame] | 137 | if (result != 0x80000002 && err) |
| 138 | memcpy(&cmd->err, err, sizeof(struct msm_dmov_errdata)); |
| 139 | |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 140 | complete(&cmd->complete); |
| 141 | } |
| 142 | |
| 143 | int msm_dmov_exec_cmd(unsigned id, unsigned int cmdptr) |
| 144 | { |
| 145 | struct msm_dmov_exec_cmdptr_cmd cmd; |
| 146 | |
| 147 | PRINT_FLOW("dmov_exec_cmdptr(%d, %x)\n", id, cmdptr); |
| 148 | |
| 149 | cmd.dmov_cmd.cmdptr = cmdptr; |
| 150 | cmd.dmov_cmd.complete_func = dmov_exec_cmdptr_complete_func; |
San Mehat | 5b00f40 | 2009-11-21 09:22:14 -0800 | [diff] [blame] | 151 | cmd.dmov_cmd.execute_func = NULL; |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 152 | cmd.id = id; |
| 153 | init_completion(&cmd.complete); |
| 154 | |
| 155 | msm_dmov_enqueue_cmd(id, &cmd.dmov_cmd); |
| 156 | wait_for_completion(&cmd.complete); |
| 157 | |
| 158 | if (cmd.result != 0x80000002) { |
| 159 | PRINT_ERROR("dmov_exec_cmdptr(%d): ERROR, result: %x\n", id, cmd.result); |
| 160 | PRINT_ERROR("dmov_exec_cmdptr(%d): flush: %x %x %x %x\n", |
Brian Swetland | 8a0f6f1 | 2008-09-10 14:58:25 -0700 | [diff] [blame] | 161 | id, cmd.err.flush[0], cmd.err.flush[1], cmd.err.flush[2], cmd.err.flush[3]); |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 162 | return -EIO; |
| 163 | } |
| 164 | PRINT_FLOW("dmov_exec_cmdptr(%d, %x) done\n", id, cmdptr); |
| 165 | return 0; |
| 166 | } |
| 167 | |
| 168 | |
| 169 | static irqreturn_t msm_datamover_irq_handler(int irq, void *dev_id) |
| 170 | { |
| 171 | unsigned int int_status, mask, id; |
| 172 | unsigned long irq_flags; |
| 173 | unsigned int ch_status; |
| 174 | unsigned int ch_result; |
| 175 | struct msm_dmov_cmd *cmd; |
| 176 | |
| 177 | spin_lock_irqsave(&msm_dmov_lock, irq_flags); |
| 178 | |
| 179 | int_status = readl(DMOV_ISR); /* read and clear interrupt */ |
| 180 | PRINT_FLOW("msm_datamover_irq_handler: DMOV_ISR %x\n", int_status); |
| 181 | |
| 182 | while (int_status) { |
| 183 | mask = int_status & -int_status; |
| 184 | id = fls(mask) - 1; |
| 185 | PRINT_FLOW("msm_datamover_irq_handler %08x %08x id %d\n", int_status, mask, id); |
| 186 | int_status &= ~mask; |
| 187 | ch_status = readl(DMOV_STATUS(id)); |
| 188 | if (!(ch_status & DMOV_STATUS_RSLT_VALID)) { |
| 189 | PRINT_FLOW("msm_datamover_irq_handler id %d, result not valid %x\n", id, ch_status); |
| 190 | continue; |
| 191 | } |
| 192 | do { |
| 193 | ch_result = readl(DMOV_RSLT(id)); |
| 194 | if (list_empty(&active_commands[id])) { |
| 195 | PRINT_ERROR("msm_datamover_irq_handler id %d, got result " |
| 196 | "with no active command, status %x, result %x\n", |
| 197 | id, ch_status, ch_result); |
| 198 | cmd = NULL; |
| 199 | } else |
| 200 | cmd = list_entry(active_commands[id].next, typeof(*cmd), list); |
| 201 | PRINT_FLOW("msm_datamover_irq_handler id %d, status %x, result %x\n", id, ch_status, ch_result); |
| 202 | if (ch_result & DMOV_RSLT_DONE) { |
| 203 | PRINT_FLOW("msm_datamover_irq_handler id %d, status %x\n", |
| 204 | id, ch_status); |
| 205 | PRINT_IO("msm_datamover_irq_handler id %d, got result " |
| 206 | "for %p, result %x\n", id, cmd, ch_result); |
| 207 | if (cmd) { |
| 208 | list_del(&cmd->list); |
Brian Swetland | 9f68fcd | 2009-08-19 18:49:45 -0700 | [diff] [blame] | 209 | dsb(); |
Brian Swetland | 8a0f6f1 | 2008-09-10 14:58:25 -0700 | [diff] [blame] | 210 | cmd->complete_func(cmd, ch_result, NULL); |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 211 | } |
| 212 | } |
| 213 | if (ch_result & DMOV_RSLT_FLUSH) { |
Brian Swetland | 8a0f6f1 | 2008-09-10 14:58:25 -0700 | [diff] [blame] | 214 | struct msm_dmov_errdata errdata; |
| 215 | |
| 216 | errdata.flush[0] = readl(DMOV_FLUSH0(id)); |
| 217 | errdata.flush[1] = readl(DMOV_FLUSH1(id)); |
| 218 | errdata.flush[2] = readl(DMOV_FLUSH2(id)); |
| 219 | errdata.flush[3] = readl(DMOV_FLUSH3(id)); |
| 220 | errdata.flush[4] = readl(DMOV_FLUSH4(id)); |
| 221 | errdata.flush[5] = readl(DMOV_FLUSH5(id)); |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 222 | PRINT_FLOW("msm_datamover_irq_handler id %d, status %x\n", id, ch_status); |
Brian Swetland | 8a0f6f1 | 2008-09-10 14:58:25 -0700 | [diff] [blame] | 223 | PRINT_FLOW("msm_datamover_irq_handler id %d, flush, result %x, flush0 %x\n", id, ch_result, errdata.flush[0]); |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 224 | if (cmd) { |
| 225 | list_del(&cmd->list); |
Brian Swetland | 9f68fcd | 2009-08-19 18:49:45 -0700 | [diff] [blame] | 226 | dsb(); |
Brian Swetland | 8a0f6f1 | 2008-09-10 14:58:25 -0700 | [diff] [blame] | 227 | cmd->complete_func(cmd, ch_result, &errdata); |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 228 | } |
| 229 | } |
| 230 | if (ch_result & DMOV_RSLT_ERROR) { |
Brian Swetland | 8a0f6f1 | 2008-09-10 14:58:25 -0700 | [diff] [blame] | 231 | struct msm_dmov_errdata errdata; |
| 232 | |
| 233 | errdata.flush[0] = readl(DMOV_FLUSH0(id)); |
| 234 | errdata.flush[1] = readl(DMOV_FLUSH1(id)); |
| 235 | errdata.flush[2] = readl(DMOV_FLUSH2(id)); |
| 236 | errdata.flush[3] = readl(DMOV_FLUSH3(id)); |
| 237 | errdata.flush[4] = readl(DMOV_FLUSH4(id)); |
| 238 | errdata.flush[5] = readl(DMOV_FLUSH5(id)); |
| 239 | |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 240 | PRINT_ERROR("msm_datamover_irq_handler id %d, status %x\n", id, ch_status); |
Brian Swetland | 8a0f6f1 | 2008-09-10 14:58:25 -0700 | [diff] [blame] | 241 | PRINT_ERROR("msm_datamover_irq_handler id %d, error, result %x, flush0 %x\n", id, ch_result, errdata.flush[0]); |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 242 | if (cmd) { |
| 243 | list_del(&cmd->list); |
Brian Swetland | 9f68fcd | 2009-08-19 18:49:45 -0700 | [diff] [blame] | 244 | dsb(); |
Brian Swetland | 8a0f6f1 | 2008-09-10 14:58:25 -0700 | [diff] [blame] | 245 | cmd->complete_func(cmd, ch_result, &errdata); |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 246 | } |
| 247 | /* this does not seem to work, once we get an error */ |
| 248 | /* the datamover will no longer accept commands */ |
| 249 | writel(0, DMOV_FLUSH0(id)); |
| 250 | } |
| 251 | ch_status = readl(DMOV_STATUS(id)); |
| 252 | PRINT_FLOW("msm_datamover_irq_handler id %d, status %x\n", id, ch_status); |
| 253 | if ((ch_status & DMOV_STATUS_CMD_PTR_RDY) && !list_empty(&ready_commands[id])) { |
| 254 | cmd = list_entry(ready_commands[id].next, typeof(*cmd), list); |
Wei Yongjun | 6eebf2d | 2012-09-05 14:53:46 +0800 | [diff] [blame] | 255 | list_move_tail(&cmd->list, &active_commands[id]); |
San Mehat | 5b00f40 | 2009-11-21 09:22:14 -0800 | [diff] [blame] | 256 | if (cmd->execute_func) |
| 257 | cmd->execute_func(cmd); |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 258 | PRINT_FLOW("msm_datamover_irq_handler id %d, start command\n", id); |
| 259 | writel(cmd->cmdptr, DMOV_CMD_PTR(id)); |
| 260 | } |
| 261 | } while (ch_status & DMOV_STATUS_RSLT_VALID); |
Brian Swetland | 8a0f6f1 | 2008-09-10 14:58:25 -0700 | [diff] [blame] | 262 | if (list_empty(&active_commands[id]) && list_empty(&ready_commands[id])) |
| 263 | channel_active &= ~(1U << id); |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 264 | PRINT_FLOW("msm_datamover_irq_handler id %d, status %x\n", id, ch_status); |
| 265 | } |
Brian Swetland | 8a0f6f1 | 2008-09-10 14:58:25 -0700 | [diff] [blame] | 266 | |
Arve Hjønnevåg | c554107 | 2009-06-25 17:03:14 -0700 | [diff] [blame] | 267 | if (!channel_active) { |
Arve Hjønnevåg | a6407dd | 2009-04-17 18:21:34 -0700 | [diff] [blame] | 268 | disable_irq_nosync(INT_ADM_AARM); |
Arve Hjønnevåg | c554107 | 2009-06-25 17:03:14 -0700 | [diff] [blame] | 269 | clk_disable(msm_dmov_clk); |
| 270 | } |
Brian Swetland | 8a0f6f1 | 2008-09-10 14:58:25 -0700 | [diff] [blame] | 271 | |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 272 | spin_unlock_irqrestore(&msm_dmov_lock, irq_flags); |
| 273 | return IRQ_HANDLED; |
| 274 | } |
| 275 | |
| 276 | static int __init msm_init_datamover(void) |
| 277 | { |
| 278 | int i; |
Brian Swetland | 8a0f6f1 | 2008-09-10 14:58:25 -0700 | [diff] [blame] | 279 | int ret; |
Arve Hjønnevåg | c554107 | 2009-06-25 17:03:14 -0700 | [diff] [blame] | 280 | struct clk *clk; |
| 281 | |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 282 | for (i = 0; i < MSM_DMOV_CHANNEL_COUNT; i++) { |
| 283 | INIT_LIST_HEAD(&ready_commands[i]); |
| 284 | INIT_LIST_HEAD(&active_commands[i]); |
| 285 | writel(DMOV_CONFIG_IRQ_EN | DMOV_CONFIG_FORCE_TOP_PTR_RSLT | DMOV_CONFIG_FORCE_FLUSH_RSLT, DMOV_CONFIG(i)); |
| 286 | } |
Arve Hjønnevåg | c554107 | 2009-06-25 17:03:14 -0700 | [diff] [blame] | 287 | clk = clk_get(NULL, "adm_clk"); |
| 288 | if (IS_ERR(clk)) |
| 289 | return PTR_ERR(clk); |
Stephen Boyd | 2dfd9c1 | 2013-06-17 10:43:17 -0700 | [diff] [blame] | 290 | clk_prepare(clk); |
Arve Hjønnevåg | c554107 | 2009-06-25 17:03:14 -0700 | [diff] [blame] | 291 | msm_dmov_clk = clk; |
Brian Swetland | 8a0f6f1 | 2008-09-10 14:58:25 -0700 | [diff] [blame] | 292 | ret = request_irq(INT_ADM_AARM, msm_datamover_irq_handler, 0, "msmdatamover", NULL); |
| 293 | if (ret) |
| 294 | return ret; |
| 295 | disable_irq(INT_ADM_AARM); |
| 296 | return 0; |
Arve Hjønnevåg | bfe645a | 2007-11-26 04:12:29 -0800 | [diff] [blame] | 297 | } |
Stephen Boyd | 2dfd9c1 | 2013-06-17 10:43:17 -0700 | [diff] [blame] | 298 | module_init(msm_init_datamover); |