alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: "Jürgen Beisert" <jbe@pengutronix.de>
To: Timur Tabi <timur@tabi.org>
Cc: Markus Pargmann <mpa@pengutronix.de>,
	alsa-devel mailing list <alsa-devel@alsa-project.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	stable@vger.kernel.org, Mark Brown <broonie@kernel.org>,
	Sascha Hauer <kernel@pengutronix.de>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [alsa-devel] [PATCH] ASoC: fsl-ssi: fix SDMA starvation
Date: Wed, 13 Nov 2013 09:31:16 +0100	[thread overview]
Message-ID: <201311130931.16238.jbe@pengutronix.de> (raw)
In-Reply-To: <CAOZdJXUWv3_ZV6p9VQ+zYqwUDVQC6BMb-VhVoVtEh1yC23VuTg@mail.gmail.com>

Hi Timur,

On Tuesday 12 November 2013 21:17:34 Timur Tabi wrote:
> On Tue, Nov 12, 2013 at 7:24 AM, Markus Pargmann <mpa@pengutronix.de> wrote:
> > No, I don't have access on PowerPC hardware, so I didn't test it on
> > PowerPC.
>
> Can you change the code so that the interrupts are enabled only on
> i.MX?  On PowerPC, the interrupts are used only for debugging.

Hmm, you are right. My patch is partially bogus. It enables the
CCSR_SSI_SIER_TDMAE and CCSR_SSI_SIER_RDMAE bits on demand, but this setting
will be overwritten by the "write_ssi(sier_bits, &ssi->sier);" just a few
lines below. :(

But this patch works, because it removes the CCSR_SSI_SIER_TDMAE and
CCSR_SSI_SIER_RDMAE from the SIER_FLAGS macro. Its content is set
_unconditionally_ in lines 570 and 575 and is written to the register in line
607. This should hit PowerPC as well.

So, the real (and small) fix is to remove these bits from the SIER_FLAGS
macro:

diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index c6b7439..f176e34 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -107,10 +107,10 @@ static inline void write_ssi_mask(u32 __iomem *addr, u32 clear, u32 set)
 #endif
 
 /* SIER bitflag of interrupts to enable */
-#define SIER_FLAGS (CCSR_SSI_SIER_TFRC_EN | CCSR_SSI_SIER_TDMAE | \
+#define SIER_FLAGS (CCSR_SSI_SIER_TFRC_EN | \
 		    CCSR_SSI_SIER_TIE | CCSR_SSI_SIER_TUE0_EN | \
 		    CCSR_SSI_SIER_TUE1_EN | CCSR_SSI_SIER_RFRC_EN | \
-		    CCSR_SSI_SIER_RDMAE | CCSR_SSI_SIER_RIE | \
+		    CCSR_SSI_SIER_RIE | \
 		    CCSR_SSI_SIER_ROE0_EN | CCSR_SSI_SIER_ROE1_EN)
 
 /**

@Markus: can you please test it on your hardware?

Thanks
jbe

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

  reply	other threads:[~2013-11-13  8:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-12 11:17 [PATCH] ASoC: fsl-ssi: fix SDMA starvation Markus Pargmann
2013-11-12 12:55 ` Timur Tabi
2013-11-12 13:24   ` Markus Pargmann
2013-11-12 20:17     ` [alsa-devel] " Timur Tabi
2013-11-13  8:31       ` Jürgen Beisert [this message]
2013-11-13 13:11         ` Timur Tabi
2013-11-13 12:16       ` Markus Pargmann
2013-11-13 13:10         ` Timur Tabi
2013-11-13 13:38           ` Markus Pargmann
2013-11-13 14:15             ` Timur Tabi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201311130931.16238.jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mpa@pengutronix.de \
    --cc=stable@vger.kernel.org \
    --cc=timur@tabi.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).