Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@caiaq.de>
To: Philipp Zabel <philipp.zabel@gmail.com>
Cc: alsa-devel@alsa-project.org,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: [PATCH 3/3][RFC] ASoC: pxa-ssp: Don't use	SSCR0_SerClkDiv and SSCR0_SCR
Date: Wed, 11 Mar 2009 19:44:16 +0100	[thread overview]
Message-ID: <20090311184416.GA29865@buzzloop.caiaq.de> (raw)
In-Reply-To: <1236795420-12175-3-git-send-email-philipp.zabel@gmail.com>

On Wed, Mar 11, 2009 at 07:17:00PM +0100, Philipp Zabel wrote:
> As soon as CONFIG_PXA25x is enabled, those macros only handle the PXA25x_SSP
> case, which is wrong most of the time (and always wrong on >=PXA27x).

Ah, I just (while reading this header file) wondered how this is
supposed to work :)

> @@ -287,10 +287,17 @@ static void ssp_set_scr(struct ssp_priv *priv, u32 div)
>  {
>  	struct ssp_dev *dev = &priv->dev;
>  	struct ssp_device *ssp = dev->ssp;
> -	u32 sscr0 = ssp_read_reg(dev->ssp, SSCR0) & ~SSCR0_SCR;
> +	u32 sscr0 = ssp_read_reg(dev->ssp, SSCR0);
>  
>  	priv->scr_div = div;
> -	ssp_write_reg(ssp, SSCR0, (sscr0 | SSCR0_SerClkDiv(div)));
> +	if (ssp->type == PXA25x_SSP) {
> +		sscr0 &= ~0x0000ff00;        /* SSCR0_SCR */
> +		sscr0 |= ((div - 2)/2) << 8; /* SSCR0_SerClkDiv(div) */
> +	} else {
> +		sscr0 &= ~0x000fff00;        /* SSCR0_SCR */
> +		sscr0 |= (div - 1) << 8;     /* SSCR0_SerClkDiv(div) */
> +	}
> +	ssp_write_reg(ssp, SSCR0, sscr0);
>  }

Then we need something like ssp_get_scr() as well to cover my special
case which uses SSCR0_SCR and SSCR0_SerClkDiv() again as you proposed ;)

Daniel

  reply	other threads:[~2009-03-11 18:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-11 18:16 [PATCH 1/3][RFC] ASoC: pxa-ssp: Use 16-bit DMA for magician stereo Philipp Zabel
2009-03-11 18:16 ` [PATCH 2/3][RFC] ASoC: Add Magician machine support Philipp Zabel
2009-03-11 19:02   ` Liam Girdwood
2009-03-11 21:03     ` pHilipp Zabel
2009-03-11 22:25   ` Mark Brown
2009-03-11 22:38     ` Liam Girdwood
2009-03-11 22:44       ` Mark Brown
2009-03-12 10:07         ` [PATCH 3/5] ASoC: Replace remaining uses of snd_soc_cnew with snd_soc_add_controls Philipp Zabel
2009-03-12 10:11           ` Mark Brown
2009-03-12 10:06     ` [PATCH] ASoC: Add Magician machine support Philipp Zabel
2009-03-12 15:58       ` Mark Brown
2009-03-11 18:17 ` [PATCH 3/3][RFC] ASoC: pxa-ssp: Don't use SSCR0_SerClkDiv and SSCR0_SCR Philipp Zabel
2009-03-11 18:44   ` Daniel Mack [this message]
2009-03-11 21:10     ` pHilipp Zabel
2009-03-12  0:46       ` Daniel Mack
2009-03-12 10:23         ` Mark Brown
2009-03-12 10:27           ` Daniel Mack
2009-03-12 10:29             ` Mark Brown
2009-03-12 10:36             ` Daniel Mack
2009-03-12 19:09             ` pHilipp Zabel
2009-03-12 19:18               ` Mark Brown
2009-03-12 23:46                 ` Daniel Mack
2009-03-11 22:27   ` Mark Brown
2009-03-11 22:29     ` Mark Brown
2009-03-12 15:57 ` [PATCH 1/3][RFC] ASoC: pxa-ssp: Use 16-bit DMA for magician stereo Mark Brown

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=20090311184416.GA29865@buzzloop.caiaq.de \
    --to=daniel@caiaq.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=philipp.zabel@gmail.com \
    /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