linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: 8250_pnp: Support configurable reg shift property
@ 2024-02-29 11:51 GuanBing Huang
  2024-02-29 22:00 ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: GuanBing Huang @ 2024-02-29 11:51 UTC (permalink / raw)
  To: gregkh; +Cc: jirislaby, linux-kernel, linux-serial, albanhuang

From: albanhuang <albanhuang@tencent.com>

The 16550a serial port based on the ACPI table requires obtaining the
reg-shift attribute. In the ACPI scenario, If the reg-shift property
is not configured like in DTS, the 16550a serial driver cannot read or
write controller registers properly during initialization.

Signed-off-by: albanhuang <albanhuang@tencent.com>
Signed-off-by: tombinfan <tombinfan@tencent.com>
Signed-off-by: dylanlhdu <dylanlhdu@tencent.com>
---
 drivers/tty/serial/8250/8250_pnp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/8250/8250_pnp.c
index 1974bbadc975..25b4e41e9745 100644
--- a/drivers/tty/serial/8250/8250_pnp.c
+++ b/drivers/tty/serial/8250/8250_pnp.c
@@ -473,6 +473,7 @@ serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
 		uart.port.flags |= UPF_SHARE_IRQ;
 	uart.port.uartclk = 1843200;
 	device_property_read_u32(&dev->dev, "clock-frequency", &uart.port.uartclk);
+	device_property_read_u8(&dev->dev, "reg-shift", &uart.port.regshift);
 	uart.port.dev = &dev->dev;
 
 	line = serial8250_register_8250_port(&uart);
-- 
2.17.1


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

end of thread, other threads:[~2024-03-08 16:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-29 11:51 [PATCH] serial: 8250_pnp: Support configurable reg shift property GuanBing Huang
2024-02-29 22:00 ` Greg KH
2024-03-05  3:24   ` GuanBing Huang
2024-03-05 11:14     ` Greg KH
2024-03-06 11:42       ` [PATCH v2] " Guanbing Huang
2024-03-08 16:15         ` Andy Shevchenko

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