Lines Matching refs:rate
36 struct samsung_clk_pll *pll, unsigned long rate) in samsung_get_pll_settings() argument
42 if (rate == rate_table[i].rate) in samsung_get_pll_settings()
58 if (drate >= rate_table[i].rate) in samsung_pll_round_rate()
59 return rate_table[i].rate; in samsung_pll_round_rate()
63 return rate_table[i - 1].rate; in samsung_pll_round_rate()
194 const struct samsung_pll_rate_table *rate, u32 pll_con) in samsung_pll35xx_mp_change() argument
201 return (rate->mdiv != old_mdiv || rate->pdiv != old_pdiv); in samsung_pll35xx_mp_change()
208 const struct samsung_pll_rate_table *rate; in samsung_pll35xx_set_rate() local
212 rate = samsung_get_pll_settings(pll, drate); in samsung_pll35xx_set_rate()
213 if (!rate) { in samsung_pll35xx_set_rate()
221 if (!(samsung_pll35xx_mp_change(rate, tmp))) { in samsung_pll35xx_set_rate()
224 tmp |= rate->sdiv << PLL35XX_SDIV_SHIFT; in samsung_pll35xx_set_rate()
231 writel_relaxed(rate->pdiv * PLL35XX_LOCK_FACTOR, in samsung_pll35xx_set_rate()
238 tmp |= (rate->mdiv << PLL35XX_MDIV_SHIFT) | in samsung_pll35xx_set_rate()
239 (rate->pdiv << PLL35XX_PDIV_SHIFT) | in samsung_pll35xx_set_rate()
240 (rate->sdiv << PLL35XX_SDIV_SHIFT); in samsung_pll35xx_set_rate()
305 const struct samsung_pll_rate_table *rate, u32 pll_con0, u32 pll_con1) in samsung_pll36xx_mpk_change() argument
313 return (rate->mdiv != old_mdiv || rate->pdiv != old_pdiv || in samsung_pll36xx_mpk_change()
314 rate->kdiv != old_kdiv); in samsung_pll36xx_mpk_change()
322 const struct samsung_pll_rate_table *rate; in samsung_pll36xx_set_rate() local
324 rate = samsung_get_pll_settings(pll, drate); in samsung_pll36xx_set_rate()
325 if (!rate) { in samsung_pll36xx_set_rate()
334 if (!(samsung_pll36xx_mpk_change(rate, pll_con0, pll_con1))) { in samsung_pll36xx_set_rate()
337 pll_con0 |= (rate->sdiv << PLL36XX_SDIV_SHIFT); in samsung_pll36xx_set_rate()
344 writel_relaxed(rate->pdiv * PLL36XX_LOCK_FACTOR, pll->lock_reg); in samsung_pll36xx_set_rate()
350 pll_con0 |= (rate->mdiv << PLL36XX_MDIV_SHIFT) | in samsung_pll36xx_set_rate()
351 (rate->pdiv << PLL36XX_PDIV_SHIFT) | in samsung_pll36xx_set_rate()
352 (rate->sdiv << PLL36XX_SDIV_SHIFT); in samsung_pll36xx_set_rate()
356 pll_con1 |= rate->kdiv << PLL36XX_KDIV_SHIFT; in samsung_pll36xx_set_rate()
422 const struct samsung_pll_rate_table *rate) in samsung_pll45xx_mp_change() argument
430 return (old_mdiv != rate->mdiv || old_pdiv != rate->pdiv in samsung_pll45xx_mp_change()
431 || old_afc != rate->afc); in samsung_pll45xx_mp_change()
438 const struct samsung_pll_rate_table *rate; in samsung_pll45xx_set_rate() local
443 rate = samsung_get_pll_settings(pll, drate); in samsung_pll45xx_set_rate()
444 if (!rate) { in samsung_pll45xx_set_rate()
453 if (!(samsung_pll45xx_mp_change(con0, con1, rate))) { in samsung_pll45xx_set_rate()
456 con0 |= rate->sdiv << PLL45XX_SDIV_SHIFT; in samsung_pll45xx_set_rate()
466 con0 |= (rate->mdiv << PLL45XX_MDIV_SHIFT) | in samsung_pll45xx_set_rate()
467 (rate->pdiv << PLL45XX_PDIV_SHIFT) | in samsung_pll45xx_set_rate()
468 (rate->sdiv << PLL45XX_SDIV_SHIFT); in samsung_pll45xx_set_rate()
473 con1 |= (rate->afc << PLL45XX_AFC_SHIFT); in samsung_pll45xx_set_rate()
478 writel_relaxed(rate->pdiv * PLL4502_LOCK_FACTOR, pll->lock_reg); in samsung_pll45xx_set_rate()
481 writel_relaxed(rate->pdiv * PLL4508_LOCK_FACTOR, pll->lock_reg); in samsung_pll45xx_set_rate()
573 const struct samsung_pll_rate_table *rate) in samsung_pll46xx_mpk_change() argument
581 return (old_mdiv != rate->mdiv || old_pdiv != rate->pdiv in samsung_pll46xx_mpk_change()
582 || old_kdiv != rate->kdiv); in samsung_pll46xx_mpk_change()
589 const struct samsung_pll_rate_table *rate; in samsung_pll46xx_set_rate() local
594 rate = samsung_get_pll_settings(pll, drate); in samsung_pll46xx_set_rate()
595 if (!rate) { in samsung_pll46xx_set_rate()
604 if (!(samsung_pll46xx_mpk_change(con0, con1, rate))) { in samsung_pll46xx_set_rate()
607 con0 |= rate->sdiv << PLL46XX_SDIV_SHIFT; in samsung_pll46xx_set_rate()
614 lock = rate->pdiv * PLL46XX_LOCK_FACTOR; in samsung_pll46xx_set_rate()
629 con0 |= rate->vsel << PLL46XX_VSEL_SHIFT; in samsung_pll46xx_set_rate()
632 con0 |= (rate->mdiv << PLL46XX_MDIV_SHIFT) | in samsung_pll46xx_set_rate()
633 (rate->pdiv << PLL46XX_PDIV_SHIFT) | in samsung_pll46xx_set_rate()
634 (rate->sdiv << PLL46XX_SDIV_SHIFT); in samsung_pll46xx_set_rate()
641 con1 |= (rate->kdiv << PLL46XX_KDIV_SHIFT) | in samsung_pll46xx_set_rate()
642 (rate->mfr << PLL46XX_MFR_SHIFT) | in samsung_pll46xx_set_rate()
643 (rate->mrr << PLL46XX_MRR_SHIFT); in samsung_pll46xx_set_rate()
808 const struct samsung_pll_rate_table *rate; in samsung_s3c2410_pll_set_rate() local
812 rate = samsung_get_pll_settings(pll, drate); in samsung_s3c2410_pll_set_rate()
813 if (!rate) { in samsung_s3c2410_pll_set_rate()
825 tmp |= (rate->mdiv << PLLS3C2410_MDIV_SHIFT) | in samsung_s3c2410_pll_set_rate()
826 (rate->pdiv << PLLS3C2410_PDIV_SHIFT) | in samsung_s3c2410_pll_set_rate()
827 (rate->sdiv << PLLS3C2410_SDIV_SHIFT); in samsung_s3c2410_pll_set_rate()
1004 const struct samsung_pll_rate_table *rate; in samsung_pll2550xx_set_rate() local
1008 rate = samsung_get_pll_settings(pll, drate); in samsung_pll2550xx_set_rate()
1009 if (!rate) { in samsung_pll2550xx_set_rate()
1017 if (!(samsung_pll2550xx_mp_change(rate->mdiv, rate->pdiv, tmp))) { in samsung_pll2550xx_set_rate()
1020 tmp |= rate->sdiv << PLL2550XX_S_SHIFT; in samsung_pll2550xx_set_rate()
1027 writel_relaxed(rate->pdiv * PLL2550XX_LOCK_FACTOR, pll->lock_reg); in samsung_pll2550xx_set_rate()
1033 tmp |= (rate->mdiv << PLL2550XX_M_SHIFT) | in samsung_pll2550xx_set_rate()
1034 (rate->pdiv << PLL2550XX_P_SHIFT) | in samsung_pll2550xx_set_rate()
1035 (rate->sdiv << PLL2550XX_S_SHIFT); in samsung_pll2550xx_set_rate()
1104 const struct samsung_pll_rate_table *rate; in samsung_pll2650x_set_rate() local
1108 rate = samsung_get_pll_settings(pll, drate); in samsung_pll2650x_set_rate()
1109 if (!rate) { in samsung_pll2650x_set_rate()
1119 writel_relaxed(rate->pdiv * PLL2650X_LOCK_FACTOR, pll->lock_reg); in samsung_pll2650x_set_rate()
1125 con0 |= (rate->mdiv << PLL2650X_M_SHIFT) | in samsung_pll2650x_set_rate()
1126 (rate->pdiv << PLL2650X_P_SHIFT) | in samsung_pll2650x_set_rate()
1127 (rate->sdiv << PLL2650X_S_SHIFT); in samsung_pll2650x_set_rate()
1132 con1 |= ((rate->kdiv & PLL2650X_K_MASK) << PLL2650X_K_SHIFT); in samsung_pll2650x_set_rate()
1200 const struct samsung_pll_rate_table *rate; in samsung_pll2650xx_set_rate() local
1202 rate = samsung_get_pll_settings(pll, drate); in samsung_pll2650xx_set_rate()
1203 if (!rate) { in samsung_pll2650xx_set_rate()
1216 pll_con0 |= rate->mdiv << PLL2650XX_MDIV_SHIFT; in samsung_pll2650xx_set_rate()
1217 pll_con0 |= rate->pdiv << PLL2650XX_PDIV_SHIFT; in samsung_pll2650xx_set_rate()
1218 pll_con0 |= rate->sdiv << PLL2650XX_SDIV_SHIFT; in samsung_pll2650xx_set_rate()
1223 pll_con2 |= ((~(rate->kdiv) + 1) & PLL2650XX_KDIV_MASK) in samsung_pll2650xx_set_rate()
1227 writel_relaxed(PLL2650XX_LOCK_FACTOR * rate->pdiv, pll->lock_reg); in samsung_pll2650xx_set_rate()
1271 for (len = 0; pll_clk->rate_table[len].rate != 0; ) in _samsung_clk_register_pll()