All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC part1/2 merge v2][PATCH 00/11] omap2/3/4: uart4 fixes + zoom2/3 changes
@ 2010-03-08 17:20 Sergio Aguirre
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 01/11] OMAP3: serial: Check for zero-based physical addr Sergio Aguirre
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Sergio Aguirre @ 2010-03-08 17:20 UTC (permalink / raw)
  To: linux-omap
  Cc: Kevin Hilman, Vikram Pandita, Paul Walmsley, Tony Lindgren,
	Sergio Aguirre

Hi,

This is v2 of my serial work series merge found here: [1]

And it's meant to be applied on top of Thomas's patch: [2]

Changelog compared to previous version:
 - Replaced hardcoded IRQ for UART4 in 3630 by newly created
   INT_36XX_UART4_IRQ define. (Thanks Kevin)

Please let me know your comments and thoughts.

Thanks to:
 - Vikram Pandita
 - Paul Walmsley
 - Kevin Hilman
 - Manjunath Kondaiah

For the feedback recieved so far. I really appreciate it.

Regards,
Sergio

Detailed changelog:

Sergio Aguirre (11):
  OMAP3: serial: Check for zero-based physical addr
  omap2/3/4: serial: Remove condition for getting uart4_phys
  ARM: OMAP3630: PRCM: Add UART4 control bits
  OMAP clock: Add uart4_ick/fck definitions for 3630
  OMAP3: PRCM: Consider UART4 for 3630 chip in prcm_setup_regs
  OMAP3: Add UART4 IRQ for 36xx chips
  omap3: serial: Fix uart4 handling for 3630
  omap3: zoom2/3 / 3630sdp: Don't init always all uarts
  omap3: 3630sdp: Explicitly enable all UARTs
  omap3: zoom 2/3: Change debugboard serial port id
  omap3: zoom2/3: Register only 1 8250 port

 arch/arm/configs/omap_zoom2_defconfig        |    2 +-
 arch/arm/configs/omap_zoom3_defconfig        |    2 +-
 arch/arm/mach-omap2/board-3630sdp.c          |    1 +
 arch/arm/mach-omap2/board-zoom-debugboard.c  |    2 +-
 arch/arm/mach-omap2/board-zoom-peripherals.c |    1 -
 arch/arm/mach-omap2/clock3xxx_data.c         |   22 +++++++++++++++++
 arch/arm/mach-omap2/cm-regbits-34xx.h        |    2 +
 arch/arm/mach-omap2/pm34xx.c                 |    8 ++++-
 arch/arm/mach-omap2/prcm-common.h            |    4 +++
 arch/arm/mach-omap2/serial.c                 |   33 +++++++++++++++-----------
 arch/arm/plat-omap/include/plat/irqs.h       |    2 +
 11 files changed, 59 insertions(+), 20 deletions(-)
 mode change 100755 => 100644 arch/arm/mach-omap2/board-3630sdp.c
 mode change 100755 => 100644 arch/arm/mach-omap2/board-zoom-peripherals.c

[1] http://marc.info/?l=linux-omap&m=126762591626792&w=2
[2] http://marc.info/?l=linux-kernel&m=126709078514087&w=2


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [RFC part1/2 merge v2][PATCH 01/11] OMAP3: serial: Check for zero-based physical addr
  2010-03-08 17:20 [RFC part1/2 merge v2][PATCH 00/11] omap2/3/4: uart4 fixes + zoom2/3 changes Sergio Aguirre
