Page MenuHomeFreeBSD

arm64: add a driver for the uart found on Apple Silicon machines
Needs ReviewPublic

Authored by kevans on Dec 17 2024, 2:45 PM.
Tags
None
Referenced Files
F112511566: D48120.diff
Wed, Mar 19, 3:17 AM
Unknown Object (File)
Fri, Mar 7, 2:19 AM
Unknown Object (File)
Feb 9 2025, 4:26 PM
Unknown Object (File)
Feb 4 2025, 7:31 PM
Unknown Object (File)
Feb 4 2025, 2:55 AM
Unknown Object (File)
Feb 3 2025, 10:41 PM
Unknown Object (File)
Jan 2 2025, 5:59 PM
Unknown Object (File)
Jan 2 2025, 5:53 AM
Subscribers

Details

Reviewers
andrew
br
imp
manu
Group Reviewers
arm64
Summary

This is a revival of the old exynos4210 driver, with some additional
bits to configure the apple "s5l" uart (which is actually slightly
different to operate).

This hasn't been tested on anything that would hit the non-s5l path, so
banish it off to the apple/ domain until someone cares to confirm that
none of the other hardware is broken -- it may be that nobody does, but
the complexity isn't too bad: mostly the driver1 construct added to the
uart_bas that we use to avoid having a whole bunch of shims for uart
driver methods and hardcoded references to the cfg structs.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 62946
Build 59830: arc lint + arc unit

Event Timeline

sys/arm64/apple/exynos_uart.c
30–31

Not needed

558–559

I wonder if we could merge this with compat_cfg_data, e.g. by putting them together like this:

struct exynos_uart_class {
 struct uart_class base;
 struct exynos_uart_cfg cfg;
};
sys/arm64/apple/exynos_uart.h
35

Not needed

kevans marked 2 inline comments as done.

Address review feedback

Remove obsolete $FreeBSD$ tags, add SPDX tags to new old files.

The cfg and class data are now tied together; note that the driver1 kludge has
to remain for the time being, as we don't have a reliable way to get that from
uart_ops. There's a period of time where a uart_devinfo is not yet associated
with a uart_softc, so we have no immediate path back to the class in the earlier
stages of boot before newbus has probed the uart.