linux-mips
[Top] [All Lists]

[PATCH 2/3] 8250: serial driver changes for XBurst SoCs.

To: linux-mips@linux-mips.org
Subject: [PATCH 2/3] 8250: serial driver changes for XBurst SoCs.
From: Graham Gower <graham.gower@gmail.com>
Date: Thu, 25 Feb 2010 17:00:50 +1030
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=Na20HfBE5ExBtI8udDoqT1l9XFM1vVdJk4I35IhidPo=; b=TvTavlVLRohmfYWdpgNhd8YxDZEQeIcnAtkEnRx61Wl6xCh5YuerejfIqXVwbY0UWv 9NZi3Ovl58rJhSbKNXFyItQSObUHIRq1jvwYNPETOOolaSXSzprjh0KA5fx27LWatjpC 63OEBRmf94geqaeA+xNMvEVDu923xivA2nsds=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=HQF4LC564ia6iX/vlJi0yavXC5li/h8UN+Zopobh4qK2zPhq4xyKtjUpwpkdo9s2Gy TdSZRi2Vb3IKgzyOgBfX1f68WrdqvnZDEYiW4kkCG9ARHzabqLp2N7agNd0QNtK2OHFj jBMJNsd8vIdL1N8EdoMD8snObJ6IUpmUVZuss=
In-reply-to: <4B861890.6090002@gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <4B861890.6090002@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 2.0.0.23 (X11/20090820)
Signed-off-by: Graham Gower <graham.gower@gmail.com>
---
 drivers/serial/8250.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index e9b15c3..dfe6640 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -199,7 +199,11 @@ static const struct serial8250_config uart_config[] = {
        [PORT_16550A] = {
                .name           = "16550A",
                .fifo_size      = 16,
+#ifndef CONFIG_XBURST
                .tx_loadsz      = 16,
+#else
+               .tx_loadsz      = 8,
+#endif
                .fcr            = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
                .flags          = UART_CAP_FIFO,
        },
@@ -406,6 +410,10 @@ static unsigned int mem_serial_in(struct uart_port *p, int 
offset)
 static void mem_serial_out(struct uart_port *p, int offset, int value)
 {
        offset = map_8250_out_reg(p, offset) << p->regshift;
+#if defined(CONFIG_XBURST)
+       if (offset == (UART_FCR << p->regshift))
+               value |= 0x10; /* set FCR.UUE */
+#endif
        writeb(value, p->membase + offset);
 }
 
@@ -2354,6 +2362,10 @@ serial8250_set_termios(struct uart_port *port, struct 
ktermios *termios,
        if (up->capabilities & UART_CAP_UUE)
                up->ier |= UART_IER_UUE | UART_IER_RTOIE;
 
+#ifdef CONFIG_XBURST
+       up->ier |= UART_IER_RTOIE; /* Set this flag, or very slow */
+#endif
+
        serial_out(up, UART_IER, up->ier);
 
        if (up->capabilities & UART_CAP_EFR) {
-- 
1.6.4



<Prev in Thread] Current Thread [Next in Thread>