Page MenuHomeFreeBSD

starfive: add a syscon driver
ClosedPublic

Authored by mhorne on Mar 7 2024, 7:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 29, 2:22 AM
Unknown Object (File)
Oct 1 2024, 10:59 PM
Unknown Object (File)
Sep 8 2024, 5:07 AM
Unknown Object (File)
Sep 5 2024, 6:26 AM
Unknown Object (File)
Sep 4 2024, 11:18 AM
Unknown Object (File)
Aug 20 2024, 1:21 AM
Unknown Object (File)
Aug 14 2024, 3:35 AM
Unknown Object (File)
Aug 7 2024, 3:23 PM
Subscribers

Details

Summary

It serves the purpose of attaching these devices at an earlier pass.
This is critical for the JH7110 PLL clock driver to access the SYS
syscon parent.

The AON and STG syscon devices do not seem to be needed this
early, but we can handle them here anyway.

This is a subclass of simple-mfd, as this allows it to find and attach
the child device (starfive,jh7110-pll). For syscon_generic to do so, it
seems to require a "simple-bus" compatible, which is lacking here.

I considered extending the existing riscv_syscon for this purpose, but
it seems better to keep the StarFive/JH7110-specific drivers properly
separated.

Diff Detail

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

Event Timeline

mhorne requested review of this revision.Mar 7 2024, 7:46 PM

Trim #includes; fix softc size in driver declaration.

I considered extending the existing riscv_syscon for this purpose, but
it seems better to keep the StarFive/JH7110-specific drivers properly
separated.

Yeah, the ordering requirements are different, and riscv_syscon is really sftest_syscon, QEMU just (ab)uses for its virt machine despite not having anything to do with SiFive. I agree they should be kept distinct.

This revision was not accepted when it landed; it landed in state Needs Review.May 7 2024, 4:04 PM
This revision was automatically updated to reflect the committed changes.