From: Peter Ujfalusi <peter.ujfalusi@nokia.com>
To: alsa-devel@alsa-project.org
Cc: jkrzyszt@tis.icnet.pl, broonie@opensource.wolfsonmicro.com,
lrg@slimlogic.co.uk
Subject: [PATCH v2 3/3] ASoC: multi-comp: OMAP2, 3, 4 McBSP: register correct number of ports
Date: Fri, 6 Aug 2010 14:10:38 +0300 [thread overview]
Message-ID: <1281093038-24247-4-git-send-email-peter.ujfalusi@nokia.com> (raw)
In-Reply-To: <1281093038-24247-1-git-send-email-peter.ujfalusi@nokia.com>
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@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
next prev parent reply other threads:[~2010-08-06 11:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-06 11:10 [PATCH v2 0/3] ASoC: multi-comp: OMAP platform fixes Peter Ujfalusi
2010-08-06 11:10 ` [PATCH v2 1/3] ASoC: multi-comp: OMAP McBSP: use macro for platform_device Peter Ujfalusi
2010-08-06 11:10 ` [PATCH v2 2/3] ASoC: multi-comp: OMAP McBSP: Enable audio on OMAP1 platform Peter Ujfalusi
2010-08-06 11:10 ` Peter Ujfalusi [this message]
2010-08-06 12:04 ` [PATCH v2 0/3] ASoC: multi-comp: OMAP platform fixes Jarkko Nikula
2010-08-07 12:02 ` Liam Girdwood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1281093038-24247-4-git-send-email-peter.ujfalusi@nokia.com \
--to=peter.ujfalusi@nokia.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=jkrzyszt@tis.icnet.pl \
--cc=lrg@slimlogic.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).