From: Tony Lindgren <tony@atomide.com>
To: linux-arm-kernel@lists.arm.linux.org.uk
Cc: linux-omap@vger.kernel.org,
Jarkko Nikula <jarkko.nikula@nokia.com>,
Misael Lopez Cruz <x0052729@ti.com>
Subject: [PATCH 09/10] ARM: OMAP: Fix ASoC by enabling writes to XCCR and RCCR McBSP registers
Date: Mon, 12 Jan 2009 16:48:47 +0200 [thread overview]
Message-ID: <20090112144847.24205.82344.stgit@localhost> (raw)
In-Reply-To: <20090112143405.24205.52151.stgit@localhost>
From: Tony Lindgren <Lopez>
This patch enables writing to McBSP Transmit Configuration Control
Register (XCCR) and Receive Configuration Control Register (RCCR)
for 2430/34xx platforms. It also adds XCCR, RCCR entries in McBSP
register configuration structure and bit definitions for both
registers.
If we enable the writing to CCR registers for 2430/34xx and don't
set the default values (setting 0 as a consequence) in ASoC driver,
the Transmit/Receive DMA mode gets disabled and the the
transmission/reception doesn't happen, ending with a
"write error: Input/Output error" when playing with 'aplay'.
Cc: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/include/mach/mcbsp.h | 7 +++++++
arch/arm/plat-omap/mcbsp.c | 4 ++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-omap/include/mach/mcbsp.h b/arch/arm/plat-omap/include/mach/mcbsp.h
index 6a0d1a0..cc48f2f 100644
--- a/arch/arm/plat-omap/include/mach/mcbsp.h
+++ b/arch/arm/plat-omap/include/mach/mcbsp.h
@@ -231,11 +231,16 @@
#define XPBBLK(value) ((value)<<7) /* Bits 7:8 */
/*********************** McBSP XCCR bit definitions *************************/
+#define EXTCLKGATE 0x8000
+#define PPCONNECT 0x4000
+#define DXENDLY(value) ((value)<<12) /* Bits 12:13 */
+#define XFULL_CYCLE 0x0800
#define DILB 0x0020
#define XDMAEN 0x0008
#define XDISABLE 0x0001
/********************** McBSP RCCR bit definitions *************************/
+#define RFULL_CYCLE 0x0800
#define RDMAEN 0x0008
#define RDISABLE 0x0001
@@ -267,6 +272,8 @@ struct omap_mcbsp_reg_cfg {
u16 rcerh;
u16 xcerg;
u16 xcerh;
+ u16 xccr;
+ u16 rccr;
};
typedef enum {
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index af33fc7..f2401a8 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -173,6 +173,10 @@ void omap_mcbsp_config(unsigned int id, const struct omap_mcbsp_reg_cfg *config)
OMAP_MCBSP_WRITE(io_base, MCR2, config->mcr2);
OMAP_MCBSP_WRITE(io_base, MCR1, config->mcr1);
OMAP_MCBSP_WRITE(io_base, PCR0, config->pcr0);
+ if (cpu_is_omap2430() || cpu_is_omap34xx()) {
+ OMAP_MCBSP_WRITE(io_base, XCCR, config->xccr);
+ OMAP_MCBSP_WRITE(io_base, RCCR, config->rccr);
+ }
}
EXPORT_SYMBOL(omap_mcbsp_config);
next prev parent reply other threads:[~2009-01-12 14:48 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-12 14:37 [PATCH 00/10] Omap fixes for 2.6.29-rc1 Tony Lindgren
2009-01-12 14:38 ` [PATCH 01/10] ARM: OMAP: Fix compile for various McBSP Tony Lindgren
2009-01-12 14:39 ` [PATCH 02/10] ARM: OMAP: Fix compile for palmte Tony Lindgren
2009-01-12 14:41 ` [PATCH 03/10] ARM: OMAP: Fix gpio by switching to generic gpio calls, v2 Tony Lindgren
2009-01-12 14:42 ` [PATCH 04/10] ARM: OMAP: Fix compile for beagle Tony Lindgren
2009-01-12 14:43 ` [PATCH 05/10] ARM: OMAP: Fix gpio.c compile on 15xx with CONFIG_DEBUGFS Tony Lindgren
2009-01-12 14:44 ` [PATCH 06/10] ARM: OMAP: Fix DMA CCR programming for request line > 63 Tony Lindgren
2009-01-12 14:59 ` Gadiyar, Anand
2009-01-12 15:35 ` Tony Lindgren
2009-01-12 15:58 ` Russell King - ARM Linux
2009-01-12 16:01 ` Russell King - ARM Linux
2009-01-12 16:10 ` [PATCH 06/10] ARM: OMAP: Fix DMA CCR programming for request line > 63, v2 Tony Lindgren
2009-01-12 16:16 ` Russell King - ARM Linux
2009-01-12 16:40 ` Tony Lindgren
2009-01-12 16:42 ` Russell King - ARM Linux
2009-01-15 12:08 ` Tony Lindgren
2009-01-12 14:46 ` [PATCH 07/10] ARM: OMAP: remove duplicated #include's Tony Lindgren
2009-01-12 14:47 ` [PATCH 08/10] ARM: OMAP: Fix OSK ASoC by registering I2C board info for tlvaic23 Tony Lindgren
2009-01-12 14:48 ` Tony Lindgren [this message]
2009-01-12 14:50 ` [PATCH 10/10] ARM: OMAP: Remove unused platform devices for old ALSA code Tony Lindgren
2009-01-15 12:11 ` Tony Lindgren
2009-01-15 13:10 ` [PATCH 10/10] ARM: OMAP: Remove unused platform devices, v3 Tony Lindgren
2009-01-15 12:13 ` [PATCH 11/10] ARM: OMAP: Fix compile for h3 MMC Tony Lindgren
2009-01-13 14:35 ` git-pull request for omap-fixes for 2.6.29-rc1 (Re: [PATCH 00/10] Omap fixes for 2.6.29-rc1) Tony Lindgren
2009-01-15 10:37 ` Russell King - ARM Linux
2009-01-15 11:13 ` David Brownell
2009-01-15 11:26 ` Tony Lindgren
2009-01-15 12:40 ` Russell King - ARM Linux
2009-01-15 13:15 ` Felipe Balbi
2009-01-15 13:34 ` Russell King - ARM Linux
2009-01-15 14:49 ` Alan Stern
2009-01-15 15:16 ` Russell King - ARM Linux
2009-01-15 13:37 ` Tony Lindgren
2009-01-15 13:49 ` Russell King - ARM Linux
2009-01-17 14:26 ` Russell King - ARM Linux
2009-01-17 20:47 ` David Brownell
2009-01-18 11:40 ` Tony Lindgren
2009-01-18 11:42 ` Russell King - ARM Linux
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=20090112144847.24205.82344.stgit@localhost \
--to=tony@atomide.com \
--cc=jarkko.nikula@nokia.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-omap@vger.kernel.org \
--cc=x0052729@ti.com \
/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