diff options
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/mcbsp.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index f27e641bf814..af33fc713e1a 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c | |||
@@ -234,8 +234,16 @@ int omap_mcbsp_request(unsigned int id) | |||
234 | mcbsp->free = 0; | 234 | mcbsp->free = 0; |
235 | spin_unlock(&mcbsp->lock); | 235 | spin_unlock(&mcbsp->lock); |
236 | 236 | ||
237 | /* | ||
238 | * Make sure that transmitter, receiver and sample-rate generator are | ||
239 | * not running before activating IRQs. | ||
240 | */ | ||
241 | OMAP_MCBSP_WRITE(mcbsp->io_base, SPCR1, 0); | ||
242 | OMAP_MCBSP_WRITE(mcbsp->io_base, SPCR2, 0); | ||
243 | |||
237 | if (mcbsp->io_type == OMAP_MCBSP_IRQ_IO) { | 244 | if (mcbsp->io_type == OMAP_MCBSP_IRQ_IO) { |
238 | /* We need to get IRQs here */ | 245 | /* We need to get IRQs here */ |
246 | init_completion(&mcbsp->tx_irq_completion); | ||
239 | err = request_irq(mcbsp->tx_irq, omap_mcbsp_tx_irq_handler, | 247 | err = request_irq(mcbsp->tx_irq, omap_mcbsp_tx_irq_handler, |
240 | 0, "McBSP", (void *)mcbsp); | 248 | 0, "McBSP", (void *)mcbsp); |
241 | if (err != 0) { | 249 | if (err != 0) { |
@@ -245,8 +253,7 @@ int omap_mcbsp_request(unsigned int id) | |||
245 | return err; | 253 | return err; |
246 | } | 254 | } |
247 | 255 | ||
248 | init_completion(&mcbsp->tx_irq_completion); | 256 | init_completion(&mcbsp->rx_irq_completion); |
249 | |||
250 | err = request_irq(mcbsp->rx_irq, omap_mcbsp_rx_irq_handler, | 257 | err = request_irq(mcbsp->rx_irq, omap_mcbsp_rx_irq_handler, |
251 | 0, "McBSP", (void *)mcbsp); | 258 | 0, "McBSP", (void *)mcbsp); |
252 | if (err != 0) { | 259 | if (err != 0) { |
@@ -256,8 +263,6 @@ int omap_mcbsp_request(unsigned int id) | |||
256 | free_irq(mcbsp->tx_irq, (void *)mcbsp); | 263 | free_irq(mcbsp->tx_irq, (void *)mcbsp); |
257 | return err; | 264 | return err; |
258 | } | 265 | } |
259 | |||
260 | init_completion(&mcbsp->rx_irq_completion); | ||
261 | } | 266 | } |
262 | 267 | ||
263 | return 0; | 268 | return 0; |