mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RESEND PATCH 1/1] ASoC: dwc: correct irq clear method
@ 2015-09-29 14:39 yitian
  2015-09-30 18:17 ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: yitian @ 2015-09-29 14:39 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, Andrew.Jackson, wsa
  Cc: alsa-devel, linux-kernel, linux-arm-kernel

from Designware I2S datasheet, irq is cleared by reading from
TOR/ROR registers, rather than by writing into them.

Signed-off-by: Yitian Bu <yitian.bu@tangramtek.com>
---
 sound/soc/dwc/designware_i2s.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c
index a3e97b4..0d28e3b 100644
--- a/sound/soc/dwc/designware_i2s.c
+++ b/sound/soc/dwc/designware_i2s.c
@@ -131,10 +131,10 @@ static inline void i2s_clear_irqs(struct dw_i2s_dev
*dev, u32 stream)
 
 	if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
 		for (i = 0; i < 4; i++)
-			i2s_write_reg(dev->i2s_base, TOR(i), 0);
+			i2s_read_reg(dev->i2s_base, TOR(i));
 	} else {
 		for (i = 0; i < 4; i++)
-			i2s_write_reg(dev->i2s_base, ROR(i), 0);
+			i2s_read_reg(dev->i2s_base, ROR(i));
 	}
 }
 
-- 
1.7.12.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RESEND PATCH 1/1] ASoC: dwc: correct irq clear method
  2015-09-29 14:39 [RESEND PATCH 1/1] ASoC: dwc: correct irq clear method yitian
@ 2015-09-30 18:17 ` Mark Brown
  2015-10-01  2:39   ` yitian
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2015-09-30 18:17 UTC (permalink / raw)
  To: yitian
  Cc: lgirdwood, perex, tiwai, Andrew.Jackson, wsa, alsa-devel,
	linux-kernel, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 242 bytes --]

On Tue, Sep 29, 2015 at 10:39:00PM +0800, yitian wrote:
> from Designware I2S datasheet, irq is cleared by reading from
> TOR/ROR registers, rather than by writing into them.

This doesn't apply against current code, please check and resend.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [RESEND PATCH 1/1] ASoC: dwc: correct irq clear method
  2015-09-30 18:17 ` Mark Brown
@ 2015-10-01  2:39   ` yitian
  2015-10-01 10:03     ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: yitian @ 2015-10-01  2:39 UTC (permalink / raw)
  To: 'Mark Brown'
  Cc: alsa-devel, wsa, linux-kernel, Andrew.Jackson, tiwai, lgirdwood,
	perex, linux-arm-kernel

> From: linux-arm-kernel
> [mailto:linux-arm-kernel-bounces@lists.infradead.org] On Behalf Of Mark
> Brown
> Sent: Thursday, October 1, 2015 2:18 AM
> To: yitian <yitian.bu@tangramtek.com>
> Cc: alsa-devel@alsa-project.org; wsa@the-dreams.de;
> linux-kernel@vger.kernel.org; Andrew.Jackson@arm.com; tiwai@suse.com;
> lgirdwood@gmail.com; perex@perex.cz;
> linux-arm-kernel@lists.infradead.org
> Subject: Re: [RESEND PATCH 1/1] ASoC: dwc: correct irq clear method
> 
> On Tue, Sep 29, 2015 at 10:39:00PM +0800, yitian wrote:
> > from Designware I2S datasheet, irq is cleared by reading from
> > TOR/ROR registers, rather than by writing into them.
> 
> This doesn't apply against current code, please check and resend.
Hi Mark:

Thanks for your comments.
Maybe I misunderstand your meaning. Please correct me.

I synced up to latest kernel branch, the code is the same as what this patch
was
generated.

I checked designware I2S spec "version 1.08a June 2014", it specified that
the TOR
and ROR registers are read only and reading the last bit will clear tx/rx
overrun irq.

Also I have checked this register by writing its last bit, the overrun irq
is not cleared.
But if I read the last bit, the overrun irq is cleared. That means the spec
is correct.

Can you please let me know what else I should double check? Thanks.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RESEND PATCH 1/1] ASoC: dwc: correct irq clear method
  2015-10-01  2:39   ` yitian
@ 2015-10-01 10:03     ` Mark Brown
  2015-10-02  7:22       ` [alsa-devel] " yitian
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2015-10-01 10:03 UTC (permalink / raw)
  To: yitian
  Cc: alsa-devel, wsa, linux-kernel, Andrew.Jackson, tiwai, lgirdwood,
	perex, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 371 bytes --]

On Thu, Oct 01, 2015 at 10:39:09AM +0800, yitian wrote:

> > This doesn't apply against current code, please check and resend.

> I synced up to latest kernel branch, the code is the same as what this patch
> was
> generated.

The "latest kernel branch" was neither v4.3-rc1 nor my for-next
branch, at least as far as git am was concerned, so I couldn't apply the
patch.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [alsa-devel] [RESEND PATCH 1/1] ASoC: dwc: correct irq clear method
  2015-10-01 10:03     ` Mark Brown
@ 2015-10-02  7:22       ` yitian
  0 siblings, 0 replies; 5+ messages in thread
From: yitian @ 2015-10-02  7:22 UTC (permalink / raw)
  To: 'Mark Brown'
  Cc: alsa-devel, wsa, linux-kernel, Andrew.Jackson, lgirdwood, tiwai,
	linux-arm-kernel

Hi Mark:
> From: alsa-devel-bounces@alsa-project.org
> [mailto:alsa-devel-bounces@alsa-project.org] On Behalf Of Mark Brown
> Sent: Thursday, October 1, 2015 6:04 PM
> To: yitian <yitian.bu@tangramtek.com>
> Cc: alsa-devel@alsa-project.org; wsa@the-dreams.de;
> linux-kernel@vger.kernel.org; Andrew.Jackson@arm.com;
> lgirdwood@gmail.com; tiwai@suse.com;
> linux-arm-kernel@lists.infradead.org
> Subject: Re: [alsa-devel] [RESEND PATCH 1/1] ASoC: dwc: correct irq clear
> method
> 
> On Thu, Oct 01, 2015 at 10:39:09AM +0800, yitian wrote:
> 
> > > This doesn't apply against current code, please check and resend.
> 
> > I synced up to latest kernel branch, the code is the same as what this
> patch
> > was
> > generated.
> 
> The "latest kernel branch" was neither v4.3-rc1 nor my for-next
> branch, at least as far as git am was concerned, so I couldn't apply the
> patch.

I am sorry.
I used Linux v4.3-rc3 to generate the patch, and I assumed that was the same
as v4.3-rc1.
I generated new patch based on next-20151001, please review it again,
thanks.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-02  7:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-29 14:39 [RESEND PATCH 1/1] ASoC: dwc: correct irq clear method yitian
2015-09-30 18:17 ` Mark Brown
2015-10-01  2:39   ` yitian
2015-10-01 10:03     ` Mark Brown
2015-10-02  7:22       ` [alsa-devel] " yitian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome