/linux/drivers/clk/spear/ |
A D | clk-frac-synth.c | 75 if (frac->lock) in clk_frac_recalc_rate() 80 if (frac->lock) in clk_frac_recalc_rate() 106 if (frac->lock) in clk_frac_set_rate() 113 if (frac->lock) in clk_frac_set_rate() 130 struct clk_frac *frac; in clk_register_frac() local 138 frac = kzalloc(sizeof(*frac), GFP_KERNEL); in clk_register_frac() 139 if (!frac) in clk_register_frac() 143 frac->reg = reg; in clk_register_frac() 144 frac->rtbl = rtbl; in clk_register_frac() 146 frac->lock = lock; in clk_register_frac() [all …]
|
/linux/drivers/clk/mxs/ |
A D | clk-frac.c | 40 div = readl_relaxed(frac->reg) >> frac->shift; in clk_frac_recalc_rate() 59 tmp <<= frac->width; in clk_frac_round_rate() 85 tmp <<= frac->width; in clk_frac_set_rate() 95 val &= ~(((1 << frac->width) - 1) << frac->shift); in clk_frac_set_rate() 101 return mxs_clk_wait(frac->reg, frac->busy); in clk_frac_set_rate() 117 frac = kzalloc(sizeof(*frac), GFP_KERNEL); in mxs_clk_frac() 118 if (!frac) in mxs_clk_frac() 127 frac->reg = reg; in mxs_clk_frac() 128 frac->shift = shift; in mxs_clk_frac() 130 frac->busy = busy; in mxs_clk_frac() [all …]
|
A D | clk-ref.c | 55 do_div(tmp, frac); in clk_ref_recalc_rate() 65 u8 frac; in clk_ref_round_rate() local 69 frac = tmp; in clk_ref_round_rate() 71 if (frac < 18) in clk_ref_round_rate() 72 frac = 18; in clk_ref_round_rate() 74 frac = 35; in clk_ref_round_rate() 78 do_div(tmp, frac); in clk_ref_round_rate() 94 frac = tmp; in clk_ref_set_rate() 96 if (frac < 18) in clk_ref_set_rate() 97 frac = 18; in clk_ref_set_rate() [all …]
|
/linux/drivers/clk/imx/ |
A D | clk-pfd.c | 59 do_div(tmp, frac); in clk_pfd_recalc_rate() 68 u8 frac; in clk_pfd_round_rate() local 72 frac = tmp; in clk_pfd_round_rate() 73 if (frac < 12) in clk_pfd_round_rate() 74 frac = 12; in clk_pfd_round_rate() 76 frac = 35; in clk_pfd_round_rate() 89 u8 frac; in clk_pfd_set_rate() local 93 frac = tmp; in clk_pfd_set_rate() 94 if (frac < 12) in clk_pfd_set_rate() 95 frac = 12; in clk_pfd_set_rate() [all …]
|
A D | clk-pfdv2.c | 84 u8 frac; in clk_pfdv2_recalc_rate() local 89 if (!frac) { in clk_pfdv2_recalc_rate() 112 u8 frac; in clk_pfdv2_determine_rate() local 119 frac = tmp; in clk_pfdv2_determine_rate() 122 frac = 12; in clk_pfdv2_determine_rate() 124 frac = 35; in clk_pfdv2_determine_rate() 159 u8 frac; in clk_pfdv2_set_rate() local 178 frac = tmp; in clk_pfdv2_set_rate() 179 if (frac < 12) in clk_pfdv2_set_rate() 180 frac = 12; in clk_pfdv2_set_rate() [all …]
|
/linux/drivers/gpu/drm/amd/display/dc/dcn10/ |
A D | dcn10_hw_sequencer_debug.c | 97 (s->data_urgent * frac) / ref_clk_mhz / frac, (s->data_urgent * frac) / ref_clk_mhz % frac, in dcn10_get_hubbub_state() 98 …(s->pte_meta_urgent * frac) / ref_clk_mhz / frac, (s->pte_meta_urgent * frac) / ref_clk_mhz % frac, in dcn10_get_hubbub_state() 99 (s->sr_enter * frac) / ref_clk_mhz / frac, (s->sr_enter * frac) / ref_clk_mhz % frac, in dcn10_get_hubbub_state() 100 (s->sr_exit * frac) / ref_clk_mhz / frac, (s->sr_exit * frac) / ref_clk_mhz % frac, in dcn10_get_hubbub_state() 101 …(s->dram_clk_chanage * frac) / ref_clk_mhz / frac, (s->dram_clk_chanage * frac) / ref_clk_mhz % fr… in dcn10_get_hubbub_state() 156 … (s->min_ttu_vblank * frac) / ref_clk_mhz / frac, (s->min_ttu_vblank * frac) / ref_clk_mhz % frac, in dcn10_get_hubp_states() 157 …(s->qos_level_low_wm * frac) / ref_clk_mhz / frac, (s->qos_level_low_wm * frac) / ref_clk_mhz % fr… in dcn10_get_hubp_states() 158 …(s->qos_level_high_wm * frac) / ref_clk_mhz / frac, (s->qos_level_high_wm * frac) / ref_clk_mhz % … in dcn10_get_hubp_states() 176 … (s->min_ttu_vblank * frac) / ref_clk_mhz / frac, (s->min_ttu_vblank * frac) / ref_clk_mhz % frac, in dcn10_get_hubp_states() 177 …(s->qos_level_low_wm * frac) / ref_clk_mhz / frac, (s->qos_level_low_wm * frac) / ref_clk_mhz % fr… in dcn10_get_hubp_states() [all …]
|
/linux/drivers/clk/at91/ |
A D | clk-sam9x60-pll.c | 43 u32 frac; member 100 (cmul == frac->mul && cfrac == frac->frac)) in sam9x60_frac_pll_set() 112 (frac->frac << core->layout->frac_shift)); in sam9x60_frac_pll_set() 222 frac->frac = nfrac; in sam9x60_frac_pll_compute_mul_frac() 266 if (cmul == frac->mul && cfrac == frac->frac) in sam9x60_frac_pll_set_rate_chg() 271 (frac->frac << core->layout->frac_shift)); in sam9x60_frac_pll_set_rate_chg() 627 frac = kzalloc(sizeof(*frac), GFP_KERNEL); in sam9x60_clk_register_frac_pll() 628 if (!frac) in sam9x60_clk_register_frac_pll() 654 frac->frac = FIELD_GET(PMC_PLL_CTRL1_FRACR_MSK, val); in sam9x60_clk_register_frac_pll() 681 kfree(frac); in sam9x60_clk_register_frac_pll() [all …]
|
A D | clk-audio-pll.c | 84 struct clk_audio_frac *frac = to_clk_audio_frac(hw); in clk_audio_pll_frac_enable() local 86 regmap_update_bits(frac->regmap, AT91_PMC_AUDIO_PLL0, in clk_audio_pll_frac_enable() 88 regmap_update_bits(frac->regmap, AT91_PMC_AUDIO_PLL0, in clk_audio_pll_frac_enable() 91 regmap_update_bits(frac->regmap, AT91_PMC_AUDIO_PLL1, in clk_audio_pll_frac_enable() 92 AT91_PMC_AUDIO_PLL_FRACR_MASK, frac->fracr); in clk_audio_pll_frac_enable() 102 AT91_PMC_AUDIO_PLL_ND(frac->nd)); in clk_audio_pll_frac_enable() 134 struct clk_audio_frac *frac = to_clk_audio_frac(hw); in clk_audio_pll_frac_disable() local 179 fout = clk_audio_pll_fout(parent_rate, frac->nd, frac->fracr); in clk_audio_pll_frac_recalc_rate() 182 fout, frac->nd, (unsigned long)frac->fracr); in clk_audio_pll_frac_recalc_rate() 381 frac->nd = nd; in clk_audio_pll_frac_set_rate() [all …]
|
/linux/arch/sh/kernel/cpu/sh2a/ |
A D | fpu.c | 202 int frac; in denormal_subf1() local 216 frac -= iy; in denormal_subf1() 219 return frac; in denormal_subf1() 220 frac <<= 1; in denormal_subf1() 229 int frac; in denormal_addf1() local 243 frac += iy; in denormal_addf1() 245 frac >>= 1; in denormal_addf1() 301 frac -= iy; in denormal_subd1() 305 frac <<= 1; in denormal_subd1() 328 frac += iy; in denormal_addd1() [all …]
|
/linux/drivers/clk/meson/ |
A D | clk-pll.c | 49 !MESON_PARM_APPLICABLE(&pll->frac)) in __pll_round_closest_mult() 57 unsigned int frac, in __pll_params_to_rate() argument 62 if (frac && MESON_PARM_APPLICABLE(&pll->frac)) { in __pll_params_to_rate() 63 u64 frac_rate = (u64)parent_rate * frac; in __pll_params_to_rate() 66 (1 << pll->frac.width)); in __pll_params_to_rate() 77 unsigned int m, n, frac; in meson_clk_pll_recalc_rate() local 91 frac = MESON_PARM_APPLICABLE(&pll->frac) ? in meson_clk_pll_recalc_rate() 92 meson_parm_read(clk->map, &pll->frac) : in meson_clk_pll_recalc_rate() 250 unsigned int m, n, frac; in meson_clk_pll_determine_rate() local 372 unsigned int enabled, m, n, frac = 0; in meson_clk_pll_set_rate() local [all …]
|
/linux/drivers/gpu/drm/meson/ |
A D | meson_vclk.c | 498 if (frac) in meson_hdmi_pll_set_params() 500 0x00004000 | frac); in meson_hdmi_pll_set_params() 547 if (frac < 0x10000) { in meson_hdmi_pll_set_params() 643 unsigned int frac; in meson_hdmi_pll_get_frac() local 661 if (frac_m > frac) in meson_hdmi_pll_get_frac() 663 frac -= frac_m; in meson_hdmi_pll_get_frac() 670 unsigned int frac) in meson_hdmi_pll_validate_params() argument 699 unsigned int *frac, in meson_hdmi_pll_find_params() argument 710 freq, *m, *frac, *od); in meson_hdmi_pll_find_params() 723 unsigned int od, m, frac; in meson_vclk_dmt_supported_freq() local [all …]
|
/linux/drivers/clk/rockchip/ |
A D | clk.c | 151 frac->rate_change_idx = in rockchip_clk_frac_notifier_cb() 153 if (frac->rate_change_idx != frac->mux_frac_idx) { in rockchip_clk_frac_notifier_cb() 155 frac->mux_frac_idx); in rockchip_clk_frac_notifier_cb() 167 frac->rate_change_idx); in rockchip_clk_frac_notifier_cb() 219 frac = kzalloc(sizeof(*frac), GFP_KERNEL); in rockchip_clk_register_frac_branch() 220 if (!frac) in rockchip_clk_register_frac_branch() 224 gate = &frac->gate; in rockchip_clk_register_frac_branch() 232 div = &frac->div; in rockchip_clk_register_frac_branch() 251 kfree(frac); in rockchip_clk_register_frac_branch() 275 init.ops = frac->mux_ops; in rockchip_clk_register_frac_branch() [all …]
|
A D | clk-pll.c | 177 u64 frac_rate64 = prate * cur.frac; in rockchip_rk3036_pll_recalc_rate() 202 rate->postdiv2, rate->dsmpd, rate->frac); in rockchip_rk3036_pll_set_params() 231 pllcon |= rate->frac << RK3036_PLLCON2_FRAC_SHIFT; in rockchip_rk3036_pll_set_params() 319 cur.dsmpd, cur.frac); in rockchip_rk3036_pll_init() 322 rate->dsmpd, rate->frac); in rockchip_rk3036_pll_init() 327 (!cur.dsmpd && (rate->frac != cur.frac))) { in rockchip_rk3036_pll_init() 659 u64 frac_rate64 = prate * cur.frac; in rockchip_rk3399_pll_recalc_rate() 684 rate->postdiv2, rate->dsmpd, rate->frac); in rockchip_rk3399_pll_set_params() 803 cur.dsmpd, cur.frac); in rockchip_rk3399_pll_init() 806 rate->dsmpd, rate->frac); in rockchip_rk3399_pll_init() [all …]
|
/linux/kernel/time/ |
A D | timecounter.c | 16 tc->frac = 0; in timecounter_init() 44 tc->mask, &tc->frac); in timecounter_read_delta() 70 u64 cycles, u64 mask, u64 frac) in cc_cyc2ns_backwards() argument 74 ns = ((ns * cc->mult) - frac) >> cc->shift; in cc_cyc2ns_backwards() 83 u64 nsec = tc->nsec, frac = tc->frac; in timecounter_cyc2time() local 92 nsec -= cc_cyc2ns_backwards(tc->cc, delta, tc->mask, frac); in timecounter_cyc2time() 94 nsec += cyclecounter_cyc2ns(tc->cc, delta, tc->mask, &frac); in timecounter_cyc2time()
|
/linux/drivers/net/ethernet/marvell/mvpp2/ |
A D | mvpp2_tai.c | 112 mvpp2_tai_write(frac >> 16, base + MVPP22_TAI_TLV_FRAC_HIGH); in mvpp2_tai_write_tlv() 113 mvpp2_tai_write(frac, base + MVPP22_TAI_TLV_FRAC_LOW); in mvpp2_tai_write_tlv() 170 s32 frac; in mvpp22_tai_adjfine() local 187 frac = -val; in mvpp22_tai_adjfine() 192 frac = val; in mvpp22_tai_adjfine() 197 mvpp2_tai_write(frac >> 16, base + MVPP22_TAI_TLV_FRAC_HIGH); in mvpp22_tai_adjfine() 198 mvpp2_tai_write(frac, base + MVPP22_TAI_TLV_FRAC_LOW); in mvpp22_tai_adjfine() 314 u32 nano, frac; in mvpp22_tai_set_step() local 317 frac = lower_32_bits(tai->period); in mvpp22_tai_set_step() 322 if (frac >= 0x80000000) in mvpp22_tai_set_step() [all …]
|
/linux/arch/mips/ath79/ |
A D | clock.c | 213 u32 frac, u32 out_div) in ar934x_get_pll_freq() argument 225 do_div(t, ref_div * frac); in ar934x_get_pll_freq() 263 frac = 1 << 18; in ar934x_clocks_init() 274 frac = 1 << 6; in ar934x_clocks_init() 278 nfrac, frac, out_div); in ar934x_clocks_init() 290 frac = 1 << 18; in ar934x_clocks_init() 301 frac = 1 << 10; in ar934x_clocks_init() 305 nfrac, frac, out_div); in ar934x_clocks_init() 379 cpu_pll += frac * (ref_rate >> 6) / ref_div; in qca953x_clocks_init() 393 ddr_pll += frac * (ref_rate >> 6) / (ref_div << 4); in qca953x_clocks_init() [all …]
|
/linux/drivers/clk/qcom/ |
A D | clk-rcg2.c | 507 for (; frac->num; frac++) { in clk_edp_pixel_set_rate() 520 f.m = frac->num; in clk_edp_pixel_set_rate() 521 f.n = frac->den; in clk_edp_pixel_set_rate() 557 for (; frac->num; frac++) { in clk_edp_pixel_determine_rate() 571 frac->num, frac->den, in clk_edp_pixel_determine_rate() 733 for (; frac->num; frac++) { in clk_pixel_determine_rate() 734 request = (req->rate * frac->den) / frac->num; in clk_pixel_determine_rate() 742 req->rate = (src_rate * frac->num) / frac->den; in clk_pixel_determine_rate() 771 for (; frac->num; frac++) { in clk_pixel_set_rate() 772 request = (rate * frac->den) / frac->num; in clk_pixel_set_rate() [all …]
|
/linux/Documentation/userspace-api/media/v4l/ |
A D | colorspaces-details.rst | 60 L = -\left( \frac{L' - 0.099}{-1.099} \right) ^{\frac{1}{0.45}} \text{, for } L' \le -0.081 64 L = \left(\frac{L' + 0.099}{1.099}\right)^{\frac{1}{0.45} } \text{, for } L' \ge 0.081 136 L = -\left( \frac{L' - 0.099}{-1.099} \right)^\frac{1}{0.45} \text{, for } L' \le -0.081 140 L = \left(\frac{L' + 0.099}{1.099}\right)^{\frac{1}{0.45} } \text{, for } L' \ge 0.081 173 Y' = \frac{219}{256} * (0.2126R' + 0.7152G' + 0.0722B') + \frac{16}{256} 186 Y' = \frac{219}{256} * (0.2990R' + 0.5870G' + 0.1140B') + \frac{16}{256} 398 L = \left( \frac{L' + 0.099}{1.099}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.081 489 L' = L^{\frac{1}{2.6}} 551 L = \left( \frac{L' + 0.1115}{1.1115}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.0913 625 L = \left( \frac{L' + 0.099}{1.099}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.081 [all …]
|
/linux/kernel/locking/ |
A D | qspinlock_stat.h | 70 u64 frac = 0; in lockevent_read() local 73 frac = 100ULL * do_div(sum, kicks); in lockevent_read() 74 frac = DIV_ROUND_CLOSEST_ULL(frac, kicks); in lockevent_read() 81 sum, frac); in lockevent_read()
|
/linux/include/linux/ |
A D | timecounter.h | 60 u64 frac; member 71 u64 cycles, u64 mask, u64 *frac) in cyclecounter_cyc2ns() argument 75 ns = (ns * cc->mult) + *frac; in cyclecounter_cyc2ns() 76 *frac = ns & mask; in cyclecounter_cyc2ns()
|
/linux/arch/powerpc/kernel/ |
A D | vecemu.c | 42 unsigned int mant, frac; in eexp2() local 76 asm("mulhwu %0,%1,%2" : "=r" (frac) in eexp2() 78 asm("mulhwu %0,%1,%2" : "=r" (frac) : "r" (frac), "r" (mant)); in eexp2() 79 mant += frac; in eexp2() 96 int exp, mant, lz, frac; in elog2() local 136 asm("mulhwu %0,%1,%2" : "=r" (frac) in elog2() 138 exp += frac; in elog2()
|
/linux/drivers/hwmon/ |
A D | stts751.c | 151 s32 integer1, integer2, frac; in stts751_update_temp() local 172 if (frac < 0) { in stts751_update_temp() 175 return frac; in stts751_update_temp() 186 frac = i2c_smbus_read_byte_data(priv->client, in stts751_update_temp() 188 if (frac < 0) { in stts751_update_temp() 191 frac); in stts751_update_temp() 192 return frac; in stts751_update_temp() 226 int integer, frac; in stts751_read_reg16() local 233 if (frac < 0) in stts751_read_reg16() 234 return frac; in stts751_read_reg16() [all …]
|
/linux/drivers/clk/sunxi-ng/ |
A D | ccu_mult.c | 81 if (ccu_frac_helper_is_enabled(&cm->common, &cm->frac)) in ccu_mult_recalc_rate() 82 return ccu_frac_helper_read_rate(&cm->common, &cm->frac); in ccu_mult_recalc_rate() 111 if (ccu_frac_helper_has_rate(&cm->common, &cm->frac, rate)) { in ccu_mult_set_rate() 112 ccu_frac_helper_enable(&cm->common, &cm->frac); in ccu_mult_set_rate() 114 return ccu_frac_helper_set_rate(&cm->common, &cm->frac, in ccu_mult_set_rate() 117 ccu_frac_helper_disable(&cm->common, &cm->frac); in ccu_mult_set_rate()
|
/linux/drivers/phy/st/ |
A D | phy-stm32-usbphyc.c | 132 u16 frac; member 206 unsigned long long fvco, ndiv, frac; in stm32_usbphyc_get_pll_params() local 224 frac = fvco * (1 << 16); in stm32_usbphyc_get_pll_params() 225 do_div(frac, (clk_rate * 2)); in stm32_usbphyc_get_pll_params() 226 frac = frac - (ndiv * (1 << 16)); in stm32_usbphyc_get_pll_params() 227 pll_params->frac = (u16)frac; in stm32_usbphyc_get_pll_params() 234 u32 ndiv, frac; in stm32_usbphyc_pll_init() local 246 frac = FIELD_PREP(PLLFRACIN, pll_params.frac); in stm32_usbphyc_pll_init() 250 if (pll_params.frac) in stm32_usbphyc_pll_init() 251 usbphyc_pll |= PLLFRACCTL | frac; in stm32_usbphyc_pll_init()
|
/linux/drivers/clk/x86/ |
A D | clk-cgu-pll.c | 25 unsigned int div, unsigned int frac, unsigned int frac_div) in lgm_pll_calc_rate() argument 31 frate = rate64 * frac; in lgm_pll_calc_rate() 42 unsigned int div, mult, frac; in lgm_pll_recalc_rate() local 48 frac = lgm_get_clk_val(pll->membase, pll->reg, 2, 24); in lgm_pll_recalc_rate() 54 return lgm_pll_calc_rate(prate, mult, div, frac, BIT(24)); in lgm_pll_recalc_rate()
|