Page MenuHomeFreeBSD

qcom_gcc: begin refactoring sys/dev/qcom_gcc to support multiple chipsets
ClosedPublic

Authored by adrian on Apr 6 2025, 5:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jul 12, 12:22 AM
Unknown Object (File)
Thu, Jul 2, 1:59 AM
Unknown Object (File)
Wed, Jul 1, 10:57 PM
Unknown Object (File)
Tue, Jun 30, 5:44 AM
Unknown Object (File)
Tue, Jun 30, 2:08 AM
Unknown Object (File)
Mon, Jun 29, 9:50 PM
Unknown Object (File)
Sat, Jun 27, 8:15 AM
Unknown Object (File)
Sat, Jun 27, 1:50 AM
Subscribers

Details

Summary

Although the driver structure is almost supportive of multiple
chipsets, there's a lot of subtle hard coded IPQ4018 assumptions
here.

This is a partial refactor of the driver in order to have a single
qcom_gcc driver that will eventually support multiple chipsets.

  • rename qcom_gcc_ipq4018 -> qcom_gcc
  • remove the ipq4018 specific naming from things
  • create a table to drive probe/attach, with a chipset id to use during attach
  • migrate the clock register accessors to not be ipq4018 specific
  • migrate the reset register accessors to not be ipq4018 specific

Note this won't compile (yet) for an arm64 kernel because there's
a hard-coded clock tree for an earlier 64 bit MSM part in
sys/arm64/qualcomm/qcom_gcc.c . That will need to be rolled into this
driver.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 63349
Build 60233: arc lint + arc unit

Event Timeline

adrian requested review of this revision.Apr 6 2025, 5:27 PM

I cant claim much expertise in this area, but I have read the diffs and they look good to me.

This revision is now accepted and ready to land.Apr 6 2025, 7:11 PM
manu requested changes to this revision.Apr 7 2025, 5:56 AM

If you're moving files you might as well move them to sys/dev/clk/qcom

This revision now requires changes to proceed.Apr 7 2025, 5:56 AM

If you're moving files you might as well move them to sys/dev/clk/qcom

It's not just a clock controller though, it's /also/ a reset block controller. :-)

This revision was not accepted when it landed; it landed in state Needs Revision.Apr 8 2025, 3:47 AM
This revision was automatically updated to reflect the committed changes.