aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap1/devices.c')
-rw-r--r--arch/arm/mach-omap1/devices.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index 379100c17639..eb98eb8d3731 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -25,6 +25,7 @@
25#include <mach/gpio.h> 25#include <mach/gpio.h>
26#include <plat/mmc.h> 26#include <plat/mmc.h>
27#include <plat/omap7xx.h> 27#include <plat/omap7xx.h>
28#include <plat/mcbsp.h>
28 29
29/*-------------------------------------------------------------------------*/ 30/*-------------------------------------------------------------------------*/
30 31
@@ -267,6 +268,30 @@ static inline void omap_init_sti(void)
267static inline void omap_init_sti(void) {} 268static inline void omap_init_sti(void) {}
268#endif 269#endif
269 270
271#if defined(CONFIG_SND_SOC) || defined(CONFIG_SND_SOC_MODULE)
272
273static struct platform_device omap_pcm = {
274 .name = "omap-pcm-audio",
275 .id = -1,
276};
277
278OMAP_MCBSP_PLATFORM_DEVICE(1);
279OMAP_MCBSP_PLATFORM_DEVICE(2);
280OMAP_MCBSP_PLATFORM_DEVICE(3);
281
282static void omap_init_audio(void)
283{
284 platform_device_register(&omap_mcbsp1);
285 platform_device_register(&omap_mcbsp2);
286 if (!cpu_is_omap7xx())
287 platform_device_register(&omap_mcbsp3);
288 platform_device_register(&omap_pcm);
289}
290
291#else
292static inline void omap_init_audio(void) {}
293#endif
294
270/*-------------------------------------------------------------------------*/ 295/*-------------------------------------------------------------------------*/
271 296
272/* 297/*
@@ -299,6 +324,7 @@ static int __init omap1_init_devices(void)
299 omap_init_rtc(); 324 omap_init_rtc();
300 omap_init_spi100k(); 325 omap_init_spi100k();
301 omap_init_sti(); 326 omap_init_sti();
327 omap_init_audio();
302 328
303 return 0; 329 return 0;
304} 330}