- 01 6月, 2017 1 次提交
-
-
由 Fabio Estevam 提交于
According to the MX7D Reference Manual the powerdown bit of CCM_ANALOG_PLL_DDRn register is bit 20, so fix it accordingly. Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Reviewed-by: NStefan Agner <stefan@agner.ch> Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
-
- 10 1月, 2017 1 次提交
-
-
由 Nikita Yushchenko 提交于
On vf610, PLL1 and PLL2 have registers to configure fractional part of frequency multiplier. This patch adds support for these registers. This fixes "fast system clock" issue on boards where bootloader sets fractional multiplier for PLL1. Suggested-by: NAndrey Smirnov <andrew.smirnov@gmail.com> CC: Chris Healy <cphealy@gmail.com> Signed-off-by: NNikita Yushchenko <nikita.yoush@cogentembedded.com> Tested-by: NAndrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
-
- 02 11月, 2016 2 次提交
-
-
由 Emil Lundmark 提交于
The audio and video PLLs are designed to have a precision of 1 Hz if some conditions are met. The current implementation only allows a precision that depends on the rate of the parent clock. E.g., if the parent clock is 24 MHz, the precision will be 24 Hz; or more generally the precision will be p / 10^6 Hz where p is the parent clock rate. This comes down to how the register values for the PLL's fractional loop divider are chosen. The clock rate calculation for the PLL is PLL output frequency = Fref * (DIV_SELECT + NUM / DENOM) or with a shorter notation r = p * (d + a / b) In addition to all variables being integers, we also have the following conditions: 27 <= d <= 54 -2^29 <= a <= 2^29-1 0 < b <= 2^30-1 |a| < b Here, d, a and b are register values for the fractional loop divider. We want to chose d, a and b such that f(p, r) = p, i.e. f is our round_rate function. Currently, d and b are chosen as d = r / p b = 10^6 hence we get the poor precision. And a is defined in terms of r, d, p and b: a = (r - d * p) * b / p I propose that if p <= 2^30-1 (i.e., the max value for b), we chose b as b = p We can do this since |a| < b |(r - d * p) * b / p| < b |r - d * p| < p Which have two solutions, one of them is when p < 0, so we can skip that one. The other is when p > 0 and p * (d - 1) < r < p * (d + 1) Substitute d = r / p: (r - p) < r < (r + p) <=> p > 0 So, as long as p > 0, we can chose b = p. This is a good choise for b since a = (r - d * p) * b / p = (r - d * p) * p / p = r - d * p r = p * (d + a / b) = p * d + p * a / b = p * d + p * a / p = p * d + a and if d = r / p: a = r - d * p = r - r / p * p = 0 r = p * d + a = p * d + 0 = p * r / p = r I reckon this is the intention by the design of the clock rate formula. Signed-off-by: NEmil Lundmark <emil@limesaudio.com> Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com> Acked-by: NShawn Guo <shawnguo@kernel.org> Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
-
由 Emil Lundmark 提交于
Since 'parent_rate * mfn' may overflow 32 bits, the result should be stored using 64 bits. The problem was discovered when trying to set the rate of the audio PLL (pll4_post_div) on an i.MX6Q. The desired rate was 196.608 MHz, but the actual rate returned was 192.000570 MHz. The round rate function should have been able to return 196.608 MHz, i.e., the desired rate. Fixes: ba7f4f55 ("clk: imx: correct AV PLL rate formula") Cc: Anson Huang <b20788@freescale.com> Signed-off-by: NEmil Lundmark <emil@limesaudio.com> Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com> Acked-by: NShawn Guo <shawnguo@kernel.org> Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
-
- 16 6月, 2016 1 次提交
-
-
由 Dong Aisheng 提交于
The powerdown bit is a bit confused, let's change it to power_bit to relfect both powerdown and powerup case according to different plls. Signed-off-by: NDong Aisheng <aisheng.dong@nxp.com> Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
- 13 6月, 2016 1 次提交
-
-
由 Dong Aisheng 提交于
After commit f5394745 ("ARM: clk: imx: update pllv3 to support imx7"), the former used BM_PLL_POWER bit is not correct anymore for IMX7 ENET. Instead, pll->powerdown holds the correct bit, so using powerdown bit in clk_pllv3_{prepare | unprepare} functions. Fixes: f5394745 ("ARM: clk: imx: update pllv3 to support imx7") Signed-off-by: NDong Aisheng <aisheng.dong@nxp.com> Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
- 12 6月, 2016 1 次提交
-
-
由 Anson Huang 提交于
The audio/video PLL's rate calculation is as below in RM: Fref * (DIV_SELECT + NUM / DENOM), in origin clk-pllv3's code, below code is used: (parent_rate * div) + ((parent_rate / mfd) * mfn as it does NOT consider the float data using div, so below formula should be used as a decent method: (parent_rate * div) + ((parent_rate * mfn) / mfd) and we also need to consider parent_rate * mfd may overflow a 32 bit value, 64 bit value should be used. After updating this formula, the dram PLL's rate is 1066MHz, which is correct, while the old formula gets 1056MHz. [Aisheng: fix clk_pllv3_av_round_rate too] Signed-off-by: NAnson Huang <b20788@freescale.com> Signed-off-by: NDong Aisheng <aisheng.dong@nxp.com> Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
- 27 4月, 2016 1 次提交
-
-
由 Stefan Agner 提交于
The i.MX 7 designs Ethernet PLL provides a 1000MHz reference clock. Store the reference clock in the clk_pllv3 structure according to the PLL type. Signed-off-by: NStefan Agner <stefan@agner.ch> Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
- 25 11月, 2015 1 次提交
-
-
由 Bai Ping 提交于
Add 'is_prepared' callback function for pllv3 type clk to make sure when the system is bootup, the unused clk is in a known state to match the prepare count info. Signed-off-by: NBai Ping <b51503@freescale.com> Reviewed-by: NLucas Stach <l.stach@pengutronix.de> Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
- 21 7月, 2015 1 次提交
-
-
由 Stephen Boyd 提交于
Clock provider drivers generally shouldn't include clk.h because it's the consumer API. Remove the include here because this is a provider driver. Cc: Alexander Shiyan <shc_work@mail.ru> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
-
- 03 6月, 2015 3 次提交
-
-
由 Frank Li 提交于
Add type IMX_PLLV3_ENET_IMX7 Signed-off-by: NFrank Li <Frank.Li@freescale.com> Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-
由 Anson Huang 提交于
The definition of do_div uses unsigned long long variable as its first parameter, better to pass a u64 variable as first parameter when calling do_div function. Signed-off-by: NAnson Huang <b20788@freescale.com> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-
由 Shawn Guo 提交于
After the cleanup on clock drivers, they are now ready to be moved into drivers/clk. Let's move them into drivers/clk/imx folder. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Acked-by: NStephen Boyd <sboyd@codeaurora.org>
-
- 05 1月, 2015 1 次提交
-
-
由 Stefan Agner 提交于
Add shift capabilties for the frequency multiplier (DIV_SELECT) to support Vybrid's USB PLL oddity. The PLL3 and PLL7 are the only PLL control registers which have the DIV_SELECT bit shifted by one. Be aware, there are known documentation errors in the reference manual too. Signed-off-by: NStefan Agner <stefan@agner.ch> Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-
- 22 11月, 2014 1 次提交
-
-
由 Dmitry Voytik 提交于
ret variable is redundant. Call clk_pllv3_wait_lock() in the end return. Signed-off-by: NDmitry Voytik <voytikd@gmail.com> Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-
- 16 9月, 2014 1 次提交
-
-
由 Shawn Guo 提交于
Since ENABLE and BYPASS bits of PLLs are now implemented as separate gate and mux clocks by clock drivers, the code handling these two bits can be removed from clk-pllv3 driver. Signed-off-by: NShawn Guo <shawn.guo@freescale.com>
-
- 11 11月, 2013 3 次提交
-
-
由 Shawn Guo 提交于
Currently, POWER and BYPASS bits are set up in a single write to pllv3 register. This causes problem occasionally from the IPU/HDMI testing. Let's follow FSL BSP code to set up POWER bit, relock, and then BYPASS sequentially. Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-
由 Shawn Guo 提交于
The pllv3 nees relock not only when powering up but also when rate changes. The patch creates a helper function clk_pllv3_wait_lock() and moves the relock code from clk_pllv3_prepare() into there, so that both .prepare() and .set_rate() hooks of pllv3 can call into the helper for relocking. Since relock is only needed when PLL is powered up while clk_set_rate() could be called before clk is prepared, we need to add a check in clk_pllv3_wait_lock() to skip the relock if PLL is not powered. Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-
由 Shawn Guo 提交于
The pllv3 relock time varies in the range of 50us ~ 500us, depending on the specific PLL type, e.g. 50us for ARM PLL and 450us for Audio/Video PLL. Let's add a usleep_range() call instead of doing busy wait during relock. Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-
- 16 8月, 2013 1 次提交
-
-
由 Peter Chen 提交于
There are two improvements for this commit: - Add comparing pll lock condition after while loop. It can fix potential fake timeout problem caused by the code is just scheduled out before compare the timeout, and the time of scheduling out are more than one jiffies. - Move timeout assignment more close to compare the timeout. It can reduce the possibility the code is scheduled out, and the timeout can be more precise. Signed-off-by: NPeter Chen <peter.chen@freescale.com> Acked-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-
- 17 6月, 2013 1 次提交
-
-
由 Jiada Wang 提交于
MLB PLL should be handled internally in MLB driver, so remove it from pllv3. Signed-off-by: NJiada Wang <jiada_wang@mentor.com> CC: Dirk Behme <dirk.behme@de.bosch.com> Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-
- 22 11月, 2012 2 次提交
-
-
由 Sascha Hauer 提交于
Now that the additional enable bits in the enet PLL are handled as gates, the gate_mask is identical for all plls. Remove the gate_mask from the code and use the BM_PLL_ENABLE bit for enabling/disabling the PLL. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Acked-by: NShawn Guo <shawn.guo@linaro.org>
-
由 Sascha Hauer 提交于
In current code the ethernet PLL is not handled correctly. The PLL runs at 500MHz and has different outputs. Only the enet reference clock is implemented. This patch changes the PLL so that it outputs 500MHz and adds the additional outputs as dividers. This now matches the datasheet which says: > This PLL synthesizes a low jitter clock from 24 MHz reference clock. > The PLL outputs a 500 MHz clock. The reference clocks generated by this PLL are: > • Ref_PCIe = 125 MHz > • Ref_SATA = 100 MHz > • Ref_ethernet, which is configurable based on the PLL_ENET[1:0] register field. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Acked-by: NShawn Guo <shawn.guo@linaro.org>
-
- 02 5月, 2012 1 次提交
-
-
由 Shawn Guo 提交于
This PLL is found on i.MX6 SoCs Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-