From: "Søren holm" <sgh@sgh.dk>
To: linux-serial@vger.kernel.org
Subject: Hardware flowcontrol on XR17D154
Date: Tue, 30 Aug 2011 12:17:07 +0200 [thread overview]
Message-ID: <201108301217.07468.sgh@sgh.dk> (raw)
[-- Attachment #1: Type: text/plain, Size: 258 bytes --]
Hi
I have hacked hardware flowcontrol into 8250.c for the XR17D154. I have
attached the patch. The fix just uses another address for the EFR-register.
I would like to have some adwise as to how to do this the right way.
Thanks.
--
Søren Holm
[-- Attachment #2: xr17d154_hwflow.patch --]
[-- Type: text/x-patch, Size: 1245 bytes --]
diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c
index b3b881b..ba28eb8 100644
--- a/drivers/tty/serial/8250.c
+++ b/drivers/tty/serial/8250.c
@@ -301,7 +301,7 @@ static const struct serial8250_config uart_config[] = {
.fifo_size = 64,
.tx_loadsz = 64,
.fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
- .flags = UART_CAP_FIFO | UART_CAP_AFE,
+ .flags = UART_CAP_FIFO | UART_CAP_AFE | UART_CAP_EFR,
},
};
@@ -2420,7 +2420,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios,
efr |= UART_EFR_CTS;
serial_outp(up, UART_LCR, UART_LCR_CONF_MODE_B);
- serial_outp(up, UART_EFR, efr);
+ serial_outp(up, UART_EFR2, efr);
}
#ifdef CONFIG_ARCH_OMAP
diff --git a/include/linux/serial_reg.h b/include/linux/serial_reg.h
index 3ecb71a..56b2569 100644
--- a/include/linux/serial_reg.h
+++ b/include/linux/serial_reg.h
@@ -150,6 +150,7 @@
* LCR=0xBF (or DLAB=1 for 16C660)
*/
#define UART_EFR 2 /* I/O: Extended Features Register */
+#define UART_EFR2 9 /* I/O: Extended Features Register for Exari XR17D154 */
#define UART_EFR_CTS 0x80 /* CTS flow control */
#define UART_EFR_RTS 0x40 /* RTS flow control */
#define UART_EFR_SCD 0x20 /* Special character detect */
next reply other threads:[~2011-08-30 10:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-30 10:17 Søren holm [this message]
2011-08-30 10:34 ` Hardware flowcontrol on XR17D154 Alan Cox
2011-08-30 11:27 ` Søren holm
2011-08-30 12:32 ` Alan Cox
2011-08-30 13:14 ` Søren holm
2011-09-02 10:20 ` Søren holm
2011-09-02 12:28 ` Alan Cox
2011-09-02 20:52 ` [PATCH] serial: Support the EFR-register of XR1715x uarts Søren Holm
2011-09-02 20:55 ` Søren Holm
2011-09-03 10:47 ` Alan Cox
2011-09-02 21:11 ` Hardware flowcontrol on XR17D154 Søren holm
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=201108301217.07468.sgh@sgh.dk \
--to=sgh@sgh.dk \
--cc=linux-serial@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