Skip to contentSkip to conversation

omap24xx mcbsp support

PATCH In review Komal Shah 2 participants 3 messages Nov 21, 2005 – Nov 22, 2005

Subsystems (4)
lore
Share & tools
lore

Komal Shah

author
#0 lore raw

PATCH 1/1 omap24xx mcbsp support

Tony,

I have added the omap24xx mcbsp support to existing mcbsp framework. Only tested with dumping the registers.

Initializing OMAP McBSP system
Muxing Y15_24XX_MCBSP2_CLKX (0x48000124): 0x0f -> 0x09 Muxing V15_24XX_MCBSP2_DX (0x48000127): 0x0f -> 0x09 Muxing R14_24XX_MCBSP2_FSX (0x48000125): 0x0f -> 0x09 Muxing W15_24XX_MCBSP2_DR (0x48000126): 0x0f -> 0x09 Muxing V14_24XX_GPIO117 (0x48000128): 0x0f -> 0x0b **** MCBSP1 regs ****

DRR2:  0x0000
DRR1:  0x0000
DXR2:  0x0000
DXR1:  0x0000
SPCR2: 0x0000
SPCR1: 0x0000
RCR2:  0x0000
RCR1:  0x0000
XCR2:  0x0000
XCR1:  0x0000
SRGR2: 0x2000
SRGR1: 0x0001
PCR0:  0x0000
***********************
**** MCBSP2 regs ****
DRR2:  0x0000
DRR1:  0x0000
DXR2:  0x0000
DXR1:  0x0000
SPCR2: 0x0000
SPCR1: 0x0000
RCR2:  0x0000
RCR1:  0x0000
XCR2:  0x0000
XCR1:  0x0000
SRGR2: 0x2000
SRGR1: 0x0001
PCR0:  0x0000

***********************

Have you tested the dma chaining on 24xx? Next plan is to add audio and touchscreen support taking spi code from 2.6.9 for time being. Once audio + ts is tested then we can move to better spi framework from spi-devel guys.

---Komal Shah
http://komalshah.blogspot.com/

__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

arch/arm/mach-omap2/devices.c +0 -0
arch/arm/mach-omap2/io.c +0 -0
arch/arm/mach-omap2/mux.c +7 -0
index ea46548..391070e 100644
@@ -53,6 +53,13 @@ MUX_CFG_24XX("W19_24XX_SYS_NIRQ",	0x12c,
 /* 24xx GPIO */
 MUX_CFG_24XX("Y20_24XX_GPIO60",		0x12c,	3,	0,	0,	1)
 MUX_CFG_24XX("M15_24XX_GPIO92",		0x10a,	3,	0,	0,	1)
+MUX_CFG_24XX("V14_24XX_GPIO117",	0x128,	3,	1,	0,	1)
+
+/* MCBSP2 */
+MUX_CFG_24XX("Y15_24XX_MCBSP2_CLKX",	0x124,	1,	1,	0,	1)
+MUX_CFG_24XX("R14_24XX_MCBSP2_FSX",	0x125,	1,	1,	0,	1)
+MUX_CFG_24XX("W15_24XX_MCBSP2_DR",	0x126,	1,	1,	0,	1)
+MUX_CFG_24XX("V15_24XX_MCBSP2_DX",	0x127,	1,	1,	0,	1)
 
 };
 
arch/arm/plat-omap/dma.c +0 -0
arch/arm/plat-omap/mcbsp.c +109 -26

223 lines not on this page · raw message

arch/arm/plat-omap/mux.c +0 -0
include/asm-arm/arch-omap/io.h +0 -0
include/asm-arm/arch-omap/irqs.h +4 -0
index 9779686..ffe4a38 100644
@@ -242,6 +242,10 @@
 #define INT_24XX_GPIO_BANK2	30
 #define INT_24XX_GPIO_BANK3	31
 #define INT_24XX_GPIO_BANK4	32
+#define INT_24XX_McBSP1TX	59
+#define INT_24XX_McBSP1RX	60
+#define INT_24XX_McBSP2TX	62
+#define INT_24XX_McBSP2RX	63
 
 /* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and
  * 16 MPUIO lines */
include/asm-arm/arch-omap/mcbsp.h +42 -0

58 lines not on this page · raw message

