diff options
Diffstat (limited to 'sys/dev/uart')
| -rw-r--r-- | sys/dev/uart/uart_bus_fdt.c | 6 | ||||
| -rw-r--r-- | sys/dev/uart/uart_dev_snps.c | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/sys/dev/uart/uart_bus_fdt.c b/sys/dev/uart/uart_bus_fdt.c index 431f2962adb2..e9a7e04e4e0c 100644 --- a/sys/dev/uart/uart_bus_fdt.c +++ b/sys/dev/uart/uart_bus_fdt.c @@ -239,6 +239,12 @@ uart_cpu_fdt_probe(struct uart_class **classp, bus_space_tag_t *bst, } /* + * Grab the default rclk from the uart class. + */ + if (clk == 0) + clk = class->uc_rclk; + + /* * Retrieve serial attributes. */ if (uart_fdt_get_shift(node, &shift) != 0) diff --git a/sys/dev/uart/uart_dev_snps.c b/sys/dev/uart/uart_dev_snps.c index 6067920e3c2a..0372a220282b 100644 --- a/sys/dev/uart/uart_dev_snps.c +++ b/sys/dev/uart/uart_dev_snps.c @@ -113,7 +113,17 @@ struct uart_class uart_snps_class = { .uc_rclk = 0, }; +struct uart_class uart_snps_jh7110_class = { + "snps", + snps_methods, + sizeof(struct snps_softc), + .uc_ops = &uart_ns8250_ops, + .uc_range = 8, + .uc_rclk = 24000000, +}; + static struct ofw_compat_data compat_data[] = { + { "starfive,jh7110-uart", (uintptr_t)&uart_snps_jh7110_class }, { "snps,dw-apb-uart", (uintptr_t)&uart_snps_class }, { "marvell,armada-38x-uart", (uintptr_t)&uart_snps_class }, { NULL, (uintptr_t)NULL } |
