diff options
Diffstat (limited to 'arch/arm/mach-omap2/devices.c')
-rw-r--r-- | arch/arm/mach-omap2/devices.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 03e6c9ed82a4..f9a5961d23a7 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <mach/gpio.h> | 29 | #include <mach/gpio.h> |
30 | #include <plat/mmc.h> | 30 | #include <plat/mmc.h> |
31 | #include <plat/dma.h> | 31 | #include <plat/dma.h> |
32 | #include <plat/mcbsp.h> | ||
32 | 33 | ||
33 | #include "mux.h" | 34 | #include "mux.h" |
34 | 35 | ||
@@ -289,6 +290,43 @@ static inline void omap_init_sti(void) | |||
289 | static inline void omap_init_sti(void) {} | 290 | static inline void omap_init_sti(void) {} |
290 | #endif | 291 | #endif |
291 | 292 | ||
293 | #if defined(CONFIG_SND_SOC) || defined(CONFIG_SND_SOC_MODULE) | ||
294 | |||
295 | static struct platform_device omap_pcm = { | ||
296 | .name = "omap-pcm-audio", | ||
297 | .id = -1, | ||
298 | }; | ||
299 | |||
300 | /* | ||
301 | * OMAP2420 has 2 McBSP ports | ||
302 | * OMAP2430 has 5 McBSP ports | ||
303 | * OMAP3 has 5 McBSP ports | ||
304 | * OMAP4 has 4 McBSP ports | ||
305 | */ | ||
306 | OMAP_MCBSP_PLATFORM_DEVICE(1); | ||
307 | OMAP_MCBSP_PLATFORM_DEVICE(2); | ||
308 | OMAP_MCBSP_PLATFORM_DEVICE(3); | ||
309 | OMAP_MCBSP_PLATFORM_DEVICE(4); | ||
310 | OMAP_MCBSP_PLATFORM_DEVICE(5); | ||
311 | |||
312 | static void omap_init_audio(void) | ||
313 | { | ||
314 | platform_device_register(&omap_mcbsp1); | ||
315 | platform_device_register(&omap_mcbsp2); | ||
316 | if (cpu_is_omap243x() || cpu_is_omap34xx() || cpu_is_omap44xx()) { | ||
317 | platform_device_register(&omap_mcbsp3); | ||
318 | platform_device_register(&omap_mcbsp4); | ||
319 | } | ||
320 | if (cpu_is_omap243x() || cpu_is_omap34xx()) | ||
321 | platform_device_register(&omap_mcbsp5); | ||
322 | |||
323 | platform_device_register(&omap_pcm); | ||
324 | } | ||
325 | |||
326 | #else | ||
327 | static inline void omap_init_audio(void) {} | ||
328 | #endif | ||
329 | |||
292 | #if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) | 330 | #if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) |
293 | 331 | ||
294 | #include <plat/mcspi.h> | 332 | #include <plat/mcspi.h> |
@@ -901,6 +939,7 @@ static int __init omap2_init_devices(void) | |||
901 | * in alphabetical order so they're easier to sort through. | 939 | * in alphabetical order so they're easier to sort through. |
902 | */ | 940 | */ |
903 | omap_hsmmc_reset(); | 941 | omap_hsmmc_reset(); |
942 | omap_init_audio(); | ||
904 | omap_init_camera(); | 943 | omap_init_camera(); |
905 | omap_init_mbox(); | 944 | omap_init_mbox(); |
906 | omap_init_mcspi(); | 945 | omap_init_mcspi(); |