Page MenuHomeFreeBSD

starfive: add a syscon driver
ClosedPublic

Authored by mhorne on Mar 7 2024, 7:46 PM.
Tags
None
Referenced Files
F84342498: D44270.id135521.diff
Wed, May 22, 3:49 PM
F84307270: D44270.diff
Wed, May 22, 3:06 AM
Unknown Object (File)
Tue, May 21, 9:06 PM
Unknown Object (File)
Tue, May 21, 9:06 PM
Unknown Object (File)
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
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 Not Applicable
Unit
Tests Not Applicable

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.