CHANGE_APLL:
local_irq_save(flags);
- /* If core src don't select gpll, apll need to enter slow mode
- * before reset
- */
- if (!sel_gpll)
- cru_writel(_RK3188_PLL_MODE_SLOW_SET(pll->mode_shift),
- pll->mode_offset);
+ /* apll enter slow mode */
+ cru_writel(_RK3188_PLL_MODE_SLOW_SET(pll->mode_shift),
+ pll->mode_offset);
/* PLL enter reset */
cru_writel(_RK3188PLUS_PLL_RESET_SET(1), pll->reg + RK3188_PLL_CON(3));
udelay(ps->rst_dly);
pll_wait_lock(hw);
- /* PLL return from slow mode */
if (!sel_gpll) {
if (rate >= old_rate) {
cru_writel(ps->clksel0, RK3368_CRU_CLKSELS_CON(0));
cru_writel(ps->clksel1, RK3368_CRU_CLKSELS_CON(1));
}
- cru_writel(_RK3188_PLL_MODE_NORM_SET(pll->mode_shift),
- pll->mode_offset);
}
+ /* apll return from slow mode */
+ cru_writel(_RK3188_PLL_MODE_NORM_SET(pll->mode_shift),
+ pll->mode_offset);
+
/* reparent to apll, and set div to 1 */
if (sel_gpll) {
#if RK3368_APLLB_DIV_MORE
CHANGE_APLL:
local_irq_save(flags);
- /* If core src don't select gpll, apll need to enter slow mode
- * before reset
- */
- if (!sel_gpll)
- cru_writel(_RK3188_PLL_MODE_SLOW_SET(pll->mode_shift),
- pll->mode_offset);
+ /* apll enter slow mode */
+ cru_writel(_RK3188_PLL_MODE_SLOW_SET(pll->mode_shift),
+ pll->mode_offset);
/* PLL enter reset */
cru_writel(_RK3188PLUS_PLL_RESET_SET(1), pll->reg + RK3188_PLL_CON(3));
udelay(ps->rst_dly);
pll_wait_lock(hw);
- /* PLL return from slow mode */
if (!sel_gpll) {
if (rate >= old_rate) {
cru_writel(ps->clksel0, RK3368_CRU_CLKSELS_CON(2));
cru_writel(ps->clksel1, RK3368_CRU_CLKSELS_CON(3));
}
- cru_writel(_RK3188_PLL_MODE_NORM_SET(pll->mode_shift),
- pll->mode_offset);
}
+ /* apll return from slow mode */
+ cru_writel(_RK3188_PLL_MODE_NORM_SET(pll->mode_shift),
+ pll->mode_offset);
+
/* reparent to apll, and set div to 1 */
if (sel_gpll) {
#if RK3368_APLLL_DIV_MORE