[PATCH 11/80] Blackfin Serial Driver: Fix bug - ircp fails on sir over Blackfin UART

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alan Cox
Date: Monday, October 13, 2008 - 2:33 am

From: Graf Yang <graf.yang@analog.com>

We now use the sir_dev/irtty_sir/uart/bfin_serial drivers framework
to monitor the TX status.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@redhat.com>
---

 .../mach-bf527/include/mach/bfin_serial_5xx.h      |    3 +++
 .../mach-bf533/include/mach/bfin_serial_5xx.h      |    2 ++
 .../mach-bf537/include/mach/bfin_serial_5xx.h      |    3 +++
 .../mach-bf548/include/mach/bfin_serial_5xx.h      |    3 +++
 .../mach-bf561/include/mach/bfin_serial_5xx.h      |    2 ++
 drivers/serial/bfin_5xx.c                          |    4 ++++
 6 files changed, 17 insertions(+), 0 deletions(-)


diff --git a/arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h
index a23d047..75722d6 100644
--- a/arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h
+++ b/arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h
@@ -78,6 +78,9 @@
 #  define CONFIG_UART1_RTS_PIN -1
 # endif
 #endif
+
+#define BFIN_UART_TX_FIFO_SIZE	2
+
 /*
  * The pin configuration is different from schematic
  */
diff --git a/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h
index 20471cd..815bfe5 100644
--- a/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h
+++ b/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h
@@ -69,6 +69,8 @@
 # endif
 #endif
 
