Commit 1c6f3b6ec717bdf7e6a26996e399e050f66abcce
1 parent
073fa27266
Exists in
smarc-imx-l5.0.0_1.0.0-ga
ENGR00331706-3 imx: mx6: Change the get_ipg_per_clk for OSC 24Mhz source
For MX6SL and MX6SX, the perclk can come from OSC 24Mhz source. Fix the get_ipg_per_clk function to support it. Signed-off-by: Ye.Li <B37916@freescale.com>
Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff
arch/arm/cpu/armv7/mx6/clock.c
... | ... | @@ -204,6 +204,10 @@ |
204 | 204 | u32 reg, perclk_podf; |
205 | 205 | |
206 | 206 | reg = __raw_readl(&imx_ccm->cscmr1); |
207 | +#if (defined(CONFIG_MX6SL) || defined(CONFIG_MX6SX)) | |
208 | + if (reg & MXC_CCM_CSCMR1_PER_CLK_SEL_MASK) | |
209 | + return MXC_HCLK; /* OSC 24Mhz */ | |
210 | +#endif | |
207 | 211 | perclk_podf = reg & MXC_CCM_CSCMR1_PERCLK_PODF_MASK; |
208 | 212 | |
209 | 213 | return get_ipg_clk() / (perclk_podf + 1); |