aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/imx
diff options
context:
space:
mode:
authorStefan Agner <stefan@agner.ch>2016-01-29 17:49:24 -0500
committerShawn Guo <shawnguo@kernel.org>2016-04-26 22:02:04 -0400
commit585a60f24bf86671b17ca7420e82b9404ff18502 (patch)
tree42d8675332251dc8f9adff7dc73645f88ce075d2 /drivers/clk/imx
parent69c542e8022ca53c5fee664548163809eb1777c3 (diff)
clk: imx: return correct frequency for Ethernet PLL
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: Stefan Agner <stefan@agner.ch> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'drivers/clk/imx')
-rw-r--r--drivers/clk/imx/clk-pllv3.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/clk/imx/clk-pllv3.c b/drivers/clk/imx/clk-pllv3.c
index c05c43d56a94..4826b3c9e19e 100644
--- a/drivers/clk/imx/clk-pllv3.c
+++ b/drivers/clk/imx/clk-pllv3.c
@@ -44,6 +44,7 @@ struct clk_pllv3 {
44 u32 powerdown; 44 u32 powerdown;
45 u32 div_mask; 45 u32 div_mask;
46 u32 div_shift; 46 u32 div_shift;
47 unsigned long ref_clock;
47}; 48};
48 49
49#define to_clk_pllv3(_hw) container_of(_hw, struct clk_pllv3, hw) 50#define to_clk_pllv3(_hw) container_of(_hw, struct clk_pllv3, hw)
@@ -286,7 +287,9 @@ static const struct clk_ops clk_pllv3_av_ops = {
286static unsigned long clk_pllv3_enet_recalc_rate(struct clk_hw *hw, 287static unsigned long clk_pllv3_enet_recalc_rate(struct clk_hw *hw,
287 unsigned long parent_rate) 288 unsigned long parent_rate)
288{ 289{
289 return 500000000; 290 struct clk_pllv3 *pll = to_clk_pllv3(hw);
291
292 return pll->ref_clock;
290} 293}
291 294
292static const struct clk_ops clk_pllv3_enet_ops = { 295static const struct clk_ops clk_pllv3_enet_ops = {
@@ -326,7 +329,11 @@ struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name,
326 break; 329 break;
327 case IMX_PLLV3_ENET_IMX7: 330 case IMX_PLLV3_ENET_IMX7:
328 pll->powerdown = IMX7_ENET_PLL_POWER; 331 pll->powerdown = IMX7_ENET_PLL_POWER;
332 pll->ref_clock = 1000000000;
333 ops = &clk_pllv3_enet_ops;
334 break;
329 case IMX_PLLV3_ENET: 335 case IMX_PLLV3_ENET:
336 pll->ref_clock = 500000000;
330 ops = &clk_pllv3_enet_ops; 337 ops = &clk_pllv3_enet_ops;
331 break; 338 break;
332 default: 339 default: