[alsa-devel] [PATCH v2 3/3] ASoC: multi-comp: OMAP2, 3, 4 McBSP: register correct number of ports
Peter Ujfalusi
peter.ujfalusi at nokia.com
Fri Aug 6 13:10:38 CEST 2010
Different OMAPs has different number of McBSP ports...
OMAP2420 has 2 McBSP ports
OMAP2430 has 5 McBSP ports
OMAP3 has 5 McBSP ports
OMAP4 has 4 McBSP ports
Since I don't have access to OMAP4 TRM, the number of ports on OMAP4
is guessed based on the original OMAP4 related McBSP code...
Signed-off-by: Peter Ujfalusi <peter.ujfalusi at nokia.com>
---
arch/arm/mach-omap2/devices.c | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 758d39b..f9a5961 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -297,6 +297,12 @@ static struct platform_device omap_pcm = {
.id = -1,
};
+/*
+ * OMAP2420 has 2 McBSP ports
+ * OMAP2430 has 5 McBSP ports
+ * OMAP3 has 5 McBSP ports
+ * OMAP4 has 4 McBSP ports
+ */
OMAP_MCBSP_PLATFORM_DEVICE(1);
OMAP_MCBSP_PLATFORM_DEVICE(2);
OMAP_MCBSP_PLATFORM_DEVICE(3);
@@ -307,9 +313,13 @@ static void omap_init_audio(void)
{
platform_device_register(&omap_mcbsp1);
platform_device_register(&omap_mcbsp2);
- platform_device_register(&omap_mcbsp3);
- platform_device_register(&omap_mcbsp4);
- platform_device_register(&omap_mcbsp5);
+ if (cpu_is_omap243x() || cpu_is_omap34xx() || cpu_is_omap44xx()) {
+ platform_device_register(&omap_mcbsp3);
+ platform_device_register(&omap_mcbsp4);
+ }
+ if (cpu_is_omap243x() || cpu_is_omap34xx())
+ platform_device_register(&omap_mcbsp5);
+
platform_device_register(&omap_pcm);
}
@@ -317,7 +327,6 @@ static void omap_init_audio(void)
static inline void omap_init_audio(void) {}
#endif
-
#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
#include <plat/mcspi.h>
--
1.7.2
More information about the Alsa-devel
mailing list