Skip to contentSkip to conversation

Updates on mcbsp driver

PATCH In review Eduardo Valentin 6 participants 19 messages Apr 24, 2008 – Apr 25, 2008

Subsystems (5)
lore
Share & tools
lore
#4 lore raw

PATCH 4/5 OMAP3xx: Add DMA and IRQ definition for McBSP 1 and 2

In reply to Eduardo Valentin

From: Eduardo Valentin <[email protected]>

This patch adds DMA and IRQ definition for McBSP 1 and 2 devices for omap34xx based systems.

---
 include/asm-arm/arch-omap/dma.h  |    4 ++++
 include/asm-arm/arch-omap/irqs.h |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
include/asm-arm/arch-omap/dma.h +4 -0
index be0431e..270e158 100644
@@ -273,6 +273,10 @@
 #define OMAP24XX_DMA_MS			63	/* S_DMA_62 */
 #define OMAP242X_DMA_EXT_DMAREQ5	64	/* S_DMA_63 */
 #define OMAP243X_DMA_EXT_DMAREQ6	64	/* S_DMA_63 */
+#define OMAP34XX_DMA_MCBSP1_TX		31	/* S_DMA_30 */
+#define OMAP34XX_DMA_MCBSP1_RX		32	/* S_DMA_31 */
+#define OMAP34XX_DMA_MCBSP2_TX		33	/* S_DMA_32 */
+#define OMAP34XX_DMA_MCBSP2_RX		34	/* S_DMA_33 */
 #define OMAP34XX_DMA_EXT_DMAREQ3	64	/* S_DMA_63 */
 #define OMAP34XX_DMA_AES2_TX		65	/* S_DMA_64 */
 #define OMAP34XX_DMA_AES2_RX		66	/* S_DMA_65 */
include/asm-arm/arch-omap/irqs.h +4 -0
index 15446fd..4e185a8 100644
@@ -316,7 +316,11 @@
 #define INT_34XX_USIM_IRQ	35
 #define INT_34XX_WDT3_IRQ	36
 #define INT_34XX_SPI4_IRQ	48
+#define INT_34XX_MCBSP1_IRQ_TX	59
+#define INT_34XX_MCBSP1_IRQ_RX	60
 #define INT_34XX_I2C3_IRQ	61
+#define INT_34XX_MCBSP2_IRQ_TX	62
+#define INT_34XX_MCBSP2_IRQ_RX	63
 #define INT_34XX_PBIAS_IRQ	75
 #define INT_34XX_OHCI_IRQ	76
 #define INT_34XX_EHCI_IRQ	77
Signature · 1 line
1.5.5.1.67.gbdb8.dirty
#2 lore raw

PATCH 2/5 MACH-OMAP1: MCBSP: Add support for mcbsp on mach-omap1

In reply to Eduardo Valentin

From: Eduardo Valentin <[email protected]>

This patch adds support for mach-omap1 based on current mcbsp platform driver.

---
 arch/arm/mach-omap1/Makefile |    2 +
 arch/arm/mach-omap1/mcbsp.c  |  166 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 168 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap1/mcbsp.c
arch/arm/mach-omap1/Makefile +2 -0
index 6ebf23b..09246a7 100644
@@ -5,6 +5,8 @@
 # Common support
 obj-y := io.o id.o clock.o irq.o mux.o serial.o devices.o
 
+obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
+
 obj-$(CONFIG_OMAP_MPU_TIMER)	+= time.o
 obj-$(CONFIG_OMAP_32K_TIMER)	+= timer32k.o
 
arch/arm/mach-omap1/mcbsp.c new file +166 -0

166 lines not on this page · raw message

Signature · 1 line
1.5.5.1.67.gbdb8.dirty
#0 lore raw

cover Updates on mcbsp driver

From: Eduardo Valentin <[email protected]>

This patch series updates mcbsp driver by transforming it into a platform driver. This is a very initial implementation. Basically it moves machine specific code to their correct place and creates the platform driver necessary structures.

It must be working for previous boards. For omap34xx it should work for mcbsp 1 and 2.

In order to do not break other places, I tryied to do not change previous API. But future improvements are needed.

Clock definitions for mcbsp 1 and 2 were also modified to add correct support for omap34xx.

Comments are wellcome.

Cheers,

Eduardo Valentin (5):
PLAT-OMAP: MCBSP: Tranform into platform driver
MACH-OMAP1: MCBSP: Add support for mcbsp on mach-omap1 Fix mcbsp clock definition on clock34xx.h
OMAP3xx: Add DMA and IRQ definition for McBSP 1 and 2
MACH-OMAP2: MCBSP: Add support for mcbsp on mach-omap2

 arch/arm/mach-omap1/Makefile      |    2 +
 arch/arm/mach-omap1/mcbsp.c       |  166 +++++++++
 arch/arm/mach-omap2/Makefile      |    2 +
 arch/arm/mach-omap2/clock34xx.h   |   30 ++-
 arch/arm/mach-omap2/mcbsp.c       |  108 ++++++
 arch/arm/plat-omap/devices.c      |   45 +++
 arch/arm/plat-omap/mcbsp.c        |  662 ++++++++++++++-----------------------
 include/asm-arm/arch-omap/dma.h   |    4 +
 include/asm-arm/arch-omap/irqs.h  |    4 +
 include/asm-arm/arch-omap/mcbsp.h |   73 ++++-
 10 files changed, 675 insertions(+), 421 deletions(-)
 create mode 100644 arch/arm/mach-omap1/mcbsp.c
 create mode 100644 arch/arm/mach-omap2/mcbsp.c
