| /linux-6.15/drivers/cpufreq/ |
| H A D | tegra186-cpufreq.c | 110 u32 ndiv; in tegra186_cpufreq_get() local 117 ndiv = readl(data->regs + edvd_offset) & EDVD_CORE_VOLT_FREQ_F_MASK; in tegra186_cpufreq_get() 122 return (cluster->ref_clk_khz * ndiv) / cluster->div; in tegra186_cpufreq_get() 174 u16 ndiv = data->ndiv[i]; in init_vhint_table() local 176 if (ndiv < data->ndiv_min || ndiv > data->ndiv_max) in init_vhint_table() 180 if (i > 0 && ndiv == data->ndiv[i - 1]) in init_vhint_table() 198 u16 ndiv = data->ndiv[i]; in init_vhint_table() local 201 if (ndiv < data->ndiv_min || ndiv > data->ndiv_max) in init_vhint_table() 205 if (i > 0 && ndiv == data->ndiv[i - 1]) in init_vhint_table() 209 edvd_val |= ndiv << EDVD_CORE_VOLT_FREQ_F_SHIFT; in init_vhint_table() [all …]
|
| H A D | tegra194-cpufreq.c | 139 writel(ndiv, data->cpu_data[cpu].freq_core_reg); in tegra234_set_cpu_ndiv() 238 *nltbl, u16 ndiv) in map_ndiv_to_freq() argument 359 static void tegra194_get_cpu_ndiv_sysreg(void *ndiv) in tegra194_get_cpu_ndiv_sysreg() argument 365 *(u64 *)ndiv = ndiv_val; in tegra194_get_cpu_ndiv_sysreg() 391 u64 ndiv; in tegra194_get_speed() local 409 if (pos->driver_data != ndiv) in tegra194_get_speed() 619 unsigned int num_freqs, ndiv, delta_ndiv; in tegra_cpufreq_bpmp_read_lut() local 671 for (index = 0, ndiv = resp.ndiv_min; in tegra_cpufreq_bpmp_read_lut() 672 ndiv < resp.ndiv_max; in tegra_cpufreq_bpmp_read_lut() 673 index++, ndiv += freq_table_step_size) { in tegra_cpufreq_bpmp_read_lut() [all …]
|
| H A D | brcmstb-avs-cpufreq.c | 342 unsigned int *ndiv) in brcm_avs_parse_p1() argument 346 *ndiv = (p1 >> NDIV_INT_SHIFT) & NDIV_INT_MASK; in brcm_avs_parse_p1() 688 unsigned int ndiv, pdiv; in show_brcm_avs_pmap() local 694 brcm_avs_parse_p1(pmap.p1, &mdiv_p0, &pdiv, &ndiv); in show_brcm_avs_pmap() 698 pmap.p1, pmap.p2, ndiv, pdiv, mdiv_p0, mdiv_p1, mdiv_p2, in show_brcm_avs_pmap()
|
| /linux-6.15/drivers/clk/st/ |
| H A D | clkgen-pll.c | 46 struct clkgen_field ndiv; member 211 u32 ndiv; member 220 unsigned long ndiv; member 350 pll->ndiv = n; in clk_pll3200c32_get_params() 386 ndiv = CLKGEN_READ(pll, ndiv); in recalc_stm_pll3200c32() 441 pll->ndiv = params.ndiv; in set_rate_stm_pll3200c32() 450 CLKGEN_WRITE(pll, ndiv, pll->ndiv); in set_rate_stm_pll3200c32() 509 pll->ndiv = n; in clk_pll4600c28_get_params() 542 params.ndiv = CLKGEN_READ(pll, ndiv); in recalc_stm_pll4600c28() 600 pll->ndiv = params.ndiv; in set_rate_stm_pll4600c28() [all …]
|
| H A D | clkgen-fsyn.c | 34 unsigned long ndiv; member 49 struct clkgen_field ndiv; member 110 .ndiv = CLKGEN_FIELD(0x2f4, 0x7, 16), 146 .ndiv = CLKGEN_FIELD(0x2a4, 0x7, 16), 247 u32 ndiv; member 273 CLKGEN_WRITE(pll, ndiv, pll->ndiv); in quadfs_pll_enable() 339 params.ndiv = CLKGEN_READ(pll, ndiv); in quadfs_pll_fs660c32_recalc_rate() 344 pll->ndiv = params.ndiv; in quadfs_pll_fs660c32_recalc_rate() 391 rate, (unsigned int)params.ndiv); in quadfs_pll_fs660c32_round_rate() 421 pll->ndiv = params.ndiv; in quadfs_pll_fs660c32_set_rate() [all …]
|
| /linux-6.15/drivers/gpu/drm/stm/ |
| H A D | dw_mipi_dsi-stm.c | 145 return DIV_ROUND_CLOSEST(clkin_khz * ndiv, divisor); in dsi_pll_get_clkout_khz() 150 int *idf, int *ndiv, int *odf) in dsi_pll_get_params() argument 191 *ndiv = n; in dsi_pll_get_params() 256 unsigned int idf, ndiv, odf, pll_in_khz, pll_out_khz; in dw_mipi_dsi_clk_recalc_rate() local 268 ndiv = (val & WRPCR_NDIV) >> 2; in dw_mipi_dsi_clk_recalc_rate() 281 unsigned int idf, ndiv, odf, pll_in_khz, pll_out_khz; in dw_mipi_dsi_clk_round_rate() local 290 ndiv = 0; in dw_mipi_dsi_clk_round_rate() 294 &idf, &ndiv, &odf); in dw_mipi_dsi_clk_round_rate() 308 unsigned int idf, ndiv, odf, pll_in_khz, pll_out_khz; in dw_mipi_dsi_clk_set_rate() local 318 ndiv = 0; in dw_mipi_dsi_clk_set_rate() [all …]
|
| H A D | lvds.c | 390 int divisor = ndiv * bdiv; in pll_get_clkout_khz() 431 *ndiv = i; in lvds_pll_get_params() 447 unsigned int pll_in_khz, bdiv = 0, mdiv = 0, ndiv = 0; in lvds_pll_config() local 502 &bdiv, &mdiv, &ndiv); in lvds_pll_config() 505 lvds_write(lvds, phy->base + phy->ofs.PLLCR2, ndiv << 16); in lvds_pll_config() 638 unsigned int pll_in_khz, bdiv, mdiv, ndiv; in lvds_pixel_clk_recalc_rate() local 655 ndiv = (val & PHY_PLLCR2_NDIV) >> 16; in lvds_pixel_clk_recalc_rate() 667 &bdiv, &mdiv, &ndiv); in lvds_pixel_clk_recalc_rate() 670 pll_out_khz = pll_get_clkout_khz(pll_in_khz, bdiv, mdiv, ndiv); in lvds_pixel_clk_recalc_rate() 672 ndiv, bdiv, mdiv, pll_out_khz); in lvds_pixel_clk_recalc_rate() [all …]
|
| /linux-6.15/drivers/media/dvb-frontends/ |
| H A D | stv0910.c | 797 if (ndiv >= 7 && ndiv <= 71) in set_mclock() 799 else if (ndiv >= 72 && ndiv <= 79) in set_mclock() 801 else if (ndiv >= 80 && ndiv <= 87) in set_mclock() 803 else if (ndiv >= 88 && ndiv <= 95) in set_mclock() 805 else if (ndiv >= 96 && ndiv <= 103) in set_mclock() 807 else if (ndiv >= 104 && ndiv <= 111) in set_mclock() 809 else if (ndiv >= 112 && ndiv <= 119) in set_mclock() 811 else if (ndiv >= 120 && ndiv <= 127) in set_mclock() 813 else if (ndiv >= 128 && ndiv <= 135) in set_mclock() 815 else if (ndiv >= 136 && ndiv <= 143) in set_mclock() [all …]
|
| H A D | cx24123.c | 506 u32 ndiv = 0, adiv = 0, vco_div = 0; in cx24123_pll_calculate() local 556 ndiv = (((p->frequency * vco_div * 10) / in cx24123_pll_calculate() 561 if (adiv == 0 && ndiv > 0) in cx24123_pll_calculate() 562 ndiv--; in cx24123_pll_calculate() 567 (pump << 14) | (ndiv << 5) | adiv; in cx24123_pll_calculate()
|
| /linux-6.15/drivers/clk/bcm/ |
| H A D | clk-iproc-armpll.c | 144 unsigned int ndiv_int, ndiv_frac, ndiv; in __get_ndiv() local 170 ndiv = (ndiv_int << 20) | ndiv_frac; in __get_ndiv() 172 return ndiv; in __get_ndiv() 191 u64 ndiv; in iproc_arm_pll_recalc_rate() local 213 ndiv = __get_ndiv(pll); in iproc_arm_pll_recalc_rate() 219 pll->rate = (ndiv * parent_rate) >> 20; in iproc_arm_pll_recalc_rate() 225 (unsigned int)(ndiv >> 20), pdiv, mdiv); in iproc_arm_pll_recalc_rate()
|
| H A D | clk-bcm2835.c | 549 u32 *ndiv, u32 *fdiv) in bcm2835_pll_choose_ndiv_and_fdiv() argument 556 *ndiv = div >> A2W_PLL_FRAC_BITS; in bcm2835_pll_choose_ndiv_and_fdiv() 561 u32 ndiv, u32 fdiv, u32 pdiv) in bcm2835_pll_rate_from_divisors() argument 568 rate = (u64)parent_rate * ((ndiv << A2W_PLL_FRAC_BITS) + fdiv); in bcm2835_pll_rate_from_divisors() 578 u32 ndiv, fdiv; in bcm2835_pll_round_rate() local 582 bcm2835_pll_choose_ndiv_and_fdiv(rate, *parent_rate, &ndiv, &fdiv); in bcm2835_pll_round_rate() 594 u32 ndiv, pdiv, fdiv; in bcm2835_pll_get_rate() local 607 ndiv *= 2; in bcm2835_pll_get_rate() 689 u32 ndiv, fdiv, a2w_ctl; in bcm2835_pll_set_rate() local 700 bcm2835_pll_choose_ndiv_and_fdiv(rate, parent_rate, &ndiv, &fdiv); in bcm2835_pll_set_rate() [all …]
|
| H A D | clk-iproc-pll.c | 454 u64 ndiv, ndiv_int, ndiv_frac; in iproc_pll_recalc_rate() local 474 ndiv = ndiv_int << 20; in iproc_pll_recalc_rate() 480 ndiv += ndiv_frac; in iproc_pll_recalc_rate() 486 rate = (ndiv * parent_rate) >> 20; in iproc_pll_recalc_rate()
|
| /linux-6.15/drivers/phy/st/ |
| H A D | phy-stm32-usbphyc.c | 132 u8 ndiv; member 207 unsigned long long fvco, ndiv, frac; in stm32_usbphyc_get_pll_params() local 221 ndiv = fvco; in stm32_usbphyc_get_pll_params() 222 do_div(ndiv, (clk_rate * 2)); in stm32_usbphyc_get_pll_params() 223 pll_params->ndiv = (u8)ndiv; in stm32_usbphyc_get_pll_params() 227 frac = frac - (ndiv * (1 << 16)); in stm32_usbphyc_get_pll_params() 235 u32 ndiv, frac; in stm32_usbphyc_pll_init() local 246 ndiv = FIELD_PREP(PLLNDIV, pll_params.ndiv); in stm32_usbphyc_pll_init() 249 usbphyc_pll = PLLDITHEN1 | PLLDITHEN0 | PLLSTRBYP | ndiv; in stm32_usbphyc_pll_init()
|
| /linux-6.15/drivers/bcma/ |
| H A D | driver_chipcommon_pmu.c | 355 u32 tmp, div, ndiv, p1, p2, fc; in bcma_pmu_pll_clock() local 379 ndiv = (tmp & BCMA_CC_PPL_NDIV_MASK) >> BCMA_CC_PPL_NDIV_SHIFT; in bcma_pmu_pll_clock() 383 fc = (p1 * ndiv * fc) / p2; in bcma_pmu_pll_clock() 391 u32 tmp, ndiv, p1div, p2div; in bcma_pmu_pll_clock_bcm4706() local 398 ndiv = (tmp & BCMA_CC_PMU6_4706_PROC_NDIV_INT_MASK) in bcma_pmu_pll_clock_bcm4706() 408 clock = (25000000 / 4) * ndiv * p2div / p1div; in bcma_pmu_pll_clock_bcm4706() 411 clock = (25000000 / 2) * ndiv * p2div / p1div; in bcma_pmu_pll_clock_bcm4706()
|
| /linux-6.15/drivers/media/tuners/ |
| H A D | tda18250.c | 429 u8 *ndiv, u8 *icp) in tda18250_pll_calc() argument 452 *ndiv = 0; in tda18250_pll_calc() 458 *ndiv = 1; in tda18250_pll_calc() 464 *ndiv = 0; in tda18250_pll_calc() 468 *ndiv = 0; in tda18250_pll_calc() 472 *ndiv = 1; in tda18250_pll_calc() 478 *ndiv = 0; in tda18250_pll_calc() 487 lopd, scale, fvco, *rdiv, *ndiv, *icp); in tda18250_pll_calc()
|
| /linux-6.15/arch/mips/bcm63xx/ |
| H A D | cpu.c | 227 unsigned int tmp, p1, p2, ndiv, m1; in detect_cpu_clock() local 238 ndiv = (tmp & DMIPSPLLCFG_6368_NDIV_MASK) >> in detect_cpu_clock() 245 return (((64 * 1000000) / p1) * p2 * ndiv) / m1; in detect_cpu_clock()
|
| /linux-6.15/drivers/net/wireless/ath/ath9k/ |
| H A D | ar9002_phy.c | 69 u32 freq, ndiv, channelSel = 0, channelFrac = 0, reg32 = 0; in ar9002_hw_set_channel() local 142 ndiv = (freq * (refDivA >> aModeRefSel)) / 60; in ar9002_hw_set_channel() 143 channelSel = ndiv & 0x1ff; in ar9002_hw_set_channel() 144 channelFrac = (ndiv & 0xfffffe00) * 2; in ar9002_hw_set_channel()
|
| /linux-6.15/drivers/i2c/busses/ |
| H A D | i2c-octeon-core.c | 679 unsigned int thp, mdiv_min, mdiv = 2, ndiv = 0, ds = 10; in octeon_i2c_set_clock() local 735 ndiv = ndiv_idx; in octeon_i2c_set_clock() 741 octeon_i2c_reg_write(i2c, SW_TWSI_EOP_TWSI_CLKCTL, (mdiv << 3) | ndiv); in octeon_i2c_set_clock()
|
| /linux-6.15/drivers/clk/ |
| H A D | clk-ep93xx.c | 305 int pdiv, div, npdiv, ndiv; in ep93xx_ddiv_set_rate() local 320 ndiv = div; in ep93xx_ddiv_set_rate() 335 val |= (npdiv << EP93XX_SYSCON_CLKDIV_PDIV_SHIFT) | ndiv; in ep93xx_ddiv_set_rate()
|
| H A D | clk-stm32f4.c | 691 unsigned int ndiv) in stm32f4_pll_set_ssc() argument 704 incstep = DIV_ROUND_CLOSEST(((1 << 15) - 1) * ssc->mod_depth * ndiv, in stm32f4_pll_set_ssc()
|
| /linux-6.15/drivers/video/fbdev/savage/ |
| H A D | savagefb_driver.c | 418 unsigned int *ndiv, unsigned int *r) in SavageCalcClock() argument 457 *ndiv = best_n1 - 2; in SavageCalcClock() 465 unsigned char *ndiv) in common_calc_clock() argument 496 *ndiv = (best_n1 - 2) | (best_n2 << 6); in common_calc_clock() 498 *ndiv = (best_n1 - 2) | (best_n2 << 5); in common_calc_clock()
|
| /linux-6.15/include/soc/tegra/ |
| H A D | bpmp-abi.h | 1982 uint16_t ndiv[80]; member
|