All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks
@ 2012-03-21 10:24 ` Govindraj.R
  0 siblings, 0 replies; 42+ messages in thread
From: Govindraj.R @ 2012-03-21 10:24 UTC (permalink / raw)
  To: linux-omap
  Cc: linux-serial, linux-arm-kernel, Kevin Hilman, Paul Walmsley,
	Felipe Balbi, Govindraj.R

From: "Govindraj.R" <govindraj.raja@ti.com>

Based on Linux-OMAP tree uart branch.
(git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
remotes/origin/uart)

* Removes the cpu checks wherever possible and use version reg
  for populating features and errata's
* enable tx wakeup available in wer reg for applicable
  module revision's

Govindraj.R (3):
  OMAP2+: UART: Remove cpu checks for populating errata flags
  OMAP2+: UART: enable tx wakeup bit for wer reg
  OMAP2+: UART: replace omap34xx/omap4xx cpu checks with not omap24xx

 arch/arm/mach-omap2/serial.c                  |   13 +----
 arch/arm/plat-omap/include/plat/omap-serial.h |    8 +++-
 drivers/tty/serial/omap-serial.c              |   71 ++++++++++++++++++++++++-
 3 files changed, 78 insertions(+), 14 deletions(-)

-- 
1.7.5.4


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

* [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks
@ 2012-03-21 10:24 ` Govindraj.R
  0 siblings, 0 replies; 42+ messages in thread
From: Govindraj.R @ 2012-03-21 10:24 UTC (permalink / raw)
  To: linux-arm-kernel

From: "Govindraj.R" <govindraj.raja@ti.com>

Based on Linux-OMAP tree uart branch.
(git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
remotes/origin/uart)

* Removes the cpu checks wherever possible and use version reg
  for populating features and errata's
* enable tx wakeup available in wer reg for applicable
  module revision's

Govindraj.R (3):
  OMAP2+: UART: Remove cpu checks for populating errata flags
  OMAP2+: UART: enable tx wakeup bit for wer reg
  OMAP2+: UART: replace omap34xx/omap4xx cpu checks with not omap24xx

 arch/arm/mach-omap2/serial.c                  |   13 +----
 arch/arm/plat-omap/include/plat/omap-serial.h |    8 +++-
 drivers/tty/serial/omap-serial.c              |   71 ++++++++++++++++++++++++-
 3 files changed, 78 insertions(+), 14 deletions(-)

-- 
1.7.5.4

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

* [PATCH 1/3] OMAP2+: UART: Remove cpu checks for populating errata flags
  2012-03-21 10:24 ` Govindraj.R
@ 2012-03-21 10:24   ` Govindraj.R
  -1 siblings, 0 replies; 42+ messages in thread
From: Govindraj.R @ 2012-03-21 10:24 UTC (permalink / raw)
  To: linux-omap
  Cc: linux-serial, linux-arm-kernel, Kevin Hilman, Paul Walmsley,
	Felipe Balbi, Govindraj.R

From: "Govindraj.R" <govindraj.raja@ti.com>

Currently the errata is populated based on cpu checks this can
be removed and replaced with module version check of uart ip block.
MVR reg is provided within the uart reg map use the same
to populate the errata and thus now errata population and handling
can be managed within the driver itself.

Cc: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
 arch/arm/mach-omap2/serial.c                  |    8 ---
 arch/arm/plat-omap/include/plat/omap-serial.h |    1 -
 drivers/tty/serial/omap-serial.c              |   62 ++++++++++++++++++++++++-
 3 files changed, 61 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index f590afc..330ee04 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -357,14 +357,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
 	omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
 	omap_up.autosuspend_timeout = info->autosuspend_timeout;
 
-	/* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
-	if (!cpu_is_omap2420() && !cpu_is_ti816x())
-		omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
-
-	/* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
-	if (cpu_is_omap34xx() || cpu_is_omap3630())
-		omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
-
 	pdata = &omap_up;
 	pdata_size = sizeof(struct omap_uart_port_info);
 
diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
index 9ff4444..1a52725 100644
--- a/arch/arm/plat-omap/include/plat/omap-serial.h
+++ b/arch/arm/plat-omap/include/plat/omap-serial.h
@@ -65,7 +65,6 @@ struct omap_uart_port_info {
 	bool			dma_enabled;	/* To specify DMA Mode */
 	unsigned int		uartclk;	/* UART clock rate */
 	upf_t			flags;		/* UPF_* flags */
-	u32			errata;
 	unsigned int		dma_rx_buf_size;
 	unsigned int		dma_rx_timeout;
 	unsigned int		autosuspend_timeout;
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index f809041..c7666d6 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -44,6 +44,13 @@
 #include <plat/dmtimer.h>
 #include <plat/omap-serial.h>
 
+#define UART_BUILD_REVISION(x, y)	(((x) << 8) | (y))
+
+#define OMAP_UART_REV_42 0x0402
+#define OMAP_UART_REV_46 0x0406
+#define OMAP_UART_REV_52 0x0502
+#define OMAP_UART_REV_63 0x0603
+
 #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
 
 /* SCR register bitmasks */
@@ -1346,6 +1353,58 @@ static void uart_tx_dma_callback(int lch, u16 ch_status, void *data)
 	return;
 }
 
+static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
+{
+	u32 mvr, scheme;
+	u16 revision, major, minor;
+
+	mvr = serial_in(up, UART_OMAP_MVER);
+
+	/* Check revision register scheme */
+	scheme = mvr & (0x03 << 30);
+	scheme >>= 30;
+
+	switch (scheme) {
+	case 0: /* Legacy Scheme: OMAP2/3 */
+		/* MINOR_REV[0:4], MAJOR_REV[4:7] */
+		major = (mvr & 0xf0) >> 4;
+		minor = (mvr & 0x0f);
+		break;
+	case 1:
+		/* New Scheme: OMAP4+ */
+		/* MINOR_REV[0:5], MAJOR_REV[8:10] */
+		major = (mvr & 0x7 << 8) >> 8;
+		minor = (mvr & 0x3f);
+		break;
+	default:
+		dev_warn(&up->pdev->dev,
+			"Unknown %s revision, defaulting to highest\n",
+			up->name);
+		/* highest possible revision */
+		major = 0xff;
+		minor = 0xff;
+	}
+
+	/* normalize revision for the driver */
+	revision = UART_BUILD_REVISION(major, minor);
+
+	switch (revision) {
+	case OMAP_UART_REV_46:
+		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
+				UART_ERRATA_i291_DMA_FORCEIDLE);
+		break;
+	case OMAP_UART_REV_52:
+		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
+				UART_ERRATA_i291_DMA_FORCEIDLE);
+		break;
+	case OMAP_UART_REV_63:
+		up->errata |= UART_ERRATA_i202_MDR1_ACCESS;
+		break;
+	default:
+		break;
+	}
+}
+
 static struct omap_uart_port_info *of_get_uart_port_info(struct device *dev)
 {
 	struct omap_uart_port_info *omap_up_info;
@@ -1443,7 +1502,6 @@ static int serial_omap_probe(struct platform_device *pdev)
 						"%d\n", DEFAULT_CLK_SPEED);
 	}
 	up->uart_dma.uart_base = mem->start;
-	up->errata = omap_up_info->errata;
 
 	if (omap_up_info->dma_enabled) {
 		up->uart_dma.uart_dma_tx = dma_tx->start;
@@ -1473,6 +1531,8 @@ static int serial_omap_probe(struct platform_device *pdev)
 	pm_runtime_enable(&pdev->dev);
 	pm_runtime_get_sync(&pdev->dev);
 
+	omap_serial_fill_features_erratas(up);
+
 	ui[up->port.line] = up;
 	serial_omap_add_console_port(up);
 
-- 
1.7.5.4


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

* [PATCH 1/3] OMAP2+: UART: Remove cpu checks for populating errata flags
@ 2012-03-21 10:24   ` Govindraj.R
  0 siblings, 0 replies; 42+ messages in thread
From: Govindraj.R @ 2012-03-21 10:24 UTC (permalink / raw)
  To: linux-arm-kernel

From: "Govindraj.R" <govindraj.raja@ti.com>

Currently the errata is populated based on cpu checks this can
be removed and replaced with module version check of uart ip block.
MVR reg is provided within the uart reg map use the same
to populate the errata and thus now errata population and handling
can be managed within the driver itself.

Cc: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
 arch/arm/mach-omap2/serial.c                  |    8 ---
 arch/arm/plat-omap/include/plat/omap-serial.h |    1 -
 drivers/tty/serial/omap-serial.c              |   62 ++++++++++++++++++++++++-
 3 files changed, 61 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index f590afc..330ee04 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -357,14 +357,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
 	omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
 	omap_up.autosuspend_timeout = info->autosuspend_timeout;
 
-	/* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
-	if (!cpu_is_omap2420() && !cpu_is_ti816x())
-		omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
-
-	/* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
-	if (cpu_is_omap34xx() || cpu_is_omap3630())
-		omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
-
 	pdata = &omap_up;
 	pdata_size = sizeof(struct omap_uart_port_info);
 
diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
index 9ff4444..1a52725 100644
--- a/arch/arm/plat-omap/include/plat/omap-serial.h
+++ b/arch/arm/plat-omap/include/plat/omap-serial.h
@@ -65,7 +65,6 @@ struct omap_uart_port_info {
 	bool			dma_enabled;	/* To specify DMA Mode */
 	unsigned int		uartclk;	/* UART clock rate */
 	upf_t			flags;		/* UPF_* flags */
-	u32			errata;
 	unsigned int		dma_rx_buf_size;
 	unsigned int		dma_rx_timeout;
 	unsigned int		autosuspend_timeout;
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index f809041..c7666d6 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -44,6 +44,13 @@
 #include <plat/dmtimer.h>
 #include <plat/omap-serial.h>
 
+#define UART_BUILD_REVISION(x, y)	(((x) << 8) | (y))
+
+#define OMAP_UART_REV_42 0x0402
+#define OMAP_UART_REV_46 0x0406
+#define OMAP_UART_REV_52 0x0502
+#define OMAP_UART_REV_63 0x0603
+
 #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
 
 /* SCR register bitmasks */
@@ -1346,6 +1353,58 @@ static void uart_tx_dma_callback(int lch, u16 ch_status, void *data)
 	return;
 }
 
+static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
+{
+	u32 mvr, scheme;
+	u16 revision, major, minor;
+
+	mvr = serial_in(up, UART_OMAP_MVER);
+
+	/* Check revision register scheme */
+	scheme = mvr & (0x03 << 30);
+	scheme >>= 30;
+
+	switch (scheme) {
+	case 0: /* Legacy Scheme: OMAP2/3 */
+		/* MINOR_REV[0:4], MAJOR_REV[4:7] */
+		major = (mvr & 0xf0) >> 4;
+		minor = (mvr & 0x0f);
+		break;
+	case 1:
+		/* New Scheme: OMAP4+ */
+		/* MINOR_REV[0:5], MAJOR_REV[8:10] */
+		major = (mvr & 0x7 << 8) >> 8;
+		minor = (mvr & 0x3f);
+		break;
+	default:
+		dev_warn(&up->pdev->dev,
+			"Unknown %s revision, defaulting to highest\n",
+			up->name);
+		/* highest possible revision */
+		major = 0xff;
+		minor = 0xff;
+	}
+
+	/* normalize revision for the driver */
+	revision = UART_BUILD_REVISION(major, minor);
+
+	switch (revision) {
+	case OMAP_UART_REV_46:
+		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
+				UART_ERRATA_i291_DMA_FORCEIDLE);
+		break;
+	case OMAP_UART_REV_52:
+		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
+				UART_ERRATA_i291_DMA_FORCEIDLE);
+		break;
+	case OMAP_UART_REV_63:
+		up->errata |= UART_ERRATA_i202_MDR1_ACCESS;
+		break;
+	default:
+		break;
+	}
+}
+
 static struct omap_uart_port_info *of_get_uart_port_info(struct device *dev)
 {
 	struct omap_uart_port_info *omap_up_info;
@@ -1443,7 +1502,6 @@ static int serial_omap_probe(struct platform_device *pdev)
 						"%d\n", DEFAULT_CLK_SPEED);
 	}
 	up->uart_dma.uart_base = mem->start;
-	up->errata = omap_up_info->errata;
 
 	if (omap_up_info->dma_enabled) {
 		up->uart_dma.uart_dma_tx = dma_tx->start;
@@ -1473,6 +1531,8 @@ static int serial_omap_probe(struct platform_device *pdev)
 	pm_runtime_enable(&pdev->dev);
 	pm_runtime_get_sync(&pdev->dev);
 
+	omap_serial_fill_features_erratas(up);
+
 	ui[up->port.line] = up;
 	serial_omap_add_console_port(up);
 
-- 
1.7.5.4

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

* [PATCH 2/3] OMAP2+: UART: enable tx wakeup bit for wer reg
  2012-03-21 10:24 ` Govindraj.R
@ 2012-03-21 10:25   ` Govindraj.R
  -1 siblings, 0 replies; 42+ messages in thread
From: Govindraj.R @ 2012-03-21 10:25 UTC (permalink / raw)
  To: linux-omap
  Cc: linux-serial, linux-arm-kernel, Kevin Hilman, Paul Walmsley,
	Felipe Balbi, Govindraj.R

From: "Govindraj.R" <govindraj.raja@ti.com>

>From omap36xx onwards the module wakeup enable reg
wer has TX wakeup bit available enable the same
by populating the necessary tx wakeup flag for the
applicable module ip blocks and use the same
while configuaring wer reg.

Also wer is not context restored, restore wer when
context is lost.

Cc: Paul Walmsley <paul@pwsan.com>
Cc: Felipe Balbi <balbi@ti.com
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
 arch/arm/plat-omap/include/plat/omap-serial.h |    7 +++++++
 drivers/tty/serial/omap-serial.c              |    9 ++++++++-
 2 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
index 1a52725..8a4ca5c 100644
--- a/arch/arm/plat-omap/include/plat/omap-serial.h
+++ b/arch/arm/plat-omap/include/plat/omap-serial.h
@@ -61,6 +61,11 @@
 #define UART_ERRATA_i202_MDR1_ACCESS	BIT(0)
 #define UART_ERRATA_i291_DMA_FORCEIDLE	BIT(1)
 
+#define OMAP_UART_TX_WAKEUP_EN	BIT(7)
+
+/* Feature flags */
+#define OMAP_UART_WER_HAS_TX_WAKEUP	BIT(0)
+
 struct omap_uart_port_info {
 	bool			dma_enabled;	/* To specify DMA Mode */
 	unsigned int		uartclk;	/* UART clock rate */
@@ -116,6 +121,7 @@ struct uart_omap_port {
 	unsigned char		dlh;
 	unsigned char		mdr1;
 	unsigned char		scr;
+	unsigned char		wer;
 
 	int			use_dma;
 	/*
@@ -129,6 +135,7 @@ struct uart_omap_port {
 	unsigned long		port_activity;
 	u32			context_loss_cnt;
 	u32			errata;
+	u32			features;
 	u8			wakeups_enabled;
 
 	struct pm_qos_request	pm_qos_request;
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index c7666d6..20d568d 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -585,7 +585,11 @@ static int serial_omap_startup(struct uart_port *port)
 	serial_out(up, UART_IER, up->ier);
 
 	/* Enable module level wake up */
-	serial_out(up, UART_OMAP_WER, OMAP_UART_WER_MOD_WKUP);
+	up->wer = OMAP_UART_WER_MOD_WKUP;
+	if (up->features & OMAP_UART_WER_HAS_TX_WAKEUP)
+		up->wer |= OMAP_UART_TX_WAKEUP_EN;
+
+	serial_out(up, UART_OMAP_WER, up->wer);
 
 	pm_runtime_mark_last_busy(&up->pdev->dev);
 	pm_runtime_put_autosuspend(&up->pdev->dev);
@@ -1396,9 +1400,11 @@ static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
 	case OMAP_UART_REV_52:
 		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
 				UART_ERRATA_i291_DMA_FORCEIDLE);
+		up->features |= OMAP_UART_WER_HAS_TX_WAKEUP;
 		break;
 	case OMAP_UART_REV_63:
 		up->errata |= UART_ERRATA_i202_MDR1_ACCESS;
+		up->features |= OMAP_UART_WER_HAS_TX_WAKEUP;
 		break;
 	default:
 		break;
@@ -1629,6 +1635,7 @@ static void serial_omap_restore_context(struct uart_omap_port *up)
 		serial_omap_mdr1_errataset(up, up->mdr1);
 	else
 		serial_out(up, UART_OMAP_MDR1, up->mdr1);
+	serial_out(up, UART_OMAP_WER, up->wer);
 }
 
 static int serial_omap_runtime_suspend(struct device *dev)
-- 
1.7.5.4


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

* [PATCH 2/3] OMAP2+: UART: enable tx wakeup bit for wer reg
@ 2012-03-21 10:25   ` Govindraj.R
  0 siblings, 0 replies; 42+ messages in thread
From: Govindraj.R @ 2012-03-21 10:25 UTC (permalink / raw)
  To: linux-arm-kernel

From: "Govindraj.R" <govindraj.raja@ti.com>

>From omap36xx onwards the module wakeup enable reg
wer has TX wakeup bit available enable the same
by populating the necessary tx wakeup flag for the
applicable module ip blocks and use the same
while configuaring wer reg.

Also wer is not context restored, restore wer when
context is lost.

Cc: Paul Walmsley <paul@pwsan.com>
Cc: Felipe Balbi <balbi at ti.com
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
 arch/arm/plat-omap/include/plat/omap-serial.h |    7 +++++++
 drivers/tty/serial/omap-serial.c              |    9 ++++++++-
 2 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
index 1a52725..8a4ca5c 100644
--- a/arch/arm/plat-omap/include/plat/omap-serial.h
+++ b/arch/arm/plat-omap/include/plat/omap-serial.h
@@ -61,6 +61,11 @@
 #define UART_ERRATA_i202_MDR1_ACCESS	BIT(0)
 #define UART_ERRATA_i291_DMA_FORCEIDLE	BIT(1)
 
+#define OMAP_UART_TX_WAKEUP_EN	BIT(7)
+
+/* Feature flags */
+#define OMAP_UART_WER_HAS_TX_WAKEUP	BIT(0)
+
 struct omap_uart_port_info {
 	bool			dma_enabled;	/* To specify DMA Mode */
 	unsigned int		uartclk;	/* UART clock rate */
@@ -116,6 +121,7 @@ struct uart_omap_port {
 	unsigned char		dlh;
 	unsigned char		mdr1;
 	unsigned char		scr;
+	unsigned char		wer;
 
 	int			use_dma;
 	/*
@@ -129,6 +135,7 @@ struct uart_omap_port {
 	unsigned long		port_activity;
 	u32			context_loss_cnt;
 	u32			errata;
+	u32			features;
 	u8			wakeups_enabled;
 
 	struct pm_qos_request	pm_qos_request;
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index c7666d6..20d568d 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -585,7 +585,11 @@ static int serial_omap_startup(struct uart_port *port)
 	serial_out(up, UART_IER, up->ier);
 
 	/* Enable module level wake up */
-	serial_out(up, UART_OMAP_WER, OMAP_UART_WER_MOD_WKUP);
+	up->wer = OMAP_UART_WER_MOD_WKUP;
+	if (up->features & OMAP_UART_WER_HAS_TX_WAKEUP)
+		up->wer |= OMAP_UART_TX_WAKEUP_EN;
+
+	serial_out(up, UART_OMAP_WER, up->wer);
 
 	pm_runtime_mark_last_busy(&up->pdev->dev);
 	pm_runtime_put_autosuspend(&up->pdev->dev);
@@ -1396,9 +1400,11 @@ static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
 	case OMAP_UART_REV_52:
 		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
 				UART_ERRATA_i291_DMA_FORCEIDLE);
+		up->features |= OMAP_UART_WER_HAS_TX_WAKEUP;
 		break;
 	case OMAP_UART_REV_63:
 		up->errata |= UART_ERRATA_i202_MDR1_ACCESS;
+		up->features |= OMAP_UART_WER_HAS_TX_WAKEUP;
 		break;
 	default:
 		break;
@@ -1629,6 +1635,7 @@ static void serial_omap_restore_context(struct uart_omap_port *up)
 		serial_omap_mdr1_errataset(up, up->mdr1);
 	else
 		serial_out(up, UART_OMAP_MDR1, up->mdr1);
+	serial_out(up, UART_OMAP_WER, up->wer);
 }
 
 static int serial_omap_runtime_suspend(struct device *dev)
-- 
1.7.5.4

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

* [PATCH 3/3] OMAP2+: UART: replace omap34xx/omap4xx cpu checks with not omap24xx
  2012-03-21 10:24 ` Govindraj.R
@ 2012-03-21 10:25   ` Govindraj.R
  -1 siblings, 0 replies; 42+ messages in thread
From: Govindraj.R @ 2012-03-21 10:25 UTC (permalink / raw)
  To: linux-omap
  Cc: linux-serial, linux-arm-kernel, Kevin Hilman, Paul Walmsley,
	Felipe Balbi, Govindraj.R

From: "Govindraj.R" <govindraj.raja@ti.com>

Minor cleanup, replace all omap34xx/omap44xx cpu checks with
cpu is not omap24xx check.

Cc: Paul Walmsley <paul@pwsan.com>
Cc: Felipe Balbi <balbi@ti.com
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
 arch/arm/mach-omap2/serial.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 330ee04..83ab5a2 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -377,8 +377,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
 
 	oh->dev_attr = uart;
 
-	if (((cpu_is_omap34xx() || cpu_is_omap44xx()) && bdata->pads)
-			&& !uart_debug)
+	if ((!cpu_is_omap24xx() && bdata->pads)	&& !uart_debug)
 		device_init_wakeup(&pdev->dev, true);
 }
 