#3 lore raw

PATCH 3/5 Fix mcbsp clock definition on clock34xx.h

In reply to Eduardo Valentin

From: Eduardo Valentin <[email protected]>

This patch fix the clock definition for mcbsps on clock34xx.h. Device identification must be done using .id field, not only name field.

---
 arch/arm/mach-omap2/clock34xx.h |   30 ++++++++++++++++++++----------
 1 files changed, 20 insertions(+), 10 deletions(-)
arch/arm/mach-omap2/clock34xx.h +20 -10
index f10a9a5..4b16bb9 100644
@@ -1472,7 +1472,8 @@ static const struct clksel mcbsp_15_clksel[] = {
 };
 
 static struct clk mcbsp5_fck = {
-	.name		= "mcbsp5_fck",
+	.name		= "mcbsp_fck",
+	.id		= 5,
 	.init		= &omap2_init_clksel_parent,
 	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
 	.enable_bit	= OMAP3430_EN_MCBSP5_SHIFT,
@@ -1485,7 +1486,8 @@ static struct clk mcbsp5_fck = {
 };
 
 static struct clk mcbsp1_fck = {
-	.name		= "mcbsp1_fck",
+	.name		= "mcbsp_fck",
+	.id		= 1,
 	.init		= &omap2_init_clksel_parent,
 	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
 	.enable_bit	= OMAP3430_EN_MCBSP1_SHIFT,
@@ -1933,7 +1935,8 @@ static struct clk gpt10_ick = {
 };
 
 static struct clk mcbsp5_ick = {
-	.name		= "mcbsp5_ick",
+	.name		= "mcbsp_ick",
+	.id		= 5,
 	.parent		= &core_l4_ick,
 	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
 	.enable_bit	= OMAP3430_EN_MCBSP5_SHIFT,
@@ -1943,7 +1946,8 @@ static struct clk mcbsp5_ick = {
 };
 
 static struct clk mcbsp1_ick = {
-	.name		= "mcbsp1_ick",
+	.name		= "mcbsp_ick",
+	.id		= 1,
 	.parent		= &core_l4_ick,
 	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
 	.enable_bit	= OMAP3430_EN_MCBSP1_SHIFT,
@@ -2768,7 +2772,8 @@ static struct clk gpt2_ick = {
 };
 
 static struct clk mcbsp2_ick = {
-	.name		= "mcbsp2_ick",
+	.name		= "mcbsp_ick",
+	.id		= 2,
 	.parent		= &per_l4_ick,
 	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
 	.enable_bit	= OMAP3430_EN_MCBSP2_SHIFT,
@@ -2778,7 +2783,8 @@ static struct clk mcbsp2_ick = {
 };
 
 static struct clk mcbsp3_ick = {
-	.name		= "mcbsp3_ick",
+	.name		= "mcbsp_ick",
+	.id		= 3,
 	.parent		= &per_l4_ick,
 	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
 	.enable_bit	= OMAP3430_EN_MCBSP3_SHIFT,
@@ -2788,7 +2794,8 @@ static struct clk mcbsp3_ick = {
 };
 
 static struct clk mcbsp4_ick = {
-	.name		= "mcbsp4_ick",
+	.name		= "mcbsp_ick",
+	.id		= 4,
 	.parent		= &per_l4_ick,
 	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
 	.enable_bit	= OMAP3430_EN_MCBSP4_SHIFT,
@@ -2804,7 +2811,8 @@ static const struct clksel mcbsp_234_clksel[] = {
 };
 
 static struct clk mcbsp2_fck = {
-	.name		= "mcbsp2_fck",
+	.name		= "mcbsp_fck",
+	.id		= 2,
 	.init		= &omap2_init_clksel_parent,
 	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
 	.enable_bit	= OMAP3430_EN_MCBSP2_SHIFT,
@@ -2817,7 +2825,8 @@ static struct clk mcbsp2_fck = {
 };
 
 static struct clk mcbsp3_fck = {
-	.name		= "mcbsp3_fck",
+	.name		= "mcbsp_fck",
+	.id		= 3,
 	.init		= &omap2_init_clksel_parent,
 	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
 	.enable_bit	= OMAP3430_EN_MCBSP3_SHIFT,
@@ -2830,7 +2839,8 @@ static struct clk mcbsp3_fck = {
 };
 
 static struct clk mcbsp4_fck = {
-	.name		= "mcbsp4_fck",
+	.name		= "mcbsp_fck",
+	.id		= 4,
 	.init		= &omap2_init_clksel_parent,
 	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
 	.enable_bit	= OMAP3430_EN_MCBSP4_SHIFT,
Signature · 1 line
1.5.5.1.67.gbdb8.dirty
#5 lore raw

PATCH 5/5 MACH-OMAP2: MCBSP: Add support for mcbsp on mach-omap2

In reply to Eduardo Valentin

From: Eduardo Valentin <[email protected]>

This patch adds support for mach-omap2 based on current mcbsp platform driver.

---
 arch/arm/mach-omap2/Makefile |    2 +
 arch/arm/mach-omap2/mcbsp.c  |  108 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 110 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/mcbsp.c
arch/arm/mach-omap2/Makefile +2 -0
index 06348d3..05f1612 100644
@@ -7,6 +7,8 @@ obj-y := irq.o id.o io.o memory.o control.o prcm.o clock.o mux.o \
 		devices.o serial.o gpmc.o timer-gp.o powerdomain.o \
 		clockdomain.o
 
+obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
+
 # Functions loaded to SRAM
 obj-$(CONFIG_ARCH_OMAP2)		+= sram24xx.o
 
arch/arm/mach-omap2/mcbsp.c new file +108 -0

108 lines not on this page · raw message

Signature · 1 line
1.5.5.1.67.gbdb8.dirty
#1 lore raw

PATCH 1/5 PLAT-OMAP: MCBSP: Tranform into platform driver

In reply to Eduardo Valentin

From: Eduardo Valentin <[email protected]>

This patch transform mcbsp code into a very initial implementation of a platform driver.

It also gets ride of ifdefs on mcbsp.c code.
To do it, a platform data structure was defined.

Platform devices are located in arch/arm/plat-omap/devices.c

---
 arch/arm/plat-omap/devices.c      |   45 +++
 arch/arm/plat-omap/mcbsp.c        |  662 ++++++++++++++-----------------------
 include/asm-arm/arch-omap/mcbsp.h |   73 ++++-
 3 files changed, 369 insertions(+), 411 deletions(-)
arch/arm/plat-omap/devices.c +45 -0
index 6f07451..415bcd7 100644
@@ -27,6 +27,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/menelaus.h>
 #include <asm/arch/dsp_common.h>
+#include <asm/arch/mcbsp.h>
 
 #if	defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE)
 
@@ -150,6 +151,49 @@ static inline void omap_init_kp(void) {}
 #endif
 
 /*-------------------------------------------------------------------------*/
+#if defined(CONFIG_OMAP_MCBSP) || defined(CONFIG_OMAP_MCBSP_MODULE)
+
+static struct platform_device omap_mcbsp_devices[OMAP_MAX_MCBSP_COUNT];
+static int mcbsps_configured;
+
+void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,
+					int size)
+{
+	int i;
+
+	if (size > OMAP_MAX_MCBSP_COUNT) {
+		printk(KERN_WARNING "Registered too many McBSPs platform_data."
+			" Using maximum (%d) available.\n",
+			OMAP_MAX_MCBSP_COUNT);
+		size = OMAP_MAX_MCBSP_COUNT;
+	}
+
+	for (i = 0; i < size; i++) {
+		struct platform_device *new_mcbsp = &omap_mcbsp_devices[i];
+		new_mcbsp->name = "omap-mcbsp";
+		new_mcbsp->id = i + 1;
+		new_mcbsp->dev.platform_data = &config[i];
+	}
+	mcbsps_configured = size;
+}
+
+static void __init omap_init_mcbsp(void)
+{
+	int i;
+
+	for (i = 0; i < mcbsps_configured; i++)
+		platform_device_register(&omap_mcbsp_devices[i]);
+}
+#else
+void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,
+					int size)
+{  }
+
+static inline void __init omap_init_mcbsp(void)
+{  }
+#endif
+
+/*-------------------------------------------------------------------------*/
 
 #if	defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) \
 	|| defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
@@ -511,6 +555,7 @@ static int __init omap_init_devices(void)
 	 */
 	omap_init_dsp();
 	omap_init_kp();
+	omap_init_mcbsp();
 	omap_init_mmc();
 	omap_init_uwire();
 	omap_init_wdt();
arch/arm/plat-omap/mcbsp.c +253 -409

919 lines not on this page · raw message

include/asm-arm/arch-omap/mcbsp.h +71 -2

104 lines not on this page · raw message

Signature · 1 line
1.5.5.1.67.gbdb8.dirty
#15 lore raw
In reply to Eduardo Valentin
Quoted 10 lines · Eduardo Valentin

From: Eduardo Valentin <[email protected]>

This patch series updates mcbsp driver by transforming it into a platform driver. This is a very initial implementation. Basically it moves machine specific code to their correct place and creates the platform driver necessary structures.

It must be working for previous boards. For omap34xx it should work for mcbsp 1 and 2.

Quoted 7 lines

In order to do not break other places, I tryied to do not change previous API. But future improvements are needed.

Clock definitions for mcbsp 1 and 2 were also modified to add correct support for omap34xx.

Comments are wellcome.

checkpatch doesn't complain, although i didn't really test it.

Signature · 5 lines
Best Regards,

Felipe Balbi
[email protected]
http://blog.felipebalbi.com
#16 lore raw
Quoted 14 lines · ext Felipe Balbi
Quoted 13 lines · Eduardo Valentin

From: Eduardo Valentin <[email protected]>

This patch series updates mcbsp driver by transforming it into a platform driver. This is a very initial implementation. Basically it moves machine specific code to their correct place and creates the platform driver necessary structures.

It must be working for previous boards. For omap34xx it should work for mcbsp 1 and 2.

In order to do not break other places, I tryied to do not change previous API. But future improvements are needed.

Quoted 6 lines
Quoted 4 lines

Clock definitions for mcbsp 1 and 2 were also modified to add correct support for omap34xx.

Comments are wellcome.

checkpatch doesn't complain, although i didn't really test it.

However I'd prefer see this patchset being merged with

[RFC/PATCH 1/1] McBSP support for 2430/34XX

and only later considered for integration.

Signature · 7 lines
Cheers, Igor

---

Igor Stoppa
Next Generation Software
Nokia Devices R&D - Helsinki
maintainer
#17 lore raw
Quoted 20 lines · Igor Stoppa
Quoted 19 lines · ext Felipe Balbi
Quoted 17 lines · Eduardo Valentin

From: Eduardo Valentin <[email protected]>

This patch series updates mcbsp driver by transforming it into a platform driver. This is a very initial implementation. Basically it moves machine specific code to their correct place and creates the platform driver necessary structures.

It must be working for previous boards. For omap34xx it should work for mcbsp 1 and 2.

In order to do not break other places, I tryied to do not change previous API. But future improvements are needed.

Clock definitions for mcbsp 1 and 2 were also modified to add correct support for omap34xx.

Comments are wellcome.

Quoted 7 lines
Quoted 1 line

checkpatch doesn't complain, although i didn't really test it.

However I'd prefer see this patchset being merged with

[RFC/PATCH 1/1] McBSP support for 2430/34XX

and only later considered for integration.

Yeah, Chandra and Eduardo, can you guys put together a merged series of patches?

Tony

maintainer
#6 lore raw

Re: [PATCH 4/5] OMAP3xx: Add DMA and IRQ definition for McBSP 1 and 2

In reply to Eduardo Valentin
Quoted 4 lines · Eduardo Valentin

From: Eduardo Valentin <[email protected]>

This patch adds DMA and IRQ definition for McBSP 1 and 2 devices for omap34xx based systems.

I'll push this patch only for now.

Tony

Quoted 44 lines
---
 include/asm-arm/arch-omap/dma.h  |    4 ++++
 include/asm-arm/arch-omap/irqs.h |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
include/asm-arm/arch-omap/dma.h +4 -0
index be0431e..270e158 100644
@@ -273,6 +273,10 @@
 #define OMAP24XX_DMA_MS			63	/* S_DMA_62 */
 #define OMAP242X_DMA_EXT_DMAREQ5	64	/* S_DMA_63 */
 #define OMAP243X_DMA_EXT_DMAREQ6	64	/* S_DMA_63 */
+#define OMAP34XX_DMA_MCBSP1_TX		31	/* S_DMA_30 */
+#define OMAP34XX_DMA_MCBSP1_RX		32	/* S_DMA_31 */
+#define OMAP34XX_DMA_MCBSP2_TX		33	/* S_DMA_32 */
+#define OMAP34XX_DMA_MCBSP2_RX		34	/* S_DMA_33 */
 #define OMAP34XX_DMA_EXT_DMAREQ3	64	/* S_DMA_63 */
 #define OMAP34XX_DMA_AES2_TX		65	/* S_DMA_64 */
 #define OMAP34XX_DMA_AES2_RX		66	/* S_DMA_65 */
include/asm-arm/arch-omap/irqs.h +4 -0
index 15446fd..4e185a8 100644
@@ -316,7 +316,11 @@
 #define INT_34XX_USIM_IRQ	35
 #define INT_34XX_WDT3_IRQ	36
 #define INT_34XX_SPI4_IRQ	48
+#define INT_34XX_MCBSP1_IRQ_TX	59
+#define INT_34XX_MCBSP1_IRQ_RX	60
 #define INT_34XX_I2C3_IRQ	61
+#define INT_34XX_MCBSP2_IRQ_TX	62
+#define INT_34XX_MCBSP2_IRQ_RX	63
 #define INT_34XX_PBIAS_IRQ	75
 #define INT_34XX_OHCI_IRQ	76
 #define INT_34XX_EHCI_IRQ	77
Signature · 6 lines
1.5.5.1.67.gbdb8.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#7 lore raw

RE: [PATCH 4/5] OMAP3xx: Add DMA and IRQ definition for McBSP 1 and 2

In reply to Eduardo Valentin

<snip>

Quoted 6 lines
include/asm-arm/arch-omap/dma.h +0 -0
index be0431e..270e158 100644

include/asm-arm/arch-omap/dma.h line 282

Quoted 10 lines
include/asm-arm/arch-omap/dma.h +4 -0
@@ -273,6 +273,10 @@
 #define OMAP24XX_DMA_MS                      63      /* S_DMA_62 */
 #define OMAP242X_DMA_EXT_DMAREQ5     64      /* S_DMA_63 */
 #define OMAP243X_DMA_EXT_DMAREQ6     64      /* S_DMA_63 */
+#define OMAP34XX_DMA_MCBSP1_TX               31      /* S_DMA_30 */
+#define OMAP34XX_DMA_MCBSP1_RX               32      /* S_DMA_31 */
+#define OMAP34XX_DMA_MCBSP2_TX               33      /* S_DMA_32 */
+#define OMAP34XX_DMA_MCBSP2_RX               34      /* S_DMA_33 */
 #define OMAP34XX_DMA_EXT_DMAREQ3     64      /* S_DMA_63 */
 #define OMAP34XX_DMA_AES2_TX         65      /* S_DMA_64 */
 #define OMAP34XX_DMA_AES2_RX         66      /* S_DMA_65 */

What's the point of this patch? Can't you use OMAP24XX_DMA_MCBSP* names?

Quoted 7 lines
include/asm-arm/arch-omap/irqs.h +0 -0
index 15446fd..4e185a8 100644
@@ -316,7 +316,11 @@
 #define INT_34XX_USIM_IRQ    35

include/asm-arm/arch-omap/irqs.h line 326

Quoted 10 lines
include/asm-arm/arch-omap/irqs.h +4 -0
 #define INT_34XX_WDT3_IRQ    36
 #define INT_34XX_SPI4_IRQ    48
+#define INT_34XX_MCBSP1_IRQ_TX       59
+#define INT_34XX_MCBSP1_IRQ_RX       60
 #define INT_34XX_I2C3_IRQ    61
+#define INT_34XX_MCBSP2_IRQ_TX       62
+#define INT_34XX_MCBSP2_IRQ_RX       63
 #define INT_34XX_PBIAS_IRQ   75
 #define INT_34XX_OHCI_IRQ    76
 #define INT_34XX_EHCI_IRQ    77

Ditto with the IRQ lines?

@Tony,
It would be nice to give people some time to take a look at the patches before they get pushed.

Regards,
Anand

#8 lore raw

Re: [PATCH 4/5] OMAP3xx: Add DMA and IRQ definition for McBSP 1 and 2

Hi Anand,

Quoted 12 lines · Anand

<snip>

Quoted 10 lines
include/asm-arm/arch-omap/dma.h +1 -0
index be0431e..270e158 100644
@@ -273,6 +273,10 @@
 #define OMAP24XX_DMA_MS                      63      /* S_DMA_62 */
 #define OMAP242X_DMA_EXT_DMAREQ5     64      /* S_DMA_63 */
 #define OMAP243X_DMA_EXT_DMAREQ6     64      /* S_DMA_63 */
+#define OMAP34XX_DMA_MCBSP1_TX               31      /* S_DMA_30 */
Quoted 8 lines

include/asm-arm/arch-omap/dma.h line 282

Quoted 6 lines
include/asm-arm/arch-omap/dma.h +3 -0
+#define OMAP34XX_DMA_MCBSP1_RX               32      /* S_DMA_31 */
+#define OMAP34XX_DMA_MCBSP2_TX               33      /* S_DMA_32 */
+#define OMAP34XX_DMA_MCBSP2_RX               34      /* S_DMA_33 */
 #define OMAP34XX_DMA_EXT_DMAREQ3     64      /* S_DMA_63 */
 #define OMAP34XX_DMA_AES2_TX         65      /* S_DMA_64 */
 #define OMAP34XX_DMA_AES2_RX         66      /* S_DMA_65 */

What's the point of this patch? Can't you use OMAP24XX_DMA_MCBSP* names?

Yes, OMAP24XX_DMA_MCBSP* can be used as they have same values. There is no big difference, but readability. That's the point of this patch. Defining names OMAP34XX_DMA_MCBSP* would let people to
write more readable code when specifying things specific for OMAP34XX.

Quoted 13 lines
Quoted 13 lines
include/asm-arm/arch-omap/irqs.h +2 -0
index 15446fd..4e185a8 100644
@@ -316,7 +316,11 @@
 #define INT_34XX_USIM_IRQ    35
 #define INT_34XX_WDT3_IRQ    36
 #define INT_34XX_SPI4_IRQ    48
+#define INT_34XX_MCBSP1_IRQ_TX       59
+#define INT_34XX_MCBSP1_IRQ_RX       60
Quoted 8 lines

include/asm-arm/arch-omap/irqs.h line 326

Quoted 6 lines
include/asm-arm/arch-omap/irqs.h +2 -0
 #define INT_34XX_I2C3_IRQ    61
+#define INT_34XX_MCBSP2_IRQ_TX       62
+#define INT_34XX_MCBSP2_IRQ_RX       63
 #define INT_34XX_PBIAS_IRQ   75
 #define INT_34XX_OHCI_IRQ    76
 #define INT_34XX_EHCI_IRQ    77

Ditto with the IRQ lines?

same here.

Quoted 7 lines

@Tony,
It would be nice to give people some time to take a look at the patches before they get pushed.

Regards,
Anand

Signature · 1 line
Eduardo Bezerra Valentin
#18 lore raw
In reply to Tony Lindgren

Hi Tony and Igor,

<snip>

Quoted 12 lines
Quoted 8 lines
Quoted 2 lines

checkpatch doesn't complain, although i didn't really test it.

However I'd prefer see this patchset being merged with

[RFC/PATCH 1/1] McBSP support for 2430/34XX

and only later considered for integration.

Yeah, Chandra and Eduardo, can you guys put together a merged series of patches?

I'll check with Chandra the best way to merge this with his patch. However, it'd be nice to have comments for our patches before starting to merge.

Quoted 2 lines

Tony

Signature · 1 line
Eduardo Bezerra Valentin
#9 lore raw

RE: [PATCH 4/5] OMAP3xx: Add DMA and IRQ definition for McBSP 1 and 2

In reply to Eduardo Valentin
Quoted 21 lines
Quoted 12 lines

<snip>

Quoted 10 lines
include/asm-arm/arch-omap/dma.h +1 -0
index be0431e..270e158 100644
@@ -273,6 +273,10 @@
 #define OMAP24XX_DMA_MS                      63      /* S_DMA_62 */
 #define OMAP242X_DMA_EXT_DMAREQ5     64      /* S_DMA_63 */
 #define OMAP243X_DMA_EXT_DMAREQ6     64      /* S_DMA_63 */
+#define OMAP34XX_DMA_MCBSP1_TX               31      /* S_DMA_30 */
Quoted 8 lines

include/asm-arm/arch-omap/dma.h line 282

Quoted 6 lines
include/asm-arm/arch-omap/dma.h +3 -0
+#define OMAP34XX_DMA_MCBSP1_RX               32      /* S_DMA_31 */
+#define OMAP34XX_DMA_MCBSP2_TX               33      /* S_DMA_32 */
+#define OMAP34XX_DMA_MCBSP2_RX               34      /* S_DMA_33 */
 #define OMAP34XX_DMA_EXT_DMAREQ3     64      /* S_DMA_63 */
 #define OMAP34XX_DMA_AES2_TX         65      /* S_DMA_64 */
 #define OMAP34XX_DMA_AES2_RX         66      /* S_DMA_65 */

What's the point of this patch? Can't you use OMAP24XX_DMA_MCBSP* names?

Quoted 5 lines

Yes, OMAP24XX_DMA_MCBSP* can be used as they have same values. There is no big difference, but readability. That's the point of this patch.
Defining names OMAP34XX_DMA_MCBSP* would let people to write more readable code when specifying things specific for OMAP34XX.

I was under the impression that one wouldn't be writing code specific to OMAP34XX given that it would work with zero modifications on a 24XX as in this case. In such a case, would it not make more sense to use the more generic name? That was why I left it that way - anything common to a 24XX and a 34XX gets the OMAP24XX name.

__Quote__
OMAP242X_* for 2420 specific names
OMAP243X_* for 2430 specific names/names present from 243X onwards OMAP24XX_* for names common to all 24XX, 34XX OMAP34XX_* for 34XX specific names
__End_Quote__

That's why I did not see a point in this patch.

-Anand

#10 lore raw

RE: [PATCH 4/5] OMAP3xx: Add DMA and IRQ definition for McBSP 1 and 2

Quoted 27 lines
Quoted 13 lines
Quoted 13 lines

include/asm-arm/arch-omap/dma.h line 282

Quoted 11 lines
 #define OMAP24XX_DMA_MS                      63      /* S_DMA_62 */
 #define OMAP242X_DMA_EXT_DMAREQ5     64      /* S_DMA_63 */
 #define OMAP243X_DMA_EXT_DMAREQ6     64      /* S_DMA_63 */
include/asm-arm/arch-omap/dma.h +4 -0
+#define OMAP34XX_DMA_MCBSP1_TX               31      /* S_DMA_30 */
+#define OMAP34XX_DMA_MCBSP1_RX               32      /* S_DMA_31 */
+#define OMAP34XX_DMA_MCBSP2_TX               33      /* S_DMA_32 */
+#define OMAP34XX_DMA_MCBSP2_RX               34      /* S_DMA_33 */
 #define OMAP34XX_DMA_EXT_DMAREQ3     64      /* S_DMA_63 */
 #define OMAP34XX_DMA_AES2_TX         65      /* S_DMA_64 */
 #define OMAP34XX_DMA_AES2_RX         66      /* S_DMA_65 */

What's the point of this patch? Can't you use OMAP24XX_DMA_MCBSP*

names?

Quoted 6 lines

Yes, OMAP24XX_DMA_MCBSP* can be used as they have same values. There is no big difference, but readability. That's the point of this patch.
Defining names OMAP34XX_DMA_MCBSP* would let people to write more readable code when specifying things specific for OMAP34XX.

I was under the impression that one wouldn't be writing code specific to OMAP34XX given that it would work with zero modifications on a 24XX as in this case. In such a case, would it not make more sense to use the more generic name? That was why I left it that way - anything common to a 24XX and a 34XX gets the OMAP24XX name.

Quoted 7 lines

__Quote__
OMAP242X_* for 2420 specific names
OMAP243X_* for 2430 specific names/names present from 243X onwards OMAP24XX_* for names common to all 24XX, 34XX OMAP34XX_* for 34XX specific names
__End_Quote__

One small correction, can we make OMAP34XX as just OMAP3, today we have OMAP3410, 3420, 3430 and OMAP3530, 3503. We also have OMAP2530, but changing OMAP24XX to OMAP2 will be a painful task. Let's just take this up for OMAP3 alone.

Regards,
Khasim

maintainer
#12 lore raw

Re: [PATCH 4/5] OMAP3xx: Add DMA and IRQ definition for McBSP 1 and 2

In reply to Gadiyar, Anand
Quoted 40 lines · Gadiyar, Anand

<snip>

Quoted 6 lines
include/asm-arm/arch-omap/dma.h +0 -0
index be0431e..270e158 100644

include/asm-arm/arch-omap/dma.h line 282

Quoted 10 lines
include/asm-arm/arch-omap/dma.h +4 -0
@@ -273,6 +273,10 @@
 #define OMAP24XX_DMA_MS                      63      /* S_DMA_62 */
 #define OMAP242X_DMA_EXT_DMAREQ5     64      /* S_DMA_63 */
 #define OMAP243X_DMA_EXT_DMAREQ6     64      /* S_DMA_63 */
+#define OMAP34XX_DMA_MCBSP1_TX               31      /* S_DMA_30 */
+#define OMAP34XX_DMA_MCBSP1_RX               32      /* S_DMA_31 */
+#define OMAP34XX_DMA_MCBSP2_TX               33      /* S_DMA_32 */
+#define OMAP34XX_DMA_MCBSP2_RX               34      /* S_DMA_33 */
 #define OMAP34XX_DMA_EXT_DMAREQ3     64      /* S_DMA_63 */
 #define OMAP34XX_DMA_AES2_TX         65      /* S_DMA_64 */
 #define OMAP34XX_DMA_AES2_RX         66      /* S_DMA_65 */

What's the point of this patch? Can't you use OMAP24XX_DMA_MCBSP* names?

Quoted 7 lines
include/asm-arm/arch-omap/irqs.h +0 -0
index 15446fd..4e185a8 100644
@@ -316,7 +316,11 @@
 #define INT_34XX_USIM_IRQ    35

include/asm-arm/arch-omap/irqs.h line 326

Quoted 10 lines
include/asm-arm/arch-omap/irqs.h +4 -0
 #define INT_34XX_WDT3_IRQ    36
 #define INT_34XX_SPI4_IRQ    48
+#define INT_34XX_MCBSP1_IRQ_TX       59
+#define INT_34XX_MCBSP1_IRQ_RX       60
 #define INT_34XX_I2C3_IRQ    61
+#define INT_34XX_MCBSP2_IRQ_TX       62
+#define INT_34XX_MCBSP2_IRQ_RX       63
 #define INT_34XX_PBIAS_IRQ   75
 #define INT_34XX_OHCI_IRQ    76
 #define INT_34XX_EHCI_IRQ    77

Ditto with the IRQ lines?

Quoted 2 lines

@Tony,
It would be nice to give people some time to take a look at the patches before they get pushed.

Sorry, it seemed like a safe patch to push. I will revert it today.

In general, I try to keep patches floating on the mailing list for few days so people can review them.

Regards,

Tony

maintainer
#11 lore raw

Re: [PATCH 4/5] OMAP3xx: Add DMA and IRQ definition for McBSP 1 and 2

In reply to Syed Mohammed, Khasim
Quoted 35 lines · Syed Mohammed, Khasim
Quoted 27 lines
Quoted 13 lines
Quoted 13 lines

include/asm-arm/arch-omap/dma.h line 282

Quoted 11 lines
 #define OMAP24XX_DMA_MS                      63      /* S_DMA_62 */
 #define OMAP242X_DMA_EXT_DMAREQ5     64      /* S_DMA_63 */
 #define OMAP243X_DMA_EXT_DMAREQ6     64      /* S_DMA_63 */
include/asm-arm/arch-omap/dma.h +4 -0
+#define OMAP34XX_DMA_MCBSP1_TX               31      /* S_DMA_30 */
+#define OMAP34XX_DMA_MCBSP1_RX               32      /* S_DMA_31 */
+#define OMAP34XX_DMA_MCBSP2_TX               33      /* S_DMA_32 */
+#define OMAP34XX_DMA_MCBSP2_RX               34      /* S_DMA_33 */
 #define OMAP34XX_DMA_EXT_DMAREQ3     64      /* S_DMA_63 */
 #define OMAP34XX_DMA_AES2_TX         65      /* S_DMA_64 */
 #define OMAP34XX_DMA_AES2_RX         66      /* S_DMA_65 */

What's the point of this patch? Can't you use OMAP24XX_DMA_MCBSP*

names?

Quoted 6 lines

Yes, OMAP24XX_DMA_MCBSP* can be used as they have same values. There is no big difference, but readability. That's the point of this patch.
Defining names OMAP34XX_DMA_MCBSP* would let people to write more readable code when specifying things specific for OMAP34XX.

I was under the impression that one wouldn't be writing code specific to OMAP34XX given that it would work with zero modifications on a 24XX as in this case. In such a case, would it not make more sense to use the more generic name? That was why I left it that way - anything common to a 24XX and a 34XX gets the OMAP24XX name.

Quoted 7 lines

__Quote__
OMAP242X_* for 2420 specific names
OMAP243X_* for 2430 specific names/names present from 243X onwards OMAP24XX_* for names common to all 24XX, 34XX OMAP34XX_* for 34XX specific names
__End_Quote__

Quoted 1 line

One small correction, can we make OMAP34XX as just OMAP3, today we have OMAP3410, 3420, 3430 and OMAP3530, 3503. We also have OMAP2530, but changing OMAP24XX to OMAP2 will be a painful task. Let's just take this up for OMAP3 alone.

Sounds good to me. Then for stuff that covers omap2 and omap3, we should just OMAP2_* unless somebody have a better name.

And just to remind people, let's not start renaming things because of the patch noise it causes. Let's rather wait on clean-up like that until we have things in sync with mainline tree first.

Regards,

Tony

#13 lore raw

RE: [PATCH 4/5] OMAP3xx: Add DMA and IRQ definition for McBSP 1 and 2

In reply to Tony Lindgren
Quoted 51 lines

-----Original Message-----
From: Tony Lindgren [mailto:[email protected]]
Sent: Friday, April 25, 2008 10:16 PM
To: Gadiyar, Anand
Cc: Eduardo Valentin; [email protected]; Eduardo Valentin
Subject: Re: [PATCH 4/5] OMAP3xx: Add DMA and IRQ definition for McBSP 1 and 2

Quoted 40 lines · Gadiyar, Anand

<snip>

Quoted 6 lines
include/asm-arm/arch-omap/dma.h +0 -0
index be0431e..270e158 100644

include/asm-arm/arch-omap/dma.h line 282

Quoted 10 lines
include/asm-arm/arch-omap/dma.h +4 -0
@@ -273,6 +273,10 @@
 #define OMAP24XX_DMA_MS                      63      /* S_DMA_62 */
 #define OMAP242X_DMA_EXT_DMAREQ5     64      /* S_DMA_63 */
 #define OMAP243X_DMA_EXT_DMAREQ6     64      /* S_DMA_63 */
+#define OMAP34XX_DMA_MCBSP1_TX               31      /* S_DMA_30 */
+#define OMAP34XX_DMA_MCBSP1_RX               32      /* S_DMA_31 */
+#define OMAP34XX_DMA_MCBSP2_TX               33      /* S_DMA_32 */
+#define OMAP34XX_DMA_MCBSP2_RX               34      /* S_DMA_33 */
 #define OMAP34XX_DMA_EXT_DMAREQ3     64      /* S_DMA_63 */
 #define OMAP34XX_DMA_AES2_TX         65      /* S_DMA_64 */
 #define OMAP34XX_DMA_AES2_RX         66      /* S_DMA_65 */

What's the point of this patch? Can't you use OMAP24XX_DMA_MCBSP* names?

Quoted 7 lines
include/asm-arm/arch-omap/irqs.h +0 -0
index 15446fd..4e185a8 100644
@@ -316,7 +316,11 @@
 #define INT_34XX_USIM_IRQ    35

include/asm-arm/arch-omap/irqs.h line 326

Quoted 10 lines
include/asm-arm/arch-omap/irqs.h +4 -0
 #define INT_34XX_WDT3_IRQ    36
 #define INT_34XX_SPI4_IRQ    48
+#define INT_34XX_MCBSP1_IRQ_TX       59
+#define INT_34XX_MCBSP1_IRQ_RX       60
 #define INT_34XX_I2C3_IRQ    61
+#define INT_34XX_MCBSP2_IRQ_TX       62
+#define INT_34XX_MCBSP2_IRQ_RX       63
 #define INT_34XX_PBIAS_IRQ   75
 #define INT_34XX_OHCI_IRQ    76
 #define INT_34XX_EHCI_IRQ    77

Ditto with the IRQ lines?

Quoted 6 lines
Quoted 2 lines

@Tony,
It would be nice to give people some time to take a look at

the patches before they get pushed.

Sorry, it seemed like a safe patch to push. I will revert it today.

I'm sorry I snapped at you guys earlier - it's just that this DMA code was some of my earliest work in the community and I'm a little passionate about it. This particular request line cleanup went through several iterations and I thought I'd done it reasonably well.

Regards,

Anand

maintainer
#14 lore raw

Re: [PATCH 4/5] OMAP3xx: Add DMA and IRQ definition for McBSP 1 and 2

Quoted 55 lines · Gadiyar, Anand
Quoted 55 lines

-----Original Message-----
From: Tony Lindgren [mailto:[email protected]]
Sent: Friday, April 25, 2008 10:16 PM
To: Gadiyar, Anand
Cc: Eduardo Valentin; [email protected]; Eduardo Valentin
Subject: Re: [PATCH 4/5] OMAP3xx: Add DMA and IRQ definition for McBSP 1 and 2

Quoted 40 lines · Gadiyar, Anand

<snip>

Quoted 6 lines
include/asm-arm/arch-omap/dma.h +0 -0
index be0431e..270e158 100644

include/asm-arm/arch-omap/dma.h line 282

Quoted 10 lines
include/asm-arm/arch-omap/dma.h +4 -0
@@ -273,6 +273,10 @@
 #define OMAP24XX_DMA_MS                      63      /* S_DMA_62 */
 #define OMAP242X_DMA_EXT_DMAREQ5     64      /* S_DMA_63 */
 #define OMAP243X_DMA_EXT_DMAREQ6     64      /* S_DMA_63 */
+#define OMAP34XX_DMA_MCBSP1_TX               31      /* S_DMA_30 */
+#define OMAP34XX_DMA_MCBSP1_RX               32      /* S_DMA_31 */
+#define OMAP34XX_DMA_MCBSP2_TX               33      /* S_DMA_32 */
+#define OMAP34XX_DMA_MCBSP2_RX               34      /* S_DMA_33 */
 #define OMAP34XX_DMA_EXT_DMAREQ3     64      /* S_DMA_63 */
 #define OMAP34XX_DMA_AES2_TX         65      /* S_DMA_64 */
 #define OMAP34XX_DMA_AES2_RX         66      /* S_DMA_65 */

What's the point of this patch? Can't you use OMAP24XX_DMA_MCBSP* names?

Quoted 7 lines
include/asm-arm/arch-omap/irqs.h +0 -0
index 15446fd..4e185a8 100644
@@ -316,7 +316,11 @@
 #define INT_34XX_USIM_IRQ    35

include/asm-arm/arch-omap/irqs.h line 326

Quoted 10 lines
include/asm-arm/arch-omap/irqs.h +4 -0
 #define INT_34XX_WDT3_IRQ    36
 #define INT_34XX_SPI4_IRQ    48
+#define INT_34XX_MCBSP1_IRQ_TX       59
+#define INT_34XX_MCBSP1_IRQ_RX       60
 #define INT_34XX_I2C3_IRQ    61
+#define INT_34XX_MCBSP2_IRQ_TX       62
+#define INT_34XX_MCBSP2_IRQ_RX       63
 #define INT_34XX_PBIAS_IRQ   75
 #define INT_34XX_OHCI_IRQ    76
 #define INT_34XX_EHCI_IRQ    77

Ditto with the IRQ lines?

Quoted 2 lines

@Tony,
It would be nice to give people some time to take a look at

the patches before they get pushed.

Quoted 7 lines
Quoted 2 lines

Sorry, it seemed like a safe patch to push. I will revert it today.

I'm sorry I snapped at you guys earlier - it's just that this DMA code was some of my earliest work in the community and I'm a little passionate about it. This particular request line cleanup went through several iterations and I thought I'd done it reasonably well.

Hey no problem, you had several valid points there for sure!

Tony