]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP3: Enable writing to XCCR and RCCR McBSP registers for OMAP 2430/34xx
authorLopez Cruz, Misael <x0052729@ti.com>
Fri, 19 Dec 2008 02:53:12 +0000 (20:53 -0600)
committerTony Lindgren <tony@atomide.com>
Thu, 8 Jan 2009 15:54:39 +0000 (17:54 +0200)
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.

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
arch/arm/plat-omap/mcbsp.c

index 6a0d1a0a24a7d86f2f767130de8ed9ea95073e3c..cc48f2f33d606310838539c4bdc1feb738f13cdd 100644 (file)
 #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 {
index af33fc713e1a325d7e5179d8fa20921ebc1e152d..f2401a831f991f3f2a27a1705ae32c14190b9bbc 100644 (file)
@@ -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);