Page MenuHomeFreeBSD

starfive: add a syscon driver
ClosedPublic

Authored by mhorne on Mar 7 2024, 7:46 PM.
Tags
None
Referenced Files
F83503850: D44270.diff
Sat, May 11, 10:53 AM
Unknown Object (File)
Wed, May 8, 1:54 AM
Unknown Object (File)
Tue, May 7, 7:17 PM
Unknown Object (File)
Fri, Apr 26, 4:01 AM
Unknown Object (File)
Mar 24 2024, 10:54 PM
Unknown Object (File)
Mar 24 2024, 7:38 PM
Unknown Object (File)
Mar 23 2024, 3:25 PM
Unknown Object (File)
Mar 17 2024, 11:00 AM
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.Tue, May 7, 4:04 PM
This revision was automatically updated to reflect the committed changes.