From: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
To: Vladimir Murzin <vladimir.murzin@arm.com>
Cc: arnd@arndb.de, linux@arm.linux.org.uk,
gregkh@linuxfoundation.org, daniel.lezcano@linaro.org,
tglx@linutronix.de, u.kleine-koenig@pengutronix.de,
mark.rutland@arm.com, pawel.moll@arm.com,
ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
jslaby@suse.cz, robh+dt@kernel.org, andy.shevchenko@gmail.com,
devicetree@vger.kernel.org, linux-serial@vger.kernel.org,
linux-api@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 04/10] serial: mps2-uart: add MPS2 UART driver
Date: Tue, 16 Feb 2016 11:02:17 +0000 [thread overview]
Message-ID: <20160216110217.3de7c007@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <1455617295-23736-5-git-send-email-vladimir.murzin@arm.com>
> +static void mps2_uart_set_termios(struct uart_port *port,
> + struct ktermios *new, struct ktermios *old)
Not that I care much but you might not want to call it "new". People get
upset when their syntax aware editors get confused by C++ keywords 8)
> +{
> + unsigned long flags;
> + unsigned int baud, bauddiv;
> +
> + new->c_cflag &= ~(CRTSCTS | CMSPAR);
> + new->c_cflag &= ~CSIZE;
> + new->c_cflag |= CS8;
> + new->c_cflag &= ~PARENB;
> + new->c_cflag &= ~CSTOPB;
> +
> + baud = uart_get_baud_rate(port, new, old,
> + DIV_ROUND_CLOSEST(port->uartclk, UARTn_BAUDDIV_MASK),
> + DIV_ROUND_CLOSEST(port->uartclk, 16));
> +
> + bauddiv = DIV_ROUND_CLOSEST(port->uartclk, baud);
> +
> + spin_lock_irqsave(&port->lock, flags);
> +
> + uart_update_timeout(port, new->c_cflag, baud);
> + mps2_uart_write32(port, bauddiv, UARTn_BAUDDIV);
This should also set the baud bits back in the termios struct
accordingly.
if (tty_termios_baud_rate(new))
tty_termios_encode_baud_rate(new, baud, baud);
Not a big deal and could certainly be a follow up patch after it's merged.
Alan
next prev parent reply other threads:[~2016-02-16 11:04 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-16 10:08 [PATCH v3 00/10] Support for Cortex-M Prototyping System Vladimir Murzin
2016-02-16 10:08 ` [PATCH v3 01/10] dt-bindings: document the MPS2 timer bindings Vladimir Murzin
2016-02-16 10:08 ` [PATCH v3 02/10] clockevents/drivers: add MPS2 Timer driver Vladimir Murzin
2016-02-16 10:08 ` [PATCH v3 03/10] dt-bindings: document the MPS2 UART bindings Vladimir Murzin
2016-02-16 10:08 ` [PATCH v3 04/10] serial: mps2-uart: add MPS2 UART driver Vladimir Murzin
2016-02-16 10:48 ` Andy Shevchenko
2016-02-16 14:25 ` Vladimir Murzin
2016-02-16 11:02 ` One Thousand Gnomes [this message]
2016-02-16 15:09 ` Vladimir Murzin
2016-02-16 10:08 ` [PATCH v3 05/10] serial: mps2-uart: add support for early console Vladimir Murzin
2016-02-16 10:36 ` Andy Shevchenko
2016-02-16 13:09 ` Vladimir Murzin
2016-02-16 13:13 ` Andy Shevchenko
2016-02-16 13:38 ` Vladimir Murzin
2016-02-16 14:00 ` Andy Shevchenko
2016-02-16 16:12 ` One Thousand Gnomes
2016-02-19 9:45 ` Vladimir Murzin
2016-02-19 9:57 ` Andy Shevchenko
2016-02-19 15:46 ` Peter Hurley
2016-02-19 16:27 ` Vladimir Murzin
2016-02-16 10:08 ` [PATCH v3 06/10] ARM: mps2: introduce MPS2 platform Vladimir Murzin
2016-02-16 10:56 ` Arnd Bergmann
2016-02-16 14:35 ` Vladimir Murzin
2016-02-16 14:39 ` Arnd Bergmann
2016-02-16 10:08 ` [PATCH v3 07/10] ARM: mps2: add low-level debug support Vladimir Murzin
2016-02-16 10:08 ` [PATCH v3 08/10] ARM: configs: add MPS2 defconfig Vladimir Murzin
2016-02-16 10:58 ` Arnd Bergmann
2016-02-16 14:51 ` Vladimir Murzin
2016-02-16 15:08 ` Arnd Bergmann
2016-02-16 15:14 ` Vladimir Murzin
2016-02-16 10:08 ` [PATCH v3 09/10] ARM: dts: introduce MPS2 AN385/AN386 Vladimir Murzin
2016-02-16 11:01 ` Arnd Bergmann
2016-02-16 16:10 ` Vladimir Murzin
2016-02-17 16:48 ` Vladimir Murzin
2016-02-17 16:58 ` Arnd Bergmann
2016-02-18 10:11 ` Vladimir Murzin
2016-02-18 10:45 ` Arnd Bergmann
2016-02-18 11:13 ` Vladimir Murzin
2016-02-18 12:16 ` Arnd Bergmann
2016-02-18 12:47 ` Vladimir Murzin
2016-02-16 15:17 ` Linus Walleij
2016-02-16 15:37 ` Vladimir Murzin
2016-02-16 10:08 ` [PATCH v3 10/10] ARM: dts: introduce MPS2 AN399/AN400 Vladimir Murzin
2016-02-16 11:05 ` [PATCH v3 00/10] Support for Cortex-M Prototyping System Arnd Bergmann
2016-02-16 16:14 ` Vladimir Murzin
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=20160216110217.3de7c007@lxorguk.ukuu.org.uk \
--to=gnomes@lxorguk.ukuu.org.uk \
--cc=andy.shevchenko@gmail.com \
--cc=arnd@arndb.de \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jslaby@suse.cz \
--cc=linux-api@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=tglx@linutronix.de \
--cc=u.kleine-koenig@pengutronix.de \
--cc=vladimir.murzin@arm.com \
/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®