aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/devices.c')
-rw-r--r--arch/arm/mach-omap2/devices.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 5391079c8689..ae8ea5b3b1a0 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -329,6 +329,38 @@ static void omap_init_audio(void)
329static inline void omap_init_audio(void) {} 329static inline void omap_init_audio(void) {}
330#endif 330#endif
331 331
332#if defined(CONFIG_SND_OMAP_SOC_MCPDM) || \
333 defined(CONFIG_SND_OMAP_SOC_MCPDM_MODULE)
334
335static struct omap_device_pm_latency omap_mcpdm_latency[] = {
336 {
337 .deactivate_func = omap_device_idle_hwmods,
338 .activate_func = omap_device_enable_hwmods,
339 .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
340 },
341};
342
343static void omap_init_mcpdm(void)
344{
345 struct omap_hwmod *oh;
346 struct omap_device *od;
347
348 oh = omap_hwmod_lookup("mcpdm");
349 if (!oh) {
350 printk(KERN_ERR "Could not look up mcpdm hw_mod\n");
351 return;
352 }
353
354 od = omap_device_build("omap-mcpdm", -1, oh, NULL, 0,
355 omap_mcpdm_latency,
356 ARRAY_SIZE(omap_mcpdm_latency), 0);
357 if (IS_ERR(od))
358 printk(KERN_ERR "Could not build omap_device for omap-mcpdm-dai\n");
359}
360#else
361static inline void omap_init_mcpdm(void) {}
362#endif
363
332#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) 364#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
333 365
334#include <plat/mcspi.h> 366#include <plat/mcspi.h>
@@ -682,6 +714,7 @@ static int __init omap2_init_devices(void)
682 * in alphabetical order so they're easier to sort through. 714 * in alphabetical order so they're easier to sort through.
683 */ 715 */
684 omap_init_audio(); 716 omap_init_audio();
717 omap_init_mcpdm();
685 omap_init_camera(); 718 omap_init_camera();
686 omap_init_mbox(); 719 omap_init_mbox();
687 omap_init_mcspi(); 720 omap_init_mcspi();