include/asm-arm/arch-omap/mux.h +8 -0
index ef4f6ea..7da41ee 100644
@@ -406,6 +406,14 @@ enum omap24xx_index {
 	/* 24xx GPIO */
 	Y20_24XX_GPIO60,
 	M15_24XX_GPIO92,
+	V14_24XX_GPIO117,
+
+	/* MCBSP2 */
+	Y15_24XX_MCBSP2_CLKX,
+	W15_24XX_MCBSP2_DR,
+	V15_24XX_MCBSP2_DX,
+	R14_24XX_MCBSP2_FSX,
+
 };
 
 #ifdef	CONFIG_OMAP_MUX
include/asm-arm/arch-omap/omap24xx.h +0 -0
include/asm-arm/io.h +0 -0
sound/oss/Makefile +0 -0

_______________________________________________
Linux-omap-open-source mailing list
[email protected]
http://linux.omap.com/mailman/listinfo/linux-omap-open-source

maintainer
#1 lore raw
Quoted 4 lines · Komal Shah

Tony,

I have added the omap24xx mcbsp support to existing mcbsp framework. Only tested with dumping the registers.

OK

Quoted 4 lines

Have you tested the dma chaining on 24xx? Next plan is to add audio and touchscreen support taking spi code from 2.6.9 for time being. Once audio + ts is tested then we can move to better spi framework from spi-devel guys.

No, I've only tested dma with memory-to-memory transfers and MMC on 24xx. So audio would be a good test :)

One comment on the patch below:

Quoted 16 lines
arch/arm/plat-omap/mcbsp.c +4 -2
@@ -228,8 +231,10 @@ int omap_mcbsp_request(unsigned int id)
 	 * On 1510, 1610 and 1710, McBSP1 and McBSP3
 	 * are DSP public peripherals.
 	 */
-	if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3)
-		omap_mcbsp_dsp_request();
+	if (cpu_is_omap1510() || cpu_is_omap16xx()) {
+		if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3)
+			omap_mcbsp_dsp_request();
+	}
 
 	spin_lock(&mcbsp[id].lock);
 	if (!mcbsp[id].free) {
@@ -274,8 +279,10 @@ void omap_mcbsp_free(unsigned int id)
 	if (omap_mcbsp_check(id) < 0)
 		return;

arch/arm/plat-omap/mcbsp.c void omap_mcbsp_free(unsigned int id) · line 288

Quoted 10 lines
arch/arm/plat-omap/mcbsp.c +4 -2
 
-	if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3)
-		omap_mcbsp_dsp_free();
+	if (cpu_is_omap1510() || cpu_is_omap24xx()) {
+		if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3)
+			omap_mcbsp_dsp_free();
+	}
 
 	spin_lock(&mcbsp[id].lock);
 	if (mcbsp[id].free) {

AFAIK 730 and 24xx do not have mcbsp wired to DSP, and only 15xx and 16xx have it wired to DSP. Then the second chunk above should probably be also if (cpu_is_omap1510() || cpu_is_omap16xx()) ?

Regards,

Tony

author
#2 lore raw
Quoted 27 lines · --- Tony Lindgren

One comment on the patch below:

Quoted 24 lines
arch/arm/plat-omap/mcbsp.c +8 -4
@@ -228,8 +231,10 @@ int omap_mcbsp_request(unsigned int id)
 	 * On 1510, 1610 and 1710, McBSP1 and McBSP3
 	 * are DSP public peripherals.
 	 */
-	if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3)
-		omap_mcbsp_dsp_request();
+	if (cpu_is_omap1510() || cpu_is_omap16xx()) {
+		if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3)
+			omap_mcbsp_dsp_request();
+	}
 
 	spin_lock(&mcbsp[id].lock);
 	if (!mcbsp[id].free) {
@@ -274,8 +279,10 @@ void omap_mcbsp_free(unsigned int id)
 	if (omap_mcbsp_check(id) < 0)
 		return;
 
-	if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3)
-		omap_mcbsp_dsp_free();
+	if (cpu_is_omap1510() || cpu_is_omap24xx()) {
+		if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3)
+			omap_mcbsp_dsp_free();
+	}
 
Quoted 6 lines

arch/arm/plat-omap/mcbsp.c void omap_mcbsp_free(unsigned int id) · line 288

Quoted 2 lines
arch/arm/plat-omap/mcbsp.c +0 -0
 	spin_lock(&mcbsp[id].lock);
 	if (mcbsp[id].free) {

AFAIK 730 and 24xx do not have mcbsp wired to DSP, and only 15xx and 16xx have it wired to DSP. Then the second chunk above should probably be also if (cpu_is_omap1510() || cpu_is_omap16xx()) ?

OK. I will modify that. Thanx for the review.

---Komal Shah
http://komalshah.blogspot.com/

__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com