OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9b0ea0
)
fix 8bit register
author
Yoshinori Sato
<ysato@users.sourceforge.jp>
Fri, 28 Dec 2018 15:04:46 +0000
(
00:04
+0900)
committer
Yoshinori Sato
<yo-satoh@sios.com>
Fri, 28 Jan 2022 13:59:01 +0000
(22:59 +0900)
drivers/tty/serial/sh-sci.c
patch
|
blob
|
history
diff --git
a/drivers/tty/serial/sh-sci.c
b/drivers/tty/serial/sh-sci.c
index
39b8244
..
ce1b37e
100644
(file)
--- a/
drivers/tty/serial/sh-sci.c
+++ b/
drivers/tty/serial/sh-sci.c
@@
-2959,12
+2959,13
@@
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 (port->type == PORT_SCI) {
- if (sci_port->reg_size >= 0x20)
- port->regshift = 2;
- else
- port->regshift = 1;
- }
+ if (port->type == PORT_SCI)
+ /*
+ < 0x10: 8bit alignment
+ >= 0x10 && < 0x20: 16bit alignment
+ >= 0x20: 32bit alignment
+ */
+ port->regshift = (sci_port->reg_size >> 4);
/*
* The UART port needs an IRQ value, so we peg this to the RX IRQ