FreeBSD Bugzilla – Attachment 247879 Details for
Bug 276523
serial console not functional orange pi 5 plus
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
ns8250: Try to get the clock-frequency property
0001-ns8250-Try-to-get-the-clock-frequency-property.patch (text/plain), 1.38 KB, created by
Emmanuel Vadot
on 2024-01-23 10:08:20 UTC
(
hide
)
Description:
ns8250: Try to get the clock-frequency property
Filename:
MIME Type:
Creator:
Emmanuel Vadot
Created:
2024-01-23 10:08:20 UTC
Size:
1.38 KB
patch
obsolete
>From cb43cf2e57974129181df733cab499d9b3c85967 Mon Sep 17 00:00:00 2001 >From: Emmanuel Vadot <manu@FreeBSD.org> >Date: Tue, 23 Jan 2024 11:03:13 +0100 >Subject: [PATCH] ns8250: Try to get the clock-frequency property >Content-Type: text/plain; charset=UTF-8 > >Not all the same hardware use the same base frequency. > >Both FDT and ACPI can have this property and device_get_propery will >work for both. >If the property isn't found we will fallback to the frequency specified >in the compat_data. > >PR: 276523 >Sponsosred by: Beckhoff Automation GmbH & Co. KG >--- > sys/dev/uart/uart_dev_ns8250.c | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c >index f211084cb013..4209c05e500c 100644 >--- a/sys/dev/uart/uart_dev_ns8250.c >+++ b/sys/dev/uart/uart_dev_ns8250.c >@@ -524,6 +524,7 @@ ns8250_bus_attach(struct uart_softc *sc) > struct ns8250_softc *ns8250 = (struct ns8250_softc*)sc; > struct uart_bas *bas; > unsigned int ivar; >+ uint32_t clock_freq; > #ifdef FDT > phandle_t node; > pcell_t cell; >@@ -538,6 +539,10 @@ ns8250_bus_attach(struct uart_softc *sc) > > bas = &sc->sc_bas; > >+ if (device_get_property(sc->sc_dev, "clock-frequency", &clock_freq, >+ sizeof(clock_freq), DEVICE_PROP_UINT32) > 0) >+ bas->rclk = clock_freq; >+ > ns8250->busy_detect = bas->busy_detect; > ns8250->mcr = uart_getreg(bas, REG_MCR); > ns8250->fcr = FCR_ENABLE; >-- >2.43.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 276523
:
247841
|
247847
|
247848
| 247879 |
247889
|
247917