Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F110701301
D36788.id.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
D36788.id.diff
View Options
diff --git a/sys/dev/uart/uart_cpu_arm64.c b/sys/dev/uart/uart_cpu_arm64.c
--- a/sys/dev/uart/uart_cpu_arm64.c
+++ b/sys/dev/uart/uart_cpu_arm64.c
@@ -79,33 +79,17 @@
return ((pmap_kextract(b1->bsh) == pmap_kextract(b2->bsh)) ? 1 : 0);
}
-int
-uart_cpu_getdev(int devtype, struct uart_devinfo *di)
+#ifdef FDT
+static int
+uart_cpu_fdt_setup(struct uart_class *class, int devtype, struct uart_devinfo *di)
{
- struct uart_class *class;
bus_space_handle_t bsh;
bus_space_tag_t bst;
u_int rclk, shift, iowidth;
int br, err;
- /* Allow overriding the FDT using the environment. */
- class = &uart_ns8250_class;
- err = uart_getenv(devtype, di, class);
- if (err == 0)
- return (0);
-
-#ifdef DEV_ACPI
- /* Check if SPCR can tell us what console to use. */
- if (uart_cpu_acpi_spcr(devtype, di) == 0)
- return (0);
-#endif
- err = ENXIO;
-#ifdef FDT
- if (err != 0) {
- err = uart_cpu_fdt_probe(&class, &bst, &bsh, &br, &rclk,
- &shift, &iowidth, devtype);
- }
-#endif
+ err = uart_cpu_fdt_probe(&class, &bst, &bsh, &br, &rclk,
+ &shift, &iowidth, devtype);
if (err != 0)
return (err);
@@ -128,3 +112,29 @@
return (0);
}
+#endif
+
+int
+uart_cpu_getdev(int devtype, struct uart_devinfo *di)
+{
+ struct uart_class *class;
+ int err;
+
+ /* Allow overriding ACPI/FDT using the environment. */
+ class = &uart_ns8250_class;
+ err = uart_getenv(devtype, di, class);
+ if (err == 0)
+ return (0);
+
+#ifdef DEV_ACPI
+ /* Check if SPCR can tell us what console to use. */
+ if (uart_cpu_acpi_spcr(devtype, di) == 0)
+ return (0);
+#endif
+#ifdef FDT
+ if (uart_cpu_fdt_setup(class, devtype, di) == 0)
+ return (0);
+#endif
+
+ return (ENXIO);
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 23, 1:57 AM (9 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16785369
Default Alt Text
D36788.id.diff (1 KB)
Attached To
Mode
D36788: uart: uart_cpu_arm64: fix the build without FDT
Attached
Detach File
Event Timeline
Log In to Comment