| /OK3568_Linux_fs/u-boot/drivers/clk/rockchip/ |
| H A D | clk_pll.c | 83 u32 *postdiv1, in rockchip_pll_clk_set_postdiv() argument 90 for (*postdiv1 = 1; *postdiv1 <= 7; (*postdiv1)++) { in rockchip_pll_clk_set_postdiv() 92 freq = fout_hz * (*postdiv1) * (*postdiv2); in rockchip_pll_clk_set_postdiv() 103 *postdiv1 = 1; in rockchip_pll_clk_set_postdiv() 117 u32 f_frac, postdiv1, postdiv2; in rockchip_pll_clk_set_by_auto() local 123 rockchip_pll_clk_set_postdiv(fout_hz, &postdiv1, &postdiv2, &foutvco); in rockchip_pll_clk_set_by_auto() 124 rate_table->postdiv1 = postdiv1; in rockchip_pll_clk_set_by_auto() 141 rate_table->fbdiv, rate_table->postdiv1, in rockchip_pll_clk_set_by_auto() 147 rate_table->postdiv1, rate_table->postdiv2, foutvco); in rockchip_pll_clk_set_by_auto() 262 __func__, rate->rate, rate->fbdiv, rate->postdiv1, rate->refdiv); in rk3036_pll_set_rate() [all …]
|
| H A D | clk_rk3399.c | 38 u32 postdiv1; member 51 .postdiv1 = _postdiv1, .postdiv2 = _postdiv2, .freq = hz}; 344 u32 refdiv, fbdiv, postdiv1, postdiv2; in rkclk_pll_get_rate() local 356 postdiv1 = (con & PLL_POSTDIV1_MASK) >> PLL_POSTDIV1_SHIFT; in rkclk_pll_get_rate() 359 return (24 * fbdiv / (refdiv * postdiv1 * postdiv2)) * 1000000; in rkclk_pll_get_rate() 370 u32 output_khz = vco_khz / div->postdiv1 / div->postdiv2; in rkclk_set_pll() 374 pll_con, div->fbdiv, div->refdiv, div->postdiv1, in rkclk_set_pll() 397 (div->postdiv1 << PLL_POSTDIV1_SHIFT) | in rkclk_set_pll() 448 u32 postdiv1, postdiv2 = 1; in pll_para_config() local 461 postdiv1 = DIV_ROUND_UP(VCO_MIN_KHZ, freq_khz); in pll_para_config() [all …]
|
| H A D | clk_rk3036.c | 52 .postdiv1 = _postdiv1, .postdiv2 = _postdiv2};\ 70 uint output_hz = vco_hz / div->postdiv1 / div->postdiv2; in rkclk_set_pll() 74 pll, div->fbdiv, div->refdiv, div->postdiv1, in rkclk_set_pll() 87 (div->postdiv1 << PLL_POSTDIV1_SHIFT) | div->fbdiv); in rkclk_set_pll() 204 uint32_t refdiv, fbdiv, postdiv1, postdiv2; in rkclk_pll_get_rate() local 230 postdiv1 = (con & PLL_POSTDIV1_MASK) >> PLL_POSTDIV1_SHIFT; in rkclk_pll_get_rate() 235 return (24 * fbdiv / (refdiv * postdiv1 * postdiv2)) * 1000000; in rkclk_pll_get_rate()
|
| H A D | clk_px30.c | 37 .postdiv1 = _postdiv1, \ 111 u32 postdiv1, postdiv2 = 1; in pll_clk_set_by_auto() local 124 postdiv1 = DIV_ROUND_UP(VCO_MIN_HZ / 1000, rate_khz); in pll_clk_set_by_auto() 125 if (postdiv1 > max_postdiv1) { in pll_clk_set_by_auto() 126 postdiv2 = DIV_ROUND_UP(postdiv1, max_postdiv1); in pll_clk_set_by_auto() 127 postdiv1 = DIV_ROUND_UP(postdiv1, postdiv2); in pll_clk_set_by_auto() 130 vco_khz = rate_khz * postdiv1 * postdiv2; in pll_clk_set_by_auto() 139 rate->postdiv1 = postdiv1; in pll_clk_set_by_auto() 229 output_hz = vco_hz / rate->postdiv1 / rate->postdiv2; in rkclk_set_pll() 232 pll, rate->fbdiv, rate->refdiv, rate->postdiv1, in rkclk_set_pll() [all …]
|
| H A D | clk_rv1108.c | 34 .postdiv1 = _postdiv1, .postdiv2 = _postdiv2};\ 73 uint output_hz = vco_hz / div->postdiv1 / div->postdiv2; in rkclk_set_pll() 76 pll, div->fbdiv, div->refdiv, div->postdiv1, in rkclk_set_pll() 95 (div->postdiv1 << POSTDIV1_SHIFT | in rkclk_set_pll() 120 uint32_t refdiv, fbdiv, postdiv1, postdiv2; in rkclk_pll_get_rate() local 132 postdiv1 = (con1 & POSTDIV1_MASK) >> POSTDIV1_SHIFT; in rkclk_pll_get_rate() 135 freq = (24 * fbdiv / (refdiv * postdiv1 * postdiv2)) * 1000000; in rkclk_pll_get_rate()
|
| /OK3568_Linux_fs/kernel/drivers/clk/rockchip/regmap/ |
| H A D | clk-regmap-pll.c | 69 unsigned int postdiv1, fbdiv, dsmpd, postdiv2, refdiv, frac, bypass; in clk_regmap_pll_recalc_rate() local 78 postdiv1 = (con0 & PLL_POSTDIV1_MASK) >> PLL_POSTDIV1_SHIFT; in clk_regmap_pll_recalc_rate() 99 do_div(foutpostdiv, postdiv1); in clk_regmap_pll_recalc_rate() 107 u8 *postdiv1, u8 *postdiv2, in clk_pll_round_rate() argument 218 if (postdiv1) in clk_pll_round_rate() 219 *postdiv1 = _postdiv1; in clk_pll_round_rate() 253 u8 refdiv, postdiv1, postdiv2, dsmpd, bypass; in clk_regmap_pll_set_rate() local 258 rate = clk_pll_round_rate(prate, drate, &refdiv, &fbdiv, &postdiv1, in clk_regmap_pll_set_rate() 271 PLL_BYPASS(0) | PLL_POSTDIV1(postdiv1) | in clk_regmap_pll_set_rate() 282 postdiv1, postdiv2); in clk_regmap_pll_set_rate()
|
| /OK3568_Linux_fs/kernel/drivers/misc/rk628/ |
| H A D | rk628_cru.c | 63 u32 postdiv1, fbdiv, dsmpd, postdiv2, refdiv, frac, bypass; in rk628_cru_clk_get_rate_pll() local 90 postdiv1 = (con0 & PLL_POSTDIV1_MASK) >> PLL_POSTDIV1_SHIFT; in rk628_cru_clk_get_rate_pll() 111 do_div(foutpostdiv, postdiv1); in rk628_cru_clk_get_rate_pll() 123 u8 dsmpd = 1, postdiv1 = 0, postdiv2 = 0, refdiv = 0; in rk628_cru_clk_set_rate_pll() local 171 postdiv1 = postdiv / postdiv2; in rk628_cru_clk_set_rate_pll() 173 if (postdiv1 > 0 && postdiv1 < 8) in rk628_cru_clk_set_rate_pll() 180 fout *= postdiv1 * postdiv2; in rk628_cru_clk_set_rate_pll() 182 postdiv1 = 1; in rk628_cru_clk_set_rate_pll() 236 do_div(foutpostdiv, postdiv1); in rk628_cru_clk_set_rate_pll() 240 PLL_BYPASS(0) | PLL_POSTDIV1(postdiv1) | in rk628_cru_clk_set_rate_pll()
|
| /OK3568_Linux_fs/kernel/drivers/clk/pistachio/ |
| H A D | clk-pll.c | 240 (params->postdiv1 != old_postdiv1 || in pll_gf40lp_frac_set_rate() 244 if (params->postdiv2 > params->postdiv1) in pll_gf40lp_frac_set_rate() 253 (params->postdiv1 << PLL_FRAC_CTRL2_POSTDIV1_SHIFT) | in pll_gf40lp_frac_set_rate() 273 u64 val, prediv, fbdiv, frac, postdiv1, postdiv2, rate; in pll_gf40lp_frac_recalc_rate() local 280 postdiv1 = (val >> PLL_FRAC_CTRL2_POSTDIV1_SHIFT) & in pll_gf40lp_frac_recalc_rate() 293 rate = do_div_round_closest(rate, (prediv * postdiv1 * postdiv2) << 24); in pll_gf40lp_frac_recalc_rate() 386 (params->postdiv1 != old_postdiv1 || in pll_gf40lp_laint_set_rate() 390 if (params->postdiv2 > params->postdiv1) in pll_gf40lp_laint_set_rate() 399 (params->postdiv1 << PLL_INT_CTRL1_POSTDIV1_SHIFT) | in pll_gf40lp_laint_set_rate() 413 u32 val, prediv, fbdiv, postdiv1, postdiv2; in pll_gf40lp_laint_recalc_rate() local [all …]
|
| H A D | clk.h | 99 unsigned long long postdiv1; member
|
| /OK3568_Linux_fs/kernel/drivers/media/i2c/rk628/ |
| H A D | rk628_cru.c | 64 u32 postdiv1, fbdiv, dsmpd, postdiv2, refdiv, frac, bypass; in rk628_cru_clk_get_rate_pll() local 91 postdiv1 = (con0 & PLL_POSTDIV1_MASK) >> PLL_POSTDIV1_SHIFT; in rk628_cru_clk_get_rate_pll() 112 do_div(foutpostdiv, postdiv1); in rk628_cru_clk_get_rate_pll() 124 u8 dsmpd = 1, postdiv1 = 0, postdiv2 = 0, refdiv = 0; in rk628_cru_clk_set_rate_pll() local 172 postdiv1 = postdiv / postdiv2; in rk628_cru_clk_set_rate_pll() 174 if (postdiv1 > 0 && postdiv1 < 8) in rk628_cru_clk_set_rate_pll() 186 fout *= postdiv1 * postdiv2; in rk628_cru_clk_set_rate_pll() 188 postdiv1 = 1; in rk628_cru_clk_set_rate_pll() 242 do_div(foutpostdiv, postdiv1); in rk628_cru_clk_set_rate_pll() 246 PLL_BYPASS(0) | PLL_POSTDIV1(postdiv1) | in rk628_cru_clk_set_rate_pll()
|
| /OK3568_Linux_fs/kernel/drivers/clk/rockchip/ |
| H A D | clk-pll.c | 172 u32 *postdiv1, in rockchip_pll_clk_set_postdiv() argument 179 for (*postdiv1 = 1; *postdiv1 <= 7; (*postdiv1)++) { in rockchip_pll_clk_set_postdiv() 181 freq = fout_hz * (*postdiv1) * (*postdiv2); in rockchip_pll_clk_set_postdiv() 192 *postdiv1 = 1; in rockchip_pll_clk_set_postdiv() 207 u32 f_frac, postdiv1, postdiv2; in rockchip_pll_clk_set_by_auto() local 213 rockchip_pll_clk_set_postdiv(fout_hz, &postdiv1, &postdiv2, &foutvco); in rockchip_pll_clk_set_by_auto() 214 rate_table->postdiv1 = postdiv1; in rockchip_pll_clk_set_by_auto() 229 rate_table->fbdiv, rate_table->postdiv1, in rockchip_pll_clk_set_by_auto() 237 rate_table->postdiv1, rate_table->postdiv2, foutvco); in rockchip_pll_clk_set_by_auto() 490 unsigned int fbdiv, postdiv1, refdiv, postdiv2; in rockchip_rk3036_pll_con_to_rate() local [all …]
|
| /OK3568_Linux_fs/u-boot/drivers/ram/rockchip/ |
| H A D | sdram_rk3328.c | 79 unsigned int refdiv, postdiv1, postdiv2, fbdiv; in rkclk_set_dpll() local 85 postdiv1 = 4; in rkclk_set_dpll() 88 postdiv1 = 6; in rkclk_set_dpll() 91 postdiv1 = 4; in rkclk_set_dpll() 94 postdiv1 = 3; in rkclk_set_dpll() 97 postdiv1 = 2; in rkclk_set_dpll() 100 postdiv1 = 1; in rkclk_set_dpll() 103 fbdiv = (mhz * refdiv * postdiv1 * postdiv2) / 24; in rkclk_set_dpll() 106 writel(POSTDIV1(postdiv1) | FBDIV(fbdiv), &dram->cru->dpll_con[0]); in rkclk_set_dpll()
|
| H A D | sdram_px30.c | 78 unsigned int refdiv, postdiv1, postdiv2, fbdiv; in rkclk_set_dpll() local 84 postdiv1 = 4; in rkclk_set_dpll() 87 postdiv1 = 6; in rkclk_set_dpll() 90 postdiv1 = 4; in rkclk_set_dpll() 93 postdiv1 = 3; in rkclk_set_dpll() 96 postdiv1 = 2; in rkclk_set_dpll() 99 postdiv1 = 1; in rkclk_set_dpll() 102 fbdiv = (mhz * refdiv * postdiv1 * postdiv2) / 24; in rkclk_set_dpll() 106 writel(POSTDIV1(postdiv1) | FBDIV(fbdiv), &dram->cru->pll[1].con0); in rkclk_set_dpll()
|
| H A D | sdram_rk3308.c | 90 pll_priv->postdiv1 << POSTDIV1_SHIFT); in pll_set() 134 rk3308_pll_div.postdiv1 = 2; in rkdclk_init() 144 rk3308_pll_div.postdiv1 = 4; in rkdclk_init() 152 rk3308_pll_div.postdiv1 = 2; in rkdclk_init() 188 rk3308_pll_div.postdiv1 = 2; in rkdclk_init() 196 rk3308_pll_div.postdiv1 = 1; in rkdclk_init() 265 rk3308_pll_div.postdiv1 = 1; in rkdclk_init() 328 rk3308_pll_div.postdiv1 = 2; in rkdclk_init()
|
| H A D | sdram_rv1126.c | 317 unsigned int refdiv, postdiv1, postdiv2, fbdiv; in rkclk_set_dpll() local 331 postdiv1 = 6; in rkclk_set_dpll() 334 postdiv1 = 4; in rkclk_set_dpll() 337 postdiv1 = 6; in rkclk_set_dpll() 340 postdiv1 = 4; in rkclk_set_dpll() 343 postdiv1 = 6; in rkclk_set_dpll() 346 postdiv1 = 4; in rkclk_set_dpll() 349 fbdiv = (mhz * refdiv * postdiv1 * postdiv2) / 24; in rkclk_set_dpll() 354 writel(POSTDIV1(postdiv1) | FBDIV(fbdiv), &dram->cru->pll[1].con0); in rkclk_set_dpll()
|
| /OK3568_Linux_fs/u-boot/arch/arm/include/asm/arch-rockchip/ |
| H A D | clock.h | 72 .postdiv1 = _postdiv1, \ 96 unsigned int postdiv1; member
|
| H A D | cru_rk3036.h | 69 u32 postdiv1; member
|
| H A D | cru_rv1108.h | 57 u32 postdiv1; member
|
| H A D | cru_rv1106.h | 122 unsigned int postdiv1; member
|
| H A D | cru_rk3528.h | 108 unsigned int postdiv1; member
|
| H A D | cru_rv1126.h | 142 unsigned int postdiv1; member
|
| H A D | cru_px30.h | 118 unsigned int postdiv1; member
|
| /OK3568_Linux_fs/kernel/drivers/gpu/drm/msm/dsi/pll/ |
| H A D | dsi_pll_28nm_8960.c | 55 u8 postdiv1; member 347 cached_state->postdiv1 = in dsi_pll_28nm_save_state() 373 cached_state->postdiv1); in dsi_pll_28nm_restore_state()
|
| H A D | dsi_pll_28nm.c | 65 u8 postdiv1; member 447 cached_state->postdiv1 = in dsi_pll_28nm_save_state() 471 cached_state->postdiv1); in dsi_pll_28nm_restore_state()
|
| /OK3568_Linux_fs/kernel/drivers/clk/ |
| H A D | clk-bm1880.c | 478 u32 postdiv1, postdiv2, denominator; in bm1880_pll_rate_calc() local 482 postdiv1 = (regval >> 8) & 0x7; in bm1880_pll_rate_calc() 486 denominator = refdiv * postdiv1 * postdiv2; in bm1880_pll_rate_calc()
|