projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb3ea80
)
serial: 8250_pnp: Support configurable clock frequency
author
Jianmin Lv
<lvjianmin@loongson.cn>
Thu, 15 Jul 2021 06:16:37 +0000
(14:16 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 21 Jul 2021 10:31:02 +0000
(12:31 +0200)
ACPI-based Loongson boards need configurable rather than fixed clock
frequency for serial ports.
Signed-off-by: Jianmin Lv <lvjianmin@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Link:
https://lore.kernel.org/r/20210715061637.134436-1-chenhuacai@loongson.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_pnp.c
patch
|
blob
|
history
diff --git
a/drivers/tty/serial/8250/8250_pnp.c
b/drivers/tty/serial/8250/8250_pnp.c
index de90d681b64c30e84ee1aed96ee69f2a198e9fd8..98e5ee4d0d08a8acb7d17d14af6da3b5973ad290 100644
(file)
--- a/
drivers/tty/serial/8250/8250_pnp.c
+++ b/
drivers/tty/serial/8250/8250_pnp.c
@@
-13,6
+13,7
@@
#include <linux/pnp.h>
#include <linux/string.h>
#include <linux/kernel.h>
+#include <linux/property.h>
#include <linux/serial_core.h>
#include <linux/bitops.h>
@@
-475,6
+476,7
@@
serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
if (pnp_irq_flags(dev, 0) & IORESOURCE_IRQ_SHAREABLE)
uart.port.flags |= UPF_SHARE_IRQ;
uart.port.uartclk = 1843200;
+ device_property_read_u32(&dev->dev, "clock-frequency", &uart.port.uartclk);
uart.port.dev = &dev->dev;
line = serial8250_register_8250_port(&uart);