2012-05-04 16:51:52

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH] omap: dma: Clear status registers on enable/disable irq.

Hi,

* Oleg Matcovschi <[email protected]> [120420 13:49]:
> Use omap_disable_channel_irq() function instead of directly accessing CICR.
> The omap_disable_chanel_irq() function clears pending interrupts
> and disables interrupt on channel.
> Functions omap2_enable_irq_lch()/omap2_disable_irq_lch() clear interrupt
> status register.

This seems like a nice fix to me. As it affects all omaps, I'd like to
see some tested-by from Janusz/Jarkko/Peter. Can you guys give it a try
with some audio tests?

Also one comment below.

> @@ -575,10 +573,15 @@ static inline void omap_enable_channel_irq(int lch)
> p->dma_write(dma_chan[lch].enabled_irqs, CICR, lch);
> }
>
> -static void omap_disable_channel_irq(int lch)
> +static inline void omap_disable_channel_irq(int lch)
> {
> - if (cpu_class_is_omap2())
> - p->dma_write(0, CICR, lch);
> + /* disable channel interrupts */
> + p->dma_write(0, CICR, lch);
> + /* Clear CSR */
> + if (cpu_class_is_omap1())
> + p->dma_read(CSR, lch);
> + else if (cpu_class_is_omap2())
> + p->dma_write(OMAP2_DMA_CSR_CLEAR_MASK, CSR, lch);
> }

You can leave out the else if cpu_class_is_omap2 and replace it
with just else above.

Regards,

Tony


2012-05-04 19:42:22

by Janusz Krzysztofik

[permalink] [raw]
Subject: Re: [PATCH] omap: dma: Clear status registers on enable/disable irq.

Dnia piÄ…tek, 4 maja 2012 09:51:46 Tony Lindgren pisze:
> Hi,
>
> * Oleg Matcovschi <[email protected]> [120420 13:49]:
> > Use omap_disable_channel_irq() function instead of directly
accessing CICR.
> > The omap_disable_chanel_irq() function clears pending interrupts
> > and disables interrupt on channel.
> > Functions omap2_enable_irq_lch()/omap2_disable_irq_lch() clear
interrupt
> > status register.
>
> This seems like a nice fix to me. As it affects all omaps, I'd like to
> see some tested-by from Janusz/Jarkko/Peter. Can you guys give it a
try
> with some audio tests?

OK, I can do, but perhaps not before next Saturday, when I'm back home,
able to actually listen to the audio, not only watch the IRQ counters
rising up ;-).

Thanks,
Janusz

2012-05-06 16:35:03

by Jarkko Nikula

[permalink] [raw]
Subject: Re: [PATCH] omap: dma: Clear status registers on enable/disable irq.

On 05/04/2012 10:39 PM, Janusz Krzysztofik wrote:
>> This seems like a nice fix to me. As it affects all omaps, I'd like to
>> see some tested-by from Janusz/Jarkko/Peter. Can you guys give it a
> try
>> with some audio tests?
>
> OK, I can do, but perhaps not before next Saturday, when I'm back home,
> able to actually listen to the audio, not only watch the IRQ counters
> rising up ;-).
>
Ok from omap3

Tested-by: Jarkko Nikula <[email protected]>

2012-05-14 12:51:44

by Janusz Krzysztofik

[permalink] [raw]
Subject: Re: [PATCH] omap: dma: Clear status registers on enable/disable irq.

On Sunday 06 of May 2012 18:50:16 Jarkko Nikula wrote:
> On 05/04/2012 10:39 PM, Janusz Krzysztofik wrote:
> >> This seems like a nice fix to me. As it affects all omaps, I'd like to
> >> see some tested-by from Janusz/Jarkko/Peter. Can you guys give it a
> > try
> >> with some audio tests?
> >
> > OK, I can do, but perhaps not before next Saturday, when I'm back home,
> > able to actually listen to the audio, not only watch the IRQ counters
> > rising up ;-).
> >
> Ok from omap3
>
> Tested-by: Jarkko Nikula <[email protected]>

Works for me on OMAP1.

Tested-by: Janusz Krzyszofik <[email protected]>