linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [RFC] serial: sh-sci: fix register alocation in h8300.
@ 2018-07-11 11:41 Yoshinori Sato
  2018-07-11 12:53 ` Geert Uytterhoeven
  2018-07-12  9:44 ` Yoshinori Sato
  0 siblings, 2 replies; 3+ messages in thread
From: Yoshinori Sato @ 2018-07-11 11:41 UTC (permalink / raw)
  To: linux-sh

h8300's SCI registers aligned byte address.
Although it may be appropriate to put it in sci_port_params,
because I can not think of a good way, I did it like this.

Signei-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
 drivers/tty/serial/sh-sci.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index c181eb37f985..827ef57cebb8 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -2862,12 +2862,16 @@ static int sci_init_single(struct platform_device *dev,
 	port->flags		= UPF_FIXED_PORT | UPF_BOOT_AUTOCONF | p->flags;
 	port->fifosize		= sci_port->params->fifosize;
 
+#if !defined(CONFIG_H8300)
 	if (port->type = PORT_SCI) {
 		if (sci_port->reg_size >= 0x20)
 			port->regshift = 2;
 		else
 			port->regshift = 1;
 	}
+#else
+	port->regshift = 0;
+#endif
 
 	/*
 	 * The UART port needs an IRQ value, so we peg this to the RX IRQ
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-12  9:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-11 11:41 [PATCH] [RFC] serial: sh-sci: fix register alocation in h8300 Yoshinori Sato
2018-07-11 12:53 ` Geert Uytterhoeven
2018-07-12  9:44 ` Yoshinori Sato

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).