Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

clk: eyeq: Skip post-divisor when computing PLL frequency

The output of the PLL is routed before the post-divisor so it should be
ignored when computing the frequency of the PLL, functional change is
implemented to reflect how the clock signal is wired internally.

For the PLL of the EyeQ5, EyeQ6L, and EyeQ6H, this change has no impact
as the post-divisor is either reported as disabled or set to 1. The PLL
frequency is the same before and after the post-divisor.

For the PLL in EyeQ6Lplus, however, the post-divisor is not 1, so it must
be ignored to compute the correct frequency.

Signed-off-by: Benoît Monin <benoit.monin@bootlin.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

authored by

Benoît Monin and committed by
Thomas Bogendoerfer
8ab1e58c c4fc0fb9

-2
-2
drivers/clk/clk-eyeq.c
··· 177 177 178 178 *mult = FIELD_GET(PCSR0_INTIN, r0); 179 179 *div = FIELD_GET(PCSR0_REF_DIV, r0); 180 - if (r0 & PCSR0_FOUTPOSTDIV_EN) 181 - *div *= FIELD_GET(PCSR0_POST_DIV1, r0) * FIELD_GET(PCSR0_POST_DIV2, r0); 182 180 183 181 /* Fractional mode, in 2^20 (0x100000) parts. */ 184 182 if (r0 & PCSR0_DSM_EN) {