diff options
author | Mika Westerberg <mika.westerberg@iki.fi> | 2010-10-14 18:49:07 +0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-10-15 14:54:53 +0400 |
commit | 534bc7fa3c0a9084e7a2db33898d92577c64e4eb (patch) | |
tree | 61d019c0858987c8e3de5fb783e8723a9b682530 /arch/arm/mach-ep93xx/core.c | |
parent | aa7e1b84c6d424264bab8c29b14ebbc906488853 (diff) | |
download | linux-534bc7fa3c0a9084e7a2db33898d92577c64e4eb.tar.xz |
ARM: ep93xx: add AC97 platform support
Add platform support for the EP93xx AC97 controller driver.
Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'arch/arm/mach-ep93xx/core.c')
-rw-r--r-- | arch/arm/mach-ep93xx/core.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 1990e2299841..ffdf87be2958 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -832,6 +832,40 @@ 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); + platform_device_register(&ep93xx_pcm_device); +} + extern void ep93xx_gpio_init(void); void __init ep93xx_init_devices(void) |