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

Merge tag 'imx-clk-4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into clk-next

Pull i.MX clk updates from Shawn Guo:

- Update clk-pllv3 driver to get it return correct frequency for
Ethernet PLL on i.MX7D.
- Correct ahb clock mux settings for i.MX7D per latest hardware
document.

* tag 'imx-clk-4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
clk: imx7d: fix ahb clock mux 1
clk: imx: return correct frequency for Ethernet PLL

+9 -2
+1 -1
drivers/clk/imx/clk-imx7d.c
··· 56 56 "pll_sys_pfd2_135m_clk", "pll_sys_pfd6_clk", "pll_enet_250m_clk", 57 57 "pll_audio_main_clk", }; 58 58 59 - static const char *ahb_channel_sel[] = { "osc", "pll_sys_pfd2_135m_clk", 59 + static const char *ahb_channel_sel[] = { "osc", "pll_sys_pfd2_270m_clk", 60 60 "pll_dram_533m_clk", "pll_sys_pfd0_392m_clk", 61 61 "pll_enet_125m_clk", "pll_usb_main_clk", "pll_audio_main_clk", 62 62 "pll_video_main_clk", };
+8 -1
drivers/clk/imx/clk-pllv3.c
··· 44 44 u32 powerdown; 45 45 u32 div_mask; 46 46 u32 div_shift; 47 + unsigned long ref_clock; 47 48 }; 48 49 49 50 #define to_clk_pllv3(_hw) container_of(_hw, struct clk_pllv3, hw) ··· 287 286 static unsigned long clk_pllv3_enet_recalc_rate(struct clk_hw *hw, 288 287 unsigned long parent_rate) 289 288 { 290 - return 500000000; 289 + struct clk_pllv3 *pll = to_clk_pllv3(hw); 290 + 291 + return pll->ref_clock; 291 292 } 292 293 293 294 static const struct clk_ops clk_pllv3_enet_ops = { ··· 329 326 break; 330 327 case IMX_PLLV3_ENET_IMX7: 331 328 pll->powerdown = IMX7_ENET_PLL_POWER; 329 + pll->ref_clock = 1000000000; 330 + ops = &clk_pllv3_enet_ops; 331 + break; 332 332 case IMX_PLLV3_ENET: 333 + pll->ref_clock = 500000000; 333 334 ops = &clk_pllv3_enet_ops; 334 335 break; 335 336 default: