All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm:omap:serial:cleanup: use module rev instead of cpu_is_xxxx
@ 2011-11-07 14:57 Vaibhav Hiremath
  2011-11-07 15:00 ` Hiremath, Vaibhav
  2011-11-07 19:44 ` Kevin Hilman
  0 siblings, 2 replies; 4+ messages in thread
From: Vaibhav Hiremath @ 2011-11-07 14:57 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, Vaibhav Hiremath

For OMAP3 uarts (module rev >= 0x52) and all successor devices
(omap4, TI81xx, AM33xx, etc...) empty fifo read errata is applicable,
so we can get rid of cpu_is_xxxx check and simply check for module rev here.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
---
NOTE: This patch has been tested on OMAP3EVM, and I expect to work on all OMAP3
family of devices (including TI816x, TI814x, AM335x, etc...).
but I am quite not sure about OMAP2 device, can anybody comment/test?

 arch/arm/mach-omap2/serial.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 9992dbf..ac274dc 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -740,16 +740,16 @@ void __init omap_serial_init_port(struct omap_board_data *bdata)
 	p->private_data = uart;
 
 	/*
-	 * omap44xx, ti816x: Never read empty UART fifo
+	 * all >omap3 family of devices: Never read empty UART fifo
 	 * omap3xxx: Never read empty UART fifo on UARTs
 	 * with IP rev >=0x52
 	 */
 	uart->regshift = p->regshift;
 	uart->membase = p->membase;
-	if (cpu_is_omap44xx() || cpu_is_ti816x())
-		uart->errata |= UART_ERRATA_FIFO_FULL_ABORT;
-	else if ((serial_read_reg(uart, UART_OMAP_MVER) & 0xFF)
-			>= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)
+	if (cpu_is_omap34xx() && (serial_read_reg(uart, UART_OMAP_MVER) & 0xFF)
+			< UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)
+		uart->errata &= ~UART_ERRATA_FIFO_FULL_ABORT;
+	else
 		uart->errata |= UART_ERRATA_FIFO_FULL_ABORT;
 
 	if (uart->errata & UART_ERRATA_FIFO_FULL_ABORT) {
-- 
1.7.0.4


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

end of thread, other threads:[~2011-11-16 14:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-07 14:57 [PATCH] arm:omap:serial:cleanup: use module rev instead of cpu_is_xxxx Vaibhav Hiremath
2011-11-07 15:00 ` Hiremath, Vaibhav
2011-11-07 19:44 ` Kevin Hilman
2011-11-16 14:53   ` Hiremath, Vaibhav

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.