diff options
author | Mika Westerberg <mika.westerberg@iki.fi> | 2010-10-14 10:49:07 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-10-15 06:54:53 -0400 |
commit | 534bc7fa3c0a9084e7a2db33898d92577c64e4eb (patch) | |
tree | 61d019c0858987c8e3de5fb783e8723a9b682530 /arch | |
parent | aa7e1b84c6d424264bab8c29b14ebbc906488853 (diff) |
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')
-rw-r--r-- | arch/arm/mach-ep93xx/core.c | 34 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/include/mach/platform.h | 1 |
3 files changed, 36 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) | |||
832 | } | 832 | } |
833 | EXPORT_SYMBOL(ep93xx_i2s_release); | 833 | EXPORT_SYMBOL(ep93xx_i2s_release); |
834 | 834 | ||
835 | /************************************************************************* | ||
836 | * EP93xx AC97 audio peripheral handling | ||
837 | *************************************************************************/ | ||
838 | static struct resource ep93xx_ac97_resources[] = { | ||
839 | { | ||
840 | .start = EP93XX_AAC_PHYS_BASE, | ||
841 | .end = EP93XX_AAC_PHYS_BASE + 0xb0 - 1, | ||
842 | .flags = IORESOURCE_MEM, | ||
843 | }, | ||
844 | { | ||
845 | .start = IRQ_EP93XX_AACINTR, | ||
846 | .end = IRQ_EP93XX_AACINTR, | ||
847 | .flags = IORESOURCE_IRQ, | ||
848 | }, | ||
849 | }; | ||
850 | |||
851 | static struct platform_device ep93xx_ac97_device = { | ||
852 | .name = "ep93xx-ac97", | ||
853 | .id = -1, | ||
854 | .num_resources = ARRAY_SIZE(ep93xx_ac97_resources), | ||
855 | .resource = ep93xx_ac97_resources, | ||
856 | }; | ||
857 | |||
858 | void __init ep93xx_register_ac97(void) | ||
859 | { | ||
860 | /* | ||
861 | * Make sure that the AC97 pins are not used by I2S. | ||
862 | */ | ||
863 | ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_I2SONAC97); | ||
864 | |||
865 | platform_device_register(&ep93xx_ac97_device); | ||
866 | platform_device_register(&ep93xx_pcm_device); | ||
867 | } | ||
868 | |||
835 | extern void ep93xx_gpio_init(void); | 869 | extern void ep93xx_gpio_init(void); |
836 | 870 | ||
837 | void __init ep93xx_init_devices(void) | 871 | void __init ep93xx_init_devices(void) |
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h index c54b3e56ba63..9ac4d1055097 100644 --- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | |||
@@ -105,6 +105,7 @@ | |||
105 | #define EP93XX_GPIO_B_INT_STATUS EP93XX_GPIO_REG(0xbc) | 105 | #define EP93XX_GPIO_B_INT_STATUS EP93XX_GPIO_REG(0xbc) |
106 | #define EP93XX_GPIO_EEDRIVE EP93XX_GPIO_REG(0xc8) | 106 | #define EP93XX_GPIO_EEDRIVE EP93XX_GPIO_REG(0xc8) |
107 | 107 | ||
108 | #define EP93XX_AAC_PHYS_BASE EP93XX_APB_PHYS(0x00080000) | ||
108 | #define EP93XX_AAC_BASE EP93XX_APB_IOMEM(0x00080000) | 109 | #define EP93XX_AAC_BASE EP93XX_APB_IOMEM(0x00080000) |
109 | 110 | ||
110 | #define EP93XX_SPI_PHYS_BASE EP93XX_APB_PHYS(0x000a0000) | 111 | #define EP93XX_SPI_PHYS_BASE EP93XX_APB_PHYS(0x000a0000) |
diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h index 3330b36d79e6..50660455b1d8 100644 --- a/arch/arm/mach-ep93xx/include/mach/platform.h +++ b/arch/arm/mach-ep93xx/include/mach/platform.h | |||
@@ -61,6 +61,7 @@ void ep93xx_keypad_release_gpio(struct platform_device *pdev); | |||
61 | void ep93xx_register_i2s(void); | 61 | void ep93xx_register_i2s(void); |
62 | int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config); | 62 | int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config); |
63 | void ep93xx_i2s_release(void); | 63 | void ep93xx_i2s_release(void); |
64 | void ep93xx_register_ac97(void); | ||
64 | 65 | ||
65 | void ep93xx_init_devices(void); | 66 | void ep93xx_init_devices(void); |
66 | extern struct sys_timer ep93xx_timer; | 67 | extern struct sys_timer ep93xx_timer; |