From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.com>
Cc: Simon Horman <horms+renesas@verge.net.au>,
Magnus Damm <magnus.damm@gmail.com>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
linux-serial@vger.kernel.org, linux-sh@vger.kernel.org,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH 2/5] serial: sh-sci: Preserve SCIFA/SCIFB bit rate config for serial console
Date: Mon, 04 Jan 2016 13:45:19 +0000 [thread overview]
Message-ID: <1451915122-30219-3-git-send-email-geert+renesas@glider.be> (raw)
In-Reply-To: <1451915122-30219-1-git-send-email-geert+renesas@glider.be>
SCIFA and SCIFB have additional bit rate config bits in the Serial Mode
Register. Don't touch them when using the port as a serial console, as
we rely on the boot loader to have configured the serial port config.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
I'm not aware of any boot loader setting these bits, but better safe
than sorry.
---
drivers/tty/serial/sh-sci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index a7c062192e2d3130..e8d6fa77e11208d4 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -2229,7 +2229,8 @@ done:
} else {
/* Don't touch the bit rate configuration */
scr_val = s->cfg->scscr & (SCSCR_CKE1 | SCSCR_CKE0);
- smr_val |= serial_port_in(port, SCSMR) & SCSMR_CKS;
+ smr_val |= serial_port_in(port, SCSMR) &
+ (SCSMR_CKEDG | SCSMR_SRC_MASK | SCSMR_CKS);
dev_dbg(port->dev, "SCR 0x%x SMR 0x%x\n", scr_val, smr_val);
serial_port_out(port, SCSCR, scr_val);
serial_port_out(port, SCSMR, smr_val);
--
1.9.1
next prev parent reply other threads:[~2016-01-04 13:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-04 13:45 [PATCH 0/5] serial: sh-sci: Add support for SCIFA/SCIFB variable sampling rates Geert Uytterhoeven
2016-01-04 13:45 ` [PATCH 1/5] serial: sh-sci: Add more Serial Mode Register documentation Geert Uytterhoeven
2016-01-04 13:45 ` Geert Uytterhoeven [this message]
2016-01-04 13:45 ` [PATCH 3/5] serial: sh-sci: Use premultiplier to handle half sampling rate Geert Uytterhoeven
2016-01-04 13:45 ` [PATCH 4/5] serial: sh-sci: Use a bitmask to indicate supported sampling rates Geert Uytterhoeven
2016-01-04 13:45 ` [PATCH 5/5] serial: sh-sci: Add support for SCIFA/SCIFB variable " Geert Uytterhoeven
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=1451915122-30219-3-git-send-email-geert+renesas@glider.be \
--to=geert+renesas@glider.be \
--cc=gregkh@linuxfoundation.org \
--cc=horms+renesas@verge.net.au \
--cc=jslaby@suse.com \
--cc=linux-serial@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=ysato@users.sourceforge.jp \
/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;
as well as URLs for NNTP newsgroup(s).