Commit d567679
phy: freescale: fsl-samsung-hdmi: Clean up fld_tg_code calculation
Currently, the calcuation for fld_tg_code is based on a lookup table,
but there are gaps in the lookup table, and frequencies in these
gaps may not properly use the correct divider. Based on the description
of FLD_CK_DIV, the internal PLL frequency should be less than 50 MHz,
so directly calcuate the value of FLD_CK_DIV from pixclk.
This allow for proper calcuation of any pixel clock and eliminates a
few gaps in the LUT.
Since the value of the int_pllclk is in Hz, do the fixed-point
math in Hz to achieve a more accurate value and reduces the complexity
of the caluation to 24MHz * (256 / int_pllclk).
Fixes: 6ad082b ("phy: freescale: add Samsung HDMI PHY")
Signed-off-by: Adam Ford <[email protected]>
Reviewed-by: Frieder Schrempf <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>1 parent 1b9b8b1 commit d567679
1 file changed
+11
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
350 | 342 | | |
351 | 343 | | |
352 | | - | |
| 344 | + | |
353 | 345 | | |
354 | 346 | | |
355 | 347 | | |
| |||
362 | 354 | | |
363 | 355 | | |
364 | 356 | | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
| 357 | + | |
| 358 | + | |
369 | 359 | | |
370 | 360 | | |
371 | 361 | | |
| |||
0 commit comments