All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ryan Mallon <ryan@bluewatersys.com>
To: Mika Westerberg <mika.westerberg@iki.fi>
Cc: alsa-devel@alsa-project.org, martinwguy@gmail.com,
	broonie@opensource.wolfsonmicro.com,
	hsweeten@visionengravers.com,
	linux-arm-kernel@lists.infradead.org, lrg@slimlogic.co.uk
Subject: Re: [PATCH 3/4] ARM: ep93xx: add AC97 platform support
Date: Mon, 11 Oct 2010 08:39:25 +1300	[thread overview]
Message-ID: <4CB2166D.5080706@bluewatersys.com> (raw)
In-Reply-To: <d63475d15634d7ffa4c4167cbead782a5aa1cfc9.1286707213.git.mika.westerberg@iki.fi>

On 10/10/2010 11:54 PM, Mika Westerberg wrote:
> Add platform support for the EP93xx AC97 controller driver.
> 
> Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
> ---
>  arch/arm/mach-ep93xx/core.c                     |   32 +++++++++++++++++++++++
>  arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h |    1 +
>  arch/arm/mach-ep93xx/include/mach/platform.h    |    1 +
>  3 files changed, 34 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
> index 4cb55d3..6f514c4 100644
> --- a/arch/arm/mach-ep93xx/core.c
> +++ b/arch/arm/mach-ep93xx/core.c
> @@ -826,6 +826,38 @@ void ep93xx_i2s_release(void)
>  }
>  EXPORT_SYMBOL(ep93xx_i2s_release);
>  
> +/*************************************************************************
> + * EP93xx AC97 audio peripheral handling
> + *************************************************************************/
> +static struct resource ep93xx_ac97_resources[] = {
> +	{
> +		.start	= EP93XX_AAC_PHYS_BASE,
> +		.end	= EP93XX_AAC_PHYS_BASE + 0xb0 - 1,
> +		.flags	= IORESOURCE_MEM,
> +	},
> +	{
> +		.start	= IRQ_EP93XX_AACINTR,
> +		.end	= IRQ_EP93XX_AACINTR,
> +		.flags	= IORESOURCE_IRQ,
> +	},
> +};
> +
> +static struct platform_device ep93xx_ac97_device = {
> +	.name		= "ep93xx-ac97",
> +	.id		= -1,
> +	.num_resources	= ARRAY_SIZE(ep93xx_ac97_resources),
> +	.resource	= ep93xx_ac97_resources,
> +};
> +
> +void __init ep93xx_register_ac97(void)
> +{
> +	/*
> +	 * Make sure that the AC97 pins are not used by I2S.
> +	 */
> +	ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_I2SONAC97);
> +	platform_device_register(&ep93xx_ac97_device);
> +}

The other ep93xx device support functions do this with acquire/release
functions. However, it is quite unlikely that a board will ever need to
switch from i2s to ac97 audio at runtime. Will see what Hartley thinks.

~Ryan

-- 
Bluewater Systems Ltd - ARM Technology Solution Centre

Ryan Mallon         		5 Amuri Park, 404 Barbadoes St
ryan@bluewatersys.com         	PO Box 13 889, Christchurch 8013
http://www.bluewatersys.com	New Zealand
Phone: +64 3 3779127		Freecall: Australia 1800 148 751
Fax:   +64 3 3779135			  USA 1800 261 2934

WARNING: multiple messages have this Message-ID (diff)
From: ryan@bluewatersys.com (Ryan Mallon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] ARM: ep93xx: add AC97 platform support
Date: Mon, 11 Oct 2010 08:39:25 +1300	[thread overview]
Message-ID: <4CB2166D.5080706@bluewatersys.com> (raw)
In-Reply-To: <d63475d15634d7ffa4c4167cbead782a5aa1cfc9.1286707213.git.mika.westerberg@iki.fi>