@ 2010-03-08 17:20 ` Sergio Aguirre
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 02/11] omap2/3/4: serial: Remove condition for getting uart4_phys Sergio Aguirre
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Sergio Aguirre @ 2010-03-08 17:20 UTC (permalink / raw)
  To: linux-omap
  Cc: Kevin Hilman, Vikram Pandita, Paul Walmsley, Tony Lindgren,
	Sergio Aguirre

This is for protecting a wrong mapping attempt of a zero-based
physical address.

The result is that, no serial port will be attempted to be mapped.

Also add an additional protection for NULL clocks before attempting
to enable them (if above condition applies)

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
---
 arch/arm/mach-omap2/serial.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index da77930..1ca4330 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -664,6 +664,12 @@ void __init omap_serial_early_init(void)
 		struct device *dev = &pdev->dev;
 		struct plat_serial8250_port *p = dev->platform_data;
 
+		/* Don't map zero-based physical address */
+		if (p->mapbase == 0) {
+			printk(KERN_WARNING "omap serial: No physical address"
+			       " for uart#%d, so skipping early_init...\n", i);
+			continue;
+		}
 		/*
 		 * Module 4KB + L4 interconnect 4KB
 		 * Static mapping, never released
@@ -727,6 +733,10 @@ void __init omap_serial_init_port(int port)
 	pdev = &uart->pdev;
 	dev = &pdev->dev;
 
+	/* Don't proceed if there's no clocks available */
+	if (!uart->ick || !uart->fck)
+		return;
+
 	omap_uart_enable_clocks(uart);
 
 	omap_uart_reset(uart);
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [RFC part1/2 merge v2][PATCH 02/11] omap2/3/4: serial: Remove condition for getting uart4_phys
  2010-03-08 17:20 [RFC part1/2 merge v2][PATCH 00/11] omap2/3/4: uart4 fixes + zoom2/3 changes Sergio Aguirre
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 01/11] OMAP3: serial: Check for zero-based physical addr Sergio Aguirre
@ 2010-03-08 17:20 ` Sergio Aguirre
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 03/11] ARM: OMAP3630: PRCM: Add UART4 control bits Sergio Aguirre
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Sergio Aguirre @ 2010-03-08 17:20 UTC (permalink / raw)
  To: linux-omap
  Cc: Kevin Hilman, Vikram Pandita, Paul Walmsley, Tony Lindgren,
	Sergio Aguirre

This check is invalid, since we haven't filled the
omap_revision var at this point.

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
---
 arch/arm/mach-omap2/serial.c |   14 +-------------
 1 files changed, 1 insertions(+), 13 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 1ca4330..351ba62 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -115,7 +115,6 @@ static struct plat_serial8250_port serial_platform_data2[] = {
 	}
 };
 
