public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: rajanikanth.hv@stericsson.com (Rajanikanth H V)
To: linux-arm-kernel@lists.infradead.org
Subject: tty/serial: Need clarification on Support for 4+M Baudrate
Date: Wed, 11 Jan 2012 17:49:01 +0530	[thread overview]
Message-ID: <20120111121901.GA4034@bnru05> (raw)

Ref:
	kernel version 3.0.8

Platform: ARM Based SOC, UART:amba pl011

I have a requirement to interface UART with an external microcontroller 
using baud rate above 4Mbps, hence following is my approach to apply
the changes. Can any one review/provide me appropriate approach.



diff --git a/arch/arm/include/asm/termbits.h b/arch/arm/include/asm/termbits.h
index 704135d..556f5fb 100644
--- a/arch/arm/include/asm/termbits.h
+++ b/arch/arm/include/asm/termbits.h
@@ -155,6 +155,8 @@ struct ktermios {
 #define  B3000000 0010015
 #define  B3500000 0010016
 #define  B4000000 0010017
+#define  B4050000 0010020
+#define  B4800000 0010021
 #define CIBAUD	  002003600000		/* input baud rate */
 #define CMSPAR    010000000000		/* mark or space (stick) parity */
 #define CRTSCTS	  020000000000		/* flow control */
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c
index 53f2442..59c0682 100644
--- a/drivers/tty/tty_ioctl.c
+++ b/drivers/tty/tty_ioctl.c
@@ -203,7 +203,7 @@ static const speed_t baud_table[] = {
 	76800, 153600, 307200, 614400, 921600
 #else
 	500000, 576000, 921600, 1000000, 1152000, 1500000, 2000000,
-	2500000, 3000000, 3500000, 4000000
+	2500000, 3000000, 3500000, 4000000, 4050000, 4800000
 #endif
 };
 
@@ -213,7 +213,7 @@ static const tcflag_t baud_bits[] = {
 	B1200, B1800, B2400, B4800, B9600, B19200, B38400,
 	B57600, B115200, B230400, B460800, B500000, B576000,
 	B921600, B1000000, B1152000, B1500000, B2000000, B2500000,
-	B3000000, B3500000, B4000000
+	B3000000, B3500000, B4000000, B4050000, B4800000
 };
 #else
 static const tcflag_t baud_bits[] = {
diff --git a/include/asm-generic/termbits.h b/include/asm-generic/termbits.h
index 232b478..f71e72f 100644
--- a/include/asm-generic/termbits.h
+++ b/include/asm-generic/termbits.h
@@ -156,6 +156,8 @@ struct ktermios {
 #define  B3000000 0010015
 #define  B3500000 0010016
 #define  B4000000 0010017
+#define  B4050000 0010020
+#define  B4800000 0010021
 #define CIBAUD	  002003600000	/* input baud rate */
 #define CMSPAR	  010000000000	/* mark or space (stick) parity */
 #define CRTSCTS	  020000000000	/* flow control */

             reply	other threads:[~2012-01-11 12:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-11 12:19 Rajanikanth H V [this message]
2012-01-11 12:30 ` tty/serial: Need clarification on Support for 4+M Baudrate Alan Cox
2012-01-12  9:49   ` Rajanikanth H V
2012-01-12 11:49     ` Alan Cox
2012-01-12 14:20       ` Rajanikanth H V
2012-01-12 14:39         ` Alan Cox
2012-01-13 14:36           ` Rajanikanth H V

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=20120111121901.GA4034@bnru05 \
    --to=rajanikanth.hv@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.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