Re: [PATCH v3 02/12] clk: sunxi-ng: Change formula for NKMP PLLs

2018-01-18 Thread Jernej Škrabec
Hi, Dne četrtek, 18. januar 2018 ob 11:58:41 CET je Maxime Ripard napisal(a): > Hi, > > On Wed, Jan 17, 2018 at 09:14:11PM +0100, Jernej Skrabec wrote: > > This commit changes formula from this: > > > > Freq = (parent_freq * N * K) / (M * P) > > > > to this: > > > > Freq = (parent_freq / M) *

Re: [PATCH v3 02/12] clk: sunxi-ng: Change formula for NKMP PLLs

2018-01-18 Thread Jernej Škrabec
Hi, Dne četrtek, 18. januar 2018 ob 11:58:41 CET je Maxime Ripard napisal(a): > Hi, > > On Wed, Jan 17, 2018 at 09:14:11PM +0100, Jernej Skrabec wrote: > > This commit changes formula from this: > > > > Freq = (parent_freq * N * K) / (M * P) > > > > to this: > > > > Freq = (parent_freq / M) *

Re: [PATCH v3 02/12] clk: sunxi-ng: Change formula for NKMP PLLs

2018-01-18 Thread Maxime Ripard
Hi, On Wed, Jan 17, 2018 at 09:14:11PM +0100, Jernej Skrabec wrote: > This commit changes formula from this: > > Freq = (parent_freq * N * K) / (M * P) > > to this: > > Freq = (parent_freq / M) * N * K / P > > This improves situation when N is in the range 1-255. PLL parent clock > is almost

Re: [PATCH v3 02/12] clk: sunxi-ng: Change formula for NKMP PLLs

2018-01-18 Thread Maxime Ripard
Hi, On Wed, Jan 17, 2018 at 09:14:11PM +0100, Jernej Skrabec wrote: > This commit changes formula from this: > > Freq = (parent_freq * N * K) / (M * P) > > to this: > > Freq = (parent_freq / M) * N * K / P > > This improves situation when N is in the range 1-255. PLL parent clock > is almost

[PATCH v3 02/12] clk: sunxi-ng: Change formula for NKMP PLLs

2018-01-17 Thread Jernej Skrabec
This commit changes formula from this: Freq = (parent_freq * N * K) / (M * P) to this: Freq = (parent_freq / M) * N * K / P This improves situation when N is in the range 1-255. PLL parent clock is almost always 24 MHz, which means that for N >= 180 original formula overflows and result

[PATCH v3 02/12] clk: sunxi-ng: Change formula for NKMP PLLs

2018-01-17 Thread Jernej Skrabec
This commit changes formula from this: Freq = (parent_freq * N * K) / (M * P) to this: Freq = (parent_freq / M) * N * K / P This improves situation when N is in the range 1-255. PLL parent clock is almost always 24 MHz, which means that for N >= 180 original formula overflows and result