Page MenuHomeFreeBSD

starfive: add a syscon driver
Needs ReviewPublic

Authored by mhorne on Mar 7 2024, 7:46 PM.
Tags
None
Referenced Files
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
Unknown Object (File)
Mar 16 2024, 8:48 PM
Unknown Object (File)
Mar 9 2024, 5:49 PM
Subscribers

Details

Reviewers
jrtc27
jsihv_gmx.com
Group Reviewers
riscv
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.