@@ -401,7 +400,7 @@ void __init omap_serial_board_init(struct omap_uart_port_info *info)
 		bdata.pads = NULL;
 		bdata.pads_cnt = 0;
 
-		if (cpu_is_omap44xx() || cpu_is_omap34xx())
+		if (!cpu_is_omap24xx())
 			omap_serial_fill_default_pads(&bdata);
 
 		if (!info)
-- 
1.7.5.4


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

* [PATCH 3/3] OMAP2+: UART: replace omap34xx/omap4xx cpu checks with not omap24xx
@ 2012-03-21 10:25   ` Govindraj.R
  0 siblings, 0 replies; 42+ messages in thread
From: Govindraj.R @ 2012-03-21 10:25 UTC (permalink / raw)
  To: linux-arm-kernel

From: "Govindraj.R" <govindraj.raja@ti.com>

Minor cleanup, replace all omap34xx/omap44xx cpu checks with
cpu is not omap24xx check.

Cc: Paul Walmsley <paul@pwsan.com>
Cc: Felipe Balbi <balbi at ti.com
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
 arch/arm/mach-omap2/serial.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 330ee04..83ab5a2 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -377,8 +377,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
 
 	oh->dev_attr = uart;
 
-	if (((cpu_is_omap34xx() || cpu_is_omap44xx()) && bdata->pads)
-			&& !uart_debug)
+	if ((!cpu_is_omap24xx() && bdata->pads)	&& !uart_debug)
 		device_init_wakeup(&pdev->dev, true);
 }
 
@@ -401,7 +400,7 @@ void __init omap_serial_board_init(struct omap_uart_port_info *info)
 		bdata.pads = NULL;
 		bdata.pads_cnt = 0;
 
-		if (cpu_is_omap44xx() || cpu_is_omap34xx())
+		if (!cpu_is_omap24xx())
 			omap_serial_fill_default_pads(&bdata);
 
 		if (!info)
-- 
1.7.5.4

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

* Re: [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks
  2012-03-21 10:24 ` Govindraj.R
@ 2012-03-21 14:28   ` Kevin Hilman
  -1 siblings, 0 replies; 42+ messages in thread
From: Kevin Hilman @ 2012-03-21 14:28 UTC (permalink / raw)
  To: Govindraj.R
  Cc: linux-omap, linux-serial, linux-arm-kernel, Paul Walmsley, Felipe Balbi

"Govindraj.R" <govindraj.raja@ti.com> writes:

> From: "Govindraj.R" <govindraj.raja@ti.com>
>
> Based on Linux-OMAP tree uart branch.
> (git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
> remotes/origin/uart)
>
> * Removes the cpu checks wherever possible and use version reg
>   for populating features and errata's
> * enable tx wakeup available in wer reg for applicable
>   module revision's

As this affects multiple SoCs, please report what SoCs it was tested on
as well.

Thanks,

Kevin

> Govindraj.R (3):
>   OMAP2+: UART: Remove cpu checks for populating errata flags
>   OMAP2+: UART: enable tx wakeup bit for wer reg
>   OMAP2+: UART: replace omap34xx/omap4xx cpu checks with not omap24xx
>
>  arch/arm/mach-omap2/serial.c                  |   13 +----
>  arch/arm/plat-omap/include/plat/omap-serial.h |    8 +++-
>  drivers/tty/serial/omap-serial.c              |   71 ++++++++++++++++++++++++-
>  3 files changed, 78 insertions(+), 14 deletions(-)

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

* [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks
@ 2012-03-21 14:28   ` Kevin Hilman
  0 siblings, 0 replies; 42+ messages in thread
From: Kevin Hilman @ 2012-03-21 14:28 UTC (permalink / raw)
  To: linux-arm-kernel

"Govindraj.R" <govindraj.raja@ti.com> writes:

> From: "Govindraj.R" <govindraj.raja@ti.com>
>
> Based on Linux-OMAP tree uart branch.
> (git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
> remotes/origin/uart)
>
> * Removes the cpu checks wherever possible and use version reg
>   for populating features and errata's
> * enable tx wakeup available in wer reg for applicable
>   module revision's

As this affects multiple SoCs, please report what SoCs it was tested on
as well.

Thanks,

Kevin

> Govindraj.R (3):
>   OMAP2+: UART: Remove cpu checks for populating errata flags
>   OMAP2+: UART: enable tx wakeup bit for wer reg
>   OMAP2+: UART: replace omap34xx/omap4xx cpu checks with not omap24xx
>
>  arch/arm/mach-omap2/serial.c                  |   13 +----
>  arch/arm/plat-omap/include/plat/omap-serial.h |    8 +++-
>  drivers/tty/serial/omap-serial.c              |   71 ++++++++++++++++++++++++-
>  3 files changed, 78 insertions(+), 14 deletions(-)

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

* Re: [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks
  2012-03-21 14:28   ` Kevin Hilman
@ 2012-03-22  6:59     ` Raja, Govindraj
  -1 siblings, 0 replies; 42+ messages in thread
From: Raja, Govindraj @ 2012-03-22  6:59 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: linux-omap, linux-serial, linux-arm-kernel, Paul Walmsley, Felipe Balbi

On Wed, Mar 21, 2012 at 7:58 PM, Kevin Hilman <khilman@ti.com> wrote:
> "Govindraj.R" <govindraj.raja@ti.com> writes:
>
>> From: "Govindraj.R" <govindraj.raja@ti.com>
>>
>> Based on Linux-OMAP tree uart branch.
>> (git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
>> remotes/origin/uart)
>>
>> * Removes the cpu checks wherever possible and use version reg
>>   for populating features and errata's
>> * enable tx wakeup available in wer reg for applicable
>>   module revision's
>
> As this affects multiple SoCs, please report what SoCs it was tested on
> as well.

Sorry I for got to add that, here are details on what was tested.

1.) OMAP2430 SDP : Boot tested with uart1 as console.

2.) OMAP3430 SDP: Boot test, suspend/resume tests, retention off mode
                               (checking retention and off mode count
in cpu idle cases)

3.) OMAP3630 - Beagle XM:  Boot test, suspend/resume tests, retention off mode
                                            (checking retention and
off mode count in cpu idle cases)

4.) OMAP4430 - PANDA: Boot test, suspend/resume tests

5.) OMAP4460 - PANDA: Boot test.

--
Thanks,
Govindraj.R


>
> Thanks,
>
> Kevin
>
>> Govindraj.R (3):
>>   OMAP2+: UART: Remove cpu checks for populating errata flags
>>   OMAP2+: UART: enable tx wakeup bit for wer reg
>>   OMAP2+: UART: replace omap34xx/omap4xx cpu checks with not omap24xx
>>
>>  arch/arm/mach-omap2/serial.c                  |   13 +----
>>  arch/arm/plat-omap/include/plat/omap-serial.h |    8 +++-
>>  drivers/tty/serial/omap-serial.c              |   71 ++++++++++++++++++++++++-
>>  3 files changed, 78 insertions(+), 14 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks
@ 2012-03-22  6:59     ` Raja, Govindraj
  0 siblings, 0 replies; 42+ messages in thread
From: Raja, Govindraj @ 2012-03-22  6:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 21, 2012 at 7:58 PM, Kevin Hilman <khilman@ti.com> wrote:
> "Govindraj.R" <govindraj.raja@ti.com> writes:
>
>> From: "Govindraj.R" <govindraj.raja@ti.com>
>>
>> Based on Linux-OMAP tree uart branch.
>> (git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
>> remotes/origin/uart)
>>
>> * Removes the cpu checks wherever possible and use version reg
>> ? for populating features and errata's
>> * enable tx wakeup available in wer reg for applicable
>> ? module revision's
>
> As this affects multiple SoCs, please report what SoCs it was tested on
> as well.

Sorry I for got to add that, here are details on what was tested.

1.) OMAP2430 SDP : Boot tested with uart1 as console.

2.) OMAP3430 SDP: Boot test, suspend/resume tests, retention off mode
                               (checking retention and off mode count
in cpu idle cases)

3.) OMAP3630 - Beagle XM:  Boot test, suspend/resume tests, retention off mode
                                            (checking retention and
off mode count in cpu idle cases)

4.) OMAP4430 - PANDA: Boot test, suspend/resume tests

5.) OMAP4460 - PANDA: Boot test.

--
Thanks,
Govindraj.R


>
> Thanks,
>
> Kevin
>
>> Govindraj.R (3):
>> ? OMAP2+: UART: Remove cpu checks for populating errata flags
>> ? OMAP2+: UART: enable tx wakeup bit for wer reg
>> ? OMAP2+: UART: replace omap34xx/omap4xx cpu checks with not omap24xx
>>
>> ?arch/arm/mach-omap2/serial.c ? ? ? ? ? ? ? ? ?| ? 13 +----
>> ?arch/arm/plat-omap/include/plat/omap-serial.h | ? ?8 +++-
>> ?drivers/tty/serial/omap-serial.c ? ? ? ? ? ? ?| ? 71 ++++++++++++++++++++++++-
>> ?3 files changed, 78 insertions(+), 14 deletions(-)

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

* Re: [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks
  2012-03-22  6:59     ` Raja, Govindraj
@ 2012-03-22 23:40       ` Paul Walmsley
  -1 siblings, 0 replies; 42+ messages in thread
From: Paul Walmsley @ 2012-03-22 23:40 UTC (permalink / raw)
  To: Raja, Govindraj
  Cc: Kevin Hilman, linux-omap, linux-serial, linux-arm-kernel, Felipe Balbi

Hi

On Thu, 22 Mar 2012, Raja, Govindraj wrote:

> Sorry I for got to add that, here are details on what was tested.
> 
> 1.) OMAP2430 SDP : Boot tested with uart1 as console.
> 
> 2.) OMAP3430 SDP: Boot test, suspend/resume tests, retention off mode
>                                (checking retention and off mode count
> in cpu idle cases)
> 
> 3.) OMAP3630 - Beagle XM:  Boot test, suspend/resume tests, retention off mode
>                                             (checking retention and
> off mode count in cpu idle cases)
> 
> 4.) OMAP4430 - PANDA: Boot test, suspend/resume tests
> 
> 5.) OMAP4460 - PANDA: Boot test.

What kernel .config was used for these tests?


- Paul

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

* [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks
@ 2012-03-22 23:40       ` Paul Walmsley
  0 siblings, 0 replies; 42+ messages in thread
From: Paul Walmsley @ 2012-03-22 23:40 UTC (permalink / raw)
  To: linux-arm-kernel

Hi

On Thu, 22 Mar 2012, Raja, Govindraj wrote:

> Sorry I for got to add that, here are details on what was tested.
> 
> 1.) OMAP2430 SDP : Boot tested with uart1 as console.
> 
> 2.) OMAP3430 SDP: Boot test, suspend/resume tests, retention off mode
>                                (checking retention and off mode count
> in cpu idle cases)
> 
> 3.) OMAP3630 - Beagle XM:  Boot test, suspend/resume tests, retention off mode
>                                             (checking retention and
> off mode count in cpu idle cases)
> 
> 4.) OMAP4430 - PANDA: Boot test, suspend/resume tests
> 
> 5.) OMAP4460 - PANDA: Boot test.

What kernel .config was used for these tests?


- Paul

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

* Re: [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks
  2012-03-22 23:40       ` Paul Walmsley
@ 2012-03-23  7:47         ` Raja, Govindraj
  -1 siblings, 0 replies; 42+ messages in thread
From: Raja, Govindraj @ 2012-03-23  7:47 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: Kevin Hilman, linux-omap, linux-serial, linux-arm-kernel, Felipe Balbi

Hi Paul,

On Fri, Mar 23, 2012 at 5:10 AM, Paul Walmsley <paul@pwsan.com> wrote:
> Hi
>
> On Thu, 22 Mar 2012, Raja, Govindraj wrote:
>
>> Sorry I for got to add that, here are details on what was tested.
>>
>> 1.) OMAP2430 SDP : Boot tested with uart1 as console.
>>
>> 2.) OMAP3430 SDP: Boot test, suspend/resume tests, retention off mode
>>                                (checking retention and off mode count
>> in cpu idle cases)
>>
>> 3.) OMAP3630 - Beagle XM:  Boot test, suspend/resume tests, retention off mode
>>                                             (checking retention and
>> off mode count in cpu idle cases)
>>
>> 4.) OMAP4430 - PANDA: Boot test, suspend/resume tests
>>
>> 5.) OMAP4460 - PANDA: Boot test.
>
> What kernel .config was used for these tests?

omap2plus_defconfig was used.

the same kernel image was tested with all these boards.
(kernel image was built along with initramfs support
using minimal busybox filesystem)

--
Thanks,
Govindraj.R
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks
@ 2012-03-23  7:47         ` Raja, Govindraj
  0 siblings, 0 replies; 42+ messages in thread
From: Raja, Govindraj @ 2012-03-23  7:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Paul,

On Fri, Mar 23, 2012 at 5:10 AM, Paul Walmsley <paul@pwsan.com> wrote:
> Hi
>
> On Thu, 22 Mar 2012, Raja, Govindraj wrote:
>
>> Sorry I for got to add that, here are details on what was tested.
>>
>> 1.) OMAP2430 SDP : Boot tested with uart1 as console.
>>
>> 2.) OMAP3430 SDP: Boot test, suspend/resume tests, retention off mode
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?(checking retention and off mode count
>> in cpu idle cases)
>>
>> 3.) OMAP3630 - Beagle XM: ?Boot test, suspend/resume tests, retention off mode
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? (checking retention and
>> off mode count in cpu idle cases)
>>
>> 4.) OMAP4430 - PANDA: Boot test, suspend/resume tests
>>
>> 5.) OMAP4460 - PANDA: Boot test.
>
> What kernel .config was used for these tests?

omap2plus_defconfig was used.

the same kernel image was tested with all these boards.
(kernel image was built along with initramfs support
using minimal busybox filesystem)

--
Thanks,
Govindraj.R

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

* Re: [PATCH 1/3] OMAP2+: UART: Remove cpu checks for populating errata flags
  2012-03-21 10:24   ` Govindraj.R
@ 2012-03-27 21:03     ` Jon Hunter
  -1 siblings, 0 replies; 42+ messages in thread
From: Jon Hunter @ 2012-03-27 21:03 UTC (permalink / raw)
  To: Govindraj.R
  Cc: linux-omap, Kevin Hilman, Paul Walmsley, Felipe Balbi,
	linux-serial, linux-arm-kernel

Hi Govindraj,

On 3/21/2012 5:24, Govindraj.R wrote:
> From: "Govindraj.R"<govindraj.raja@ti.com>
>
> Currently the errata is populated based on cpu checks this can
> be removed and replaced with module version check of uart ip block.
> MVR reg is provided within the uart reg map use the same
> to populate the errata and thus now errata population and handling
> can be managed within the driver itself.
>
> Cc: Paul Walmsley<paul@pwsan.com>
> Cc: Kevin Hilman<khilman@ti.com>
> Signed-off-by: Felipe Balbi<balbi@ti.com>
> Signed-off-by: Govindraj.R<govindraj.raja@ti.com>
> ---
>   arch/arm/mach-omap2/serial.c                  |    8 ---
>   arch/arm/plat-omap/include/plat/omap-serial.h |    1 -
>   drivers/tty/serial/omap-serial.c              |   62 ++++++++++++++++++++++++-
>   3 files changed, 61 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index f590afc..330ee04 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -357,14 +357,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
>   	omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
>   	omap_up.autosuspend_timeout = info->autosuspend_timeout;
>
> -	/* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
> -	if (!cpu_is_omap2420()&&  !cpu_is_ti816x())
> -		omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
> -
> -	/* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
> -	if (cpu_is_omap34xx() || cpu_is_omap3630())
> -		omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
> -
>   	pdata =&omap_up;
>   	pdata_size = sizeof(struct omap_uart_port_info);
>
> diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
> index 9ff4444..1a52725 100644
> --- a/arch/arm/plat-omap/include/plat/omap-serial.h
> +++ b/arch/arm/plat-omap/include/plat/omap-serial.h
> @@ -65,7 +65,6 @@ struct omap_uart_port_info {
>   	bool			dma_enabled;	/* To specify DMA Mode */
>   	unsigned int		uartclk;	/* UART clock rate */
>   	upf_t			flags;		/* UPF_* flags */
> -	u32			errata;
>   	unsigned int		dma_rx_buf_size;
>   	unsigned int		dma_rx_timeout;
>   	unsigned int		autosuspend_timeout;
> diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
> index f809041..c7666d6 100644
> --- a/drivers/tty/serial/omap-serial.c
> +++ b/drivers/tty/serial/omap-serial.c
> @@ -44,6 +44,13 @@
>   #include<plat/dmtimer.h>
>   #include<plat/omap-serial.h>
>
> +#define UART_BUILD_REVISION(x, y)	(((x)<<  8) | (y))
> +
> +#define OMAP_UART_REV_42 0x0402
> +#define OMAP_UART_REV_46 0x0406
> +#define OMAP_UART_REV_52 0x0502
> +#define OMAP_UART_REV_63 0x0603
> +
>   #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
>
>   /* SCR register bitmasks */
> @@ -1346,6 +1353,58 @@ static void uart_tx_dma_callback(int lch, u16 ch_status, void *data)
>   	return;
>   }
>
> +static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
> +{
> +	u32 mvr, scheme;
> +	u16 revision, major, minor;
> +
> +	mvr = serial_in(up, UART_OMAP_MVER);
> +
> +	/* Check revision register scheme */
> +	scheme = mvr&  (0x03<<  30);
> +	scheme>>= 30;

Minor nit-pick, why not just ...

	scheme = mvr >> 30;

> +	switch (scheme) {
> +	case 0: /* Legacy Scheme: OMAP2/3 */
> +		/* MINOR_REV[0:4], MAJOR_REV[4:7] */

Same scheme applies to OMAP1 devices too. So maybe we should include in 
the comment.

> +		major = (mvr&  0xf0)>>  4;
> +		minor = (mvr&  0x0f);
> +		break;
> +	case 1:
> +		/* New Scheme: OMAP4+ */
> +		/* MINOR_REV[0:5], MAJOR_REV[8:10] */
> +		major = (mvr&  0x7<<  8)>>  8;

Nit-pick ...

	major = (mvr >> 8) & 0x7;

> +		minor = (mvr&  0x3f);
> +		break;
> +	default:
> +		dev_warn(&up->pdev->dev,
> +			"Unknown %s revision, defaulting to highest\n",
> +			up->name);
> +		/* highest possible revision */
> +		major = 0xff;
> +		minor = 0xff;
> +	}
> +
> +	/* normalize revision for the driver */
> +	revision = UART_BUILD_REVISION(major, minor);
> +
> +	switch (revision) {
> +	case OMAP_UART_REV_46:
> +		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
> +				UART_ERRATA_i291_DMA_FORCEIDLE);
> +		break;
> +	case OMAP_UART_REV_52:
> +		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
> +				UART_ERRATA_i291_DMA_FORCEIDLE);
> +		break;
> +	case OMAP_UART_REV_63:
> +		up->errata |= UART_ERRATA_i202_MDR1_ACCESS;
> +		break;
> +	default:
> +		break;
> +	}

Should we also warn on an unknown revision?

> +}
> +
>   static struct omap_uart_port_info *of_get_uart_port_info(struct device *dev)
>   {
>   	struct omap_uart_port_info *omap_up_info;
> @@ -1443,7 +1502,6 @@ static int serial_omap_probe(struct platform_device *pdev)
>   						"%d\n", DEFAULT_CLK_SPEED);
>   	}
>   	up->uart_dma.uart_base = mem->start;
> -	up->errata = omap_up_info->errata;
>
>   	if (omap_up_info->dma_enabled) {
>   		up->uart_dma.uart_dma_tx = dma_tx->start;
> @@ -1473,6 +1531,8 @@ static int serial_omap_probe(struct platform_device *pdev)
>   	pm_runtime_enable(&pdev->dev);
>   	pm_runtime_get_sync(&pdev->dev);
>
> +	omap_serial_fill_features_erratas(up);
> +
>   	ui[up->port.line] = up;
>   	serial_omap_add_console_port(up);
>

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

* [PATCH 1/3] OMAP2+: UART: Remove cpu checks for populating errata flags
@ 2012-03-27 21:03     ` Jon Hunter
  0 siblings, 0 replies; 42+ messages in thread