+#define BFIN_UART_TX_FIFO_SIZE	2
+
 struct bfin_serial_port {
         struct uart_port        port;
         unsigned int            old_status;
diff --git a/arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h
index 08dfe30..b3f87e1 100644
--- a/arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h
+++ b/arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h
@@ -78,6 +78,9 @@
 #  define CONFIG_UART1_RTS_PIN -1
 # endif
 #endif
+
+#define BFIN_UART_TX_FIFO_SIZE	2
+
 /*
  * The pin configuration is different from schematic
  */
diff --git a/arch/blackfin/mach-bf548/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf548/include/mach/bfin_serial_5xx.h
index 76976b1..e4cf35e 100644
--- a/arch/blackfin/mach-bf548/include/mach/bfin_serial_5xx.h
+++ b/arch/blackfin/mach-bf548/include/mach/bfin_serial_5xx.h
@@ -82,6 +82,9 @@
 #  define CONFIG_UART1_RTS_PIN -1
 # endif
 #endif
+
+#define BFIN_UART_TX_FIFO_SIZE	2
+
 /*
  * The pin configuration is different from schematic
  */
diff --git a/arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h
index 6cddca4..e0ce0c1 100644
--- a/arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h
+++ b/arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h
@@ -69,6 +69,8 @@
 # endif
 #endif
 
+#define BFIN_UART_TX_FIFO_SIZE	2
+
 struct bfin_serial_port {
         struct uart_port        port;
         unsigned int            old_status;
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 5e20f50..a5cf0e7 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -761,6 +761,9 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
 	val |= UCEN;
 	UART_PUT_GCTL(uart, val);
 
+	/* Port speed changed, update the per-port timeout. */
+	uart_update_timeout(port, termios->c_cflag, baud);
+
 	spin_unlock_irqrestore(&uart->port.lock, flags);
 }
 
@@ -865,6 +868,7 @@ static void __init bfin_serial_init_ports(void)
 
 	for (i = 0; i < nr_active_ports; i++) {
 		bfin_serial_ports[i].port.uartclk   = get_sclk();
+		bfin_serial_ports[i].port.fifosize  = BFIN_UART_TX_FIFO_SIZE;
 		bfin_serial_ports[i].port.ops       = &bfin_serial_pops;
 		bfin_serial_ports[i].port.line      = i;
 		bfin_serial_ports[i].port.iotype    = UPIO_MEM;

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/80] TTY updates for 2.6.28, Alan Cox, (Mon Oct 13, 2:31 am)
[PATCH 04/80] epca: call tty_port_init, Alan Cox, (Mon Oct 13, 2:32 am)
[PATCH 11/80] Blackfin Serial Driver: Fix bug - ircp fails ..., Alan Cox, (Mon Oct 13, 2:33 am)
[PATCH 13/80] Fix oti6858 debug level, Alan Cox, (Mon Oct 13, 2:34 am)
[PATCH 14/80] Char: cyclades. remove bogus iomap, Alan Cox, (Mon Oct 13, 2:34 am)
[PATCH 15/80] Char: sx, fix io unmapping, Alan Cox, (Mon Oct 13, 2:34 am)
[PATCH 16/80] Char: merge ip2main and ip2base, Alan Cox, (Mon Oct 13, 2:34 am)
[PATCH 17/80] ip2, cleanup globals, Alan Cox, (Mon Oct 13, 2:34 am)
[PATCH 18/80] ip2, fix sparse warnings, Alan Cox, (Mon Oct 13, 2:34 am)
[PATCH 19/80] ip2, init/deinit cleanup, Alan Cox, (Mon Oct 13, 2:34 am)
[PATCH 23/80] nozomi: Fix close on error, Alan Cox, (Mon Oct 13, 2:35 am)
[PATCH 25/80] usb: fix pl2303 initialization, Alan Cox, (Mon Oct 13, 2:35 am)
[PATCH 35/80] tty: Add a kref count, Alan Cox, (Mon Oct 13, 2:37 am)
[PATCH 38/80] tty: ipw need reworking, Alan Cox, (Mon Oct 13, 2:38 am)
[PATCH 39/80] tty: Add termiox, Alan Cox, (Mon Oct 13, 2:38 am)
[PATCH 41/80] tty: compare the tty winsize, Alan Cox, (Mon Oct 13, 2:39 am)
[PATCH 44/80] tty: usb-serial krefs, Alan Cox, (Mon Oct 13, 2:39 am)
[PATCH 45/80] tty: kref usage for isicom and moxa, Alan Cox, (Mon Oct 13, 2:39 am)
[PATCH 46/80] stallion: Use krefs, Alan Cox, (Mon Oct 13, 2:40 am)
[PATCH 47/80] mxser: Switch to kref tty, Alan Cox, (Mon Oct 13, 2:40 am)
[PATCH 48/80] tty: the vhangup syscall is racy, Alan Cox, (Mon Oct 13, 2:40 am)
[PATCH 49/80] tty: Redo current tty locking, Alan Cox, (Mon Oct 13, 2:40 am)
[PATCH 52/80] vt: remove bogus lock dropping, Alan Cox, (Mon Oct 13, 2:41 am)
[PATCH 53/80] tty: shutdown method, Alan Cox, (Mon Oct 13, 2:41 am)
[PATCH 57/80] tty: kref the tty driver object, Alan Cox, (Mon Oct 13, 2:42 am)
[PATCH 58/80] tty: More driver operations, Alan Cox, (Mon Oct 13, 2:42 am)
[PATCH 61/80] Move tty lookup/reopen to caller, Alan Cox, (Mon Oct 13, 2:42 am)
[PATCH 63/80] Simplify devpts_get_tty(), Alan Cox, (Mon Oct 13, 2:43 am)
[PATCH 64/80] Simplify devpts_pty_new(), Alan Cox, (Mon Oct 13, 2:43 am)
[PATCH 65/80] Simplify devpts_pty_kill, Alan Cox, (Mon Oct 13, 2:43 am)
[PATCH 66/80] pty: Coding style and polish, Alan Cox, (Mon Oct 13, 2:43 am)
[PATCH 68/80] pty: simplify unix98 allocation, Alan Cox, (Mon Oct 13, 2:43 am)
[PATCH 69/80] tty: simplify ktermios allocation, Alan Cox, (Mon Oct 13, 2:44 am)
[PATCH 72/80] tty: fix up gigaset a bit, Alan Cox, (Mon Oct 13, 2:44 am)
[PATCH 73/80] tty: Remove lots of NULL checks, Alan Cox, (Mon Oct 13, 2:44 am)
[PATCH 77/80] tty: tty_io.c shadows sparse fix, Alan Cox, (Mon Oct 13, 2:45 am)
[PATCH 78/80] fs3270: remove extra locks, Alan Cox, (Mon Oct 13, 2:45 am)
[PATCH 79/80] fs3270: Correct error returns, Alan Cox, (Mon Oct 13, 2:46 am)
Re: [PATCH 72/80] tty: fix up gigaset a bit, Tilman Schmidt, (Thu Oct 16, 8:50 am)
Re: [PATCH 72/80] tty: fix up gigaset a bit, Alan Cox, (Fri Oct 17, 4:40 am)
Re: [PATCH 72/80] tty: fix up gigaset a bit, Tilman Schmidt, (Sun Oct 19, 5:28 am)
Re: [PATCH 72/80] tty: fix up gigaset a bit, Alan Cox, (Wed Oct 22, 2:00 am)
Re: [PATCH 72/80] tty: fix up gigaset a bit, Tilman Schmidt, (Fri Oct 24, 4:21 am)