From: David Jander <david.jander@protonic.nl>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: alsa-devel@alsa-project.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@ti.com>
Subject: Re: ASoC driver parts probing order (MPC5200/MPC5121)
Date: Thu, 20 Oct 2011 13:37:58 +0200 [thread overview]
Message-ID: <20111020133758.27011ac7@archvile> (raw)
In-Reply-To: <20111020105940.GB2379@pengutronix.de>
Hi Wolfram,
Thanks for replying.
On Thu, 20 Oct 2011 12:59:40 +0200
Wolfram Sang <w.sang@pengutronix.de> wrote:
> Hi David,
>
> > I am writing a AC97 ASoC driver for the MPC5121e SoC from Freescale. This
> > SoC has almost the same PSC (Programmable Serial Controllers) as the
> > MPC5200B, for which there already is an AC97 driver:
> > sound/soc/fsl/mpc5200-ac97.c, so I'd like to extend that one to also
> > support the MPC5121e.
>
> Yes, this seems feasible. It has been done like this for the uart-driver,
> sadly not for the spi-driver :(
>
> > So obviously, it is supposed that the DMA driver
> > somehow gets probed before the PSC driver, but I can't see where this is
> > enforced. AFAIK, the order is fairly random, so it could be the other way
>
> Check arch/powerpc/sysdev/bestcomm/bestcomm.c at the end:
>
> /* If we're not a module, we must make sure everything is setup before */
> /* anyone tries to use us ... that's why we use subsys_initcall instead */
> /* of module_init. */
> subsys_initcall(mpc52xx_bcom_init);
>
> while the mpc5121-driver has simply module_init() here. subsys_initcall() is
> also often used for I2C host drivers to ensure client drivers can access them
> early.
I think I was not clear enough. I meant sound/soc/fsl/mpc5200_dma.c, not the
actual Bestcom DMA driver.
Btw, I am writing a DMA-less driver for the MPC5121e for now. It uses the PSC
FIFO and FIFO alarm interrupts. DMA support could be added later, when de
MPC5121 DMA driver becomes capable of doing device IO.
But, if I extend sound/soc/fsl/mpc5200-ac97.c, I will still need to write a
second part doing the actual PCM audio stuff... basically the same thing
sound/soc/fsl/mpc5200_dma.c does, but without DMA. It's the shared drv_data
struct that goes sour.
> > 1.- I can't test it on a MPC5200B, so therefor I need help.
>
> I can do tests.
If you could try out latest mainline, to see if the driver still works,
that would be great for a start. I am almost certain it either doesn't work
anymore, or you have a 50% chance it crashes while booting.
Best regards,
--
David Jander
Protonic Holland.
next prev parent reply other threads:[~2011-10-20 11:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-20 10:23 ASoC driver parts probing order (MPC5200/MPC5121) David Jander
2011-10-20 10:59 ` Wolfram Sang
2011-10-20 11:37 ` David Jander [this message]
2011-10-20 12:13 ` Wolfram Sang
2011-10-20 12:27 ` David Jander
2011-10-20 12:35 ` Mark Brown
2011-10-20 13:26 ` David Jander
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=20111020133758.27011ac7@archvile \
--to=david.jander@protonic.nl \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@ti.com \
--cc=w.sang@pengutronix.de \
/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).