Home
last modified time | relevance | path

Searched refs:postdiv (Results 1 – 22 of 22) sorted by relevance

/linux-5.19.10/arch/mips/ath79/
Dclock.c238 u32 pll, out_div, ref_div, nint, nfrac, frac, clk_ctrl, postdiv; in ar934x_clocks_init() local
309 postdiv = (clk_ctrl >> AR934X_PLL_CPU_DDR_CLK_CTRL_CPU_POST_DIV_SHIFT) & in ar934x_clocks_init()
315 cpu_rate = cpu_pll / (postdiv + 1); in ar934x_clocks_init()
317 cpu_rate = ddr_pll / (postdiv + 1); in ar934x_clocks_init()
319 postdiv = (clk_ctrl >> AR934X_PLL_CPU_DDR_CLK_CTRL_DDR_POST_DIV_SHIFT) & in ar934x_clocks_init()
325 ddr_rate = ddr_pll / (postdiv + 1); in ar934x_clocks_init()
327 ddr_rate = cpu_pll / (postdiv + 1); in ar934x_clocks_init()
329 postdiv = (clk_ctrl >> AR934X_PLL_CPU_DDR_CLK_CTRL_AHB_POST_DIV_SHIFT) & in ar934x_clocks_init()
335 ahb_rate = ddr_pll / (postdiv + 1); in ar934x_clocks_init()
337 ahb_rate = cpu_pll / (postdiv + 1); in ar934x_clocks_init()
[all …]
/linux-5.19.10/arch/mips/ar7/
Dclock.c74 u32 postdiv; member
101 int *postdiv, int *mul) in approximate() argument
112 *postdiv = k; in approximate()
117 static void calculate(int base, int target, int *prediv, int *postdiv, in calculate() argument
126 *postdiv = tmp_base / tmp_gcd; in calculate()
129 if ((*postdiv > 0) & (*postdiv <= 32)) in calculate()
133 if (base / *prediv * *mul / *postdiv != target) { in calculate()
134 approximate(base, target, prediv, postdiv, mul); in calculate()
135 tmp_freq = base / *prediv * *mul / *postdiv; in calculate()
142 *prediv, *postdiv, *mul); in calculate()
[all …]
/linux-5.19.10/drivers/clk/mediatek/
Dclk-pll.c68 u32 pcw, int postdiv) in __mtk_pll_recalc_rate() argument
91 return ((unsigned long)vco + postdiv - 1) / postdiv; in __mtk_pll_recalc_rate()
121 int postdiv) in mtk_pll_set_rate_regs() argument
131 val |= (ffs(postdiv) - 1) << pll->data->pd_shift; in mtk_pll_set_rate_regs()
164 static void mtk_pll_calc_values(struct mtk_clk_pll *pll, u32 *pcw, u32 *postdiv, in mtk_pll_calc_values() argument
184 *postdiv = 1 << val; in mtk_pll_calc_values()
187 *postdiv = 1 << val; in mtk_pll_calc_values()
188 if ((u64)freq * *postdiv >= fmin) in mtk_pll_calc_values()
206 u32 postdiv; in mtk_pll_set_rate() local
208 mtk_pll_calc_values(pll, &pcw, &postdiv, rate, parent_rate); in mtk_pll_set_rate()
[all …]
/linux-5.19.10/drivers/clk/mmp/
Dclk-audio.c119 unsigned int postdiv; in audio_pll_recalc_rate() local
138 for (postdiv = 0; postdiv < ARRAY_SIZE(postdivs); postdiv++) { in audio_pll_recalc_rate()
144 val |= SSPA_AUD_PLL_CTRL0_DIV_OCLK_MODULO(postdivs[postdiv].modulo); in audio_pll_recalc_rate()
152 val |= SSPA_AUD_PLL_CTRL1_DIV_OCLK_PATTERN(postdivs[postdiv].pattern); in audio_pll_recalc_rate()
157 freq /= postdivs[postdiv].divisor; in audio_pll_recalc_rate()
169 unsigned int postdiv; in audio_pll_round_rate() local
175 for (postdiv = 0; postdiv < ARRAY_SIZE(postdivs); postdiv++) { in audio_pll_round_rate()
178 freq /= postdivs[postdiv].divisor; in audio_pll_round_rate()
197 unsigned int postdiv; in audio_pll_set_rate() local
204 for (postdiv = 0; postdiv < ARRAY_SIZE(postdivs); postdiv++) { in audio_pll_set_rate()
[all …]
Dclk-pll.c49 u32 fbdiv, refdiv, postdiv; in mmp_clk_pll_recalc_rate() local
71 postdiv = (val >> pll->postdiv_shift) & 0x7; in mmp_clk_pll_recalc_rate()
76 do_div(rate, postdivs[postdiv]); in mmp_clk_pll_recalc_rate()
/linux-5.19.10/drivers/clk/keystone/
Dpll.c60 u32 postdiv; member
81 u32 mult = 0, prediv, postdiv, val; in clk_pllclk_recalc() local
100 postdiv = ((val & pll_data->clkod_mask) >> in clk_pllclk_recalc()
103 postdiv = readl(pll_data->pllod); in clk_pllclk_recalc()
104 postdiv = ((postdiv & pll_data->clkod_mask) >> in clk_pllclk_recalc()
107 postdiv = pll_data->postdiv; in clk_pllclk_recalc()
111 rate /= postdiv; in clk_pllclk_recalc()
172 if (of_property_read_u32(node, "fixed-postdiv", &pll_data->postdiv)) { in _of_pll_clk_init()
/linux-5.19.10/drivers/gpu/drm/msm/dsi/phy/
Ddsi_phy_14nm.c602 struct dsi_pll_14nm_postdiv *postdiv = to_pll_14nm_postdiv(hw); in dsi_pll_14nm_postdiv_recalc_rate() local
603 struct dsi_pll_14nm *pll_14nm = postdiv->pll; in dsi_pll_14nm_postdiv_recalc_rate()
605 u8 shift = postdiv->shift; in dsi_pll_14nm_postdiv_recalc_rate()
606 u8 width = postdiv->width; in dsi_pll_14nm_postdiv_recalc_rate()
615 postdiv->flags, width); in dsi_pll_14nm_postdiv_recalc_rate()
622 struct dsi_pll_14nm_postdiv *postdiv = to_pll_14nm_postdiv(hw); in dsi_pll_14nm_postdiv_round_rate() local
623 struct dsi_pll_14nm *pll_14nm = postdiv->pll; in dsi_pll_14nm_postdiv_round_rate()
628 postdiv->width, in dsi_pll_14nm_postdiv_round_rate()
629 postdiv->flags); in dsi_pll_14nm_postdiv_round_rate()
635 struct dsi_pll_14nm_postdiv *postdiv = to_pll_14nm_postdiv(hw); in dsi_pll_14nm_postdiv_set_rate() local
[all …]
/linux-5.19.10/drivers/clk/
Dclk-tps68470.c35 unsigned int postdiv; member
171 regmap_write(clkdata->regmap, TPS68470_REG_POSTDIV, clk_freqs[idx].postdiv); in tps68470_clk_set_rate()
172 regmap_write(clkdata->regmap, TPS68470_REG_POSTDIV2, clk_freqs[idx].postdiv); in tps68470_clk_set_rate()
Dclk-axm5516.c52 unsigned long rate, fbdiv, refdiv, postdiv; in axxia_pllclk_recalc() local
56 postdiv = ((control >> 0) & 0xf) + 1; in axxia_pllclk_recalc()
59 rate = (parent_rate / (refdiv * postdiv)) * fbdiv; in axxia_pllclk_recalc()
/linux-5.19.10/arch/arm/mach-davinci/
Dda850.c359 unsigned int postdiv; member
368 .postdiv = 1,
377 .postdiv = 1,
386 .postdiv = 1,
395 .postdiv = 2,
404 .postdiv = 3,
413 .postdiv = 5,
/linux-5.19.10/Documentation/devicetree/bindings/clock/
Dkeystone-pll.txt20 - fixed-postdiv : fixed post divider value. If absent, use clkod register bits
21 for postdiv
30 fixed-postdiv = <2>;
/linux-5.19.10/drivers/clk/visconti/
Dpll.c59 u32 postdiv, val; in visconti_pll_get_params() local
70 postdiv = readl(pll->pll_base + PLL_POSTDIV_REG); in visconti_pll_get_params()
71 rate_table->postdiv1 = postdiv & PLL_POSTDIV_MASK; in visconti_pll_get_params()
72 rate_table->postdiv2 = (postdiv >> 4) & PLL_POSTDIV_MASK; in visconti_pll_get_params()
/linux-5.19.10/drivers/clk/imx/
Dclk-composite-8m.c52 int *prediv, int *postdiv) in imx8m_clk_composite_compute_dividers() argument
59 *postdiv = 1; in imx8m_clk_composite_compute_dividers()
67 *postdiv = div2; in imx8m_clk_composite_compute_dividers()
/linux-5.19.10/drivers/video/fbdev/
Dgxt4500.c238 int m, n, pdiv1, pdiv2, postdiv; in calc_pll() local
248 postdiv = pdiv1 * pdiv2; in calc_pll()
249 pll_period = DIV_ROUND_UP(period_ps, postdiv); in calc_pll()
257 n = intf * postdiv / period_ps; in calc_pll()
260 t = par->refclk_ps * m * postdiv / n; in calc_pll()
/linux-5.19.10/drivers/clk/microchip/
Dclk-mpfs.c117 u32 mult, ref_div, postdiv; in mpfs_clk_msspll_recalc_rate() local
123 postdiv = readl_relaxed(postdiv_addr) >> MSSPLL_POSTDIV_SHIFT; in mpfs_clk_msspll_recalc_rate()
124 postdiv &= clk_div_mask(MSSPLL_POSTDIV_WIDTH); in mpfs_clk_msspll_recalc_rate()
126 return prate * mult / (ref_div * MSSPLL_FIXED_DIV * postdiv); in mpfs_clk_msspll_recalc_rate()
/linux-5.19.10/drivers/phy/rockchip/
Dphy-rockchip-inno-hdmi.c270 u8 postdiv; member
917 if (cfg->postdiv == 1) { in inno_hdmi_phy_rk3228_power_on()
921 int div = cfg->postdiv / 2 - 1; in inno_hdmi_phy_rk3228_power_on()
1023 if (cfg->postdiv == 1) { in inno_hdmi_phy_rk3328_power_on()
1028 v = (cfg->postdiv / 2) - 1; in inno_hdmi_phy_rk3328_power_on()
/linux-5.19.10/drivers/gpu/drm/amd/pm/powerplay/smumgr/
Dvegam_smumgr.c684 table->SclkFcwRangeTable[i].postdiv = in vegam_get_sclk_range_table()
703 (ref_clk * Range_Table[i].fcw_trans_lower) >> Range_Table[i].postdiv; in vegam_get_sclk_range_table()
705 (ref_clk * Range_Table[i].fcw_trans_upper) >> Range_Table[i].postdiv; in vegam_get_sclk_range_table()
708 table->SclkFcwRangeTable[i].postdiv = Range_Table[i].postdiv; in vegam_get_sclk_range_table()
761 ((clock << table->SclkFcwRangeTable[sclk_setting->PllRange].postdiv) / in vegam_calculate_sclk_params()
763 temp = clock << table->SclkFcwRangeTable[sclk_setting->PllRange].postdiv; in vegam_calculate_sclk_params()
771 ((pcc_target_freq << table->SclkFcwRangeTable[sclk_setting->PllRange].postdiv) / in vegam_calculate_sclk_params()
780 ((ss_target_freq << table->SclkFcwRangeTable[sclk_setting->PllRange].postdiv) / in vegam_calculate_sclk_params()
782 temp = ss_target_freq << table->SclkFcwRangeTable[sclk_setting->PllRange].postdiv; in vegam_calculate_sclk_params()
Dpolaris10_smumgr.c860 table->SclkFcwRangeTable[i].postdiv = range_table_from_vbios.entry[i].ucPostdiv; in polaris10_get_sclk_range_table()
874 …le[i].trans_lower_frequency = (ref_clk * Range_Table[i].fcw_trans_lower) >> Range_Table[i].postdiv; in polaris10_get_sclk_range_table()
875 …le[i].trans_upper_frequency = (ref_clk * Range_Table[i].fcw_trans_upper) >> Range_Table[i].postdiv; in polaris10_get_sclk_range_table()
878 table->SclkFcwRangeTable[i].postdiv = Range_Table[i].postdiv; in polaris10_get_sclk_range_table()
930 …_int = (uint16_t)((clock << table->SclkFcwRangeTable[sclk_setting->PllRange].postdiv) / ref_clock); in polaris10_calculate_sclk_params()
931 temp = clock << table->SclkFcwRangeTable[sclk_setting->PllRange].postdiv; in polaris10_calculate_sclk_params()
938 …nt16_t)((pcc_target_freq << table->SclkFcwRangeTable[sclk_setting->PllRange].postdiv) / ref_clock); in polaris10_calculate_sclk_params()
945 …int16_t)((ss_target_freq << table->SclkFcwRangeTable[sclk_setting->PllRange].postdiv) / ref_clock); in polaris10_calculate_sclk_params()
946 temp = ss_target_freq << table->SclkFcwRangeTable[sclk_setting->PllRange].postdiv; in polaris10_calculate_sclk_params()
/linux-5.19.10/drivers/media/i2c/
Dov2659.c897 u32 prediv, postdiv, mult; in ov2659_pll_calc_params() local
903 postdiv = ctrl1[i].div; in ov2659_pll_calc_params()
910 actual /= postdiv; in ov2659_pll_calc_params()
/linux-5.19.10/drivers/gpu/drm/amd/pm/powerplay/inc/
Dsmu74_discrete.h45 uint8_t postdiv; member
Dsmu75_discrete.h44 uint8_t postdiv; /* divide by 2^n */ member
/linux-5.19.10/drivers/gpu/drm/radeon/
Drv770_dpm.c344 static int rv770_encode_yclk_post_div(u32 postdiv, u32 *encoded_postdiv) in rv770_encode_yclk_post_div() argument
348 switch (postdiv) { in rv770_encode_yclk_post_div()