/linux/drivers/cpufreq/ |
A D | tegra186-cpufreq.c | 103 u32 ndiv; in tegra186_cpufreq_get() local 110 ndiv = readl(data->regs + edvd_offset) & EDVD_CORE_VOLT_FREQ_F_MASK; in tegra186_cpufreq_get() 115 return (cluster->ref_clk_khz * ndiv) / cluster->div; in tegra186_cpufreq_get() 168 u16 ndiv = data->ndiv[i]; in init_vhint_table() local 170 if (ndiv < data->ndiv_min || ndiv > data->ndiv_max) in init_vhint_table() 174 if (i > 0 && ndiv == data->ndiv[i - 1]) in init_vhint_table() 192 u16 ndiv = data->ndiv[i]; in init_vhint_table() local 195 if (ndiv < data->ndiv_min || ndiv > data->ndiv_max) in init_vhint_table() 199 if (i > 0 && ndiv == data->ndiv[i - 1]) in init_vhint_table() 203 edvd_val |= ndiv << EDVD_CORE_VOLT_FREQ_F_SHIFT; in init_vhint_table() [all …]
|
A D | tegra194-cpufreq.c | 83 *nltbl, u16 ndiv) in map_ndiv_to_freq() argument 180 static void get_cpu_ndiv(void *ndiv) in get_cpu_ndiv() argument 186 *(u64 *)ndiv = ndiv_val; in get_cpu_ndiv() 202 u64 ndiv; in tegra194_get_speed() local 223 if (pos->driver_data != ndiv) in tegra194_get_speed() 228 cpu, rate, pos->frequency, ndiv); in tegra194_get_speed() 294 unsigned int num_freqs, ndiv, delta_ndiv; in init_freq_table() local 346 for (index = 0, ndiv = resp.ndiv_min; in init_freq_table() 347 ndiv < resp.ndiv_max; in init_freq_table() 348 index++, ndiv += freq_table_step_size) { in init_freq_table() [all …]
|
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() 679 unsigned int ndiv, pdiv; in show_brcm_avs_pmap() local 685 brcm_avs_parse_p1(pmap.p1, &mdiv_p0, &pdiv, &ndiv); in show_brcm_avs_pmap() 689 pmap.p1, pmap.p2, ndiv, pdiv, mdiv_p0, mdiv_p1, mdiv_p2, in show_brcm_avs_pmap()
|
/linux/drivers/clk/st/ |
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 …]
|
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/drivers/media/dvb-frontends/ |
A D | stv0910.c | 802 if (ndiv >= 7 && ndiv <= 71) in set_mclock() 804 else if (ndiv >= 72 && ndiv <= 79) in set_mclock() 806 else if (ndiv >= 80 && ndiv <= 87) in set_mclock() 808 else if (ndiv >= 88 && ndiv <= 95) in set_mclock() 810 else if (ndiv >= 96 && ndiv <= 103) in set_mclock() 812 else if (ndiv >= 104 && ndiv <= 111) in set_mclock() 814 else if (ndiv >= 112 && ndiv <= 119) in set_mclock() 816 else if (ndiv >= 120 && ndiv <= 127) in set_mclock() 818 else if (ndiv >= 128 && ndiv <= 135) in set_mclock() 820 else if (ndiv >= 136 && ndiv <= 143) in set_mclock() [all …]
|
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/drivers/clk/bcm/ |
A D | clk-iproc-armpll.c | 154 unsigned int ndiv_int, ndiv_frac, ndiv; in __get_ndiv() local 180 ndiv = (ndiv_int << 20) | ndiv_frac; in __get_ndiv() 182 return ndiv; in __get_ndiv() 201 u64 ndiv; in iproc_arm_pll_recalc_rate() local 223 ndiv = __get_ndiv(pll); in iproc_arm_pll_recalc_rate() 229 pll->rate = (ndiv * parent_rate) >> 20; in iproc_arm_pll_recalc_rate() 235 (unsigned int)(ndiv >> 20), pdiv, mdiv); in iproc_arm_pll_recalc_rate()
|
A D | clk-bcm2835.c | 546 u32 *ndiv, u32 *fdiv) in bcm2835_pll_choose_ndiv_and_fdiv() argument 553 *ndiv = div >> A2W_PLL_FRAC_BITS; in bcm2835_pll_choose_ndiv_and_fdiv() 558 u32 ndiv, u32 fdiv, u32 pdiv) in bcm2835_pll_rate_from_divisors() argument 565 rate = (u64)parent_rate * ((ndiv << A2W_PLL_FRAC_BITS) + fdiv); in bcm2835_pll_rate_from_divisors() 575 u32 ndiv, fdiv; in bcm2835_pll_round_rate() local 579 bcm2835_pll_choose_ndiv_and_fdiv(rate, *parent_rate, &ndiv, &fdiv); in bcm2835_pll_round_rate() 591 u32 ndiv, pdiv, fdiv; in bcm2835_pll_get_rate() local 604 ndiv *= 2; in bcm2835_pll_get_rate() 686 u32 ndiv, fdiv, a2w_ctl; in bcm2835_pll_set_rate() local 697 bcm2835_pll_choose_ndiv_and_fdiv(rate, parent_rate, &ndiv, &fdiv); in bcm2835_pll_set_rate() [all …]
|
A D | clk-iproc-pll.c | 464 u64 ndiv, ndiv_int, ndiv_frac; in iproc_pll_recalc_rate() local 484 ndiv = ndiv_int << 20; in iproc_pll_recalc_rate() 490 ndiv += ndiv_frac; in iproc_pll_recalc_rate() 496 rate = (ndiv * parent_rate) >> 20; in iproc_pll_recalc_rate()
|
/linux/drivers/gpu/drm/stm/ |
A D | dw_mipi_dsi-stm.c | 130 static int dsi_pll_get_clkout_khz(int clkin_khz, int idf, int ndiv, int odf) in dsi_pll_get_clkout_khz() argument 138 return DIV_ROUND_CLOSEST(clkin_khz * ndiv, divisor); in dsi_pll_get_clkout_khz() 143 int *idf, int *ndiv, int *odf) in dsi_pll_get_params() argument 184 *ndiv = n; in dsi_pll_get_params() 246 unsigned int idf, ndiv, odf, pll_in_khz, pll_out_khz; in dw_mipi_dsi_get_lane_mbps() local 279 ndiv = 0; in dw_mipi_dsi_get_lane_mbps() 282 &idf, &ndiv, &odf); in dw_mipi_dsi_get_lane_mbps() 287 pll_out_khz = dsi_pll_get_clkout_khz(pll_in_khz, idf, ndiv, odf); in dw_mipi_dsi_get_lane_mbps() 291 (ndiv << 2) | (idf << 11) | ((ffs(odf) - 1) << 16)); in dw_mipi_dsi_get_lane_mbps()
|
/linux/drivers/phy/st/ |
A D | phy-stm32-usbphyc.c | 131 u8 ndiv; member 206 unsigned long long fvco, ndiv, frac; in stm32_usbphyc_get_pll_params() local 220 ndiv = fvco; in stm32_usbphyc_get_pll_params() 221 do_div(ndiv, (clk_rate * 2)); in stm32_usbphyc_get_pll_params() 222 pll_params->ndiv = (u8)ndiv; in stm32_usbphyc_get_pll_params() 226 frac = frac - (ndiv * (1 << 16)); in stm32_usbphyc_get_pll_params() 234 u32 ndiv, frac; in stm32_usbphyc_pll_init() local 245 ndiv = FIELD_PREP(PLLNDIV, pll_params.ndiv); in stm32_usbphyc_pll_init() 248 usbphyc_pll = PLLDITHEN1 | PLLDITHEN0 | PLLSTRBYP | ndiv; in stm32_usbphyc_pll_init()
|
/linux/drivers/bcma/ |
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/drivers/media/tuners/ |
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/arch/mips/bcm63xx/ |
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/drivers/net/wireless/ath/ath9k/ |
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/drivers/i2c/busses/ |
A D | i2c-octeon-core.c | 661 int thp = 0x18, mdiv = 2, ndiv = 0, delta_hz = 1000000; in octeon_i2c_set_clock() local 690 ndiv = ndiv_idx; in octeon_i2c_set_clock() 696 octeon_i2c_reg_write(i2c, SW_TWSI_EOP_TWSI_CLKCTL, (mdiv << 3) | ndiv); in octeon_i2c_set_clock()
|
/linux/drivers/video/fbdev/savage/ |
A D | savagefb_driver.c | 417 unsigned int *ndiv, unsigned int *r) in SavageCalcClock() argument 456 *ndiv = best_n1 - 2; in SavageCalcClock() 464 unsigned char *ndiv) in common_calc_clock() argument 495 *ndiv = (best_n1 - 2) | (best_n2 << 6); in common_calc_clock() 497 *ndiv = (best_n1 - 2) | (best_n2 << 5); in common_calc_clock()
|
/linux/include/soc/tegra/ |
A D | bpmp-abi.h | 1937 uint16_t ndiv[80]; member
|