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 2dbb265bedd4..512ae4696a6c 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <plat/control.h> | 25 | #include <plat/control.h> |
26 | #include <plat/tc.h> | 26 | #include <plat/tc.h> |
27 | #include <plat/board.h> | 27 | #include <plat/board.h> |
28 | #include <plat/mcbsp.h> | ||
28 | #include <mach/gpio.h> | 29 | #include <mach/gpio.h> |
29 | #include <plat/mmc.h> | 30 | #include <plat/mmc.h> |
30 | #include <plat/dma.h> | 31 | #include <plat/dma.h> |
@@ -235,6 +236,43 @@ static inline void omap_init_mbox(void) { } | |||
235 | 236 | ||
236 | static inline void omap_init_sti(void) {} | 237 | static inline void omap_init_sti(void) {} |
237 | 238 | ||
239 | #if defined(CONFIG_SND_SOC) || defined(CONFIG_SND_SOC_MODULE) | ||
240 | |||
241 | static struct platform_device omap_pcm = { | ||
242 | .name = "omap-pcm-audio", | ||
243 | .id = -1, | ||
244 | }; | ||
245 | |||
246 | /* | ||
247 | * OMAP2420 has 2 McBSP ports | ||
248 | * OMAP2430 has 5 McBSP ports | ||
249 | * OMAP3 has 5 McBSP ports | ||
250 | * OMAP4 has 4 McBSP ports | ||
251 | */ | ||
252 | OMAP_MCBSP_PLATFORM_DEVICE(1); | ||
253 | OMAP_MCBSP_PLATFORM_DEVICE(2); | ||
254 | OMAP_MCBSP_PLATFORM_DEVICE(3); | ||
255 | OMAP_MCBSP_PLATFORM_DEVICE(4); | ||
256 | OMAP_MCBSP_PLATFORM_DEVICE(5); | ||
257 | |||
258 | static void omap_init_audio(void) | ||
259 | { | ||
260 | platform_device_register(&omap_mcbsp1); | ||
261 | platform_device_register(&omap_mcbsp2); | ||
262 | if (cpu_is_omap243x() || cpu_is_omap34xx() || cpu_is_omap44xx()) { | ||
263 | platform_device_register(&omap_mcbsp3); | ||
264 | platform_device_register(&omap_mcbsp4); | ||
265 | } | ||
266 | if (cpu_is_omap243x() || cpu_is_omap34xx()) | ||
267 | platform_device_register(&omap_mcbsp5); | ||
268 | |||
269 | platform_device_register(&omap_pcm); | ||
270 | } | ||
271 | |||
272 | #else | ||
273 | static inline void omap_init_audio(void) {} | ||
274 | #endif | ||
275 | |||
238 | #if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) | 276 | #if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) |
239 | 277 | ||
240 | #include <plat/mcspi.h> | 278 | #include <plat/mcspi.h> |
@@ -847,6 +885,7 @@ static int __init omap2_init_devices(void) | |||
847 | * in alphabetical order so they're easier to sort through. | 885 | * in alphabetical order so they're easier to sort through. |
848 | */ | 886 | */ |
849 | omap_hsmmc_reset(); | 887 | omap_hsmmc_reset(); |
888 | omap_init_audio(); | ||
850 | omap_init_camera(); | 889 | omap_init_camera(); |
851 | omap_init_mbox(); | 890 | omap_init_mbox(); |
852 | omap_init_mcspi(); | 891 | omap_init_mcspi(); |