On 10/10/2010 11:54 PM, Mika Westerberg wrote:
> Add platform support for the EP93xx AC97 controller driver.
> 
> Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
> ---
>  arch/arm/mach-ep93xx/core.c                     |   32 +++++++++++++++++++++++
>  arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h |    1 +
>  arch/arm/mach-ep93xx/include/mach/platform.h    |    1 +
>  3 files changed, 34 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
> index 4cb55d3..6f514c4 100644
> --- a/arch/arm/mach-ep93xx/core.c
> +++ b/arch/arm/mach-ep93xx/core.c
> @@ -826,6 +826,38 @@ void ep93xx_i2s_release(void)
>  }
>  EXPORT_SYMBOL(ep93xx_i2s_release);
>  
> +/*************************************************************************
> + * EP93xx AC97 audio peripheral handling
> + *************************************************************************/
> +static struct resource ep93xx_ac97_resources[] = {
> +	{
> +		.start	= EP93XX_AAC_PHYS_BASE,
> +		.end	= EP93XX_AAC_PHYS_BASE + 0xb0 - 1,
> +		.flags	= IORESOURCE_MEM,
> +	},
> +	{
> +		.start	= IRQ_EP93XX_AACINTR,
> +		.end	= IRQ_EP93XX_AACINTR,
> +		.flags	= IORESOURCE_IRQ,
> +	},
> +};
> +
> +static struct platform_device ep93xx_ac97_device = {
> +	.name		= "ep93xx-ac97",
> +	.id		= -1,
> +	.num_resources	= ARRAY_SIZE(ep93xx_ac97_resources),
> +	.resource	= ep93xx_ac97_resources,
> +};
> +
> +void __init ep93xx_register_ac97(void)
> +{
> +	/*
> +	 * Make sure that the AC97 pins are not used by I2S.
> +	 */
> +	ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_I2SONAC97);
> +	platform_device_register(&ep93xx_ac97_device);
> +}

The other ep93xx device support functions do this with acquire/release
functions. However, it is quite unlikely that a board will ever need to
switch from i2s to ac97 audio at runtime. Will see what Hartley thinks.

~Ryan

-- 
Bluewater Systems Ltd - ARM Technology Solution Centre

Ryan Mallon         		5 Amuri Park, 404 Barbadoes St
ryan at bluewatersys.com         	PO Box 13 889, Christchurch 8013
http://www.bluewatersys.com	New Zealand
Phone: +64 3 3779127		Freecall: Australia 1800 148 751
Fax:   +64 3 3779135			  USA 1800 261 2934

  reply	other threads:[~2010-10-10 19:38 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-10 10:54 [PATCH 0/4] ASoC AC97 audio support for ep93xx Mika Westerberg
2010-10-10 10:54 ` Mika Westerberg
2010-10-10 10:54 ` [PATCH 1/4] ARM: ep93xx: DMA: fix channel_disable Mika Westerberg
2010-10-10 10:54   ` Mika Westerberg
2010-10-10 19:34   ` Ryan Mallon
2010-10-10 19:34     ` Ryan Mallon
2010-10-10 10:54 ` [PATCH 2/4] ASoC: add ep93xx AC97 audio driver Mika Westerberg
2010-10-10 10:54   ` Mika Westerberg
2010-10-11  9:47   ` Mark Brown
2010-10-11  9:47     ` Mark Brown
2010-10-11 10:07     ` Mika Westerberg
2010-10-11 10:07       ` Mika Westerberg
2010-10-11 10:43       ` Mark Brown
2010-10-11 10:43         ` Mark Brown
2010-10-11 12:17         ` Mika Westerberg
2010-10-11 12:17           ` Mika Westerberg
2010-10-10 10:54 ` [PATCH 3/4] ARM: ep93xx: add AC97 platform support Mika Westerberg
2010-10-10 10:54   ` Mika Westerberg
2010-10-10 19:39   ` Ryan Mallon [this message]
2010-10-10 19:39     ` Ryan Mallon
2010-10-11  7:47     ` Mika Westerberg
2010-10-11  7:47       ` Mika Westerberg
2010-10-10 10:54 ` [PATCH 4/4] ASoC: ep93xx: add Simplemachines Sim.One AC97 audio support Mika Westerberg
2010-10-10 10:54   ` Mika Westerberg
2010-10-11  0:22   ` Jassi Brar
2010-10-11  0:22     ` [alsa-devel] " Jassi Brar
2010-10-11  7:38     ` Mika Westerberg
2010-10-11  7:38       ` [alsa-devel] " Mika Westerberg
2010-10-11  7:46       ` Jassi Brar
2010-10-11  7:46         ` [alsa-devel] " Jassi Brar
2010-10-10 17:02 ` [PATCH 0/4] ASoC AC97 audio support for ep93xx Mika Westerberg
2010-10-10 17:02   ` Mika Westerberg

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=4CB2166D.5080706@bluewatersys.com \
    --to=ryan@bluewatersys.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=hsweeten@visionengravers.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=lrg@slimlogic.co.uk \
    --cc=martinwguy@gmail.com \
    --cc=mika.westerberg@iki.fi \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.