Page MenuHomeFreeBSD

[mips/broadcom] Replace static frequency table with generic PMU clock handling.

Authored by landonf on Aug 18 2016, 4:54 AM.




  • Extended PWRCTL/PMU APIs to support querying clock frequency during very early boot, prior to bus attach.
  • Implement generic PMU-based calculation of UART rclk values.
  • Replaced use of static frequency tables (bcm_socinfo) with runtime-determined values.

Depends on D7492

Test Plan

For RT-N16, RT-N53, and WGT634U:

  • Verified computed clock values against those specified in static table.
  • Verified that I did not, in fact, break the serial console.

Diff Detail

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

landonf retitled this revision from to [mips/broadcom] Replace static frequency table with generic PMU clock handling..
landonf updated this object.
landonf edited the test plan for this revision. (Show Details)
landonf added reviewers: adrian, mizhka.
  • Avoid using implicit global variables in BCM register macros. In theory, all the bcm_platform APIs should be usable with an arbitrary bcm_platform instance.
  • PMU watchdog writes were always sent to ChipCommon, even if a PMU core was found. Since none of our currently supported devices use a distinct PMU core (and map the register block to ChipCommon), this worked fine.
  • Due to a typo, the UART clock divisor register offset (instead of value) was improperly masked.
adrian edited edge metadata.
This revision is now accepted and ready to land.Aug 18 2016, 11:53 PM
This revision was automatically updated to reflect the committed changes.