From: Jon Hunter @ 2012-03-27 21:03 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Govindraj,

On 3/21/2012 5:24, Govindraj.R wrote:
> From: "Govindraj.R"<govindraj.raja@ti.com>
>
> Currently the errata is populated based on cpu checks this can
> be removed and replaced with module version check of uart ip block.
> MVR reg is provided within the uart reg map use the same
> to populate the errata and thus now errata population and handling
> can be managed within the driver itself.
>
> Cc: Paul Walmsley<paul@pwsan.com>
> Cc: Kevin Hilman<khilman@ti.com>
> Signed-off-by: Felipe Balbi<balbi@ti.com>
> Signed-off-by: Govindraj.R<govindraj.raja@ti.com>
> ---
>   arch/arm/mach-omap2/serial.c                  |    8 ---
>   arch/arm/plat-omap/include/plat/omap-serial.h |    1 -
>   drivers/tty/serial/omap-serial.c              |   62 ++++++++++++++++++++++++-
>   3 files changed, 61 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index f590afc..330ee04 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -357,14 +357,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
>   	omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
>   	omap_up.autosuspend_timeout = info->autosuspend_timeout;
>
> -	/* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
> -	if (!cpu_is_omap2420()&&  !cpu_is_ti816x())
> -		omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
> -
> -	/* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
> -	if (cpu_is_omap34xx() || cpu_is_omap3630())
> -		omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
> -
>   	pdata =&omap_up;
>   	pdata_size = sizeof(struct omap_uart_port_info);
>
> diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
> index 9ff4444..1a52725 100644
> --- a/arch/arm/plat-omap/include/plat/omap-serial.h
> +++ b/arch/arm/plat-omap/include/plat/omap-serial.h
> @@ -65,7 +65,6 @@ struct omap_uart_port_info {
>   	bool			dma_enabled;	/* To specify DMA Mode */
>   	unsigned int		uartclk;	/* UART clock rate */
>   	upf_t			flags;		/* UPF_* flags */
> -	u32			errata;
>   	unsigned int		dma_rx_buf_size;
>   	unsigned int		dma_rx_timeout;
>   	unsigned int		autosuspend_timeout;
> diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
> index f809041..c7666d6 100644
> --- a/drivers/tty/serial/omap-serial.c
> +++ b/drivers/tty/serial/omap-serial.c
> @@ -44,6 +44,13 @@
>   #include<plat/dmtimer.h>
>   #include<plat/omap-serial.h>
>
> +#define UART_BUILD_REVISION(x, y)	(((x)<<  8) | (y))
> +
> +#define OMAP_UART_REV_42 0x0402
> +#define OMAP_UART_REV_46 0x0406
> +#define OMAP_UART_REV_52 0x0502
> +#define OMAP_UART_REV_63 0x0603
> +
>   #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
>
>   /* SCR register bitmasks */
> @@ -1346,6 +1353,58 @@ static void uart_tx_dma_callback(int lch, u16 ch_status, void *data)
>   	return;
>   }
>
> +static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
> +{
> +	u32 mvr, scheme;
> +	u16 revision, major, minor;
> +
> +	mvr = serial_in(up, UART_OMAP_MVER);
> +
> +	/* Check revision register scheme */
> +	scheme = mvr&  (0x03<<  30);
> +	scheme>>= 30;

Minor nit-pick, why not just ...

	scheme = mvr >> 30;

> +	switch (scheme) {
> +	case 0: /* Legacy Scheme: OMAP2/3 */
> +		/* MINOR_REV[0:4], MAJOR_REV[4:7] */

Same scheme applies to OMAP1 devices too. So maybe we should include in 
the comment.

> +		major = (mvr&  0xf0)>>  4;
> +		minor = (mvr&  0x0f);
> +		break;
> +	case 1:
> +		/* New Scheme: OMAP4+ */
> +		/* MINOR_REV[0:5], MAJOR_REV[8:10] */
> +		major = (mvr&  0x7<<  8)>>  8;

Nit-pick ...

	major = (mvr >> 8) & 0x7;

> +		minor = (mvr&  0x3f);
> +		break;
> +	default:
> +		dev_warn(&up->pdev->dev,
> +			"Unknown %s revision, defaulting to highest\n",
> +			up->name);
> +		/* highest possible revision */
> +		major = 0xff;
> +		minor = 0xff;
> +	}
> +
> +	/* normalize revision for the driver */
> +	revision = UART_BUILD_REVISION(major, minor);
> +
> +	switch (revision) {
> +	case OMAP_UART_REV_46:
> +		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
> +				UART_ERRATA_i291_DMA_FORCEIDLE);
> +		break;
> +	case OMAP_UART_REV_52:
> +		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
> +				UART_ERRATA_i291_DMA_FORCEIDLE);
> +		break;
> +	case OMAP_UART_REV_63:
> +		up->errata |= UART_ERRATA_i202_MDR1_ACCESS;
> +		break;
> +	default:
> +		break;
> +	}

Should we also warn on an unknown revision?

