Commit MetaInfo

Revisionaa52589d9b4e184f8d08b14e2804872821a54672 (tree)
Time2018-12-29 00:04:46
AuthorYoshinori Sato <ysato@user...>
CommiterYoshinori Sato

Log Message

fix 8bit register

Change Summary

Incremental Difference

--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -2924,12 +2924,13 @@ static int sci_init_single(struct platform_device *dev,
29242924 port->flags = UPF_FIXED_PORT | UPF_BOOT_AUTOCONF | p->flags;
29252925 port->fifosize = sci_port->params->fifosize;
29262926
2927- if (port->type == PORT_SCI) {
2928- if (sci_port->reg_size >= 0x20)
2929- port->regshift = 2;
2930- else
2931- port->regshift = 1;
2932- }
2927+ if (port->type == PORT_SCI)
2928+ /*
2929+ < 0x10: 8bit alignment
2930+ >= 0x10 && < 0x20: 16bit alignment
2931+ >= 0x20: 32bit alignment
2932+ */
2933+ port->regshift = (sci_port->reg_size >> 4);
29332934
29342935 /*
29352936 * The UART port needs an IRQ value, so we peg this to the RX IRQ
Show on old repository browser