Skip to content

Commit 2a9868d

Browse files
aford173vinodkoul
authored andcommitted
phy: freescale: fsl-samsung-hdmi: Expand Integer divider range
The Integer divder uses values of P,M, and S to determine the PLL rate. Currently, the range of M was set based on a series of table entries where the range was limited. Since the ref manual shows it is 8-bit wide, expand the range to be up to 255. 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 ba8ad7e commit 2a9868d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

drivers/phy/freescale/phy-fsl-samsung-hdmi.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -406,16 +406,15 @@ static unsigned long fsl_samsung_hdmi_phy_find_pms(unsigned long fout, u8 *p, u1
406406
continue;
407407

408408
/*
409-
* TODO: Ref Manual doesn't state the range of _m
410-
* so this should be further refined if possible.
411-
* This range was set based on the original values
412-
* in the lookup table
409+
* The Ref manual doesn't explicitly state the range of M,
410+
* but it does show it as an 8-bit value, so reject
411+
* any value above 255.
413412
*/
414413
tmp = (u64)fout * (_p * _s);
415414
do_div(tmp, 24 * MHZ);
416-
_m = tmp;
417-
if (_m < 0x30 || _m > 0x7b)
415+
if (tmp > 255)
418416
continue;
417+
_m = tmp;
419418

420419
/*
421420
* Rev 2 of the Ref Manual states the

0 commit comments

Comments
 (0)