> +}
> +
>   static struct omap_uart_port_info *of_get_uart_port_info(struct device *dev)
>   {
>   	struct omap_uart_port_info *omap_up_info;
> @@ -1443,7 +1502,6 @@ static int serial_omap_probe(struct platform_device *pdev)
>   						"%d\n", DEFAULT_CLK_SPEED);
>   	}
>   	up->uart_dma.uart_base = mem->start;
> -	up->errata = omap_up_info->errata;
>
>   	if (omap_up_info->dma_enabled) {
>   		up->uart_dma.uart_dma_tx = dma_tx->start;
> @@ -1473,6 +1531,8 @@ static int serial_omap_probe(struct platform_device *pdev)
>   	pm_runtime_enable(&pdev->dev);
>   	pm_runtime_get_sync(&pdev->dev);
>
> +	omap_serial_fill_features_erratas(up);
> +
>   	ui[up->port.line] = up;
>   	serial_omap_add_console_port(up);
>

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

* Re: [PATCH 1/3] OMAP2+: UART: Remove cpu checks for populating errata flags
  2012-03-21 10:24   ` Govindraj.R
@ 2012-03-27 21:08     ` Jon Hunter
  -1 siblings, 0 replies; 42+ messages in thread
From: Jon Hunter @ 2012-03-27 21:08 UTC (permalink / raw)
  To: Govindraj.R
  Cc: linux-omap, Kevin Hilman, Paul Walmsley, Felipe Balbi,
	linux-serial, linux-arm-kernel

Hi Govindraj,

On 3/21/2012 5:24, Govindraj.R wrote:
> From: "Govindraj.R"<govindraj.raja@ti.com>
>
> Currently the errata is populated based on cpu checks this can
> be removed and replaced with module version check of uart ip block.
> MVR reg is provided within the uart reg map use the same
> to populate the errata and thus now errata population and handling
> can be managed within the driver itself.
>
> Cc: Paul Walmsley<paul@pwsan.com>
> Cc: Kevin Hilman<khilman@ti.com>
> Signed-off-by: Felipe Balbi<balbi@ti.com>
> Signed-off-by: Govindraj.R<govindraj.raja@ti.com>
> ---
>   arch/arm/mach-omap2/serial.c                  |    8 ---
>   arch/arm/plat-omap/include/plat/omap-serial.h |    1 -
>   drivers/tty/serial/omap-serial.c              |   62 ++++++++++++++++++++++++-
>   3 files changed, 61 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index f590afc..330ee04 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -357,14 +357,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
>   	omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
>   	omap_up.autosuspend_timeout = info->autosuspend_timeout;
>
> -	/* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
> -	if (!cpu_is_omap2420()&&  !cpu_is_ti816x())
> -		omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
> -
> -	/* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
> -	if (cpu_is_omap34xx() || cpu_is_omap3630())
> -		omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
> -
>   	pdata =&omap_up;
>   	pdata_size = sizeof(struct omap_uart_port_info);
>
> diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
> index 9ff4444..1a52725 100644
> --- a/arch/arm/plat-omap/include/plat/omap-serial.h
> +++ b/arch/arm/plat-omap/include/plat/omap-serial.h
> @@ -65,7 +65,6 @@ struct omap_uart_port_info {
>   	bool			dma_enabled;	/* To specify DMA Mode */
>   	unsigned int		uartclk;	/* UART clock rate */
>   	upf_t			flags;		/* UPF_* flags */
> -	u32			errata;
>   	unsigned int		dma_rx_buf_size;
>   	unsigned int		dma_rx_timeout;
>   	unsigned int		autosuspend_timeout;
> diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
> index f809041..c7666d6 100644
> --- a/drivers/tty/serial/omap-serial.c
> +++ b/drivers/tty/serial/omap-serial.c
> @@ -44,6 +44,13 @@
>   #include<plat/dmtimer.h>
>   #include<plat/omap-serial.h>
>
> +#define UART_BUILD_REVISION(x, y)	(((x)<<  8) | (y))
> +
> +#define OMAP_UART_REV_42 0x0402
> +#define OMAP_UART_REV_46 0x0406
> +#define OMAP_UART_REV_52 0x0502
> +#define OMAP_UART_REV_63 0x0603
> +
>   #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
>
>   /* SCR register bitmasks */
> @@ -1346,6 +1353,58 @@ static void uart_tx_dma_callback(int lch, u16 ch_status, void *data)
>   	return;
>   }
>
> +static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
> +{
> +	u32 mvr, scheme;
> +	u16 revision, major, minor;
> +
> +	mvr = serial_in(up, UART_OMAP_MVER);
> +
> +	/* Check revision register scheme */
> +	scheme = mvr&  (0x03<<  30);
> +	scheme>>= 30;

Minor nit-pick, why not ...

	scheme = mvr >> 30;

> +	switch (scheme) {
> +	case 0: /* Legacy Scheme: OMAP2/3 */
> +		/* MINOR_REV[0:4], MAJOR_REV[4:7] */

This scheme is also true from OMAP1 devices. Maybe we could include in 
the comment.

> +		major = (mvr&  0xf0)>>  4;
> +		minor = (mvr&  0x0f);
> +		break;
> +	case 1:
> +		/* New Scheme: OMAP4+ */
> +		/* MINOR_REV[0:5], MAJOR_REV[8:10] */
> +		major = (mvr&  0x7<<  8)>>  8;

Nit-pick ...

	major = (mvr >> 8) & 0x7;

Cheers
Jon

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

* [PATCH 1/3] OMAP2+: UART: Remove cpu checks for populating errata flags
@ 2012-03-27 21:08     ` Jon Hunter
  0 siblings, 0 replies; 42+ messages in thread
From: Jon Hunter @ 2012-03-27 21:08 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Govindraj,

On 3/21/2012 5:24, Govindraj.R wrote:
> From: "Govindraj.R"<govindraj.raja@ti.com>
>
> Currently the errata is populated based on cpu checks this can
> be removed and replaced with module version check of uart ip block.
> MVR reg is provided within the uart reg map use the same
> to populate the errata and thus now errata population and handling
> can be managed within the driver itself.
>
> Cc: Paul Walmsley<paul@pwsan.com>
> Cc: Kevin Hilman<khilman@ti.com>
> Signed-off-by: Felipe Balbi<balbi@ti.com>
> Signed-off-by: Govindraj.R<govindraj.raja@ti.com>
> ---
>   arch/arm/mach-omap2/serial.c                  |    8 ---
>   arch/arm/plat-omap/include/plat/omap-serial.h |    1 -
>   drivers/tty/serial/omap-serial.c              |   62 ++++++++++++++++++++++++-
>   3 files changed, 61 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index f590afc..330ee04 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -357,14 +357,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
>   	omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
>   	omap_up.autosuspend_timeout = info->autosuspend_timeout;
>
> -	/* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
> -	if (!cpu_is_omap2420()&&  !cpu_is_ti816x())
> -		omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
> -
> -	/* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
> -	if (cpu_is_omap34xx() || cpu_is_omap3630())
> -		omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
> -
>   	pdata =&omap_up;
>   	pdata_size = sizeof(struct omap_uart_port_info);
>
> diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
> index 9ff4444..1a52725 100644
> --- a/arch/arm/plat-omap/include/plat/omap-serial.h
> +++ b/arch/arm/plat-omap/include/plat/omap-serial.h
> @@ -65,7 +65,6 @@ struct omap_uart_port_info {
>   	bool			dma_enabled;	/* To specify DMA Mode */
>   	unsigned int		uartclk;	/* UART clock rate */
>   	upf_t			flags;		/* UPF_* flags */
> -	u32			errata;
>   	unsigned int		dma_rx_buf_size;
>   	unsigned int		dma_rx_timeout;
>   	unsigned int		autosuspend_timeout;
> diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
> index f809041..c7666d6 100644
> --- a/drivers/tty/serial/omap-serial.c
> +++ b/drivers/tty/serial/omap-serial.c
> @@ -44,6 +44,13 @@
>   #include<plat/dmtimer.h>
>   #include<plat/omap-serial.h>
>
> +#define UART_BUILD_REVISION(x, y)	(((x)<<  8) | (y))
> +
> +#define OMAP_UART_REV_42 0x0402
> +#define OMAP_UART_REV_46 0x0406
> +#define OMAP_UART_REV_52 0x0502
> +#define OMAP_UART_REV_63 0x0603
> +
>   #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
>
>   /* SCR register bitmasks */
> @@ -1346,6 +1353,58 @@ static void uart_tx_dma_callback(int lch, u16 ch_status, void *data)
>   	return;
>   }
>
> +static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
> +{
> +	u32 mvr, scheme;
> +	u16 revision, major, minor;
> +
> +	mvr = serial_in(up, UART_OMAP_MVER);
> +
> +	/* Check revision register scheme */
> +	scheme = mvr&  (0x03<<  30);
> +	scheme>>= 30;

Minor nit-pick, why not ...

	scheme = mvr >> 30;

> +	switch (scheme) {
> +	case 0: /* Legacy Scheme: OMAP2/3 */
> +		/* MINOR_REV[0:4], MAJOR_REV[4:7] */

This scheme is also true from OMAP1 devices. Maybe we could include in 
the comment.

> +		major = (mvr&  0xf0)>>  4;
> +		minor = (mvr&  0x0f);
> +		break;
> +	case 1:
> +		/* New Scheme: OMAP4+ */
> +		/* MINOR_REV[0:5], MAJOR_REV[8:10] */
> +		major = (mvr&  0x7<<  8)>>  8;

Nit-pick ...

	major = (mvr >> 8) & 0x7;

Cheers
Jon

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

* Re: [PATCH 1/3] OMAP2+: UART: Remove cpu checks for populating errata flags
  2012-03-27 21:08     ` Jon Hunter
@ 2012-03-28 11:09       ` Raja, Govindraj
  -1 siblings, 0 replies; 42+ messages in thread
From: Raja, Govindraj @ 2012-03-28 11:09 UTC (permalink / raw)
  To: Jon Hunter
  Cc: linux-omap, Kevin Hilman, Paul Walmsley, Felipe Balbi,
	linux-serial, linux-arm-kernel

On Wed, Mar 28, 2012 at 2:38 AM, Jon Hunter <jon-hunter@ti.com> wrote:
> Hi Govindraj,
>
>
> On 3/21/2012 5:24, Govindraj.R wrote:
>>
>> From: "Govindraj.R"<govindraj.raja@ti.com>
>>
>> Currently the errata is populated based on cpu checks this can
>> be removed and replaced with module version check of uart ip block.
>> MVR reg is provided within the uart reg map use the same
>> to populate the errata and thus now errata population and handling
>> can be managed within the driver itself.
>>
>> Cc: Paul Walmsley<paul@pwsan.com>
>> Cc: Kevin Hilman<khilman@ti.com>
>> Signed-off-by: Felipe Balbi<balbi@ti.com>
>> Signed-off-by: Govindraj.R<govindraj.raja@ti.com>
>> ---
>>  arch/arm/mach-omap2/serial.c                  |    8 ---
>>  arch/arm/plat-omap/include/plat/omap-serial.h |    1 -
>>  drivers/tty/serial/omap-serial.c              |   62
>> ++++++++++++++++++++++++-
>>  3 files changed, 61 insertions(+), 10 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
>> index f590afc..330ee04 100644
>> --- a/arch/arm/mach-omap2/serial.c
>> +++ b/arch/arm/mach-omap2/serial.c
>> @@ -357,14 +357,6 @@ void __init omap_serial_init_port(struct
>> omap_board_data *bdata,
>>        omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
>>        omap_up.autosuspend_timeout = info->autosuspend_timeout;
>>
>> -       /* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
>> -       if (!cpu_is_omap2420()&&  !cpu_is_ti816x())
>>
>> -               omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
>> -
>> -       /* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
>> -       if (cpu_is_omap34xx() || cpu_is_omap3630())
>> -               omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
>> -
>>        pdata =&omap_up;
>>        pdata_size = sizeof(struct omap_uart_port_info);
>>
>> diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h
>> b/arch/arm/plat-omap/include/plat/omap-serial.h
>> index 9ff4444..1a52725 100644
>> --- a/arch/arm/plat-omap/include/plat/omap-serial.h
>> +++ b/arch/arm/plat-omap/include/plat/omap-serial.h
>> @@ -65,7 +65,6 @@ struct omap_uart_port_info {
>>        bool                    dma_enabled;    /* To specify DMA Mode */
>>        unsigned int            uartclk;        /* UART clock rate */
>>        upf_t                   flags;          /* UPF_* flags */
>> -       u32                     errata;
>>        unsigned int            dma_rx_buf_size;
>>        unsigned int            dma_rx_timeout;
>>        unsigned int            autosuspend_timeout;
>> diff --git a/drivers/tty/serial/omap-serial.c
>> b/drivers/tty/serial/omap-serial.c
>> index f809041..c7666d6 100644
>> --- a/drivers/tty/serial/omap-serial.c
>> +++ b/drivers/tty/serial/omap-serial.c
>> @@ -44,6 +44,13 @@
>>  #include<plat/dmtimer.h>
>>  #include<plat/omap-serial.h>
>>
>> +#define UART_BUILD_REVISION(x, y)      (((x)<<  8) | (y))
>> +
>> +#define OMAP_UART_REV_42 0x0402
>> +#define OMAP_UART_REV_46 0x0406
>> +#define OMAP_UART_REV_52 0x0502
>> +#define OMAP_UART_REV_63 0x0603
>> +
>>  #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
>>
>>  /* SCR register bitmasks */
>> @@ -1346,6 +1353,58 @@ static void uart_tx_dma_callback(int lch, u16
>> ch_status, void *data)
>>        return;
>>  }
>>
>> +static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
>> +{
>> +       u32 mvr, scheme;
>> +       u16 revision, major, minor;
>> +
>> +       mvr = serial_in(up, UART_OMAP_MVER);
>> +
>> +       /* Check revision register scheme */
>> +       scheme = mvr&  (0x03<<  30);
>> +       scheme>>= 30;
>
>
> Minor nit-pick, why not ...
>
>        scheme = mvr >> 30;
>

yes will correct it.

>
>> +       switch (scheme) {
>> +       case 0: /* Legacy Scheme: OMAP2/3 */
>> +               /* MINOR_REV[0:4], MAJOR_REV[4:7] */
>
>
> This scheme is also true from OMAP1 devices. Maybe we could include in the
> comment.

No omap1 from $SUBJECT also reason,

mach-omap1/serial.c => 8250.c
mach-omap2/serial.c => omap-serial.c

>
>> +               major = (mvr&  0xf0)>>  4;
>> +               minor = (mvr&  0x0f);
>>
>> +               break;
>> +       case 1:
>> +               /* New Scheme: OMAP4+ */
>> +               /* MINOR_REV[0:5], MAJOR_REV[8:10] */
>> +               major = (mvr&  0x7<<  8)>>  8;
>
>
> Nit-pick ...
>
>        major = (mvr >> 8) & 0x7;

yes fine will correct this.

--
Thanks,
Govindraj.R
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 1/3] OMAP2+: UART: Remove cpu checks for populating errata flags
@ 2012-03-28 11:09       ` Raja, Govindraj
  0 siblings, 0 replies; 42+ messages in thread
From: Raja, Govindraj @ 2012-03-28 11:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 28, 2012 at 2:38 AM, Jon Hunter <jon-hunter@ti.com> wrote:
> Hi Govindraj,
>
>
> On 3/21/2012 5:24, Govindraj.R wrote:
>>
>> From: "Govindraj.R"<govindraj.raja@ti.com>
>>
>> Currently the errata is populated based on cpu checks this can
>> be removed and replaced with module version check of uart ip block.
>> MVR reg is provided within the uart reg map use the same
>> to populate the errata and thus now errata population and handling
>> can be managed within the driver itself.
>>
>> Cc: Paul Walmsley<paul@pwsan.com>
>> Cc: Kevin Hilman<khilman@ti.com>
>> Signed-off-by: Felipe Balbi<balbi@ti.com>
>> Signed-off-by: Govindraj.R<govindraj.raja@ti.com>
>> ---
>> ?arch/arm/mach-omap2/serial.c ? ? ? ? ? ? ? ? ?| ? ?8 ---
>> ?arch/arm/plat-omap/include/plat/omap-serial.h | ? ?1 -
>> ?drivers/tty/serial/omap-serial.c ? ? ? ? ? ? ?| ? 62
>> ++++++++++++++++++++++++-
>> ?3 files changed, 61 insertions(+), 10 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
>> index f590afc..330ee04 100644
>> --- a/arch/arm/mach-omap2/serial.c
>> +++ b/arch/arm/mach-omap2/serial.c
>> @@ -357,14 +357,6 @@ void __init omap_serial_init_port(struct
>> omap_board_data *bdata,
>> ? ? ? ?omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
>> ? ? ? ?omap_up.autosuspend_timeout = info->autosuspend_timeout;
>>
>> - ? ? ? /* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
>> - ? ? ? if (!cpu_is_omap2420()&& ?!cpu_is_ti816x())
>>
>> - ? ? ? ? ? ? ? omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
>> -
>> - ? ? ? /* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
>> - ? ? ? if (cpu_is_omap34xx() || cpu_is_omap3630())
>> - ? ? ? ? ? ? ? omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
>> -
>> ? ? ? ?pdata =&omap_up;
>> ? ? ? ?pdata_size = sizeof(struct omap_uart_port_info);
>>
>> diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h
>> b/arch/arm/plat-omap/include/plat/omap-serial.h
>> index 9ff4444..1a52725 100644
>> --- a/arch/arm/plat-omap/include/plat/omap-serial.h
>> +++ b/arch/arm/plat-omap/include/plat/omap-serial.h
>> @@ -65,7 +65,6 @@ struct omap_uart_port_info {
>> ? ? ? ?bool ? ? ? ? ? ? ? ? ? ?dma_enabled; ? ?/* To specify DMA Mode */
>> ? ? ? ?unsigned int ? ? ? ? ? ?uartclk; ? ? ? ?/* UART clock rate */
>> ? ? ? ?upf_t ? ? ? ? ? ? ? ? ? flags; ? ? ? ? ?/* UPF_* flags */
>> - ? ? ? u32 ? ? ? ? ? ? ? ? ? ? errata;
>> ? ? ? ?unsigned int ? ? ? ? ? ?dma_rx_buf_size;
>> ? ? ? ?unsigned int ? ? ? ? ? ?dma_rx_timeout;
>> ? ? ? ?unsigned int ? ? ? ? ? ?autosuspend_timeout;
>> diff --git a/drivers/tty/serial/omap-serial.c
>> b/drivers/tty/serial/omap-serial.c
>> index f809041..c7666d6 100644
>> --- a/drivers/tty/serial/omap-serial.c
>> +++ b/drivers/tty/serial/omap-serial.c
>> @@ -44,6 +44,13 @@
>> ?#include<plat/dmtimer.h>
>> ?#include<plat/omap-serial.h>
>>
>> +#define UART_BUILD_REVISION(x, y) ? ? ?(((x)<< ?8) | (y))
>> +
>> +#define OMAP_UART_REV_42 0x0402
>> +#define OMAP_UART_REV_46 0x0406
>> +#define OMAP_UART_REV_52 0x0502
>> +#define OMAP_UART_REV_63 0x0603
>> +
>> ?#define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
>>
>> ?/* SCR register bitmasks */
>> @@ -1346,6 +1353,58 @@ static void uart_tx_dma_callback(int lch, u16
>> ch_status, void *data)
>> ? ? ? ?return;
>> ?}
>>
>> +static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
>> +{
>> + ? ? ? u32 mvr, scheme;
>> + ? ? ? u16 revision, major, minor;
>> +
>> + ? ? ? mvr = serial_in(up, UART_OMAP_MVER);
>> +
>> + ? ? ? /* Check revision register scheme */
>> + ? ? ? scheme = mvr& ?(0x03<< ?30);
>> + ? ? ? scheme>>= 30;
>
>
> Minor nit-pick, why not ...
>
> ? ? ? ?scheme = mvr >> 30;
>

yes will correct it.

>
>> + ? ? ? switch (scheme) {
>> + ? ? ? case 0: /* Legacy Scheme: OMAP2/3 */
>> + ? ? ? ? ? ? ? /* MINOR_REV[0:4], MAJOR_REV[4:7] */
>
>
> This scheme is also true from OMAP1 devices. Maybe we could include in the
> comment.

No omap1 from $SUBJECT also reason,

mach-omap1/serial.c => 8250.c
mach-omap2/serial.c => omap-serial.c

>
>> + ? ? ? ? ? ? ? major = (mvr& ?0xf0)>> ?4;
>> + ? ? ? ? ? ? ? minor = (mvr& ?0x0f);
>>
>> + ? ? ? ? ? ? ? break;
>> + ? ? ? case 1:
>> + ? ? ? ? ? ? ? /* New Scheme: OMAP4+ */
>> + ? ? ? ? ? ? ? /* MINOR_REV[0:5], MAJOR_REV[8:10] */
>> + ? ? ? ? ? ? ? major = (mvr& ?0x7<< ?8)>> ?8;
>
>
> Nit-pick ...
>
> ? ? ? ?major = (mvr >> 8) & 0x7;

yes fine will correct this.

--
Thanks,
Govindraj.R

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

* Re: [PATCH 1/3] OMAP2+: UART: Remove cpu checks for populating errata flags
  2012-03-28 11:09       ` Raja, Govindraj
@ 2012-03-28 16:43         ` Jon Hunter
  -1 siblings, 0 replies; 42+ messages in thread
From: Jon Hunter @ 2012-03-28 16:43 UTC (permalink / raw)
  To: Raja, Govindraj
  Cc: linux-omap, Kevin Hilman, Paul Walmsley, Felipe Balbi,
	linux-serial, linux-arm-kernel

Hi Govindraj,

On 3/28/2012 6:09, Raja, Govindraj wrote:
> On Wed, Mar 28, 2012 at 2:38 AM, Jon Hunter<jon-hunter@ti.com>  wrote:
>> Hi Govindraj,
>>
>>
>> On 3/21/2012 5:24, Govindraj.R wrote:
>>>
>>> From: "Govindraj.R"<govindraj.raja@ti.com>
>>>
>>> Currently the errata is populated based on cpu checks this can
>>> be removed and replaced with module version check of uart ip block.
>>> MVR reg is provided within the uart reg map use the same
>>> to populate the errata and thus now errata population and handling
>>> can be managed within the driver itself.
>>>
>>> Cc: Paul Walmsley<paul@pwsan.com>
>>> Cc: Kevin Hilman<khilman@ti.com>
>>> Signed-off-by: Felipe Balbi<balbi@ti.com>
>>> Signed-off-by: Govindraj.R<govindraj.raja@ti.com>
>>> ---
>>>   arch/arm/mach-omap2/serial.c                  |    8 ---
>>>   arch/arm/plat-omap/include/plat/omap-serial.h |    1 -
>>>   drivers/tty/serial/omap-serial.c              |   62
>>> ++++++++++++++++++++++++-
>>>   3 files changed, 61 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
>>> index f590afc..330ee04 100644
>>> --- a/arch/arm/mach-omap2/serial.c
>>> +++ b/arch/arm/mach-omap2/serial.c
>>> @@ -357,14 +357,6 @@ void __init omap_serial_init_port(struct
>>> omap_board_data *bdata,
>>>         omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
>>>         omap_up.autosuspend_timeout = info->autosuspend_timeout;
>>>
>>> -       /* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
>>> -       if (!cpu_is_omap2420()&&    !cpu_is_ti816x())
>>>
>>> -               omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
>>> -
>>> -       /* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
>>> -       if (cpu_is_omap34xx() || cpu_is_omap3630())
>>> -               omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
>>> -
>>>         pdata =&omap_up;
>>>         pdata_size = sizeof(struct omap_uart_port_info);
>>>
>>> diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h
>>> b/arch/arm/plat-omap/include/plat/omap-serial.h
>>> index 9ff4444..1a52725 100644
>>> --- a/arch/arm/plat-omap/include/plat/omap-serial.h
>>> +++ b/arch/arm/plat-omap/include/plat/omap-serial.h
>>> @@ -65,7 +65,6 @@ struct omap_uart_port_info {
>>>         bool                    dma_enabled;    /* To specify DMA Mode */
>>>         unsigned int            uartclk;        /* UART clock rate */
>>>         upf_t                   flags;          /* UPF_* flags */
>>> -       u32                     errata;
>>>         unsigned int            dma_rx_buf_size;
>>>         unsigned int            dma_rx_timeout;
>>>         unsigned int            autosuspend_timeout;
>>> diff --git a/drivers/tty/serial/omap-serial.c
>>> b/drivers/tty/serial/omap-serial.c
>>> index f809041..c7666d6 100644
>>> --- a/drivers/tty/serial/omap-serial.c
>>> +++ b/drivers/tty/serial/omap-serial.c
>>> @@ -44,6 +44,13 @@
>>>   #include<plat/dmtimer.h>
>>>   #include<plat/omap-serial.h>
>>>
>>> +#define UART_BUILD_REVISION(x, y)      (((x)<<    8) | (y))
>>> +
>>> +#define OMAP_UART_REV_42 0x0402
>>> +#define OMAP_UART_REV_46 0x0406
>>> +#define OMAP_UART_REV_52 0x0502
>>> +#define OMAP_UART_REV_63 0x0603
>>> +
>>>   #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
>>>
>>>   /* SCR register bitmasks */
>>> @@ -1346,6 +1353,58 @@ static void uart_tx_dma_callback(int lch, u16
>>> ch_status, void *data)
>>>         return;
>>>   }
>>>
>>> +static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
>>> +{
>>> +       u32 mvr, scheme;
>>> +       u16 revision, major, minor;
>>> +
>>> +       mvr = serial_in(up, UART_OMAP_MVER);
>>> +
>>> +       /* Check revision register scheme */
>>> +       scheme = mvr&    (0x03<<    30);
>>> +       scheme>>= 30;
>>
>>
>> Minor nit-pick, why not ...
>>
>>         scheme = mvr>>  30;
>>
>
> yes will correct it.

Thinking some more, could be better to add some #defines for 
OMAP_MVR_VERSION_MASK/SHIFT here.

>>
>>> +       switch (scheme) {
>>> +       case 0: /* Legacy Scheme: OMAP2/3 */
>>> +               /* MINOR_REV[0:4], MAJOR_REV[4:7] */
>>
>>
>> This scheme is also true from OMAP1 devices. Maybe we could include in the
>> comment.
>
> No omap1 from $SUBJECT also reason,
>
> mach-omap1/serial.c =>  8250.c
> mach-omap2/serial.c =>  omap-serial.c

Got it! Thanks.

>>> +               major = (mvr&    0xf0)>>    4;
>>> +               minor = (mvr&    0x0f);
>>>
>>> +               break;
>>> +       case 1:
>>> +               /* New Scheme: OMAP4+ */
>>> +               /* MINOR_REV[0:5], MAJOR_REV[8:10] */
>>> +               major = (mvr&    0x7<<    8)>>    8;
>>
>>
>> Nit-pick ...
>>
>>         major = (mvr>>  8)&  0x7;
>
> yes fine will correct this.

May be we should add #defines here to for OMAP_UART_MVR1_MAJ_MASK/SHIFT, 
OMAP_UART_MVR1_MIN_MASK/SHIFT, OMAP_UART_MVR2_MAJ_MASK/SHIFT and 
OMAP_UART_MVR2_MIN_MASK/SHIFT.

Jon

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

* [PATCH 1/3] OMAP2+: UART: Remove cpu checks for populating errata flags
@ 2012-03-28 16:43         ` Jon Hunter
  0 siblings, 0 replies; 42+ messages in thread
From: Jon Hunter @ 2012-03-28 16:43 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Govindraj,

On 3/28/2012 6:09, Raja, Govindraj wrote:
> On Wed, Mar 28, 2012 at 2:38 AM, Jon Hunter<jon-hunter@ti.com>  wrote:
>> Hi Govindraj,
>>
>>
>> On 3/21/2012 5:24, Govindraj.R wrote:
>>>
>>> From: "Govindraj.R"<govindraj.raja@ti.com>
>>>
>>> Currently the errata is populated based on cpu checks this can
>>> be removed and replaced with module version check of uart ip block.
>>> MVR reg is provided within the uart reg map use the same
>>> to populate the errata and thus now errata population and handling
>>> can be managed within the driver itself.
>>>
>>> Cc: Paul Walmsley<paul@pwsan.com>
>>> Cc: Kevin Hilman<khilman@ti.com>
>>> Signed-off-by: Felipe Balbi<balbi@ti.com>
>>> Signed-off-by: Govindraj.R<govindraj.raja@ti.com>
>>> ---
>>>   arch/arm/mach-omap2/serial.c                  |    8 ---
>>>   arch/arm/plat-omap/include/plat/omap-serial.h |    1 -
>>>   drivers/tty/serial/omap-serial.c              |   62
>>> ++++++++++++++++++++++++-
>>>   3 files changed, 61 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
>>> index f590afc..330ee04 100644
>>> --- a/arch/arm/mach-omap2/serial.c
>>> +++ b/arch/arm/mach-omap2/serial.c
>>> @@ -357,14 +357,6 @@ void __init omap_serial_init_port(struct
>>> omap_board_data *bdata,
>>>         omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
>>>         omap_up.autosuspend_timeout = info->autosuspend_timeout;
>>>
>>> -       /* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
>>> -       if (!cpu_is_omap2420()&&    !cpu_is_ti816x())
>>>
>>> -               omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
>>> -
>>> -       /* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
>>> -       if (cpu_is_omap34xx() || cpu_is_omap3630())
>>> -               omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
>>> -
>>>         pdata =&omap_up;
>>>         pdata_size = sizeof(struct omap_uart_port_info);
>>>
>>> diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h
>>> b/arch/arm/plat-omap/include/plat/omap-serial.h
>>> index 9ff4444..1a52725 100644
>>> --- a/arch/arm/plat-omap/include/plat/omap-serial.h
>>> +++ b/arch/arm/plat-omap/include/plat/omap-serial.h
>>> @@ -65,7 +65,6 @@ struct omap_uart_port_info {
>>>         bool                    dma_enabled;    /* To specify DMA Mode */
>>>         unsigned int            uartclk;        /* UART clock rate */
>>>         upf_t                   flags;          /* UPF_* flags */
>>> -       u32                     errata;
>>>         unsigned int            dma_rx_buf_size;
>>>         unsigned int            dma_rx_timeout;
>>>         unsigned int            autosuspend_timeout;
>>> diff --git a/drivers/tty/serial/omap-serial.c
>>> b/drivers/tty/serial/omap-serial.c
>>> index f809041..c7666d6 100644
>>> --- a/drivers/tty/serial/omap-serial.c
>>> +++ b/drivers/tty/serial/omap-serial.c
>>> @@ -44,6 +44,13 @@
>>>   #include<plat/dmtimer.h>
>>>   #include<plat/omap-serial.h>
>>>
>>> +#define UART_BUILD_REVISION(x, y)      (((x)<<    8) | (y))
>>> +
>>> +#define OMAP_UART_REV_42 0x0402
>>> +#define OMAP_UART_REV_46 0x0406
>>> +#define OMAP_UART_REV_52 0x0502
>>> +#define OMAP_UART_REV_63 0x0603
>>> +
>>>   #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
>>>
>>>   /* SCR register bitmasks */
>>> @@ -1346,6 +1353,58 @@ static void uart_tx_dma_callback(int lch, u16
>>> ch_status, void *data)
>>>         return;
>>>   }
>>>
>>> +static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
>>> +{
>>> +       u32 mvr, scheme;
>>> +       u16 revision, major, minor;
>>> +
>>> +       mvr = serial_in(up, UART_OMAP_MVER);
>>> +
>>> +       /* Check revision register scheme */
>>> +       scheme = mvr&    (0x03<<    30);
>>> +       scheme>>= 30;
>>
>>
>> Minor nit-pick, why not ...
>>
>>         scheme = mvr>>  30;
>>
>
> yes will correct it.

Thinking some more, could be better to add some #defines for 
OMAP_MVR_VERSION_MASK/SHIFT here.

>>
>>> +       switch (scheme) {
>>> +       case 0: /* Legacy Scheme: OMAP2/3 */
>>> +               /* MINOR_REV[0:4], MAJOR_REV[4:7] */
>>
>>
>> This scheme is also true from OMAP1 devices. Maybe we could include in the
>> comment.
>
> No omap1 from $SUBJECT also reason,
>
> mach-omap1/serial.c =>  8250.c
> mach-omap2/serial.c =>  omap-serial.c

Got it! Thanks.

>>> +               major = (mvr&    0xf0)>>    4;
>>> +               minor = (mvr&    0x0f);
>>>
>>> +               break;
>>> +       case 1:
>>> +               /* New Scheme: OMAP4+ */
>>> +               /* MINOR_REV[0:5], MAJOR_REV[8:10] */
>>> +               major = (mvr&    0x7<<    8)>>    8;
>>
>>
>> Nit-pick ...
>>
>>         major = (mvr>>  8)&  0x7;
>
> yes fine will correct this.

May be we should add #defines here to for OMAP_UART_MVR1_MAJ_MASK/SHIFT, 
OMAP_UART_MVR1_MIN_MASK/SHIFT, OMAP_UART_MVR2_MAJ_MASK/SHIFT and 
OMAP_UART_MVR2_MIN_MASK/SHIFT.

Jon

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

* Re: [PATCH 1/3] OMAP2+: UART: Remove cpu checks for populating errata flags
  2012-03-28 16:43         ` Jon Hunter
@ 2012-03-29  7:35           ` Raja, Govindraj
  -1 siblings, 0 replies; 42+ messages in thread
From: Raja, Govindraj @ 2012-03-29  7:35 UTC (permalink / raw)
  To: Jon Hunter
  Cc: linux-omap, Kevin Hilman, Paul Walmsley, Felipe Balbi,
	linux-serial, linux-arm-kernel

On Wed, Mar 28, 2012 at 10:13 PM, Jon Hunter <jon-hunter@ti.com> wrote:
> Hi Govindraj,
>
>
> On 3/28/2012 6:09, Raja, Govindraj wrote:
>>
>> On Wed, Mar 28, 2012 at 2:38 AM, Jon Hunter<jon-hunter@ti.com>  wrote:
>>>
>>> Hi Govindraj,
>>>
>>>

[...]

>>>> +       u32 mvr, scheme;
>>>> +       u16 revision, major, minor;
>>>> +
>>>> +       mvr = serial_in(up, UART_OMAP_MVER);
>>>> +
>>>> +       /* Check revision register scheme */
>>>> +       scheme = mvr&    (0x03<<    30);
>>>> +       scheme>>= 30;
>>>
>>>
>>>
>>> Minor nit-pick, why not ...
>>>
>>>        scheme = mvr>>  30;
>>>
>>
>> yes will correct it.
>
>
> Thinking some more, could be better to add some #defines for
> OMAP_MVR_VERSION_MASK/SHIFT here.
>

Yes sure.

>
>>>
>>>> +       switch (scheme) {
>>>> +       case 0: /* Legacy Scheme: OMAP2/3 */
>>>> +               /* MINOR_REV[0:4], MAJOR_REV[4:7] */
>>>
>>>
>>>
>>> This scheme is also true from OMAP1 devices. Maybe we could include in
>>> the
>>> comment.
>>
>>
>> No omap1 from $SUBJECT also reason,
>>
>> mach-omap1/serial.c =>  8250.c
>> mach-omap2/serial.c =>  omap-serial.c
>
>
> Got it! Thanks.
>
>>>> +               major = (mvr&    0xf0)>>    4;
>>>> +               minor = (mvr&    0x0f);
>>>>
>>>> +               break;
>>>> +       case 1:
>>>> +               /* New Scheme: OMAP4+ */
>>>> +               /* MINOR_REV[0:5], MAJOR_REV[8:10] */
>>>> +               major = (mvr&    0x7<<    8)>>    8;
>>>
>>>
>>>
>>> Nit-pick ...
>>>
>>>        major = (mvr>>  8)&  0x7;
>>
>>
>> yes fine will correct this.
>
>
> May be we should add #defines here to for OMAP_UART_MVR1_MAJ_MASK/SHIFT,
> OMAP_UART_MVR1_MIN_MASK/SHIFT, OMAP_UART_MVR2_MAJ_MASK/SHIFT and
> OMAP_UART_MVR2_MIN_MASK/SHIFT.
>

okay will add this.

--
Thanks,
Govindraj.R
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 1/3] OMAP2+: UART: Remove cpu checks for populating errata flags
@ 2012-03-29  7:35           ` Raja, Govindraj
  0 siblings, 0 replies; 42+ messages in thread
From: Raja, Govindraj @ 2012-03-29  7:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 28, 2012 at 10:13 PM, Jon Hunter <jon-hunter@ti.com> wrote:
> Hi Govindraj,
>
>
> On 3/28/2012 6:09, Raja, Govindraj wrote:
>>
>> On Wed, Mar 28, 2012 at 2:38 AM, Jon Hunter<jon-hunter@ti.com> ?wrote:
>>>
>>> Hi Govindraj,
>>>
>>>

[...]

>>>> + ? ? ? u32 mvr, scheme;
>>>> + ? ? ? u16 revision, major, minor;
>>>> +
>>>> + ? ? ? mvr = serial_in(up, UART_OMAP_MVER);
>>>> +
>>>> + ? ? ? /* Check revision register scheme */
>>>> + ? ? ? scheme = mvr& ? ?(0x03<< ? ?30);
>>>> + ? ? ? scheme>>= 30;
>>>
>>>
>>>
>>> Minor nit-pick, why not ...
>>>
>>> ? ? ? ?scheme = mvr>> ?30;
>>>
>>
>> yes will correct it.
>
>
> Thinking some more, could be better to add some #defines for
> OMAP_MVR_VERSION_MASK/SHIFT here.
>

Yes sure.

>
>>>
>>>> + ? ? ? switch (scheme) {
>>>> + ? ? ? case 0: /* Legacy Scheme: OMAP2/3 */
>>>> + ? ? ? ? ? ? ? /* MINOR_REV[0:4], MAJOR_REV[4:7] */
>>>
>>>
>>>
>>> This scheme is also true from OMAP1 devices. Maybe we could include in
>>> the
>>> comment.
>>
>>
>> No omap1 from $SUBJECT also reason,
>>
>> mach-omap1/serial.c => ?8250.c
>> mach-omap2/serial.c => ?omap-serial.c
>
>
> Got it! Thanks.
>
>>>> + ? ? ? ? ? ? ? major = (mvr& ? ?0xf0)>> ? ?4;
>>>> + ? ? ? ? ? ? ? minor = (mvr& ? ?0x0f);
>>>>
>>>> + ? ? ? ? ? ? ? break;
>>>> + ? ? ? case 1:
>>>> + ? ? ? ? ? ? ? /* New Scheme: OMAP4+ */
>>>> + ? ? ? ? ? ? ? /* MINOR_REV[0:5], MAJOR_REV[8:10] */
>>>> + ? ? ? ? ? ? ? major = (mvr& ? ?0x7<< ? ?8)>> ? ?8;
>>>
>>>
>>>
>>> Nit-pick ...
>>>
>>> ? ? ? ?major = (mvr>> ?8)& ?0x7;
>>
>>
>> yes fine will correct this.
>
>
> May be we should add #defines here to for OMAP_UART_MVR1_MAJ_MASK/SHIFT,
> OMAP_UART_MVR1_MIN_MASK/SHIFT, OMAP_UART_MVR2_MAJ_MASK/SHIFT and
> OMAP_UART_MVR2_MIN_MASK/SHIFT.
>

okay will add this.

--
Thanks,
Govindraj.R

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

* [PATCH v2] OMAP2+: UART: Remove cpu checks for populating errata flags
  2012-03-21 10:24   ` Govindraj.R
@ 2012-04-02  8:48     ` Govindraj.R
  -1 siblings, 0 replies; 42+ messages in thread
From: Govindraj.R @ 2012-04-02  8:48 UTC (permalink / raw)
  To: linux-omap
  Cc: linux-arm-kernel, Govindraj.R, Paul Walmsley, Kevin Hilman,
	Jon Hunter, Felipe Balbi

From: "Govindraj.R" <govindraj.raja@ti.com>

Currently the errata is populated based on cpu checks this can
be removed and replaced with module version check of uart ip block.
MVR reg is provided within the uart reg map use the same
to populate the errata and thus now errata population and handling
can be managed within the driver itself.

Cc: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
 arch/arm/mach-omap2/serial.c                  |    8 ---
 arch/arm/plat-omap/include/plat/omap-serial.h |    1 -
 drivers/tty/serial/omap-serial.c              |   75 ++++++++++++++++++++++++-
 3 files changed, 74 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 0cdd359..6affdd4 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -355,14 +355,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
 	omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
 	omap_up.autosuspend_timeout = info->autosuspend_timeout;
 
-	/* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
-	if (!cpu_is_omap2420() && !cpu_is_ti816x())
-		omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
-
-	/* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
-	if (cpu_is_omap34xx() || cpu_is_omap3630())
-		omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
-
 	pdata = &omap_up;
 	pdata_size = sizeof(struct omap_uart_port_info);
 
diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
index 9ff4444..1a52725 100644
--- a/arch/arm/plat-omap/include/plat/omap-serial.h
+++ b/arch/arm/plat-omap/include/plat/omap-serial.h
@@ -65,7 +65,6 @@ struct omap_uart_port_info {
 	bool			dma_enabled;	/* To specify DMA Mode */
 	unsigned int		uartclk;	/* UART clock rate */
 	upf_t			flags;		/* UPF_* flags */
-	u32			errata;
 	unsigned int		dma_rx_buf_size;
 	unsigned int		dma_rx_timeout;
 	unsigned int		autosuspend_timeout;
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 0121486..7d218c6 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -44,6 +44,13 @@
 #include <plat/dmtimer.h>
 #include <plat/omap-serial.h>
 
+#define UART_BUILD_REVISION(x, y)	(((x) << 8) | (y))
+
+#define OMAP_UART_REV_42 0x0402
+#define OMAP_UART_REV_46 0x0406
+#define OMAP_UART_REV_52 0x0502
+#define OMAP_UART_REV_63 0x0603
+
 #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
 
 /* SCR register bitmasks */
@@ -53,6 +60,18 @@
 #define OMAP_UART_FCR_RX_FIFO_TRIG_SHIFT		6
 #define OMAP_UART_FCR_RX_FIFO_TRIG_MASK			(0x3 << 6)
 
+/* MVR register bitmasks */
+#define OMAP_UART_MVR_SCHEME_SHIFT	30
+
+#define OMAP_UART_LEGACY_MVR_MAJ_MASK	0xf0
+#define OMAP_UART_LEGACY_MVR_MAJ_SHIFT	4
+#define OMAP_UART_LEGACY_MVR_MIN_MASK	0x0f
+
+#define OMAP_UART_MVR_MAJ_MASK		0x7
+#define OMAP_UART_MVR_MAJ_SHIFT		8
+#define OMAP_UART_MVR_MIN_MASK		0x3f
+
+
 static struct uart_omap_port *ui[OMAP_MAX_HSUART_PORTS];
 
 /* Forward declaration of functions */
@@ -1346,6 +1365,59 @@ static void uart_tx_dma_callback(int lch, u16 ch_status, void *data)
 	return;
 }
 
+static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
+{
+	u32 mvr, scheme;
+	u16 revision, major, minor;
+
+	mvr = serial_in(up, UART_OMAP_MVER);
+
+	/* Check revision register scheme */
+	scheme = mvr >> OMAP_UART_MVR_SCHEME_SHIFT;
+
+	switch (scheme) {
+	case 0: /* Legacy Scheme: OMAP2/3 */
+		/* MINOR_REV[0:4], MAJOR_REV[4:7] */
+		major = (mvr & OMAP_UART_LEGACY_MVR_MAJ_MASK) >>
+					OMAP_UART_LEGACY_MVR_MAJ_SHIFT;
+		minor = (mvr & OMAP_UART_LEGACY_MVR_MIN_MASK);
+		break;
+	case 1:
+		/* New Scheme: OMAP4+ */
+		/* MINOR_REV[0:5], MAJOR_REV[8:10] */
+		major = (mvr >> OMAP_UART_MVR_MAJ_SHIFT) &
+					OMAP_UART_MVR_MAJ_MASK;
+		minor = (mvr & OMAP_UART_MVR_MIN_MASK);
+		break;
+	default:
+		dev_warn(&up->pdev->dev,
+			"Unknown %s revision, defaulting to highest\n",
+			up->name);
+		/* highest possible revision */
+		major = 0xff;
+		minor = 0xff;
+	}
+
+	/* normalize revision for the driver */
+	revision = UART_BUILD_REVISION(major, minor);
+
+	switch (revision) {
+	case OMAP_UART_REV_46:
+		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
+				UART_ERRATA_i291_DMA_FORCEIDLE);
+		break;
+	case OMAP_UART_REV_52:
+		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
+				UART_ERRATA_i291_DMA_FORCEIDLE);
+		break;
+	case OMAP_UART_REV_63:
+		up->errata |= UART_ERRATA_i202_MDR1_ACCESS;
+		break;
+	default:
+		break;
+	}
+}
+
 static struct omap_uart_port_info *of_get_uart_port_info(struct device *dev)
 {
 	struct omap_uart_port_info *omap_up_info;
@@ -1443,7 +1515,6 @@ static int serial_omap_probe(struct platform_device *pdev)
 						"%d\n", DEFAULT_CLK_SPEED);
 	}
 	up->uart_dma.uart_base = mem->start;
-	up->errata = omap_up_info->errata;
 
 	if (omap_up_info->dma_enabled) {
 		up->uart_dma.uart_dma_tx = dma_tx->start;
@@ -1473,6 +1544,8 @@ static int serial_omap_probe(struct platform_device *pdev)
 	pm_runtime_enable(&pdev->dev);
 	pm_runtime_get_sync(&pdev->dev);
 
+	omap_serial_fill_features_erratas(up);
+
 	ui[up->port.line] = up;
 	serial_omap_add_console_port(up);
 
-- 
1.7.5.4


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

* [PATCH v2] OMAP2+: UART: Remove cpu checks for populating errata flags
@ 2012-04-02  8:48     ` Govindraj.R
  0 siblings, 0 replies; 42+ messages in thread
From: Govindraj.R @ 2012-04-02  8:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: "Govindraj.R" <govindraj.raja@ti.com>

Currently the errata is populated based on cpu checks this can
be removed and replaced with module version check of uart ip block.
MVR reg is provided within the uart reg map use the same
to populate the errata and thus now errata population and handling
can be managed within the driver itself.

Cc: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
 arch/arm/mach-omap2/serial.c                  |    8 ---
 arch/arm/plat-omap/include/plat/omap-serial.h |    1 -
 drivers/tty/serial/omap-serial.c              |   75 ++++++++++++++++++++++++-
 3 files changed, 74 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 0cdd359..6affdd4 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -355,14 +355,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
 	omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
 	omap_up.autosuspend_timeout = info->autosuspend_timeout;
 
-	/* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
-	if (!cpu_is_omap2420() && !cpu_is_ti816x())
-		omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
-
-	/* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
-	if (cpu_is_omap34xx() || cpu_is_omap3630())
-		omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
-
 	pdata = &omap_up;
 	pdata_size = sizeof(struct omap_uart_port_info);
 
diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
index 9ff4444..1a52725 100644
--- a/arch/arm/plat-omap/include/plat/omap-serial.h
+++ b/arch/arm/plat-omap/include/plat/omap-serial.h
@@ -65,7 +65,6 @@ struct omap_uart_port_info {
 	bool			dma_enabled;	/* To specify DMA Mode */
 	unsigned int		uartclk;	/* UART clock rate */
 	upf_t			flags;		/* UPF_* flags */
-	u32			errata;
 	unsigned int		dma_rx_buf_size;
 	unsigned int		dma_rx_timeout;
 	unsigned int		autosuspend_timeout;
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 0121486..7d218c6 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -44,6 +44,13 @@
 #include <plat/dmtimer.h>
 #include <plat/omap-serial.h>
 
+#define UART_BUILD_REVISION(x, y)	(((x) << 8) | (y))
+
+#define OMAP_UART_REV_42 0x0402
+#define OMAP_UART_REV_46 0x0406
+#define OMAP_UART_REV_52 0x0502
+#define OMAP_UART_REV_63 0x0603
+
 #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
 
 /* SCR register bitmasks */
@@ -53,6 +60,18 @@
 #define OMAP_UART_FCR_RX_FIFO_TRIG_SHIFT		6
 #define OMAP_UART_FCR_RX_FIFO_TRIG_MASK			(0x3 << 6)
 
+/* MVR register bitmasks */
+#define OMAP_UART_MVR_SCHEME_SHIFT	30
+
+#define OMAP_UART_LEGACY_MVR_MAJ_MASK	0xf0
+#define OMAP_UART_LEGACY_MVR_MAJ_SHIFT	4
+#define OMAP_UART_LEGACY_MVR_MIN_MASK	0x0f
+
+#define OMAP_UART_MVR_MAJ_MASK		0x7
+#define OMAP_UART_MVR_MAJ_SHIFT		8
+#define OMAP_UART_MVR_MIN_MASK		0x3f
+
+
 static struct uart_omap_port *ui[OMAP_MAX_HSUART_PORTS];
 
 /* Forward declaration of functions */
@@ -1346,6 +1365,59 @@ static void uart_tx_dma_callback(int lch, u16 ch_status, void *data)
 	return;
 }
 
+static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
+{
+	u32 mvr, scheme;
+	u16 revision, major, minor;
+
+	mvr = serial_in(up, UART_OMAP_MVER);
+
+	/* Check revision register scheme */
+	scheme = mvr >> OMAP_UART_MVR_SCHEME_SHIFT;
+
+	switch (scheme) {
+	case 0: /* Legacy Scheme: OMAP2/3 */
+		/* MINOR_REV[0:4], MAJOR_REV[4:7] */
+		major = (mvr & OMAP_UART_LEGACY_MVR_MAJ_MASK) >>
+					OMAP_UART_LEGACY_MVR_MAJ_SHIFT;
+		minor = (mvr & OMAP_UART_LEGACY_MVR_MIN_MASK);
+		break;
+	case 1:
+		/* New Scheme: OMAP4+ */
+		/* MINOR_REV[0:5], MAJOR_REV[8:10] */
+		major = (mvr >> OMAP_UART_MVR_MAJ_SHIFT) &
+					OMAP_UART_MVR_MAJ_MASK;
+		minor = (mvr & OMAP_UART_MVR_MIN_MASK);
+		break;
+	default:
+		dev_warn(&up->pdev->dev,
+			"Unknown %s revision, defaulting to highest\n",
+			up->name);
+		/* highest possible revision */
+		major = 0xff;
+		minor = 0xff;
+	}
+
+	/* normalize revision for the driver */
+	revision = UART_BUILD_REVISION(major, minor);
+
+	switch (revision) {
+	case OMAP_UART_REV_46:
+		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
+				UART_ERRATA_i291_DMA_FORCEIDLE);
+		break;
+	case OMAP_UART_REV_52:
+		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
+				UART_ERRATA_i291_DMA_FORCEIDLE);
+		break;
+	case OMAP_UART_REV_63:
+		up->errata |= UART_ERRATA_i202_MDR1_ACCESS;
+		break;
+	default:
+		break;
+	}
+}
+
 static struct omap_uart_port_info *of_get_uart_port_info(struct device *dev)
 {
 	struct omap_uart_port_info *omap_up_info;
@@ -1443,7 +1515,6 @@ static int serial_omap_probe(struct platform_device *pdev)
 						"%d\n", DEFAULT_CLK_SPEED);
 	}
 	up->uart_dma.uart_base = mem->start;
-	up->errata = omap_up_info->errata;
 
 	if (omap_up_info->dma_enabled) {
 		up->uart_dma.uart_dma_tx = dma_tx->start;
@@ -1473,6 +1544,8 @@ static int serial_omap_probe(struct platform_device *pdev)
 	pm_runtime_enable(&pdev->dev);
 	pm_runtime_get_sync(&pdev->dev);
 
+	omap_serial_fill_features_erratas(up);
+
 	ui[up->port.line] = up;
 	serial_omap_add_console_port(up);
 
-- 
1.7.5.4

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

* Re: [PATCH v2] OMAP2+: UART: Remove cpu checks for populating errata flags
  2012-04-02  8:48     ` Govindraj.R
@ 2012-04-02 15:44       ` Jon Hunter
  -1 siblings, 0 replies; 42+ messages in thread
From: Jon Hunter @ 2012-04-02 15:44 UTC (permalink / raw)
  To: Govindraj.R
  Cc: linux-omap, linux-arm-kernel, Paul Walmsley, Kevin Hilman, Felipe Balbi

Hi Govindraj,

Looks good, one minor comment ...

On 4/2/2012 3:48, Govindraj.R wrote:

> From: "Govindraj.R" <govindraj.raja@ti.com>
> 
> Currently the errata is populated based on cpu checks this can
> be removed and replaced with module version check of uart ip block.
> MVR reg is provided within the uart reg map use the same
> to populate the errata and thus now errata population and handling
> can be managed within the driver itself.
> 
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Kevin Hilman <khilman@ti.com>
> Cc: Jon Hunter <jon-hunter@ti.com>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
> ---
>  arch/arm/mach-omap2/serial.c                  |    8 ---
>  arch/arm/plat-omap/include/plat/omap-serial.h |    1 -
>  drivers/tty/serial/omap-serial.c              |   75 ++++++++++++++++++++++++-
>  3 files changed, 74 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index 0cdd359..6affdd4 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -355,14 +355,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
>  	omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
>  	omap_up.autosuspend_timeout = info->autosuspend_timeout;
>  
> -	/* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
> -	if (!cpu_is_omap2420() && !cpu_is_ti816x())
> -		omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
> -
> -	/* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
> -	if (cpu_is_omap34xx() || cpu_is_omap3630())
> -		omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
> -
>  	pdata = &omap_up;
>  	pdata_size = sizeof(struct omap_uart_port_info);
>  
> diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
> index 9ff4444..1a52725 100644
> --- a/arch/arm/plat-omap/include/plat/omap-serial.h
> +++ b/arch/arm/plat-omap/include/plat/omap-serial.h
> @@ -65,7 +65,6 @@ struct omap_uart_port_info {
>  	bool			dma_enabled;	/* To specify DMA Mode */
>  	unsigned int		uartclk;	/* UART clock rate */
>  	upf_t			flags;		/* UPF_* flags */
> -	u32			errata;
>  	unsigned int		dma_rx_buf_size;
>  	unsigned int		dma_rx_timeout;
>  	unsigned int		autosuspend_timeout;
> diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
> index 0121486..7d218c6 100644
> --- a/drivers/tty/serial/omap-serial.c
> +++ b/drivers/tty/serial/omap-serial.c
> @@ -44,6 +44,13 @@
>  #include <plat/dmtimer.h>
>  #include <plat/omap-serial.h>
>  
> +#define UART_BUILD_REVISION(x, y)	(((x) << 8) | (y))
> +
> +#define OMAP_UART_REV_42 0x0402
> +#define OMAP_UART_REV_46 0x0406
> +#define OMAP_UART_REV_52 0x0502
> +#define OMAP_UART_REV_63 0x0603
> +
>  #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
>  
>  /* SCR register bitmasks */
> @@ -53,6 +60,18 @@
>  #define OMAP_UART_FCR_RX_FIFO_TRIG_SHIFT		6
>  #define OMAP_UART_FCR_RX_FIFO_TRIG_MASK			(0x3 << 6)
>  
> +/* MVR register bitmasks */
> +#define OMAP_UART_MVR_SCHEME_SHIFT	30
> +
> +#define OMAP_UART_LEGACY_MVR_MAJ_MASK	0xf0
> +#define OMAP_UART_LEGACY_MVR_MAJ_SHIFT	4
> +#define OMAP_UART_LEGACY_MVR_MIN_MASK	0x0f
> +
> +#define OMAP_UART_MVR_MAJ_MASK		0x7


I think that you need to be consistent in how you define the mask and
shifts here. For Legacy major the mask is the actual bits in the
register representing the major number but for non-legacy the mask is
simply the bits minus the shift. So may be change the above define to ...

#define OMAP_UART_MVR_MAJ_MASK		0x700

> +#define OMAP_UART_MVR_MAJ_SHIFT		8
> +#define OMAP_UART_MVR_MIN_MASK		0x3f
> +
> +


I think you can remove one of the above lines of white space.

>  static struct uart_omap_port *ui[OMAP_MAX_HSUART_PORTS];
>  
>  /* Forward declaration of functions */
> @@ -1346,6 +1365,59 @@ static void uart_tx_dma_callback(int lch, u16 ch_status, void *data)
>  	return;
>  }
>  
> +static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
> +{
> +	u32 mvr, scheme;
> +	u16 revision, major, minor;
> +
> +	mvr = serial_in(up, UART_OMAP_MVER);
> +
> +	/* Check revision register scheme */
> +	scheme = mvr >> OMAP_UART_MVR_SCHEME_SHIFT;
> +
> +	switch (scheme) {
> +	case 0: /* Legacy Scheme: OMAP2/3 */
> +		/* MINOR_REV[0:4], MAJOR_REV[4:7] */
> +		major = (mvr & OMAP_UART_LEGACY_MVR_MAJ_MASK) >>
> +					OMAP_UART_LEGACY_MVR_MAJ_SHIFT;
> +		minor = (mvr & OMAP_UART_LEGACY_MVR_MIN_MASK);
> +		break;
> +	case 1:
> +		/* New Scheme: OMAP4+ */
> +		/* MINOR_REV[0:5], MAJOR_REV[8:10] */
> +		major = (mvr >> OMAP_UART_MVR_MAJ_SHIFT) &
> +					OMAP_UART_MVR_MAJ_MASK;


By changing the mask definition, you can then make the code for
extracting the major number consistent between legacy and non-legacy
devices too. Easier to read :-)

Cheers
Jon

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

* [PATCH v2] OMAP2+: UART: Remove cpu checks for populating errata flags
@ 2012-04-02 15:44       ` Jon Hunter
  0 siblings, 0 replies; 42+ messages in thread
From: Jon Hunter @ 2012-04-02 15:44 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Govindraj,

Looks good, one minor comment ...

On 4/2/2012 3:48, Govindraj.R wrote:

> From: "Govindraj.R" <govindraj.raja@ti.com>
> 
> Currently the errata is populated based on cpu checks this can
> be removed and replaced with module version check of uart ip block.
> MVR reg is provided within the uart reg map use the same
> to populate the errata and thus now errata population and handling
> can be managed within the driver itself.
> 
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Kevin Hilman <khilman@ti.com>
> Cc: Jon Hunter <jon-hunter@ti.com>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
> ---
>  arch/arm/mach-omap2/serial.c                  |    8 ---
>  arch/arm/plat-omap/include/plat/omap-serial.h |    1 -
>  drivers/tty/serial/omap-serial.c              |   75 ++++++++++++++++++++++++-
>  3 files changed, 74 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index 0cdd359..6affdd4 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -355,14 +355,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
>  	omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
>  	omap_up.autosuspend_timeout = info->autosuspend_timeout;
>  
> -	/* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
> -	if (!cpu_is_omap2420() && !cpu_is_ti816x())
> -		omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
> -
> -	/* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
> -	if (cpu_is_omap34xx() || cpu_is_omap3630())
> -		omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
> -
>  	pdata = &omap_up;
>  	pdata_size = sizeof(struct omap_uart_port_info);
>  
> diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
> index 9ff4444..1a52725 100644
> --- a/arch/arm/plat-omap/include/plat/omap-serial.h
> +++ b/arch/arm/plat-omap/include/plat/omap-serial.h
> @@ -65,7 +65,6 @@ struct omap_uart_port_info {
>  	bool			dma_enabled;	/* To specify DMA Mode */
>  	unsigned int		uartclk;	/* UART clock rate */
>  	upf_t			flags;		/* UPF_* flags */
> -	u32			errata;
>  	unsigned int		dma_rx_buf_size;
>  	unsigned int		dma_rx_timeout;
>  	unsigned int		autosuspend_timeout;
> diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
> index 0121486..7d218c6 100644
> --- a/drivers/tty/serial/omap-serial.c
> +++ b/drivers/tty/serial/omap-serial.c
> @@ -44,6 +44,13 @@
>  #include <plat/dmtimer.h>
>  #include <plat/omap-serial.h>
>  
> +#define UART_BUILD_REVISION(x, y)	(((x) << 8) | (y))
> +
> +#define OMAP_UART_REV_42 0x0402
> +#define OMAP_UART_REV_46 0x0406
> +#define OMAP_UART_REV_52 0x0502
> +#define OMAP_UART_REV_63 0x0603
> +
>  #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
>  
>  /* SCR register bitmasks */
> @@ -53,6 +60,18 @@
>  #define OMAP_UART_FCR_RX_FIFO_TRIG_SHIFT		6
>  #define OMAP_UART_FCR_RX_FIFO_TRIG_MASK			(0x3 << 6)
>  
> +/* MVR register bitmasks */
> +#define OMAP_UART_MVR_SCHEME_SHIFT	30
> +
> +#define OMAP_UART_LEGACY_MVR_MAJ_MASK	0xf0
> +#define OMAP_UART_LEGACY_MVR_MAJ_SHIFT	4
> +#define OMAP_UART_LEGACY_MVR_MIN_MASK	0x0f
> +
> +#define OMAP_UART_MVR_MAJ_MASK		0x7


I think that you need to be consistent in how you define the mask and
shifts here. For Legacy major the mask is the actual bits in the
register representing the major number but for non-legacy the mask is
simply the bits minus the shift. So may be change the above define to ...

#define OMAP_UART_MVR_MAJ_MASK		0x700

> +#define OMAP_UART_MVR_MAJ_SHIFT		8
> +#define OMAP_UART_MVR_MIN_MASK		0x3f
> +
> +


I think you can remove one of the above lines of white space.

>  static struct uart_omap_port *ui[OMAP_MAX_HSUART_PORTS];
>  
>  /* Forward declaration of functions */
> @@ -1346,6 +1365,59 @@ static void uart_tx_dma_callback(int lch, u16 ch_status, void *data)
>  	return;
>  }
>  
> +static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
> +{
> +	u32 mvr, scheme;
> +	u16 revision, major, minor;
> +
> +	mvr = serial_in(up, UART_OMAP_MVER);
> +
> +	/* Check revision register scheme */
> +	scheme = mvr >> OMAP_UART_MVR_SCHEME_SHIFT;
> +
> +	switch (scheme) {
> +	case 0: /* Legacy Scheme: OMAP2/3 */
> +		/* MINOR_REV[0:4], MAJOR_REV[4:7] */
> +		major = (mvr & OMAP_UART_LEGACY_MVR_MAJ_MASK) >>
> +					OMAP_UART_LEGACY_MVR_MAJ_SHIFT;
> +		minor = (mvr & OMAP_UART_LEGACY_MVR_MIN_MASK);
> +		break;
> +	case 1:
> +		/* New Scheme: OMAP4+ */
> +		/* MINOR_REV[0:5], MAJOR_REV[8:10] */
> +		major = (mvr >> OMAP_UART_MVR_MAJ_SHIFT) &
> +					OMAP_UART_MVR_MAJ_MASK;


By changing the mask definition, you can then make the code for
extracting the major number consistent between legacy and non-legacy
devices too. Easier to read :-)

Cheers
Jon

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

* [PATCH v3] OMAP2+: UART: Remove cpu checks for populating errata flags
  2012-04-02  8:48     ` Govindraj.R
@ 2012-04-03 13:42       ` Govindraj.R
  -1 siblings, 0 replies; 42+ messages in thread
From: Govindraj.R @ 2012-04-03 13:42 UTC (permalink / raw)
  To: linux-omap
  Cc: linux-serial, linux-arm-kernel, Govindraj.R, Jon Hunter,
	Paul Walmsley, Kevin Hilman, Felipe Balbi

From: "Govindraj.R" <govindraj.raja@ti.com>

Currently the errata is populated based on cpu checks this can
be removed and replaced with module version check of uart ip block.
MVR reg is provided within the uart reg map use the same
to populate the errata and thus now errata population and handling
can be managed within the driver itself.

Cc: Jon Hunter <jon-hunter@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
 arch/arm/mach-omap2/serial.c                  |    8 ---
 arch/arm/plat-omap/include/plat/omap-serial.h |    1 -
 drivers/tty/serial/omap-serial.c              |   74 ++++++++++++++++++++++++-
 3 files changed, 73 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 0cdd359..6affdd4 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -355,14 +355,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
 	omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
 	omap_up.autosuspend_timeout = info->autosuspend_timeout;
 
-	/* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
-	if (!cpu_is_omap2420() && !cpu_is_ti816x())
-		omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
-
-	/* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
-	if (cpu_is_omap34xx() || cpu_is_omap3630())
-		omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
-
 	pdata = &omap_up;
 	pdata_size = sizeof(struct omap_uart_port_info);
 
diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
index 9ff4444..1a52725 100644
--- a/arch/arm/plat-omap/include/plat/omap-serial.h
+++ b/arch/arm/plat-omap/include/plat/omap-serial.h
@@ -65,7 +65,6 @@ struct omap_uart_port_info {
 	bool			dma_enabled;	/* To specify DMA Mode */
 	unsigned int		uartclk;	/* UART clock rate */
 	upf_t			flags;		/* UPF_* flags */
-	u32			errata;
 	unsigned int		dma_rx_buf_size;
 	unsigned int		dma_rx_timeout;
 	unsigned int		autosuspend_timeout;
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 0121486..0555c96 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -44,6 +44,13 @@
 #include <plat/dmtimer.h>
 #include <plat/omap-serial.h>
 
+#define UART_BUILD_REVISION(x, y)	(((x) << 8) | (y))
+
+#define OMAP_UART_REV_42 0x0402
+#define OMAP_UART_REV_46 0x0406
+#define OMAP_UART_REV_52 0x0502
+#define OMAP_UART_REV_63 0x0603
+
 #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
 
 /* SCR register bitmasks */
@@ -53,6 +60,17 @@
 #define OMAP_UART_FCR_RX_FIFO_TRIG_SHIFT		6
 #define OMAP_UART_FCR_RX_FIFO_TRIG_MASK			(0x3 << 6)
 
+/* MVR register bitmasks */
+#define OMAP_UART_MVR_SCHEME_SHIFT	30
+
+#define OMAP_UART_LEGACY_MVR_MAJ_MASK	0xf0
+#define OMAP_UART_LEGACY_MVR_MAJ_SHIFT	4
+#define OMAP_UART_LEGACY_MVR_MIN_MASK	0x0f
+
+#define OMAP_UART_MVR_MAJ_MASK		0x700
+#define OMAP_UART_MVR_MAJ_SHIFT		8
+#define OMAP_UART_MVR_MIN_MASK		0x3f
+
 static struct uart_omap_port *ui[OMAP_MAX_HSUART_PORTS];
 
 /* Forward declaration of functions */
@@ -1346,6 +1364,59 @@ static void uart_tx_dma_callback(int lch, u16 ch_status, void *data)
 	return;
 }
 
+static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
+{
+	u32 mvr, scheme;
+	u16 revision, major, minor;
+
+	mvr = serial_in(up, UART_OMAP_MVER);
+
+	/* Check revision register scheme */
+	scheme = mvr >> OMAP_UART_MVR_SCHEME_SHIFT;
+
+	switch (scheme) {
+	case 0: /* Legacy Scheme: OMAP2/3 */
+		/* MINOR_REV[0:4], MAJOR_REV[4:7] */
+		major = (mvr & OMAP_UART_LEGACY_MVR_MAJ_MASK) >>
+					OMAP_UART_LEGACY_MVR_MAJ_SHIFT;
+		minor = (mvr & OMAP_UART_LEGACY_MVR_MIN_MASK);
+		break;
+	case 1:
+		/* New Scheme: OMAP4+ */
+		/* MINOR_REV[0:5], MAJOR_REV[8:10] */
+		major = (mvr & OMAP_UART_MVR_MAJ_MASK) >>
+					OMAP_UART_MVR_MAJ_SHIFT;
+		minor = (mvr & OMAP_UART_MVR_MIN_MASK);
+		break;
+	default:
+		dev_warn(&up->pdev->dev,
+			"Unknown %s revision, defaulting to highest\n",
+			up->name);
+		/* highest possible revision */
+		major = 0xff;
+		minor = 0xff;
+	}
+
+	/* normalize revision for the driver */
+	revision = UART_BUILD_REVISION(major, minor);
+
+	switch (revision) {
+	case OMAP_UART_REV_46:
+		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
+				UART_ERRATA_i291_DMA_FORCEIDLE);
+		break;
+	case OMAP_UART_REV_52:
+		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
+				UART_ERRATA_i291_DMA_FORCEIDLE);
+		break;
+	case OMAP_UART_REV_63:
+		up->errata |= UART_ERRATA_i202_MDR1_ACCESS;
+		break;
+	default:
+		break;
+	}
+}
+
 static struct omap_uart_port_info *of_get_uart_port_info(struct device *dev)
 {
 	struct omap_uart_port_info *omap_up_info;
@@ -1443,7 +1514,6 @@ static int serial_omap_probe(struct platform_device *pdev)
 						"%d\n", DEFAULT_CLK_SPEED);
 	}
 	up->uart_dma.uart_base = mem->start;
