Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1287453

Re: [PATCH v1] serial: core: support more baud rates when serial console setup

From One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Newsgroups linux.kernel
Subject Re: [PATCH v1] serial: core: support more baud rates when serial console setup
Date 2015-12-09 13:10 +0100
Message-ID <qDLJh-8df-35@gated-at.bofh.it> (permalink)
References <qDH2V-5aZ-1@gated-at.bofh.it>
Organization Intel Corporation

Show all headers | View raw


On Wed,  9 Dec 2015 15:07:58 +0800
Jeffy Chen <jeffy.chen@rock-chips.com> wrote:

> Currently, when tring to set up a serial console with a higher
> baud rate, it would fallback to 921600.
> 
> So, add more baud rates to the baud rate array.
> 
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>


Far simpler I think would be if we finally lost this old code and just did

	memset(&termios, 0, sizeof(struct termios));
	termios.c_cflag |= CREAD | HUPCL | CLOCAL;
	tty_termios_encode_baud_rate(&termios, baud, baud);


	if (bits == 7)
		..


and just removed the baud_rates table for good. The console drivers now
understand arbitrary rate requests and the core tty code has for years
supported doing the mapping for arbitrary baud rates as well as back
mapping them onto "classic" B9600 type encoding when possible.

That would also various devices with insane baud rates where someone was
too cheap to fit an extra crystal.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v1] serial: core: support more baud rates when serial console setup Jeffy Chen <jeffy.chen@rock-chips.com> - 2015-12-09 08:10 +0100
  Re: [PATCH v1] serial: core: support more baud rates when serial  console setup One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2015-12-09 13:10 +0100

csiph-web