Home
last modified time | relevance | path

Searched refs:post_div (Results 1 – 25 of 46) sorted by relevance

12

/OK3568_Linux_fs/kernel/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_pll.c83 static void amdgpu_pll_get_fb_ref_div(unsigned nom, unsigned den, unsigned post_div, in amdgpu_pll_get_fb_ref_div() argument
88 ref_div_max = min(128 / post_div, ref_div_max); in amdgpu_pll_get_fb_ref_div()
91 *ref_div = min(max(DIV_ROUND_CLOSEST(den, post_div), 1u), ref_div_max); in amdgpu_pll_get_fb_ref_div()
92 *fb_div = DIV_ROUND_CLOSEST(nom * *ref_div * post_div, den); in amdgpu_pll_get_fb_ref_div()
126 unsigned post_div_min, post_div_max, post_div; in amdgpu_pll_compute() local
154 post_div_min = pll->post_div; in amdgpu_pll_compute()
155 post_div_max = pll->post_div; in amdgpu_pll_compute()
199 for (post_div = post_div_min; post_div <= post_div_max; ++post_div) { in amdgpu_pll_compute()
201 amdgpu_pll_get_fb_ref_div(nom, den, post_div, fb_div_max, in amdgpu_pll_compute()
204 (ref_div * post_div)); in amdgpu_pll_compute()
[all …]
H A Datombios_crtc.c585 u32 post_div, in amdgpu_atombios_crtc_program_pll() argument
612 args.v1.ucPostDiv = post_div; in amdgpu_atombios_crtc_program_pll()
622 args.v2.ucPostDiv = post_div; in amdgpu_atombios_crtc_program_pll()
632 args.v3.ucPostDiv = post_div; in amdgpu_atombios_crtc_program_pll()
649 args.v5.ucPostDiv = post_div; in amdgpu_atombios_crtc_program_pll()
679 args.v6.ucPostDiv = post_div; in amdgpu_atombios_crtc_program_pll()
826 u32 ref_div = 0, fb_div = 0, frac_fb_div = 0, post_div = 0; in amdgpu_atombios_crtc_set_pll() local
852 pll->post_div = amdgpu_crtc->pll_post_div; in amdgpu_atombios_crtc_set_pll()
855 &fb_div, &frac_fb_div, &ref_div, &post_div); in amdgpu_atombios_crtc_set_pll()
862 ref_div, fb_div, frac_fb_div, post_div, in amdgpu_atombios_crtc_set_pll()
H A Damdgpu_atombios.h28 u32 post_div; member
68 u32 post_div; member
H A Dsi.c1560 unsigned post_div = vco_freq / target_freq; in si_uvd_calc_upll_post_div() local
1563 if (post_div < pd_min) in si_uvd_calc_upll_post_div()
1564 post_div = pd_min; in si_uvd_calc_upll_post_div()
1567 if ((vco_freq / post_div) > target_freq) in si_uvd_calc_upll_post_div()
1568 post_div += 1; in si_uvd_calc_upll_post_div()
1571 if (post_div > pd_even && post_div % 2) in si_uvd_calc_upll_post_div()
1572 post_div += 1; in si_uvd_calc_upll_post_div()
1574 return post_div; in si_uvd_calc_upll_post_div()
H A Datombios_crtc.h51 u32 post_div,
/OK3568_Linux_fs/u-boot/drivers/clk/aspeed/
H A Dclk_ast2500.c46 unsigned int post_div; member
58 const ulong post_div = (mpll_reg & SCU_MPLL_POST_MASK) in ast2500_get_mpll_rate() local
61 return (clkin * ((num + 1) / (denum + 1))) / (post_div + 1); in ast2500_get_mpll_rate()
73 const ulong post_div = (hpll_reg & SCU_HPLL_POST_MASK) in ast2500_get_hpll_rate() local
76 return (clkin * ((num + 1) / (denum + 1))) / (post_div + 1); in ast2500_get_hpll_rate()
194 for (it.post_div = 0; it.post_div <= max_vals.post_div; in ast2500_calc_clock_config()
195 ++it.post_div) { in ast2500_calc_clock_config()
196 it.num = (rate_khz * (it.post_div + 1) / input_rate_khz) in ast2500_calc_clock_config()
203 / (it.post_div + 1); in ast2500_calc_clock_config()
228 .post_div = (SCU_MPLL_POST_MASK >> SCU_MPLL_POST_SHIFT), in ast2500_configure_ddr()
[all …]
/OK3568_Linux_fs/kernel/drivers/gpu/drm/radeon/
H A Dradeon_clocks.c43 uint32_t fb_div, ref_div, post_div, sclk; in radeon_legacy_get_engine_clock() local
58 post_div = RREG32_PLL(RADEON_SCLK_CNTL) & RADEON_SCLK_SRC_SEL_MASK; in radeon_legacy_get_engine_clock()
59 if (post_div == 2) in radeon_legacy_get_engine_clock()
61 else if (post_div == 3) in radeon_legacy_get_engine_clock()
63 else if (post_div == 4) in radeon_legacy_get_engine_clock()
73 uint32_t fb_div, ref_div, post_div, mclk; in radeon_legacy_get_memory_clock() local
88 post_div = RREG32_PLL(RADEON_MCLK_CNTL) & 0x7; in radeon_legacy_get_memory_clock()
89 if (post_div == 2) in radeon_legacy_get_memory_clock()
91 else if (post_div == 3) in radeon_legacy_get_memory_clock()
93 else if (post_div == 4) in radeon_legacy_get_memory_clock()
[all …]
H A Dradeon_display.c927 static void avivo_get_fb_ref_div(unsigned nom, unsigned den, unsigned post_div, in avivo_get_fb_ref_div() argument
932 ref_div_max = max(min(100 / post_div, ref_div_max), 1u); in avivo_get_fb_ref_div()
935 *ref_div = min(max(den/post_div, 1u), ref_div_max); in avivo_get_fb_ref_div()
936 *fb_div = DIV_ROUND_CLOSEST(nom * *ref_div * post_div, den); in avivo_get_fb_ref_div()
970 unsigned post_div_min, post_div_max, post_div; in radeon_compute_pll_avivo() local
1001 post_div_min = pll->post_div; in radeon_compute_pll_avivo()
1002 post_div_max = pll->post_div; in radeon_compute_pll_avivo()
1046 for (post_div = post_div_min; post_div <= post_div_max; ++post_div) { in radeon_compute_pll_avivo()
1048 avivo_get_fb_ref_div(nom, den, post_div, fb_div_max, in radeon_compute_pll_avivo()
1051 (ref_div * post_div)); in radeon_compute_pll_avivo()
[all …]
H A Dradeon_legacy_tv.c856 int post_div; in get_post_div() local
858 case 1: post_div = 0; break; in get_post_div()
859 case 2: post_div = 1; break; in get_post_div()
860 case 3: post_div = 4; break; in get_post_div()
861 case 4: post_div = 2; break; in get_post_div()
862 case 6: post_div = 6; break; in get_post_div()
863 case 8: post_div = 3; break; in get_post_div()
864 case 12: post_div = 7; break; in get_post_div()
866 default: post_div = 5; break; in get_post_div()
868 return post_div; in get_post_div()
H A Drv730_dpm.c64 post_divider = ((dividers.post_div >> 4) & 0xf) + in rv730_populate_sclk_value()
65 (dividers.post_div & 0xf) + 2; in rv730_populate_sclk_value()
80 spll_func_cntl |= SPLL_HILEN((dividers.post_div >> 4) & 0xf); in rv730_populate_sclk_value()
81 spll_func_cntl |= SPLL_LOLEN(dividers.post_div & 0xf); in rv730_populate_sclk_value()
142 post_divider = ((dividers.post_div >> 4) & 0xf) + in rv730_populate_mclk_value()
143 (dividers.post_div & 0xf) + 2; in rv730_populate_mclk_value()
155 mpll_func_cntl |= MPLL_HILEN((dividers.post_div >> 4) & 0xf); in rv730_populate_mclk_value()
156 mpll_func_cntl |= MPLL_LOLEN(dividers.post_div & 0xf); in rv730_populate_mclk_value()
H A Drv740_dpm.c143 tmp = (u64) engine_clock * reference_divider * dividers.post_div * 16384; in rv740_populate_sclk_value()
149 spll_func_cntl |= SPLL_PDIV_A(dividers.post_div); in rv740_populate_sclk_value()
160 u32 vco_freq = engine_clock * dividers.post_div; in rv740_populate_sclk_value()
217 mpll_ad_func_cntl |= YCLK_POST_DIV(dividers.post_div); in rv740_populate_mclk_value()
234 mpll_dq_func_cntl |= YCLK_POST_DIV(dividers.post_div); in rv740_populate_mclk_value()
247 u32 vco_freq = memory_clock * dividers.post_div; in rv740_populate_mclk_value()
H A Dradeon_uvd.c922 unsigned post_div = vco_freq / target_freq; in radeon_uvd_calc_upll_post_div() local
925 if (post_div < pd_min) in radeon_uvd_calc_upll_post_div()
926 post_div = pd_min; in radeon_uvd_calc_upll_post_div()
929 if ((vco_freq / post_div) > target_freq) in radeon_uvd_calc_upll_post_div()
930 post_div += 1; in radeon_uvd_calc_upll_post_div()
933 if (post_div > pd_even && post_div % 2) in radeon_uvd_calc_upll_post_div()
934 post_div += 1; in radeon_uvd_calc_upll_post_div()
936 return post_div; in radeon_uvd_calc_upll_post_div()
H A Dradeon_legacy_crtc.c756 } *post_div, post_divs[] = { in radeon_set_pll() local
822 for (post_div = &post_divs[0]; post_div->divider; ++post_div) { in radeon_set_pll()
823 if (post_div->divider == post_divider) in radeon_set_pll()
827 if (!post_div->divider) in radeon_set_pll()
828 post_div = &post_divs[0]; in radeon_set_pll()
843 pll_fb_post_div = (feedback_div | (post_div->bitvalue << 16)); in radeon_set_pll()
H A Drs780_dpm.c89 r600_engine_clock_entry_set_post_divider(rdev, 0, dividers.post_div); in rs780_initialize_dpm_power_state()
455 (min_dividers.post_div != max_dividers.post_div) || in rs780_set_engine_clock_scaling()
457 (max_dividers.post_div != current_max_dividers.post_div)) in rs780_set_engine_clock_scaling()
990 u32 post_div = ((func_cntl & SPLL_SW_HILEN_MASK) >> SPLL_SW_HILEN_SHIFT) + 1 + in rs780_dpm_debugfs_print_current_performance_level() local
993 (post_div * ref_div); in rs780_dpm_debugfs_print_current_performance_level()
1012 u32 post_div = ((func_cntl & SPLL_SW_HILEN_MASK) >> SPLL_SW_HILEN_SHIFT) + 1 + in rs780_dpm_get_current_sclk() local
1015 (post_div * ref_div); in rs780_dpm_get_current_sclk()
H A Datombios_crtc.c831 u32 post_div, in atombios_crtc_program_pll() argument
858 args.v1.ucPostDiv = post_div; in atombios_crtc_program_pll()
868 args.v2.ucPostDiv = post_div; in atombios_crtc_program_pll()
878 args.v3.ucPostDiv = post_div; in atombios_crtc_program_pll()
895 args.v5.ucPostDiv = post_div; in atombios_crtc_program_pll()
924 args.v6.ucPostDiv = post_div; in atombios_crtc_program_pll()
1071 u32 ref_div = 0, fb_div = 0, frac_fb_div = 0, post_div = 0; in atombios_crtc_set_pll() local
1098 pll->post_div = radeon_crtc->pll_post_div; in atombios_crtc_set_pll()
1103 &fb_div, &frac_fb_div, &ref_div, &post_div); in atombios_crtc_set_pll()
1106 &fb_div, &frac_fb_div, &ref_div, &post_div); in atombios_crtc_set_pll()
[all …]
/OK3568_Linux_fs/u-boot/drivers/spi/
H A Dmxc_spi.c136 u32 pre_div = 0, post_div = 0; in spi_cfg_mxc() local
154 post_div = fls(pre_div); in spi_cfg_mxc()
155 if (post_div > 4) { in spi_cfg_mxc()
156 post_div -= 4; in spi_cfg_mxc()
157 if (post_div >= 16) { in spi_cfg_mxc()
162 pre_div >>= post_div; in spi_cfg_mxc()
164 post_div = 0; in spi_cfg_mxc()
168 debug("pre_div = %d, post_div=%d\n", pre_div, post_div); in spi_cfg_mxc()
174 MXC_CSPICTRL_POSTDIV(post_div); in spi_cfg_mxc()
/OK3568_Linux_fs/u-boot/arch/arm/mach-davinci/
H A Dcpu.c59 int post_div; in clk_get() local
89 post_div = (readl(pll_base + PLLC_POSTDIV) & in clk_get()
92 pll_out /= post_div; in clk_get()
/OK3568_Linux_fs/u-boot/arch/arm/mach-imx/mx6/
H A Dclock.c553 u32 post_div) in enable_pll_video() argument
569 switch (post_div) { in enable_pll_video()
627 u32 pll_div, pll_num, pll_denom, post_div = 1; in mxs_set_lcdclk() local
664 for (post_div = 2; post_div <= 4; post_div <<= 1) { in mxs_set_lcdclk()
665 if ((temp * post_div) > min) { in mxs_set_lcdclk()
666 freq *= post_div; in mxs_set_lcdclk()
671 if (post_div > 4) { in mxs_set_lcdclk()
711 if (enable_pll_video(pll_div, pll_num, pll_denom, post_div)) in mxs_set_lcdclk()
748 if (enable_pll_video(pll_div, pll_num, pll_denom, post_div)) in mxs_set_lcdclk()
/OK3568_Linux_fs/u-boot/arch/arm/mach-imx/mx7/
H A Dclock.c475 enum root_post_div post_div; in get_ddrc_clk() local
485 post_div = reg & DRAM_CLK_ROOT_POST_DIV_MASK; in get_ddrc_clk()
487 return freq / (post_div + 1) / 2; in get_ddrc_clk()
777 u32 post_div) in enable_pll_video() argument
795 switch (post_div) { in enable_pll_video()
899 u32 pll_div, pll_num, pll_denom, post_div = 0; in mxs_set_lcdclk() local
910 post_div = i; in mxs_set_lcdclk()
947 if (enable_pll_video(pll_div, pll_num, pll_denom, post_div)) in mxs_set_lcdclk()
H A Dclock_slice.c673 enum root_post_div post_div, enum clk_root_src clock_src) in clock_root_cfg() argument
699 if (post_div > CLK_ROOT_POST_DIV7) { in clock_root_cfg()
706 if (post_div != CLK_ROOT_POST_DIV1) { in clock_root_cfg()
717 post_div << CLK_ROOT_POST_DIV_SHIFT | in clock_root_cfg()
/OK3568_Linux_fs/kernel/drivers/clk/
H A Dclk-stm32f4.c1760 const struct stm32f4_pll_post_div_data *post_div; in stm32f4_rcc_init() local
1763 post_div = &post_div_data[n]; in stm32f4_rcc_init()
1765 hw = clk_register_pll_div(post_div->name, in stm32f4_rcc_init()
1766 post_div->parent, in stm32f4_rcc_init()
1767 post_div->flag, in stm32f4_rcc_init()
1768 base + post_div->offset, in stm32f4_rcc_init()
1769 post_div->shift, in stm32f4_rcc_init()
1770 post_div->width, in stm32f4_rcc_init()
1771 post_div->flag_div, in stm32f4_rcc_init()
1772 post_div->div_table, in stm32f4_rcc_init()
[all …]
/OK3568_Linux_fs/kernel/drivers/gpu/drm/nouveau/nvkm/subdev/clk/
H A Dmcp77.c55 u32 post_div = 0; in read_pll() local
61 post_div = 1 << ((nvkm_rd32(device, 0x4070) & 0x000f0000) >> 16); in read_pll()
64 post_div = (nvkm_rd32(device, 0x4040) & 0x000f0000) >> 16; in read_pll()
74 clock = clock / post_div; in read_pll()
/OK3568_Linux_fs/kernel/drivers/video/fbdev/aty/
H A Dradeon_base.c1526 } *post_div, in radeon_calc_pll_regs() local
1595 for (post_div = &post_divs[0]; post_div->divider; ++post_div) { in radeon_calc_pll_regs()
1596 pll_output_freq = post_div->divider * freq; in radeon_calc_pll_regs()
1600 if (uses_dvo && (post_div->divider & 1)) in radeon_calc_pll_regs()
1609 if ( !post_div->divider ) { in radeon_calc_pll_regs()
1610 post_div = &post_divs[post_div->bitvalue]; in radeon_calc_pll_regs()
1611 pll_output_freq = post_div->divider * freq; in radeon_calc_pll_regs()
1619 if ( !post_div->divider ) { in radeon_calc_pll_regs()
1620 post_div = &post_divs[post_div->bitvalue]; in radeon_calc_pll_regs()
1621 pll_output_freq = post_div->divider * freq; in radeon_calc_pll_regs()
[all …]
/OK3568_Linux_fs/u-boot/board/gdsys/common/
H A Dosd.c81 unsigned int *post_div, unsigned int *feedback_div) in mpc92469ac_calc_parameters() argument
83 unsigned int n = *post_div; in mpc92469ac_calc_parameters()
101 *post_div = n; in mpc92469ac_calc_parameters()
/OK3568_Linux_fs/u-boot/arch/arm/include/asm/arch-mx7/
H A Dclock_slice.h112 enum root_post_div post_div, enum clk_root_src clock_src);

12