-	up->errata = omap_up_info->errata;
 
 	if (omap_up_info->dma_enabled) {
 		up->uart_dma.uart_dma_tx = dma_tx->start;
@@ -1473,6 +1543,8 @@ static int serial_omap_probe(struct platform_device *pdev)
 	pm_runtime_enable(&pdev->dev);
 	pm_runtime_get_sync(&pdev->dev);
 
+	omap_serial_fill_features_erratas(up);
+
 	ui[up->port.line] = up;
 	serial_omap_add_console_port(up);
 
-- 
1.7.5.4


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

* [PATCH v3] OMAP2+: UART: Remove cpu checks for populating errata flags
@ 2012-04-03 13:42       ` Govindraj.R
  0 siblings, 0 replies; 42+ messages in thread
From: Govindraj.R @ 2012-04-03 13:42 UTC (permalink / raw)
  To: linux-arm-kernel

From: "Govindraj.R" <govindraj.raja@ti.com>

Currently the errata is populated based on cpu checks this can
be removed and replaced with module version check of uart ip block.
MVR reg is provided within the uart reg map use the same
to populate the errata and thus now errata population and handling
can be managed within the driver itself.

Cc: Jon Hunter <jon-hunter@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
 arch/arm/mach-omap2/serial.c                  |    8 ---
 arch/arm/plat-omap/include/plat/omap-serial.h |    1 -
 drivers/tty/serial/omap-serial.c              |   74 ++++++++++++++++++++++++-
 3 files changed, 73 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 0cdd359..6affdd4 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -355,14 +355,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
 	omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
 	omap_up.autosuspend_timeout = info->autosuspend_timeout;
 
-	/* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
-	if (!cpu_is_omap2420() && !cpu_is_ti816x())
-		omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
-
-	/* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
-	if (cpu_is_omap34xx() || cpu_is_omap3630())
-		omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
-
 	pdata = &omap_up;
 	pdata_size = sizeof(struct omap_uart_port_info);
 
diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
index 9ff4444..1a52725 100644
--- a/arch/arm/plat-omap/include/plat/omap-serial.h
+++ b/arch/arm/plat-omap/include/plat/omap-serial.h
@@ -65,7 +65,6 @@ struct omap_uart_port_info {
 	bool			dma_enabled;	/* To specify DMA Mode */
 	unsigned int		uartclk;	/* UART clock rate */
 	upf_t			flags;		/* UPF_* flags */
-	u32			errata;
 	unsigned int		dma_rx_buf_size;
 	unsigned int		dma_rx_timeout;
 	unsigned int		autosuspend_timeout;
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 0121486..0555c96 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -44,6 +44,13 @@
 #include <plat/dmtimer.h>
 #include <plat/omap-serial.h>
 
+#define UART_BUILD_REVISION(x, y)	(((x) << 8) | (y))
+
+#define OMAP_UART_REV_42 0x0402
+#define OMAP_UART_REV_46 0x0406
+#define OMAP_UART_REV_52 0x0502
+#define OMAP_UART_REV_63 0x0603
+
 #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
 
 /* SCR register bitmasks */
@@ -53,6 +60,17 @@
 #define OMAP_UART_FCR_RX_FIFO_TRIG_SHIFT		6
 #define OMAP_UART_FCR_RX_FIFO_TRIG_MASK			(0x3 << 6)
 
+/* MVR register bitmasks */
+#define OMAP_UART_MVR_SCHEME_SHIFT	30
+
+#define OMAP_UART_LEGACY_MVR_MAJ_MASK	0xf0
+#define OMAP_UART_LEGACY_MVR_MAJ_SHIFT	4
+#define OMAP_UART_LEGACY_MVR_MIN_MASK	0x0f
+
+#define OMAP_UART_MVR_MAJ_MASK		0x700
+#define OMAP_UART_MVR_MAJ_SHIFT		8
+#define OMAP_UART_MVR_MIN_MASK		0x3f
+
 static struct uart_omap_port *ui[OMAP_MAX_HSUART_PORTS];
 
 /* Forward declaration of functions */
@@ -1346,6 +1364,59 @@ static void uart_tx_dma_callback(int lch, u16 ch_status, void *data)
 	return;
 }
 
+static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
+{
+	u32 mvr, scheme;
+	u16 revision, major, minor;
+
+	mvr = serial_in(up, UART_OMAP_MVER);
+
+	/* Check revision register scheme */
+	scheme = mvr >> OMAP_UART_MVR_SCHEME_SHIFT;
+
+	switch (scheme) {
+	case 0: /* Legacy Scheme: OMAP2/3 */
+		/* MINOR_REV[0:4], MAJOR_REV[4:7] */
+		major = (mvr & OMAP_UART_LEGACY_MVR_MAJ_MASK) >>
+					OMAP_UART_LEGACY_MVR_MAJ_SHIFT;
+		minor = (mvr & OMAP_UART_LEGACY_MVR_MIN_MASK);
+		break;
+	case 1:
+		/* New Scheme: OMAP4+ */
+		/* MINOR_REV[0:5], MAJOR_REV[8:10] */
+		major = (mvr & OMAP_UART_MVR_MAJ_MASK) >>
+					OMAP_UART_MVR_MAJ_SHIFT;
+		minor = (mvr & OMAP_UART_MVR_MIN_MASK);
+		break;
+	default:
+		dev_warn(&up->pdev->dev,
+			"Unknown %s revision, defaulting to highest\n",
+			up->name);
+		/* highest possible revision */
+		major = 0xff;
+		minor = 0xff;
+	}
+
+	/* normalize revision for the driver */
+	revision = UART_BUILD_REVISION(major, minor);
+
+	switch (revision) {
+	case OMAP_UART_REV_46:
+		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
+				UART_ERRATA_i291_DMA_FORCEIDLE);
+		break;
+	case OMAP_UART_REV_52:
+		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
+				UART_ERRATA_i291_DMA_FORCEIDLE);
+		break;
+	case OMAP_UART_REV_63:
+		up->errata |= UART_ERRATA_i202_MDR1_ACCESS;
+		break;
+	default:
+		break;
+	}
+}
+
 static struct omap_uart_port_info *of_get_uart_port_info(struct device *dev)
 {
 	struct omap_uart_port_info *omap_up_info;
@@ -1443,7 +1514,6 @@ static int serial_omap_probe(struct platform_device *pdev)
 						"%d\n", DEFAULT_CLK_SPEED);
 	}
 	up->uart_dma.uart_base = mem->start;
-	up->errata = omap_up_info->errata;
 
 	if (omap_up_info->dma_enabled) {
 		up->uart_dma.uart_dma_tx = dma_tx->start;
@@ -1473,6 +1543,8 @@ static int serial_omap_probe(struct platform_device *pdev)
 	pm_runtime_enable(&pdev->dev);
 	pm_runtime_get_sync(&pdev->dev);
 
+	omap_serial_fill_features_erratas(up);
+
 	ui[up->port.line] = up;
 	serial_omap_add_console_port(up);
 
-- 
1.7.5.4

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

* Re: [PATCH v3] OMAP2+: UART: Remove cpu checks for populating errata flags
  2012-04-03 13:42       ` Govindraj.R
@ 2012-04-04 14:10         ` Jon Hunter
  -1 siblings, 0 replies; 42+ messages in thread
From: Jon Hunter @ 2012-04-04 14:10 UTC (permalink / raw)
  To: Govindraj.R
  Cc: linux-omap, linux-serial, linux-arm-kernel, Paul Walmsley,
	Kevin Hilman, Felipe Balbi

Hi Govindraj,

On 04/03/2012 08:42 AM, Govindraj.R wrote:
> From: "Govindraj.R"<govindraj.raja@ti.com>
>
> Currently the errata is populated based on cpu checks this can
> be removed and replaced with module version check of uart ip block.
> MVR reg is provided within the uart reg map use the same
> to populate the errata and thus now errata population and handling
> can be managed within the driver itself.
>
> Cc: Jon Hunter<jon-hunter@ti.com>
> Cc: Paul Walmsley<paul@pwsan.com>
> Cc: Kevin Hilman<khilman@ti.com>
> Signed-off-by: Felipe Balbi<balbi@ti.com>
> Signed-off-by: Govindraj.R<govindraj.raja@ti.com>
> ---
>   arch/arm/mach-omap2/serial.c                  |    8 ---
>   arch/arm/plat-omap/include/plat/omap-serial.h |    1 -
>   drivers/tty/serial/omap-serial.c              |   74 ++++++++++++++++++++++++-
>   3 files changed, 73 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index 0cdd359..6affdd4 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -355,14 +355,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
>   	omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
>   	omap_up.autosuspend_timeout = info->autosuspend_timeout;
>
> -	/* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
> -	if (!cpu_is_omap2420()&&  !cpu_is_ti816x())
> -		omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
> -
> -	/* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
> -	if (cpu_is_omap34xx() || cpu_is_omap3630())
> -		omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
> -
>   	pdata =&omap_up;
>   	pdata_size = sizeof(struct omap_uart_port_info);
>
> diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
> index 9ff4444..1a52725 100644
> --- a/arch/arm/plat-omap/include/plat/omap-serial.h
> +++ b/arch/arm/plat-omap/include/plat/omap-serial.h
> @@ -65,7 +65,6 @@ struct omap_uart_port_info {
>   	bool			dma_enabled;	/* To specify DMA Mode */
>   	unsigned int		uartclk;	/* UART clock rate */
>   	upf_t			flags;		/* UPF_* flags */
> -	u32			errata;
>   	unsigned int		dma_rx_buf_size;
>   	unsigned int		dma_rx_timeout;
>   	unsigned int		autosuspend_timeout;
> diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
> index 0121486..0555c96 100644
> --- a/drivers/tty/serial/omap-serial.c
> +++ b/drivers/tty/serial/omap-serial.c
> @@ -44,6 +44,13 @@
>   #include<plat/dmtimer.h>
>   #include<plat/omap-serial.h>
>
> +#define UART_BUILD_REVISION(x, y)	(((x)<<  8) | (y))
> +
> +#define OMAP_UART_REV_42 0x0402
> +#define OMAP_UART_REV_46 0x0406
> +#define OMAP_UART_REV_52 0x0502
> +#define OMAP_UART_REV_63 0x0603
> +
>   #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
>
>   /* SCR register bitmasks */
> @@ -53,6 +60,17 @@
>   #define OMAP_UART_FCR_RX_FIFO_TRIG_SHIFT		6
>   #define OMAP_UART_FCR_RX_FIFO_TRIG_MASK			(0x3<<  6)
>
> +/* MVR register bitmasks */
> +#define OMAP_UART_MVR_SCHEME_SHIFT	30
> +
> +#define OMAP_UART_LEGACY_MVR_MAJ_MASK	0xf0
> +#define OMAP_UART_LEGACY_MVR_MAJ_SHIFT	4
> +#define OMAP_UART_LEGACY_MVR_MIN_MASK	0x0f
> +
> +#define OMAP_UART_MVR_MAJ_MASK		0x700
> +#define OMAP_UART_MVR_MAJ_SHIFT		8
> +#define OMAP_UART_MVR_MIN_MASK		0x3f
> +
>   static struct uart_omap_port *ui[OMAP_MAX_HSUART_PORTS];
>
>   /* Forward declaration of functions */
> @@ -1346,6 +1364,59 @@ static void uart_tx_dma_callback(int lch, u16 ch_status, void *data)
>   	return;
>   }
>
> +static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
> +{
> +	u32 mvr, scheme;
> +	u16 revision, major, minor;
> +
> +	mvr = serial_in(up, UART_OMAP_MVER);
> +
> +	/* Check revision register scheme */
> +	scheme = mvr>>  OMAP_UART_MVR_SCHEME_SHIFT;
> +
> +	switch (scheme) {
> +	case 0: /* Legacy Scheme: OMAP2/3 */
> +		/* MINOR_REV[0:4], MAJOR_REV[4:7] */
> +		major = (mvr&  OMAP_UART_LEGACY_MVR_MAJ_MASK)>>
> +					OMAP_UART_LEGACY_MVR_MAJ_SHIFT;
> +		minor = (mvr&  OMAP_UART_LEGACY_MVR_MIN_MASK);
> +		break;
> +	case 1:
> +		/* New Scheme: OMAP4+ */
> +		/* MINOR_REV[0:5], MAJOR_REV[8:10] */
> +		major = (mvr&  OMAP_UART_MVR_MAJ_MASK)>>
> +					OMAP_UART_MVR_MAJ_SHIFT;
> +		minor = (mvr&  OMAP_UART_MVR_MIN_MASK);
> +		break;
> +	default:
> +		dev_warn(&up->pdev->dev,
> +			"Unknown %s revision, defaulting to highest\n",
> +			up->name);
> +		/* highest possible revision */
> +		major = 0xff;
> +		minor = 0xff;
> +	}
> +
> +	/* normalize revision for the driver */
> +	revision = UART_BUILD_REVISION(major, minor);
> +
> +	switch (revision) {
> +	case OMAP_UART_REV_46:
> +		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
> +				UART_ERRATA_i291_DMA_FORCEIDLE);
> +		break;
> +	case OMAP_UART_REV_52:
> +		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
> +				UART_ERRATA_i291_DMA_FORCEIDLE);
> +		break;
> +	case OMAP_UART_REV_63:
> +		up->errata |= UART_ERRATA_i202_MDR1_ACCESS;
> +		break;
> +	default:
> +		break;
> +	}
> +}
> +
>   static struct omap_uart_port_info *of_get_uart_port_info(struct device *dev)
>   {
>   	struct omap_uart_port_info *omap_up_info;
> @@ -1443,7 +1514,6 @@ static int serial_omap_probe(struct platform_device *pdev)
>   						"%d\n", DEFAULT_CLK_SPEED);
>   	}
>   	up->uart_dma.uart_base = mem->start;
> -	up->errata = omap_up_info->errata;
>
>   	if (omap_up_info->dma_enabled) {
>   		up->uart_dma.uart_dma_tx = dma_tx->start;
> @@ -1473,6 +1543,8 @@ static int serial_omap_probe(struct platform_device *pdev)
>   	pm_runtime_enable(&pdev->dev);
>   	pm_runtime_get_sync(&pdev->dev);
>
> +	omap_serial_fill_features_erratas(up);
> +
>   	ui[up->port.line] = up;
>   	serial_omap_add_console_port(up);
>

Thanks!

Reviewed-by: Jon Hunter <jon-hunter@ti.com>

Cheers
Jon

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

* [PATCH v3] OMAP2+: UART: Remove cpu checks for populating errata flags
@ 2012-04-04 14:10         ` Jon Hunter
  0 siblings, 0 replies; 42+ messages in thread
From: Jon Hunter @ 2012-04-04 14:10 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Govindraj,

On 04/03/2012 08:42 AM, Govindraj.R wrote:
> From: "Govindraj.R"<govindraj.raja@ti.com>
>
> Currently the errata is populated based on cpu checks this can
> be removed and replaced with module version check of uart ip block.
> MVR reg is provided within the uart reg map use the same
> to populate the errata and thus now errata population and handling
> can be managed within the driver itself.
>
> Cc: Jon Hunter<jon-hunter@ti.com>
> Cc: Paul Walmsley<paul@pwsan.com>
> Cc: Kevin Hilman<khilman@ti.com>
> Signed-off-by: Felipe Balbi<balbi@ti.com>
> Signed-off-by: Govindraj.R<govindraj.raja@ti.com>
> ---
>   arch/arm/mach-omap2/serial.c                  |    8 ---
>   arch/arm/plat-omap/include/plat/omap-serial.h |    1 -
>   drivers/tty/serial/omap-serial.c              |   74 ++++++++++++++++++++++++-
>   3 files changed, 73 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index 0cdd359..6affdd4 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -355,14 +355,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
>   	omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
>   	omap_up.autosuspend_timeout = info->autosuspend_timeout;
>
> -	/* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
> -	if (!cpu_is_omap2420()&&  !cpu_is_ti816x())
> -		omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
> -
> -	/* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
> -	if (cpu_is_omap34xx() || cpu_is_omap3630())
> -		omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
> -
>   	pdata =&omap_up;
>   	pdata_size = sizeof(struct omap_uart_port_info);
>
> diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
> index 9ff4444..1a52725 100644
> --- a/arch/arm/plat-omap/include/plat/omap-serial.h
> +++ b/arch/arm/plat-omap/include/plat/omap-serial.h
> @@ -65,7 +65,6 @@ struct omap_uart_port_info {
>   	bool			dma_enabled;	/* To specify DMA Mode */
>   	unsigned int		uartclk;	/* UART clock rate */
>   	upf_t			flags;		/* UPF_* flags */
> -	u32			errata;
>   	unsigned int		dma_rx_buf_size;
>   	unsigned int		dma_rx_timeout;
>   	unsigned int		autosuspend_timeout;
> diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
> index 0121486..0555c96 100644
> --- a/drivers/tty/serial/omap-serial.c
> +++ b/drivers/tty/serial/omap-serial.c
> @@ -44,6 +44,13 @@
>   #include<plat/dmtimer.h>
>   #include<plat/omap-serial.h>
>
> +#define UART_BUILD_REVISION(x, y)	(((x)<<  8) | (y))
> +
> +#define OMAP_UART_REV_42 0x0402
> +#define OMAP_UART_REV_46 0x0406
> +#define OMAP_UART_REV_52 0x0502
> +#define OMAP_UART_REV_63 0x0603
> +
>   #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
>
>   /* SCR register bitmasks */
> @@ -53,6 +60,17 @@
>   #define OMAP_UART_FCR_RX_FIFO_TRIG_SHIFT		6
>   #define OMAP_UART_FCR_RX_FIFO_TRIG_MASK			(0x3<<  6)
>
> +/* MVR register bitmasks */
> +#define OMAP_UART_MVR_SCHEME_SHIFT	30
> +
> +#define OMAP_UART_LEGACY_MVR_MAJ_MASK	0xf0
> +#define OMAP_UART_LEGACY_MVR_MAJ_SHIFT	4
> +#define OMAP_UART_LEGACY_MVR_MIN_MASK	0x0f
> +
> +#define OMAP_UART_MVR_MAJ_MASK		0x700
> +#define OMAP_UART_MVR_MAJ_SHIFT		8
> +#define OMAP_UART_MVR_MIN_MASK		0x3f
> +
>   static struct uart_omap_port *ui[OMAP_MAX_HSUART_PORTS];
>
>   /* Forward declaration of functions */
> @@ -1346,6 +1364,59 @@ static void uart_tx_dma_callback(int lch, u16 ch_status, void *data)
>   	return;
>   }
>
> +static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
> +{
> +	u32 mvr, scheme;
> +	u16 revision, major, minor;
> +
> +	mvr = serial_in(up, UART_OMAP_MVER);
> +
> +	/* Check revision register scheme */
> +	scheme = mvr>>  OMAP_UART_MVR_SCHEME_SHIFT;
> +
> +	switch (scheme) {
> +	case 0: /* Legacy Scheme: OMAP2/3 */
> +		/* MINOR_REV[0:4], MAJOR_REV[4:7] */
> +		major = (mvr&  OMAP_UART_LEGACY_MVR_MAJ_MASK)>>
> +					OMAP_UART_LEGACY_MVR_MAJ_SHIFT;
> +		minor = (mvr&  OMAP_UART_LEGACY_MVR_MIN_MASK);
> +		break;
> +	case 1:
> +		/* New Scheme: OMAP4+ */
> +		/* MINOR_REV[0:5], MAJOR_REV[8:10] */
> +		major = (mvr&  OMAP_UART_MVR_MAJ_MASK)>>
> +					OMAP_UART_MVR_MAJ_SHIFT;
> +		minor = (mvr&  OMAP_UART_MVR_MIN_MASK);
> +		break;
> +	default:
> +		dev_warn(&up->pdev->dev,
> +			"Unknown %s revision, defaulting to highest\n",
> +			up->name);
> +		/* highest possible revision */
> +		major = 0xff;
> +		minor = 0xff;
> +	}
> +
> +	/* normalize revision for the driver */
> +	revision = UART_BUILD_REVISION(major, minor);
> +
> +	switch (revision) {
> +	case OMAP_UART_REV_46:
> +		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
> +				UART_ERRATA_i291_DMA_FORCEIDLE);
> +		break;
> +	case OMAP_UART_REV_52:
> +		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
> +				UART_ERRATA_i291_DMA_FORCEIDLE);
> +		break;
> +	case OMAP_UART_REV_63:
> +		up->errata |= UART_ERRATA_i202_MDR1_ACCESS;
> +		break;
> +	default:
> +		break;
> +	}
> +}
> +
>   static struct omap_uart_port_info *of_get_uart_port_info(struct device *dev)
>   {
>   	struct omap_uart_port_info *omap_up_info;
> @@ -1443,7 +1514,6 @@ static int serial_omap_probe(struct platform_device *pdev)
>   						"%d\n", DEFAULT_CLK_SPEED);
>   	}
>   	up->uart_dma.uart_base = mem->start;
> -	up->errata = omap_up_info->errata;
>
>   	if (omap_up_info->dma_enabled) {
>   		up->uart_dma.uart_dma_tx = dma_tx->start;
> @@ -1473,6 +1543,8 @@ static int serial_omap_probe(struct platform_device *pdev)
>   	pm_runtime_enable(&pdev->dev);
>   	pm_runtime_get_sync(&pdev->dev);
>
> +	omap_serial_fill_features_erratas(up);
> +
>   	ui[up->port.line] = up;
>   	serial_omap_add_console_port(up);
>

Thanks!

Reviewed-by: Jon Hunter <jon-hunter@ti.com>

Cheers
Jon

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

* Re: [PATCH v3] OMAP2+: UART: Remove cpu checks for populating errata flags
  2012-04-03 13:42       ` Govindraj.R
@ 2012-04-05 11:12         ` Shubhrajyoti
  -1 siblings, 0 replies; 42+ messages in thread
From: Shubhrajyoti @ 2012-04-05 11:12 UTC (permalink / raw)
  To: Govindraj.R
  Cc: linux-omap, linux-serial, linux-arm-kernel, Jon Hunter,
	Paul Walmsley, Kevin Hilman, Felipe Balbi

Hi Govind,

On Tuesday 03 April 2012 07:12 PM, Govindraj.R wrote:
> From: "Govindraj.R" <govindraj.raja@ti.com>
>
> Currently the errata is populated based on cpu checks this can
> be removed and replaced with module version check of uart ip block.
> MVR reg is provided within the uart reg map use the same
> to populate the errata and thus now errata population and handling
> can be managed within the driver itself.
>
> Cc: Jon Hunter <jon-hunter@ti.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Kevin Hilman <khilman@ti.com>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
> ---
>  arch/arm/mach-omap2/serial.c                  |    8 ---
>  arch/arm/plat-omap/include/plat/omap-serial.h |    1 -
>  drivers/tty/serial/omap-serial.c              |   74 ++++++++++++++++++++++++-
>  3 files changed, 73 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index 0cdd359..6affdd4 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -355,14 +355,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
>  	omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
>  	omap_up.autosuspend_timeout = info->autosuspend_timeout;
>  
> -	/* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
> -	if (!cpu_is_omap2420() && !cpu_is_ti816x())
> -		omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
> -
> -	/* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
> -	if (cpu_is_omap34xx() || cpu_is_omap3630())
34xx is true for 3630 also thanks for fixing the unneeded oring.
:-)

> -		omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
> -
>  	pdata = &omap_up;
>  	pdata_size = sizeof(struct omap_uart_port_info);
>  
> diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
> index 9ff4444..1a52725 100644
> --- a/arch/arm/plat-omap/include/plat/omap-serial.h
> +++ b/arch/arm/plat-omap/include/plat/omap-serial.h
> @@ -65,7 +65,6 @@ struct omap_uart_port_info {
>  	bool			dma_enabled;	/* To specify DMA Mode */
>  	unsigned int		uartclk;	/* UART clock rate */
>  	upf_t			flags;		/* UPF_* flags */
> -	u32			errata;
>  	unsigned int		dma_rx_buf_size;
>  	unsigned int		dma_rx_timeout;
>  	unsigned int		autosuspend_timeout;
> diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
> index 0121486..0555c96 100644
> --- a/drivers/tty/serial/omap-serial.c
> +++ b/drivers/tty/serial/omap-serial.c
> @@ -44,6 +44,13 @@
>  #include <plat/dmtimer.h>
>  #include <plat/omap-serial.h>
>  
> +#define UART_BUILD_REVISION(x, y)	(((x) << 8) | (y))
> +
> +#define OMAP_UART_REV_42 0x0402
> +#define OMAP_UART_REV_46 0x0406
> +#define OMAP_UART_REV_52 0x0502
> +#define OMAP_UART_REV_63 0x0603
Maybe a comment can be added or the #define changed to reflect
the processor also so that it is easy to map.


A dev_info print could be added so that the bootup logs(probe) could
tell what ip rev is booted is running.


Feel free to ignore such trivial comments.
> +
>  #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
>  
>  /* SCR register bitmasks */
> @@ -53,6 +60,17 @@
>  #define OMAP_UART_FCR_RX_FIFO_TRIG_SHIFT		6
>  #define OMAP_UART_FCR_RX_FIFO_TRIG_MASK			(0x3 << 6)
>  
> +/* MVR register bitmasks */
> +#define OMAP_UART_MVR_SCHEME_SHIFT	30
> +
> +#define OMAP_UART_LEGACY_MVR_MAJ_MASK	0xf0
> +#define OMAP_UART_LEGACY_MVR_MAJ_SHIFT	4
> +#define OMAP_UART_LEGACY_MVR_MIN_MASK	0x0f
> +
> +#define OMAP_UART_MVR_MAJ_MASK		0x700
> +#define OMAP_UART_MVR_MAJ_SHIFT		8
> +#define OMAP_UART_MVR_MIN_MASK		0x3f
> +
>  static struct uart_omap_port *ui[OMAP_MAX_HSUART_PORTS];
>  
>  /* Forward declaration of functions */
> @@ -1346,6 +1364,59 @@ static void uart_tx_dma_callback(int lch, u16 ch_status, void *data)
>  	return;
>  }
>  
> +static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
> +{
> +	u32 mvr, scheme;
> +	u16 revision, major, minor;
> +
> +	mvr = serial_in(up, UART_OMAP_MVER);
> +
> +	/* Check revision register scheme */
> +	scheme = mvr >> OMAP_UART_MVR_SCHEME_SHIFT;
> +
> +	switch (scheme) {
> +	case 0: /* Legacy Scheme: OMAP2/3 */
> +		/* MINOR_REV[0:4], MAJOR_REV[4:7] */
> +		major = (mvr & OMAP_UART_LEGACY_MVR_MAJ_MASK) >>
> +					OMAP_UART_LEGACY_MVR_MAJ_SHIFT;
> +		minor = (mvr & OMAP_UART_LEGACY_MVR_MIN_MASK);
> +		break;
> +	case 1:
> +		/* New Scheme: OMAP4+ */
> +		/* MINOR_REV[0:5], MAJOR_REV[8:10] */
> +		major = (mvr & OMAP_UART_MVR_MAJ_MASK) >>
> +					OMAP_UART_MVR_MAJ_SHIFT;
> +		minor = (mvr & OMAP_UART_MVR_MIN_MASK);
> +		break;
> +	default:
> +		dev_warn(&up->pdev->dev,
> +			"Unknown %s revision, defaulting to highest\n",
> +			up->name);
> +		/* highest possible revision */
> +		major = 0xff;
> +		minor = 0xff;
> +	}
> +
> +	/* normalize revision for the driver */
> +	revision = UART_BUILD_REVISION(major, minor);
> +
> +	switch (revision) {
> +	case OMAP_UART_REV_46:
> +		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
> +				UART_ERRATA_i291_DMA_FORCEIDLE);
> +		break;
> +	case OMAP_UART_REV_52:
> +		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
> +				UART_ERRATA_i291_DMA_FORCEIDLE);
> +		break;
> +	case OMAP_UART_REV_63:
> +		up->errata |= UART_ERRATA_i202_MDR1_ACCESS;
> +		break;
> +	default:
> +		break;
> +	}
> +}
> +
>  static struct omap_uart_port_info *of_get_uart_port_info(struct device *dev)
>  {
>  	struct omap_uart_port_info *omap_up_info;
> @@ -1443,7 +1514,6 @@ static int serial_omap_probe(struct platform_device *pdev)
>  						"%d\n", DEFAULT_CLK_SPEED);
>  	}
>  	up->uart_dma.uart_base = mem->start;
> -	up->errata = omap_up_info->errata;
>  
>  	if (omap_up_info->dma_enabled) {
>  		up->uart_dma.uart_dma_tx = dma_tx->start;
> @@ -1473,6 +1543,8 @@ static int serial_omap_probe(struct platform_device *pdev)
>  	pm_runtime_enable(&pdev->dev);
>  	pm_runtime_get_sync(&pdev->dev);
>  
> +	omap_serial_fill_features_erratas(up);
Nit : errata ( it is the prural of erratum)
> +
>  	ui[up->port.line] = up;
>  	serial_omap_add_console_port(up);
>  


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

* [PATCH v3] OMAP2+: UART: Remove cpu checks for populating errata flags
@ 2012-04-05 11:12         ` Shubhrajyoti
  0 siblings, 0 replies; 42+ messages in thread
From: Shubhrajyoti @ 2012-04-05 11:12 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Govind,

On Tuesday 03 April 2012 07:12 PM, Govindraj.R wrote:
> From: "Govindraj.R" <govindraj.raja@ti.com>
>
> Currently the errata is populated based on cpu checks this can
> be removed and replaced with module version check of uart ip block.
> MVR reg is provided within the uart reg map use the same
> to populate the errata and thus now errata population and handling
> can be managed within the driver itself.
>
> Cc: Jon Hunter <jon-hunter@ti.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Kevin Hilman <khilman@ti.com>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
> ---
>  arch/arm/mach-omap2/serial.c                  |    8 ---
>  arch/arm/plat-omap/include/plat/omap-serial.h |    1 -
>  drivers/tty/serial/omap-serial.c              |   74 ++++++++++++++++++++++++-
>  3 files changed, 73 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index 0cdd359..6affdd4 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -355,14 +355,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
>  	omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
>  	omap_up.autosuspend_timeout = info->autosuspend_timeout;
>  
> -	/* Enable the MDR1 Errata i202 for OMAP2430/3xxx/44xx */
> -	if (!cpu_is_omap2420() && !cpu_is_ti816x())
> -		omap_up.errata |= UART_ERRATA_i202_MDR1_ACCESS;
> -
> -	/* Enable DMA Mode Force Idle Errata i291 for omap34xx/3630 */
> -	if (cpu_is_omap34xx() || cpu_is_omap3630())
34xx is true for 3630 also thanks for fixing the unneeded oring.
:-)

> -		omap_up.errata |= UART_ERRATA_i291_DMA_FORCEIDLE;
> -
>  	pdata = &omap_up;
>  	pdata_size = sizeof(struct omap_uart_port_info);
>  
> diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
> index 9ff4444..1a52725 100644
> --- a/arch/arm/plat-omap/include/plat/omap-serial.h
> +++ b/arch/arm/plat-omap/include/plat/omap-serial.h
> @@ -65,7 +65,6 @@ struct omap_uart_port_info {
>  	bool			dma_enabled;	/* To specify DMA Mode */
>  	unsigned int		uartclk;	/* UART clock rate */
>  	upf_t			flags;		/* UPF_* flags */
> -	u32			errata;
>  	unsigned int		dma_rx_buf_size;
>  	unsigned int		dma_rx_timeout;
>  	unsigned int		autosuspend_timeout;
> diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
> index 0121486..0555c96 100644
> --- a/drivers/tty/serial/omap-serial.c
> +++ b/drivers/tty/serial/omap-serial.c
> @@ -44,6 +44,13 @@
>  #include <plat/dmtimer.h>
>  #include <plat/omap-serial.h>
>  
> +#define UART_BUILD_REVISION(x, y)	(((x) << 8) | (y))
> +
> +#define OMAP_UART_REV_42 0x0402
> +#define OMAP_UART_REV_46 0x0406
> +#define OMAP_UART_REV_52 0x0502
> +#define OMAP_UART_REV_63 0x0603
Maybe a comment can be added or the #define changed to reflect
the processor also so that it is easy to map.


A dev_info print could be added so that the bootup logs(probe) could
tell what ip rev is booted is running.


Feel free to ignore such trivial comments.
> +
>  #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
>  
>  /* SCR register bitmasks */
> @@ -53,6 +60,17 @@
>  #define OMAP_UART_FCR_RX_FIFO_TRIG_SHIFT		6
>  #define OMAP_UART_FCR_RX_FIFO_TRIG_MASK			(0x3 << 6)
>  
> +/* MVR register bitmasks */
> +#define OMAP_UART_MVR_SCHEME_SHIFT	30
> +
> +#define OMAP_UART_LEGACY_MVR_MAJ_MASK	0xf0
> +#define OMAP_UART_LEGACY_MVR_MAJ_SHIFT	4
> +#define OMAP_UART_LEGACY_MVR_MIN_MASK	0x0f
> +
> +#define OMAP_UART_MVR_MAJ_MASK		0x700
> +#define OMAP_UART_MVR_MAJ_SHIFT		8
> +#define OMAP_UART_MVR_MIN_MASK		0x3f
> +
>  static struct uart_omap_port *ui[OMAP_MAX_HSUART_PORTS];
>  
>  /* Forward declaration of functions */
> @@ -1346,6 +1364,59 @@ static void uart_tx_dma_callback(int lch, u16 ch_status, void *data)
>  	return;
>  }
>  
> +static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
> +{
> +	u32 mvr, scheme;
> +	u16 revision, major, minor;
> +
> +	mvr = serial_in(up, UART_OMAP_MVER);
> +
> +	/* Check revision register scheme */
> +	scheme = mvr >> OMAP_UART_MVR_SCHEME_SHIFT;
> +
> +	switch (scheme) {
> +	case 0: /* Legacy Scheme: OMAP2/3 */
> +		/* MINOR_REV[0:4], MAJOR_REV[4:7] */
> +		major = (mvr & OMAP_UART_LEGACY_MVR_MAJ_MASK) >>
> +					OMAP_UART_LEGACY_MVR_MAJ_SHIFT;
> +		minor = (mvr & OMAP_UART_LEGACY_MVR_MIN_MASK);
> +		break;
> +	case 1:
> +		/* New Scheme: OMAP4+ */
> +		/* MINOR_REV[0:5], MAJOR_REV[8:10] */
> +		major = (mvr & OMAP_UART_MVR_MAJ_MASK) >>
> +					OMAP_UART_MVR_MAJ_SHIFT;
> +		minor = (mvr & OMAP_UART_MVR_MIN_MASK);
> +		break;
> +	default:
> +		dev_warn(&up->pdev->dev,
> +			"Unknown %s revision, defaulting to highest\n",
> +			up->name);
> +		/* highest possible revision */
> +		major = 0xff;
> +		minor = 0xff;
> +	}
> +
> +	/* normalize revision for the driver */
> +	revision = UART_BUILD_REVISION(major, minor);
> +
> +	switch (revision) {
> +	case OMAP_UART_REV_46:
> +		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
> +				UART_ERRATA_i291_DMA_FORCEIDLE);
> +		break;
> +	case OMAP_UART_REV_52:
> +		up->errata |= (UART_ERRATA_i202_MDR1_ACCESS |
> +				UART_ERRATA_i291_DMA_FORCEIDLE);
> +		break;
> +	case OMAP_UART_REV_63:
> +		up->errata |= UART_ERRATA_i202_MDR1_ACCESS;
> +		break;
> +	default:
> +		break;
> +	}
> +}
> +
>  static struct omap_uart_port_info *of_get_uart_port_info(struct device *dev)
>  {
>  	struct omap_uart_port_info *omap_up_info;
> @@ -1443,7 +1514,6 @@ static int serial_omap_probe(struct platform_device *pdev)
>  						"%d\n", DEFAULT_CLK_SPEED);
>  	}
>  	up->uart_dma.uart_base = mem->start;
> -	up->errata = omap_up_info->errata;
>  
>  	if (omap_up_info->dma_enabled) {
>  		up->uart_dma.uart_dma_tx = dma_tx->start;
> @@ -1473,6 +1543,8 @@ static int serial_omap_probe(struct platform_device *pdev)
>  	pm_runtime_enable(&pdev->dev);
>  	pm_runtime_get_sync(&pdev->dev);
>  
> +	omap_serial_fill_features_erratas(up);
Nit : errata ( it is the prural of erratum)
> +
>  	ui[up->port.line] = up;
>  	serial_omap_add_console_port(up);
>  

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

* Re: [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks
  2012-03-21 10:24 ` Govindraj.R
@ 2012-04-05 11:24   ` Raja, Govindraj
  -1 siblings, 0 replies; 42+ messages in thread
From: Raja, Govindraj @ 2012-04-05 11:24 UTC (permalink / raw)
  To: Tony Lindgren, Alan Cox, Greg KH
  Cc: linux-serial, linux-arm-kernel, Kevin Hilman, Paul Walmsley,
	Felipe Balbi, Govindraj.R, linux-omap

On Wed, Mar 21, 2012 at 3:54 PM, Govindraj.R <govindraj.raja@ti.com> wrote:
> From: "Govindraj.R" <govindraj.raja@ti.com>
>
> Based on Linux-OMAP tree uart branch.
> (git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
> remotes/origin/uart)
>
> * Removes the cpu checks wherever possible and use version reg
>  for populating features and errata's
> * enable tx wakeup available in wer reg for applicable
>  module revision's
>
> Govindraj.R (3):
>  OMAP2+: UART: Remove cpu checks for populating errata flags
>  OMAP2+: UART: enable tx wakeup bit for wer reg
>  OMAP2+: UART: replace omap34xx/omap4xx cpu checks with not omap24xx
>
>  arch/arm/mach-omap2/serial.c                  |   13 +----
>  arch/arm/plat-omap/include/plat/omap-serial.h |    8 +++-
>  drivers/tty/serial/omap-serial.c              |   71 ++++++++++++++++++++++++-
>  3 files changed, 78 insertions(+), 14 deletions(-)

Alan / Greg,

With you ack on tty parts can this series be upstreamed from
omap tree ?


Tony,

Can you take these series into your uart fixes branch for 3.4-rc
(Let me know if you need a pull request with patches based on
linux-omap tree uart branch)

--
Thanks,
Govindraj.R
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks
@ 2012-04-05 11:24   ` Raja, Govindraj
  0 siblings, 0 replies; 42+ messages in thread
From: Raja, Govindraj @ 2012-04-05 11:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 21, 2012 at 3:54 PM, Govindraj.R <govindraj.raja@ti.com> wrote:
> From: "Govindraj.R" <govindraj.raja@ti.com>
>
> Based on Linux-OMAP tree uart branch.
> (git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
> remotes/origin/uart)
>
> * Removes the cpu checks wherever possible and use version reg
> ?for populating features and errata's
> * enable tx wakeup available in wer reg for applicable
> ?module revision's
>
> Govindraj.R (3):
> ?OMAP2+: UART: Remove cpu checks for populating errata flags
> ?OMAP2+: UART: enable tx wakeup bit for wer reg
> ?OMAP2+: UART: replace omap34xx/omap4xx cpu checks with not omap24xx
>
> ?arch/arm/mach-omap2/serial.c ? ? ? ? ? ? ? ? ?| ? 13 +----
> ?arch/arm/plat-omap/include/plat/omap-serial.h | ? ?8 +++-
> ?drivers/tty/serial/omap-serial.c ? ? ? ? ? ? ?| ? 71 ++++++++++++++++++++++++-
> ?3 files changed, 78 insertions(+), 14 deletions(-)

Alan / Greg,

With you ack on tty parts can this series be upstreamed from
omap tree ?


Tony,

Can you take these series into your uart fixes branch for 3.4-rc
(Let me know if you need a pull request with patches based on
linux-omap tree uart branch)

--
Thanks,
Govindraj.R

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

* Re: [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks
  2012-04-05 11:24   ` Raja, Govindraj
@ 2012-04-05 12:26     ` Alan Cox
  -1 siblings, 0 replies; 42+ messages in thread
From: Alan Cox @ 2012-04-05 12:26 UTC (permalink / raw)
  To: Raja, Govindraj
  Cc: Tony Lindgren, Greg KH, linux-serial, linux-arm-kernel,
	Kevin Hilman, Paul Walmsley, Felipe Balbi, linux-omap

On Thu, 5 Apr 2012 16:54:03 +0530
"Raja, Govindraj" <govindraj.raja@ti.com> wrote:

> On Wed, Mar 21, 2012 at 3:54 PM, Govindraj.R <govindraj.raja@ti.com>
> wrote:
> > From: "Govindraj.R" <govindraj.raja@ti.com>
> >
> > Based on Linux-OMAP tree uart branch.
> > (git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
> > remotes/origin/uart)
> >
> > * Removes the cpu checks wherever possible and use version reg
> >  for populating features and errata's
> > * enable tx wakeup available in wer reg for applicable
> >  module revision's
> >
> > Govindraj.R (3):
> >  OMAP2+: UART: Remove cpu checks for populating errata flags
> >  OMAP2+: UART: enable tx wakeup bit for wer reg
> >  OMAP2+: UART: replace omap34xx/omap4xx cpu checks with not omap24xx
> >
> >  arch/arm/mach-omap2/serial.c                  |   13 +----
> >  arch/arm/plat-omap/include/plat/omap-serial.h |    8 +++-
> >  drivers/tty/serial/omap-serial.c              |   71
> > ++++++++++++++++++++++++- 3 files changed, 78 insertions(+), 14
> > deletions(-)
> 
> Alan / Greg,
> 
> With you ack on tty parts can this series be upstreamed from
> omap tree ?

Fine by me - this seems primarily to be architectural details.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks
@ 2012-04-05 12:26     ` Alan Cox
  0 siblings, 0 replies; 42+ messages in thread
From: Alan Cox @ 2012-04-05 12:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 5 Apr 2012 16:54:03 +0530
"Raja, Govindraj" <govindraj.raja@ti.com> wrote:

> On Wed, Mar 21, 2012 at 3:54 PM, Govindraj.R <govindraj.raja@ti.com>
> wrote:
> > From: "Govindraj.R" <govindraj.raja@ti.com>
> >
> > Based on Linux-OMAP tree uart branch.
> > (git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
> > remotes/origin/uart)
> >
> > * Removes the cpu checks wherever possible and use version reg
> > ?for populating features and errata's
> > * enable tx wakeup available in wer reg for applicable
> > ?module revision's
> >
> > Govindraj.R (3):
> > ?OMAP2+: UART: Remove cpu checks for populating errata flags
> > ?OMAP2+: UART: enable tx wakeup bit for wer reg
> > ?OMAP2+: UART: replace omap34xx/omap4xx cpu checks with not omap24xx
> >
> > ?arch/arm/mach-omap2/serial.c ? ? ? ? ? ? ? ? ?| ? 13 +----
> > ?arch/arm/plat-omap/include/plat/omap-serial.h | ? ?8 +++-
> > ?drivers/tty/serial/omap-serial.c ? ? ? ? ? ? ?| ? 71
> > ++++++++++++++++++++++++- 3 files changed, 78 insertions(+), 14
> > deletions(-)
> 
> Alan / Greg,
> 
> With you ack on tty parts can this series be upstreamed from
> omap tree ?

Fine by me - this seems primarily to be architectural details.

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

* Re: [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks
  2012-04-05 12:26     ` Alan Cox
@ 2012-04-05 16:47       ` Greg KH
  -1 siblings, 0 replies; 42+ messages in thread
From: Greg KH @ 2012-04-05 16:47 UTC (permalink / raw)
  To: Alan Cox
  Cc: Raja, Govindraj, Tony Lindgren, linux-serial, linux-arm-kernel,
	Kevin Hilman, Paul Walmsley, Felipe Balbi, linux-omap

On Thu, Apr 05, 2012 at 01:26:17PM +0100, Alan Cox wrote:
> On Thu, 5 Apr 2012 16:54:03 +0530
> "Raja, Govindraj" <govindraj.raja@ti.com> wrote:
> 
> > On Wed, Mar 21, 2012 at 3:54 PM, Govindraj.R <govindraj.raja@ti.com>
> > wrote:
> > > From: "Govindraj.R" <govindraj.raja@ti.com>
> > >
> > > Based on Linux-OMAP tree uart branch.
> > > (git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
> > > remotes/origin/uart)
> > >
> > > * Removes the cpu checks wherever possible and use version reg
> > >  for populating features and errata's
> > > * enable tx wakeup available in wer reg for applicable
> > >  module revision's
> > >
> > > Govindraj.R (3):
> > >  OMAP2+: UART: Remove cpu checks for populating errata flags
> > >  OMAP2+: UART: enable tx wakeup bit for wer reg
> > >  OMAP2+: UART: replace omap34xx/omap4xx cpu checks with not omap24xx
> > >
> > >  arch/arm/mach-omap2/serial.c                  |   13 +----
> > >  arch/arm/plat-omap/include/plat/omap-serial.h |    8 +++-
> > >  drivers/tty/serial/omap-serial.c              |   71
> > > ++++++++++++++++++++++++- 3 files changed, 78 insertions(+), 14
> > > deletions(-)
> > 
> > Alan / Greg,
> > 
> > With you ack on tty parts can this series be upstreamed from
> > omap tree ?
> 
> Fine by me - this seems primarily to be architectural details.

Fine by me as well:
	Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks
@ 2012-04-05 16:47       ` Greg KH
  0 siblings, 0 replies; 42+ messages in thread
From: Greg KH @ 2012-04-05 16:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Apr 05, 2012 at 01:26:17PM +0100, Alan Cox wrote:
> On Thu, 5 Apr 2012 16:54:03 +0530
> "Raja, Govindraj" <govindraj.raja@ti.com> wrote:
> 
> > On Wed, Mar 21, 2012 at 3:54 PM, Govindraj.R <govindraj.raja@ti.com>
> > wrote:
> > > From: "Govindraj.R" <govindraj.raja@ti.com>
> > >
> > > Based on Linux-OMAP tree uart branch.
> > > (git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
> > > remotes/origin/uart)
> > >
> > > * Removes the cpu checks wherever possible and use version reg
> > > ?for populating features and errata's
> > > * enable tx wakeup available in wer reg for applicable
> > > ?module revision's
> > >
> > > Govindraj.R (3):
> > > ?OMAP2+: UART: Remove cpu checks for populating errata flags
> > > ?OMAP2+: UART: enable tx wakeup bit for wer reg
> > > ?OMAP2+: UART: replace omap34xx/omap4xx cpu checks with not omap24xx
> > >
> > > ?arch/arm/mach-omap2/serial.c ? ? ? ? ? ? ? ? ?| ? 13 +----
> > > ?arch/arm/plat-omap/include/plat/omap-serial.h | ? ?8 +++-
> > > ?drivers/tty/serial/omap-serial.c ? ? ? ? ? ? ?| ? 71
> > > ++++++++++++++++++++++++- 3 files changed, 78 insertions(+), 14
> > > deletions(-)
> > 
> > Alan / Greg,
> > 
> > With you ack on tty parts can this series be upstreamed from
> > omap tree ?
> 
> Fine by me - this seems primarily to be architectural details.

Fine by me as well:
	Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

end of thread, other threads:[~2012-04-05 16:47 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-21 10:24 [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks Govindraj.R
2012-03-21 10:24 ` Govindraj.R
2012-03-21 10:24 ` [PATCH 1/3] OMAP2+: UART: Remove cpu checks for populating errata flags Govindraj.R
2012-03-21 10:24   ` Govindraj.R
2012-03-27 21:03   ` Jon Hunter
2012-03-27 21:03     ` Jon Hunter
2012-03-27 21:08   ` Jon Hunter
2012-03-27 21:08     ` Jon Hunter
2012-03-28 11:09     ` Raja, Govindraj
2012-03-28 11:09       ` Raja, Govindraj
2012-03-28 16:43       ` Jon Hunter
2012-03-28 16:43         ` Jon Hunter
2012-03-29  7:35         ` Raja, Govindraj
2012-03-29  7:35           ` Raja, Govindraj
2012-04-02  8:48   ` [PATCH v2] " Govindraj.R
2012-04-02  8:48     ` Govindraj.R
2012-04-02 15:44     ` Jon Hunter
2012-04-02 15:44       ` Jon Hunter
2012-04-03 13:42     ` [PATCH v3] " Govindraj.R
2012-04-03 13:42       ` Govindraj.R
2012-04-04 14:10       ` Jon Hunter
2012-04-04 14:10         ` Jon Hunter
2012-04-05 11:12       ` Shubhrajyoti
2012-04-05 11:12         ` Shubhrajyoti
2012-03-21 10:25 ` [PATCH 2/3] OMAP2+: UART: enable tx wakeup bit for wer reg Govindraj.R
2012-03-21 10:25   ` Govindraj.R
2012-03-21 10:25 ` [PATCH 3/3] OMAP2+: UART: replace omap34xx/omap4xx cpu checks with not omap24xx Govindraj.R
2012-03-21 10:25   ` Govindraj.R
2012-03-21 14:28 ` [PATCH 0/3] OMAP2+: UART: Enable tx wakeup + remove cpu checks Kevin Hilman
2012-03-21 14:28   ` Kevin Hilman
2012-03-22  6:59   ` Raja, Govindraj
2012-03-22  6:59     ` Raja, Govindraj
2012-03-22 23:40     ` Paul Walmsley
2012-03-22 23:40       ` Paul Walmsley
2012-03-23  7:47       ` Raja, Govindraj
2012-03-23  7:47         ` Raja, Govindraj
2012-04-05 11:24 ` Raja, Govindraj
2012-04-05 11:24   ` Raja, Govindraj
2012-04-05 12:26   ` Alan Cox
2012-04-05 12:26     ` Alan Cox
2012-04-05 16:47     ` Greg KH
2012-04-05 16:47       ` Greg KH

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.