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)
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
Unknown Object (File)
Mar 16 2024, 8:48 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 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.