-#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
 static struct plat_serial8250_port serial_platform_data3[] = {
 	{
 		.irq		= 70,
@@ -128,23 +127,12 @@ static struct plat_serial8250_port serial_platform_data3[] = {
 	}
 };
 
-static inline void omap2_set_globals_uart4(struct omap_globals *omap2_globals)
-{
-	serial_platform_data3[0].mapbase = omap2_globals->uart4_phys;
-}
-#else
-static inline void omap2_set_globals_uart4(struct omap_globals *omap2_globals)
-{
-}
-#endif
-
 void __init omap2_set_globals_uart(struct omap_globals *omap2_globals)
 {
 	serial_platform_data0[0].mapbase = omap2_globals->uart1_phys;
 	serial_platform_data1[0].mapbase = omap2_globals->uart2_phys;
 	serial_platform_data2[0].mapbase = omap2_globals->uart3_phys;
-	if (cpu_is_omap3630() || cpu_is_omap44xx())
-		omap2_set_globals_uart4(omap2_globals);
+	serial_platform_data3[0].mapbase = omap2_globals->uart4_phys;
 }
 
 static inline unsigned int __serial_read_reg(struct uart_port *up,
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [RFC part1/2 merge v2][PATCH 03/11] ARM: OMAP3630: PRCM: Add UART4 control bits
  2010-03-08 17:20 [RFC part1/2 merge v2][PATCH 00/11] omap2/3/4: uart4 fixes + zoom2/3 changes Sergio Aguirre
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 01/11] OMAP3: serial: Check for zero-based physical addr Sergio Aguirre
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 02/11] omap2/3/4: serial: Remove condition for getting uart4_phys Sergio Aguirre
@ 2010-03-08 17:20 ` Sergio Aguirre
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 04/11] OMAP clock: Add uart4_ick/fck definitions for 3630 Sergio Aguirre
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Sergio Aguirre @ 2010-03-08 17:20 UTC (permalink / raw)
  To: linux-omap
  Cc: Kevin Hilman, Vikram Pandita, Paul Walmsley, Tony Lindgren,
	Sergio Aguirre

This bits are exclusive of omap 36xx family of chips.

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
---
 arch/arm/mach-omap2/cm-regbits-34xx.h |    2 ++
 arch/arm/mach-omap2/prcm-common.h     |    4 ++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/cm-regbits-34xx.h b/arch/arm/mach-omap2/cm-regbits-34xx.h
index a3a3ca0..834b671 100644
--- a/arch/arm/mach-omap2/cm-regbits-34xx.h
+++ b/arch/arm/mach-omap2/cm-regbits-34xx.h
@@ -649,6 +649,8 @@
 #define OMAP3430_ST_MCBSP2_MASK				(1 << 0)
 
 /* CM_AUTOIDLE_PER */
+#define OMAP3630_AUTO_UART4				(1 << 18)
+#define OMAP3630_AUTO_UART4_SHIFT			18
 #define OMAP3430_AUTO_GPIO6				(1 << 17)
 #define OMAP3430_AUTO_GPIO6_SHIFT			17
 #define OMAP3430_AUTO_GPIO5				(1 << 16)
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h
index 90f603d..c4e7bcb 100644
--- a/arch/arm/mach-omap2/prcm-common.h
+++ b/arch/arm/mach-omap2/prcm-common.h
@@ -390,6 +390,8 @@
 #define OMAP3430_EN_MPU_SHIFT				1
 
 /* CM_FCLKEN_PER, CM_ICLKEN_PER, PM_WKEN_PER shared bits */
+#define OMAP3630_EN_UART4				(1 << 18)
+#define OMAP3630_EN_UART4_SHIFT				18
 #define OMAP3430_EN_GPIO6				(1 << 17)
 #define OMAP3430_EN_GPIO6_SHIFT				17
 #define OMAP3430_EN_GPIO5				(1 << 16)
@@ -430,6 +432,8 @@
 #define OMAP3430_EN_MCBSP2_SHIFT			0
 
 /* CM_IDLEST_PER, PM_WKST_PER shared bits */
+#define OMAP3630_ST_UART4_SHIFT				18
+#define OMAP3630_ST_UART4_MASK				(1 << 18)
 #define OMAP3430_ST_GPIO6_SHIFT				17
 #define OMAP3430_ST_GPIO6_MASK				(1 << 17)
 #define OMAP3430_ST_GPIO5_SHIFT				16
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [RFC part1/2 merge v2][PATCH 04/11] OMAP clock: Add uart4_ick/fck definitions for 3630
  2010-03-08 17:20 [RFC part1/2 merge v2][PATCH 00/11] omap2/3/4: uart4 fixes + zoom2/3 changes Sergio Aguirre
                   ` (2 preceding siblings ...)
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 03/11] ARM: OMAP3630: PRCM: Add UART4 control bits Sergio Aguirre
@ 2010-03-08 17:20 ` Sergio Aguirre
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 05/11] OMAP3: PRCM: Consider UART4 for 3630 chip in prcm_setup_regs Sergio Aguirre
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Sergio Aguirre @ 2010-03-08 17:20 UTC (permalink / raw)
  To: linux-omap
  Cc: Kevin Hilman, Vikram Pandita, Paul Walmsley, Tony Lindgren,
	Sergio Aguirre

This is only valid for omap 36xx family of chips.

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
---
 arch/arm/mach-omap2/clock3xxx_data.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index d5153b6..e8afaa6 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -2541,6 +2541,16 @@ static struct clk uart3_fck = {
 	.recalc		= &followparent_recalc,
 };
 
+static struct clk uart4_fck = {
+	.name		= "uart4_fck",
+	.ops		= &clkops_omap2_dflt_wait,
+	.parent		= &per_48m_fck,
+	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
+	.enable_bit	= OMAP3630_EN_UART4_SHIFT,
+	.clkdm_name	= "per_clkdm",
+	.recalc		= &followparent_recalc,
+};
+
 static struct clk gpt2_fck = {
 	.name		= "gpt2_fck",
 	.ops		= &clkops_omap2_dflt_wait,
@@ -2791,6 +2801,16 @@ static struct clk uart3_ick = {
 	.recalc		= &followparent_recalc,
 };
 
+static struct clk uart4_ick = {
+	.name		= "uart4_ick",
+	.ops		= &clkops_omap2_dflt_wait,
+	.parent		= &per_l4_ick,
+	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
+	.enable_bit	= OMAP3630_EN_UART4_SHIFT,
+	.clkdm_name	= "per_clkdm",
+	.recalc		= &followparent_recalc,
+};
+
 static struct clk gpt9_ick = {
 	.name		= "gpt9_ick",
 	.ops		= &clkops_omap2_dflt_wait,
@@ -3420,6 +3440,7 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK(NULL,	"per_96m_fck",	&per_96m_fck,	CK_3XXX),
 	CLK(NULL,	"per_48m_fck",	&per_48m_fck,	CK_3XXX),
 	CLK(NULL,	"uart3_fck",	&uart3_fck,	CK_3XXX),
+	CLK(NULL,	"uart4_fck",	&uart4_fck,	CK_36XX),
 	CLK(NULL,	"gpt2_fck",	&gpt2_fck,	CK_3XXX),
 	CLK(NULL,	"gpt3_fck",	&gpt3_fck,	CK_3XXX),
 	CLK(NULL,	"gpt4_fck",	&gpt4_fck,	CK_3XXX),
@@ -3443,6 +3464,7 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK(NULL,	"gpio2_ick",	&gpio2_ick,	CK_3XXX),
 	CLK(NULL,	"wdt3_ick",	&wdt3_ick,	CK_3XXX),
 	CLK(NULL,	"uart3_ick",	&uart3_ick,	CK_3XXX),
+	CLK(NULL,	"uart4_ick",	&uart4_ick,	CK_36XX),
 	CLK(NULL,	"gpt9_ick",	&gpt9_ick,	CK_3XXX),
 	CLK(NULL,	"gpt8_ick",	&gpt8_ick,	CK_3XXX),
 	CLK(NULL,	"gpt7_ick",	&gpt7_ick,	CK_3XXX),
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [RFC part1/2 merge v2][PATCH 05/11] OMAP3: PRCM: Consider UART4 for 3630 chip in prcm_setup_regs
  2010-03-08 17:20 [RFC part1/2 merge v2][PATCH 00/11] omap2/3/4: uart4 fixes + zoom2/3 changes Sergio Aguirre
                   ` (3 preceding siblings ...)
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 04/11] OMAP clock: Add uart4_ick/fck definitions for 3630 Sergio Aguirre
@ 2010-03-08 17:20 ` Sergio Aguirre
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 06/11] OMAP3: Add UART4 IRQ for 36xx chips Sergio Aguirre
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Sergio Aguirre @ 2010-03-08 17:20 UTC (permalink / raw)
  To: linux-omap
  Cc: Kevin Hilman, Vikram Pandita, Paul Walmsley, Tony Lindgren,
	Sergio Aguirre

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
---
 arch/arm/mach-omap2/pm34xx.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index fee2efb..81082f2 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -734,6 +734,9 @@ static void __init omap3_d2d_idle(void)
 
 static void __init prcm_setup_regs(void)
 {
+	u32 omap3630_auto_uart4 = cpu_is_omap3630() ? OMAP3630_AUTO_UART4 : 0;
+	u32 omap3630_en_uart4 = cpu_is_omap3630() ? OMAP3630_EN_UART4 : 0;
+
 	/* XXX Reset all wkdeps. This should be done when initializing
 	 * powerdomains */
 	prm_write_mod_reg(0, OMAP3430_IVA2_MOD, PM_WKDEP);
@@ -820,6 +823,7 @@ static void __init prcm_setup_regs(void)
 		CM_AUTOIDLE);
 
 	cm_write_mod_reg(
+		omap3630_auto_uart4 |
 		OMAP3430_AUTO_GPIO6 |
 		OMAP3430_AUTO_GPIO5 |
 		OMAP3430_AUTO_GPIO4 |
@@ -899,14 +903,14 @@ static void __init prcm_setup_regs(void)
 			  OMAP3430_EN_GPIO4 | OMAP3430_EN_GPIO5 |
 			  OMAP3430_EN_GPIO6 | OMAP3430_EN_UART3 |
 			  OMAP3430_EN_MCBSP2 | OMAP3430_EN_MCBSP3 |
-			  OMAP3430_EN_MCBSP4,
+			  OMAP3430_EN_MCBSP4 | omap3630_en_uart4,
 			  OMAP3430_PER_MOD, PM_WKEN);
 	/* and allow them to wake up MPU */
 	prm_write_mod_reg(OMAP3430_GRPSEL_GPIO2 | OMAP3430_EN_GPIO3 |
 			  OMAP3430_GRPSEL_GPIO4 | OMAP3430_EN_GPIO5 |
 			  OMAP3430_GRPSEL_GPIO6 | OMAP3430_EN_UART3 |
 			  OMAP3430_EN_MCBSP2 | OMAP3430_EN_MCBSP3 |
-			  OMAP3430_EN_MCBSP4,
+			  OMAP3430_EN_MCBSP4 | omap3630_en_uart4,
 			  OMAP3430_PER_MOD, OMAP3430_PM_MPUGRPSEL);
 
 	/* Don't attach IVA interrupts */
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [RFC part1/2 merge v2][PATCH 06/11] OMAP3: Add UART4 IRQ for 36xx chips
  2010-03-08 17:20 [RFC part1/2 merge v2][PATCH 00/11] omap2/3/4: uart4 fixes + zoom2/3 changes Sergio Aguirre
                   ` (4 preceding siblings ...)
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 05/11] OMAP3: PRCM: Consider UART4 for 3630 chip in prcm_setup_regs Sergio Aguirre
@ 2010-03-08 17:20 ` Sergio Aguirre
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 07/11] omap3: serial: Fix uart4 handling for 3630 Sergio Aguirre
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Sergio Aguirre @ 2010-03-08 17:20 UTC (permalink / raw)
  To: linux-omap
  Cc: Kevin Hilman, Vikram Pandita, Paul Walmsley, Tony Lindgren,
	Sergio Aguirre

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
---
 arch/arm/plat-omap/include/plat/irqs.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h
index b65088a..a7ae3f3 100644
--- a/arch/arm/plat-omap/include/plat/irqs.h
+++ b/arch/arm/plat-omap/include/plat/irqs.h
@@ -358,6 +358,8 @@
 #define INT_35XX_CCDC_VD1_IRQ		92
 #define INT_35XX_CCDC_VD2_IRQ		93
 
+#define INT_34XX_UART4_IRQ	80
+
 /* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730/850) and
  * 16 MPUIO lines */
 #define OMAP_MAX_GPIO_LINES	192
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [RFC part1/2 merge v2][PATCH 07/11] omap3: serial: Fix uart4 handling for 3630
  2010-03-08 17:20 [RFC part1/2 merge v2][PATCH 00/11] omap2/3/4: uart4 fixes + zoom2/3 changes Sergio Aguirre
                   ` (5 preceding siblings ...)
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 06/11] OMAP3: Add UART4 IRQ for 36xx chips Sergio Aguirre
@ 2010-03-08 17:20 ` Sergio Aguirre
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 08/11] omap3: zoom2/3 / 3630sdp: Don't init always all uarts Sergio Aguirre
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Sergio Aguirre @ 2010-03-08 17:20 UTC (permalink / raw)
  To: linux-omap
  Cc: Kevin Hilman, Vikram Pandita, Paul Walmsley, Tony Lindgren,
	Sergio Aguirre

This patch makes the following:
 - Adds missing wakeup padding register handling.
 - Fixes a hardcode to use PER module ONLY on UART3.
 - Corrects IRQ number to 80 for 3630 case.

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
---
 arch/arm/mach-omap2/serial.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 351ba62..4ad1c6c 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -444,7 +444,7 @@ static void omap_uart_idle_init(struct omap_uart_state *uart)
 	omap_uart_smart_idle_enable(uart, 0);
 
 	if (cpu_is_omap34xx()) {
-		u32 mod = (uart->num == 2) ? OMAP3430_PER_MOD : CORE_MOD;
+		u32 mod = (uart->num > 1) ? OMAP3430_PER_MOD : CORE_MOD;
 		u32 wk_mask = 0;
 		u32 padconf = 0;
 
@@ -463,6 +463,10 @@ static void omap_uart_idle_init(struct omap_uart_state *uart)
 			wk_mask = OMAP3430_ST_UART3_MASK;
 			padconf = 0x19e;
 			break;
+		case 3:
+			wk_mask = OMAP3630_ST_UART4_MASK;
+			padconf = 0x0d2;
+			break;
 		}
 		uart->wk_mask = wk_mask;
 		uart->padconf = padconf;
@@ -694,6 +698,9 @@ void __init omap_serial_early_init(void)
 
 		if (cpu_is_omap44xx())
 			p->irq += 32;
+
+		if (cpu_is_omap3630() && (i == 3))
+			p->irq = INT_34XX_UART4_IRQ;
 	}
 }
 
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [RFC part1/2 merge v2][PATCH 08/11] omap3: zoom2/3 / 3630sdp: Don't init always all uarts
  2010-03-08 17:20 [RFC part1/2 merge v2][PATCH 00/11] omap2/3/4: uart4 fixes + zoom2/3 changes Sergio Aguirre
                   ` (6 preceding siblings ...)
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 07/11] omap3: serial: Fix uart4 handling for 3630 Sergio Aguirre
@ 2010-03-08 17:20 ` Sergio Aguirre
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 09/11] omap3: 3630sdp: Explicitly enable all UARTs Sergio Aguirre
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Sergio Aguirre @ 2010-03-08 17:20 UTC (permalink / raw)
  To: linux-omap
  Cc: Kevin Hilman, Vikram Pandita, Paul Walmsley, Tony Lindgren,
	Sergio Aguirre

This is useless, since in Zoom2/3 boards, the ports aren't even
physically accessible.

They must be explicitly initted in the board-zoom2.c, board-zoom3.c
and board-3630sdp.c files instead.

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
---
 arch/arm/mach-omap2/board-zoom-peripherals.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
 mode change 100755 => 100644 arch/arm/mach-omap2/board-zoom-peripherals.c

diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
old mode 100755
new mode 100644
index ca95d8d..6b39849
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -280,7 +280,6 @@ static void enable_board_wakeup_source(void)
 void __init zoom_peripherals_init(void)
 {
 	omap_i2c_init();
-	omap_serial_init();
 	usb_musb_init(&musb_board_data);
 	enable_board_wakeup_source();
 }
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [RFC part1/2 merge v2][PATCH 09/11] omap3: 3630sdp: Explicitly enable all UARTs
  2010-03-08 17:20 [RFC part1/2 merge v2][PATCH 00/11] omap2/3/4: uart4 fixes + zoom2/3 changes Sergio Aguirre
                   ` (7 preceding siblings ...)
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 08/11] omap3: zoom2/3 / 3630sdp: Don't init always all uarts Sergio Aguirre
@ 2010-03-08 17:20 ` Sergio Aguirre
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 10/11] omap3: zoom 2/3: Change debugboard serial port id Sergio Aguirre
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Sergio Aguirre @ 2010-03-08 17:20 UTC (permalink / raw)
  To: linux-omap
  Cc: Kevin Hilman, Vikram Pandita, Paul Walmsley, Tony Lindgren,
	Sergio Aguirre

All UARTs seem physically reachable, so, enable them all.

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
---
 arch/arm/mach-omap2/board-3630sdp.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
 mode change 100755 => 100644 arch/arm/mach-omap2/board-3630sdp.c

diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
old mode 100755
new mode 100644
index 4386d2b..399117a
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -96,6 +96,7 @@ static struct omap_board_mux board_mux[] __initdata = {
 static void __init omap_sdp_init(void)
 {
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
+	omap_serial_init();
 	zoom_peripherals_init();
 	board_smc91x_init();
 	enable_board_wakeup_source();
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [RFC part1/2 merge v2][PATCH 10/11] omap3: zoom 2/3: Change debugboard serial port id
  2010-03-08 17:20 [RFC part1/2 merge v2][PATCH 00/11] omap2/3/4: uart4 fixes + zoom2/3 changes Sergio Aguirre
                   ` (8 preceding siblings ...)
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 09/11] omap3: 3630sdp: Explicitly enable all UARTs Sergio Aguirre
@ 2010-03-08 17:20 ` Sergio Aguirre
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 11/11] omap3: zoom2/3: Register only 1 8250 port Sergio Aguirre
  2010-03-08 17:22 ` [RFC part1/2 merge v2][PATCH 00/11] omap2/3/4: uart4 fixes + zoom2/3 changes Aguirre, Sergio
  11 siblings, 0 replies; 13+ messages in thread
