Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102878062
D36326.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D36326.diff
View Options
diff --git a/sys/dev/uart/uart_bus_acpi.c b/sys/dev/uart/uart_bus_acpi.c
--- a/sys/dev/uart/uart_bus_acpi.c
+++ b/sys/dev/uart/uart_bus_acpi.c
@@ -83,19 +83,29 @@
static int
uart_acpi_probe(device_t dev)
{
- struct uart_softc *sc;
struct acpi_uart_compat_data *cd;
+ struct uart_softc *sc;
+ uint32_t rclk;
+ ssize_t size;
sc = device_get_softc(dev);
+ rclk = 0;
- if ((cd = uart_acpi_find_device(dev)) != NULL) {
- sc->sc_class = cd->cd_class;
- if (cd->cd_desc != NULL)
- device_set_desc(dev, cd->cd_desc);
- return (uart_bus_probe(dev, cd->cd_regshft, cd->cd_regiowidth,
- cd->cd_rclk, 0, 0, cd->cd_quirks));
- }
- return (ENXIO);
+ cd = uart_acpi_find_device(dev);
+ if (cd == NULL)
+ return (ENXIO);
+
+ sc->sc_class = cd->cd_class;
+ if (cd->cd_desc != NULL)
+ device_set_desc(dev, cd->cd_desc);
+
+ size = device_get_property(dev, "clock-frequency", &rclk,
+ sizeof(rclk), DEVICE_PROP_UINT32);
+ if (size < 0 || rclk == 0)
+ rclk = cd->cd_rclk;
+
+ return (uart_bus_probe(dev, cd->cd_regshft, cd->cd_regiowidth,
+ rclk, 0, 0, cd->cd_quirks));
}
DRIVER_MODULE(uart, acpi, uart_acpi_driver, 0, 0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 19, 8:32 AM (22 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14713344
Default Alt Text
D36326.diff (1 KB)
Attached To
Mode
D36326: uart: Read clock frequency from bus
Attached
Detach File
Event Timeline
Log In to Comment