mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bryan Wu <cooloney@kernel.org>
To: alan@lxorguk.ukuu.org.uk
Cc: linux-kernel@vger.kernel.org, Graf Yang <graf.yang@analog.com>,
	Bryan Wu <cooloney@kernel.org>
Subject: [PATCH 7/8] Blackfin Serial Driver: Fix bug - ircp fails on sir over Blackfin UART
Date: Sun, 27 Jul 2008 14:04:06 +0800	[thread overview]
Message-ID: <1217138647-18227-8-git-send-email-cooloney@kernel.org> (raw)
In-Reply-To: <1217138647-18227-1-git-send-email-cooloney@kernel.org>

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>
---
 drivers/serial/bfin_5xx.c                         |    4 ++++
 include/asm-blackfin/mach-bf527/bfin_serial_5xx.h |    3 +++
 include/asm-blackfin/mach-bf533/bfin_serial_5xx.h |    2 ++
 include/asm-blackfin/mach-bf537/bfin_serial_5xx.h |    3 +++
 include/asm-blackfin/mach-bf548/bfin_serial_5xx.h |    3 +++
 include/asm-blackfin/mach-bf561/bfin_serial_5xx.h |    2 ++
 6 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index afeff9f..ac74d8b 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;
diff --git a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
index a23d047..75722d6 100644
--- a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf527/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/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
index 20471cd..815bfe5 100644
--- a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf533/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/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
index 08dfe30..b3f87e1 100644
--- a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf537/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/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
index 76976b1..e4cf35e 100644
--- a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf548/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/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
index 6cddca4..e0ce0c1 100644
--- a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf561/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;
-- 
1.5.6


  parent reply	other threads:[~2008-07-27  6:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-27  6:03 [PATCH 0/8] Blackfin serial driver updates for 2.6.27 Bryan Wu
2008-07-27  6:04 ` [PATCH 1/8] Blackfin Serial Driver: use __initdata for data, not __init Bryan Wu
2008-07-27  6:04 ` [PATCH 2/8] Blackfin Serial Driver: Fix bug - should suspend/resume/remove all uart ports Bryan Wu
2008-07-27  6:04 ` [PATCH 3/8] Blackfin Serial Driver: trim trailing whitespace -- no functional changes Bryan Wu
2008-07-27  6:04 ` [PATCH 4/8] Blackfin Serial Driver: move common variables out of serial headers and into the serial driver Bryan Wu
2008-07-27  6:04 ` [PATCH 5/8] Blackfin Serial Driver: Remove useless stop Bryan Wu
2008-07-27  6:04 ` [PATCH 6/8] Blackfin Serial Driver: Fix bug - Don't call tx_stop in tx_transfer Bryan Wu
2008-07-27  6:04 ` Bryan Wu [this message]
2008-07-27  6:04 ` [PATCH 8/8] Blackfin Serial Driver: Fix bug - request UART2/3 peripheral mapped interrupts in PIO mode Bryan Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1217138647-18227-8-git-send-email-cooloney@kernel.org \
    --to=cooloney@kernel.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=graf.yang@analog.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®