From: Sergio Aguirre @ 2010-03-08 17:20 UTC (permalink / raw)
  To: linux-omap
  Cc: Kevin Hilman, Vikram Pandita, Paul Walmsley, Tony Lindgren,
	Sergio Aguirre

This is now changed to PLAT8250_DEV_PLATFORM (= 0), because
it is the only port that's going to be initted in Zoom 2/3 boards.

So, it doesn't make sense to keep the hardcoded 3 value anymore.

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
---
 arch/arm/mach-omap2/board-zoom-debugboard.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c
index bb4018b..e15d2e8 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -96,7 +96,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
 
 static struct platform_device zoom_debugboard_serial_device = {
 	.name			= "serial8250",
-	.id			= 3,
+	.id			= PLAT8250_DEV_PLATFORM,
 	.dev			= {
 		.platform_data	= serial_platform_data,
 	},
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [RFC part1/2 merge v2][PATCH 11/11] omap3: zoom2/3: Register only 1 8250 port
  2010-03-08 17:20 [RFC part1/2 merge v2][PATCH 00/11] omap2/3/4: uart4 fixes + zoom2/3 changes Sergio Aguirre
                   ` (9 preceding siblings ...)
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 10/11] omap3: zoom 2/3: Change debugboard serial port id Sergio Aguirre
@ 2010-03-08 17:20 ` Sergio Aguirre
  2010-03-08 17:22 ` [RFC part1/2 merge v2][PATCH 00/11] omap2/3/4: uart4 fixes + zoom2/3 changes Aguirre, Sergio
  11 siblings, 0 replies; 13+ messages in thread
From: Sergio Aguirre @ 2010-03-08 17:20 UTC (permalink / raw)
  To: linux-omap
  Cc: Kevin Hilman, Vikram Pandita, Paul Walmsley, Tony Lindgren,
	Sergio Aguirre

There's no more serial ports available, so, doesn't make sense
to create 4 device nodes.

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
---
 arch/arm/configs/omap_zoom2_defconfig |    2 +-
 arch/arm/configs/omap_zoom3_defconfig |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/configs/omap_zoom2_defconfig b/arch/arm/configs/omap_zoom2_defconfig
index a82e813..3dfd2d5 100644
--- a/arch/arm/configs/omap_zoom2_defconfig
+++ b/arch/arm/configs/omap_zoom2_defconfig
@@ -660,7 +660,7 @@ CONFIG_DEVKMEM=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_NR_UARTS=32
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=1
 CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_MANY_PORTS=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
diff --git a/arch/arm/configs/omap_zoom3_defconfig b/arch/arm/configs/omap_zoom3_defconfig
index ff8ac3d..a1c0c43 100644
--- a/arch/arm/configs/omap_zoom3_defconfig
+++ b/arch/arm/configs/omap_zoom3_defconfig
@@ -680,7 +680,7 @@ CONFIG_DEVKMEM=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_NR_UARTS=32
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=1
 CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_MANY_PORTS=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* RE: [RFC part1/2 merge v2][PATCH 00/11] omap2/3/4: uart4 fixes + zoom2/3 changes
  2010-03-08 17:20 [RFC part1/2 merge v2][PATCH 00/11] omap2/3/4: uart4 fixes + zoom2/3 changes Sergio Aguirre
                   ` (10 preceding siblings ...)
  2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 11/11] omap3: zoom2/3: Register only 1 8250 port Sergio Aguirre
