diff options
author | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2023-05-24 11:28:01 +0300 |
---|---|---|
committer | Francesco Dolcini <francesco.dolcini@toradex.com> | 2023-06-19 15:54:19 +0200 |
commit | cf089ee81460d586813143d0539955b3bf04caa3 (patch) | |
tree | 26953485343c3e804335ef3a7b7f326f41b318ff /drivers/acpi | |
parent | 6c81e4c96cfb50a47d62f45eccb68a2b160b1e87 (diff) |
drm/bridge: tc358768: Cleanup PLL calculations
As is quite common, some of TC358768's PLL register fields are to be
programmed with (value - 1). Specifically, the FBD and PRD, multiplier
and divider, are such fields.
However, what the driver currently does is that it considers that the
formula used for PLL rate calculation is:
RefClk * [(FBD + 1)/ (PRD + 1)] * [1 / (2^FRS)]
where FBD and PRD are values directly from the registers, while a more
sensible way to look at it is:
RefClk * FBD / PRD * (1 / (2^FRS))
and when the FBD and PRD values are written to the registers, they will
be subtracted by one.
Change the driver accordingly, as it simplifies the PLL code.
Upstream-Status: Pending
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Diffstat (limited to 'drivers/acpi')
0 files changed, 0 insertions, 0 deletions