Page MenuHomeFreeBSD

uart: uart_cpu_arm64: fix the build without FDT
ClosedPublic

Authored by kevans on Sep 29 2022, 6:12 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 11, 4:41 AM
Unknown Object (File)
Sat, Jan 11, 1:48 AM
Unknown Object (File)
Dec 21 2024, 4:11 PM
Unknown Object (File)
Dec 15 2024, 3:59 PM
Unknown Object (File)
Dec 3 2024, 5:53 PM
Unknown Object (File)
Dec 2 2024, 10:45 PM
Unknown Object (File)
Oct 10 2024, 7:25 AM
Unknown Object (File)
Oct 10 2024, 7:25 AM
Subscribers

Details

Summary

clang 14 doesn't properly determine that we're unconditionally returning
if we have ACPI but not FDT. Workaround it for now by just returning
earlier explicitly, but drop a comment noting that it's sketchy.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 47600
Build 44487: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Sep 29 2022, 6:35 AM

Maybe we should create a new function that calls uart_cpu_fdt_probe and sets up di similar to uart_cpu_acpi_spcr. This will mean the code is

#if DEV_ACPI
if (uart_cpu_acpi_spcr(...) == 0)
    return (0);
#endif
#if FDT
if (uart_new_fdt_func(...) == 0)
   return (0);
#endif
return (ENXIO);

Switch to Andy's idea; do fdt setup in a new function entirely, just return
ENXIO if neither setup succeeds.

This revision now requires review to proceed.Sep 29 2022, 4:11 PM
This revision is now accepted and ready to land.Sep 29 2022, 4:32 PM