diff options
author | William Lai <b04597@freescale.com> | 2010-07-01 09:36:48 +0800 |
---|---|---|
committer | William Lai <b04597@freescale.com> | 2010-07-08 16:23:25 +0800 |
commit | d9ec8c985136cb1989037a1843c9457048b82fd5 (patch) | |
tree | 97748adc03090797ef06e86c806bd62b884f0a46 /arch/arm/mach-mx35 | |
parent | e01220ea65dadfbb7acac0cbd39dd4628cf853bb (diff) |
ENGR00124740-4 MX25/35 ALSA: Changes due to ESAI as platform device
Make ESAI as a platform device, and pass the audio data to use
the external memory by default.
Signed-off-by: William Lai <b04597@freescale.com>
Diffstat (limited to 'arch/arm/mach-mx35')
-rw-r--r-- | arch/arm/mach-mx35/devices.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/arch/arm/mach-mx35/devices.c b/arch/arm/mach-mx35/devices.c index 7687d0e0b09d..9d030e1ecfeb 100644 --- a/arch/arm/mach-mx35/devices.c +++ b/arch/arm/mach-mx35/devices.c @@ -585,11 +585,58 @@ static inline void mxc_init_spdif(void) platform_device_register(&mxc_alsa_spdif_device); } +#if defined(CONFIG_SND_MXC_SOC_ESAI) || defined(CONFIG_SND_MXC_SOC_ESAI_MODULE) + +static struct mxc_esai_platform_data esai_data = { + .activate_esai_ports = gpio_activate_esai_ports, + .deactivate_esai_ports = gpio_deactivate_esai_ports, +}; + +static struct resource esai_resources[] = { + { + .start = ESAI_BASE_ADDR, + .end = ESAI_BASE_ADDR + 0x100, + .flags = IORESOURCE_MEM, + }, + { + .start = MXC_INT_ESAI, + .end = MXC_INT_ESAI, + .flags = IORESOURCE_IRQ, + }, +}; + +struct platform_device mxc_esai_device = { + .name = "mxc_esai", + .id = 0, + .num_resources = ARRAY_SIZE(esai_resources), + .resource = esai_resources, + .dev = { + .release = mxc_nop_release, + .platform_data = &esai_data, + }, +}; + +static void mxc_init_esai(void) +{ + platform_device_register(&mxc_esai_device); +} +#else +static void mxc_init_esai(void) +{ + +} +#endif + +static struct mxc_audio_platform_data mxc_surround_audio_data = { + .ext_ram = 1, +}; + static struct platform_device mxc_alsa_surround_device = { .name = "imx-3stack-wm8580", .id = 0, .dev = { .release = mxc_nop_release, + .platform_data = &mxc_surround_audio_data, }, }; @@ -873,6 +920,7 @@ int __init mxc_init_devices(void) mxc_init_iim(); mxc_init_gpu(); mxc_init_ssi(); + mxc_init_esai(); return 0; } |