Page MenuHomeFreeBSD

jz4780: fix clk_gen divider calculation and rounding

Authored by jmcneill on Dec 14 2016, 1:49 AM.



jz4780_clk_gen_set_freq always sets a frequency >= target. Included:

  • By default choose the closest matching divider instead of one that results in a frequency >= target
  • Fix inverted rounding logic

Diff Detail

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

Event Timeline

jmcneill updated this revision to Diff 22896.Dec 14 2016, 1:49 AM
jmcneill retitled this revision from to jz4780: fix clk_gen divider calculation and rounding.
jmcneill updated this object.
jmcneill edited the test plan for this revision. (Show Details)
jmcneill added a reviewer: kan.
jmcneill set the repository for this revision to rS FreeBSD src repository.
jmcneill added a project: MIPS.
br added a subscriber: br.Dec 17 2016, 5:06 PM

I just can say that I saw some problem in that area configuring MMC device for X1000 processor a month ago and was thinking about similar change.

kan accepted this revision.Dec 17 2016, 9:29 PM
kan edited edge metadata.
This revision is now accepted and ready to land.Dec 17 2016, 9:29 PM
This revision was automatically updated to reflect the committed changes.