@ 2010-03-08 17:22 ` Aguirre, Sergio
  11 siblings, 0 replies; 13+ messages in thread
From: Aguirre, Sergio @ 2010-03-08 17:22 UTC (permalink / raw)
  To: Aguirre, Sergio, linux-omap
  Cc: Kevin Hilman, Pandita, Vikram, Paul Walmsley, Tony Lindgren

> -----Original Message-----
> From: Aguirre, Sergio
> Sent: Monday, March 08, 2010 11:21 AM
> To: linux-omap@vger.kernel.org
> Cc: Kevin Hilman; Pandita, Vikram; Paul Walmsley; Tony Lindgren; Aguirre,
> Sergio
> Subject: [RFC part1/2 merge v2][PATCH 00/11] omap2/3/4: uart4 fixes +
> zoom2/3 changes
> 
> Hi,
> 
> This is v2 of my serial work series merge found here: [1]
> 
> And it's meant to be applied on top of Thomas's patch: [2]
> 
> Changelog compared to previous version:
>  - Replaced hardcoded IRQ for UART4 in 3630 by newly created
>    INT_36XX_UART4_IRQ define. (Thanks Kevin)

Oops, sent a wrong past internal revision... sorry for the spam, but I'll resend with the correction.

Regards,
Sergio

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-03-08 17:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-08 17:20 [RFC part1/2 merge v2][PATCH 00/11] omap2/3/4: uart4 fixes + zoom2/3 changes Sergio Aguirre
2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 01/11] OMAP3: serial: Check for zero-based physical addr Sergio Aguirre
2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 02/11] omap2/3/4: serial: Remove condition for getting uart4_phys Sergio Aguirre
2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 03/11] ARM: OMAP3630: PRCM: Add UART4 control bits Sergio Aguirre
2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 04/11] OMAP clock: Add uart4_ick/fck definitions for 3630 Sergio Aguirre
2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 05/11] OMAP3: PRCM: Consider UART4 for 3630 chip in prcm_setup_regs Sergio Aguirre
2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 06/11] OMAP3: Add UART4 IRQ for 36xx chips Sergio Aguirre
2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 07/11] omap3: serial: Fix uart4 handling for 3630 Sergio Aguirre
2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 08/11] omap3: zoom2/3 / 3630sdp: Don't init always all uarts Sergio Aguirre
2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 09/11] omap3: 3630sdp: Explicitly enable all UARTs Sergio Aguirre
2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 10/11] omap3: zoom 2/3: Change debugboard serial port id Sergio Aguirre
2010-03-08 17:20 ` [RFC part1/2 merge v2][PATCH 11/11] omap3: zoom2/3: Register only 1 8250 port Sergio Aguirre
2010-03-08 17:22 ` [RFC part1/2 merge v2][PATCH 00/11] omap2/3/4: uart4 fixes + zoom2/3 changes Aguirre, Sergio

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.