lkml.org 
[lkml]   [2021]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[-next] serial: 8250: Match legacy NS16550A UARTs
Date
From: Florian Fainelli <f.fainelli@gmail.com>

Older 32-bit only Broadcom STB chips used a NS16550A compatible UART,
the 8250_bcm7271.c driver can drive those UARTs just fine provided that
we let it match the appropriate compatible string.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Al Cooper <alcooperx@gmail.com>
---
drivers/tty/serial/8250/8250_bcm7271.c | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/drivers/tty/serial/8250/8250_bcm7271.c b/drivers/tty/serial/8250/8250_bcm7271.c
index 725a450058f8..023a2de8b2d6 100644
--- a/drivers/tty/serial/8250/8250_bcm7271.c
+++ b/drivers/tty/serial/8250/8250_bcm7271.c
@@ -204,6 +204,13 @@ static const u32 brcmstb_rate_table_7278[] = {
MHZ(48),
};

+static const u32 brcmstb_rate_table_16550a[] = {
+ MHZ(81),
+ 0,
+ 0,
+ 0,
+};
+
struct brcmuart_priv {
int line;
struct clk *baud_mux_clk;
@@ -865,6 +872,10 @@ static const struct of_device_id brcmuart_dt_ids[] = {
.compatible = "brcm,bcm7271-uart",
.data = brcmstb_rate_table,
},
+ {
+ .compatible = "ns16550a",
+ .data = brcmstb_rate_table_16550a,
+ },
{},
};

--
2.17.1
\
 
 \ /
  Last update: 2021-04-14 15:46    [W:0.056 / U:2.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site