Home
last modified time | relevance | path

Searched refs:mclk (Results 1 – 25 of 99) sorted by relevance

1234

/drivers/clk/hisilicon/
Dclk-hi3620.c298 struct clk_mmc *mclk = to_mmc(hw); in mmc_clk_determine_rate() local
300 if ((req->rate <= 13000000) && (mclk->id == HI3620_MMC_CIUCLK1)) { in mmc_clk_determine_rate()
337 struct clk_mmc *mclk = to_mmc(hw); in mmc_clk_set_timing() local
374 val = readl_relaxed(mclk->clken_reg); in mmc_clk_set_timing()
375 val &= ~(1 << mclk->clken_bit); in mmc_clk_set_timing()
376 writel_relaxed(val, mclk->clken_reg); in mmc_clk_set_timing()
378 val = readl_relaxed(mclk->sam_reg); in mmc_clk_set_timing()
379 val = mmc_clk_delay(val, sam, mclk->sam_off, mclk->sam_bits); in mmc_clk_set_timing()
380 writel_relaxed(val, mclk->sam_reg); in mmc_clk_set_timing()
382 val = readl_relaxed(mclk->drv_reg); in mmc_clk_set_timing()
[all …]
/drivers/gpu/drm/radeon/
Dbtc_dpm.c1244 u32 *sclk, u32 *mclk) in btc_skip_blacklist_clocks() argument
1248 if ((sclk == NULL) || (mclk == NULL)) in btc_skip_blacklist_clocks()
1255 (btc_blacklist_clocks[i].mclk == *mclk)) in btc_skip_blacklist_clocks()
1264 btc_skip_blacklist_clocks(rdev, max_sclk, max_mclk, sclk, mclk); in btc_skip_blacklist_clocks()
1274 if ((pl->mclk == 0) || (pl->sclk == 0)) in btc_adjust_clock_combinations()
1277 if (pl->mclk == pl->sclk) in btc_adjust_clock_combinations()
1280 if (pl->mclk > pl->sclk) { in btc_adjust_clock_combinations()
1281 if (((pl->mclk + (pl->sclk - 1)) / pl->sclk) > rdev->pm.dpm.dyn_state.mclk_sclk_ratio) in btc_adjust_clock_combinations()
1284 (pl->mclk + in btc_adjust_clock_combinations()
1288 if ((pl->sclk - pl->mclk) > rdev->pm.dpm.dyn_state.sclk_mclk_delta) in btc_adjust_clock_combinations()
[all …]
Drv730_dpm.c121 LPRV7XX_SMC_MCLK_VALUE mclk) in rv730_populate_mclk_value() argument
186 mclk->mclk730.vMCLK_PWRMGT_CNTL = cpu_to_be32(mclk_pwrmgt_cntl); in rv730_populate_mclk_value()
187 mclk->mclk730.vDLL_CNTL = cpu_to_be32(dll_cntl); in rv730_populate_mclk_value()
188 mclk->mclk730.mclk_value = cpu_to_be32(memory_clock); in rv730_populate_mclk_value()
189 mclk->mclk730.vMPLL_FUNC_CNTL = cpu_to_be32(mpll_func_cntl); in rv730_populate_mclk_value()
190 mclk->mclk730.vMPLL_FUNC_CNTL2 = cpu_to_be32(mpll_func_cntl_2); in rv730_populate_mclk_value()
191 mclk->mclk730.vMPLL_FUNC_CNTL3 = cpu_to_be32(mpll_func_cntl_3); in rv730_populate_mclk_value()
192 mclk->mclk730.vMPLL_SS = cpu_to_be32(mpll_ss); in rv730_populate_mclk_value()
193 mclk->mclk730.vMPLL_SS2 = cpu_to_be32(mpll_ss2); in rv730_populate_mclk_value()
297 table->ACPIState.levels[0].mclk.mclk730.vMPLL_FUNC_CNTL = cpu_to_be32(mpll_func_cntl); in rv730_populate_smc_acpi_state()
[all …]
Drv740_dpm.c189 RV7XX_SMC_MCLK_VALUE *mclk) in rv740_populate_mclk_value() argument
272 mclk->mclk770.mclk_value = cpu_to_be32(memory_clock); in rv740_populate_mclk_value()
273 mclk->mclk770.vMPLL_AD_FUNC_CNTL = cpu_to_be32(mpll_ad_func_cntl); in rv740_populate_mclk_value()
274 mclk->mclk770.vMPLL_AD_FUNC_CNTL_2 = cpu_to_be32(mpll_ad_func_cntl_2); in rv740_populate_mclk_value()
275 mclk->mclk770.vMPLL_DQ_FUNC_CNTL = cpu_to_be32(mpll_dq_func_cntl); in rv740_populate_mclk_value()
276 mclk->mclk770.vMPLL_DQ_FUNC_CNTL_2 = cpu_to_be32(mpll_dq_func_cntl_2); in rv740_populate_mclk_value()
277 mclk->mclk770.vMCLK_PWRMGT_CNTL = cpu_to_be32(mclk_pwrmgt_cntl); in rv740_populate_mclk_value()
278 mclk->mclk770.vDLL_CNTL = cpu_to_be32(dll_cntl); in rv740_populate_mclk_value()
279 mclk->mclk770.vMPLL_SS = cpu_to_be32(mpll_ss1); in rv740_populate_mclk_value()
280 mclk->mclk770.vMPLL_SS2 = cpu_to_be32(mpll_ss2); in rv740_populate_mclk_value()
[all …]
Drv770_dpm.c388 RV7XX_SMC_MCLK_VALUE *mclk) in rv770_populate_mclk_value() argument
473 mclk->mclk770.mclk_value = cpu_to_be32(memory_clock); in rv770_populate_mclk_value()
474 mclk->mclk770.vMPLL_AD_FUNC_CNTL = cpu_to_be32(mpll_ad_func_cntl); in rv770_populate_mclk_value()
475 mclk->mclk770.vMPLL_AD_FUNC_CNTL_2 = cpu_to_be32(mpll_ad_func_cntl_2); in rv770_populate_mclk_value()
476 mclk->mclk770.vMPLL_DQ_FUNC_CNTL = cpu_to_be32(mpll_dq_func_cntl); in rv770_populate_mclk_value()
477 mclk->mclk770.vMPLL_DQ_FUNC_CNTL_2 = cpu_to_be32(mpll_dq_func_cntl_2); in rv770_populate_mclk_value()
478 mclk->mclk770.vMCLK_PWRMGT_CNTL = cpu_to_be32(mclk_pwrmgt_cntl); in rv770_populate_mclk_value()
479 mclk->mclk770.vDLL_CNTL = cpu_to_be32(dll_cntl); in rv770_populate_mclk_value()
592 int rv770_populate_mvdd_value(struct radeon_device *rdev, u32 mclk, in rv770_populate_mvdd_value() argument
603 if (mclk <= pi->mvdd_split_frequency) { in rv770_populate_mvdd_value()
[all …]
Dcypress_dpm.c423 u8 cypress_get_strobe_mode_settings(struct radeon_device *rdev, u32 mclk) in cypress_get_strobe_mode_settings() argument
430 if (mclk <= pi->mclk_strobe_mode_threshold) in cypress_get_strobe_mode_settings()
432 result = cypress_get_mclk_frequency_ratio(rdev, mclk, strobe_mode); in cypress_get_strobe_mode_settings()
475 RV7XX_SMC_MCLK_VALUE *mclk, in cypress_populate_mclk_value() argument
597 mclk->mclk770.mclk_value = cpu_to_be32(memory_clock); in cypress_populate_mclk_value()
598 mclk->mclk770.vMPLL_AD_FUNC_CNTL = cpu_to_be32(mpll_ad_func_cntl); in cypress_populate_mclk_value()
599 mclk->mclk770.vMPLL_AD_FUNC_CNTL_2 = cpu_to_be32(mpll_ad_func_cntl_2); in cypress_populate_mclk_value()
600 mclk->mclk770.vMPLL_DQ_FUNC_CNTL = cpu_to_be32(mpll_dq_func_cntl); in cypress_populate_mclk_value()
601 mclk->mclk770.vMPLL_DQ_FUNC_CNTL_2 = cpu_to_be32(mpll_dq_func_cntl_2); in cypress_populate_mclk_value()
602 mclk->mclk770.vMCLK_PWRMGT_CNTL = cpu_to_be32(mclk_pwrmgt_cntl); in cypress_populate_mclk_value()
[all …]
Dni_dpm.c791 u32 mclk; in ni_apply_state_adjust_rules() local
808 if (ps->performance_levels[i].mclk > max_limits->mclk) in ni_apply_state_adjust_rules()
809 ps->performance_levels[i].mclk = max_limits->mclk; in ni_apply_state_adjust_rules()
823 ps->performance_levels[0].mclk = in ni_apply_state_adjust_rules()
824 ps->performance_levels[ps->performance_level_count - 1].mclk; in ni_apply_state_adjust_rules()
829 btc_skip_blacklist_clocks(rdev, max_limits->sclk, max_limits->mclk, in ni_apply_state_adjust_rules()
831 &ps->performance_levels[0].mclk); in ni_apply_state_adjust_rules()
842 mclk = ps->performance_levels[0].mclk; in ni_apply_state_adjust_rules()
845 if (mclk < ps->performance_levels[i].mclk) in ni_apply_state_adjust_rules()
846 mclk = ps->performance_levels[i].mclk; in ni_apply_state_adjust_rules()
[all …]
Dsi_dpm.c2996 u32 mclk, sclk; in si_apply_state_adjust_rules() local
3087 if (ps->performance_levels[i].mclk > max_limits->mclk) in si_apply_state_adjust_rules()
3088 ps->performance_levels[i].mclk = max_limits->mclk; in si_apply_state_adjust_rules()
3112 if (ps->performance_levels[i].mclk > max_mclk_vddci) in si_apply_state_adjust_rules()
3113 ps->performance_levels[i].mclk = max_mclk_vddci; in si_apply_state_adjust_rules()
3116 if (ps->performance_levels[i].mclk > max_mclk_vddc) in si_apply_state_adjust_rules()
3117 ps->performance_levels[i].mclk = max_mclk_vddc; in si_apply_state_adjust_rules()
3120 if (ps->performance_levels[i].mclk > max_mclk) in si_apply_state_adjust_rules()
3121 ps->performance_levels[i].mclk = max_mclk; in si_apply_state_adjust_rules()
3132 mclk = ps->performance_levels[ps->performance_level_count - 1].mclk; in si_apply_state_adjust_rules()
[all …]
Dci_dpm.c799 u32 sclk, mclk; in ci_apply_state_adjust_rules() local
828 if (ps->performance_levels[i].mclk > max_limits->mclk) in ci_apply_state_adjust_rules()
829 ps->performance_levels[i].mclk = max_limits->mclk; in ci_apply_state_adjust_rules()
838 mclk = ps->performance_levels[ps->performance_level_count - 1].mclk; in ci_apply_state_adjust_rules()
841 mclk = ps->performance_levels[0].mclk; in ci_apply_state_adjust_rules()
848 if (mclk < rdev->pm.dpm.vce_states[rdev->pm.dpm.vce_level].mclk) in ci_apply_state_adjust_rules()
849 mclk = rdev->pm.dpm.vce_states[rdev->pm.dpm.vce_level].mclk; in ci_apply_state_adjust_rules()
853 ps->performance_levels[0].mclk = mclk; in ci_apply_state_adjust_rules()
859 if (ps->performance_levels[0].mclk < ps->performance_levels[1].mclk) in ci_apply_state_adjust_rules()
860 ps->performance_levels[0].mclk = ps->performance_levels[1].mclk; in ci_apply_state_adjust_rules()
[all …]
Drv770_dpm.h143 u32 mclk; member
184 LPRV7XX_SMC_MCLK_VALUE mclk);
205 RV7XX_SMC_MCLK_VALUE *mclk);
219 int rv770_populate_mvdd_value(struct radeon_device *rdev, u32 mclk,
/drivers/media/dvb-frontends/
Dstv0900_sw.c56 max_carrier /= intp->mclk / 1000; in stv0900_check_signal_presence()
83 max_carrier /= intp->mclk / 1000; in stv0900_get_sw_loop_params()
89 freq_inc /= intp->mclk >> 10; in stv0900_get_sw_loop_params()
149 max_carrier /= intp->mclk / 1000; in stv0900_search_carr_sw_loop()
309 u32 mclk, in stv0900_get_symbol_rate() argument
324 intval1 = (mclk) >> 16; in stv0900_get_symbol_rate()
327 rem1 = (mclk) % 0x10000; in stv0900_get_symbol_rate()
337 u32 mclk, u32 srate, in stv0900_set_symbol_rate() argument
342 dprintk("%s: Mclk %d, SR %d, Dmd %d\n", __func__, mclk, in stv0900_set_symbol_rate()
347 symb /= (mclk >> 12); in stv0900_set_symbol_rate()
[all …]
Dstv6110.c42 u32 mclk; member
225 ((((priv->mclk / 1000000) - 16) & 0x1f) << 3); in stv6110_init()
254 freq = divider * (priv->mclk / 1000); in stv6110_get_frequency()
273 frequency, priv->mclk); in stv6110_set_frequency()
278 ((((priv->mclk / 1000000) - 16) & 0x1f) << 3); in stv6110_set_frequency()
314 p_calc = (priv->mclk / 100000); in stv6110_set_frequency()
319 p_calc_opt = (priv->mclk / 100000); in stv6110_set_frequency()
323 ref = priv->mclk / ((1 << (r_div_opt + 1)) * (1 << (p + 1))); in stv6110_set_frequency()
353 vco_freq = divider * ((priv->mclk / 1000) / ((1 << (r_div_opt + 1)))); in stv6110_set_frequency()
441 priv->mclk = config->mclk; in stv6110_attach()
Dm88rs2000.c116 u32 mclk; in m88rs2000_get_mclk() local
126 mclk = (u32)(reg * RS2000_FE_CRYSTAL_KHZ + 28 / 2) / 28; in m88rs2000_get_mclk()
128 return mclk; in m88rs2000_get_mclk()
134 u32 mclk; in m88rs2000_set_carrieroffset() local
139 mclk = m88rs2000_get_mclk(fe); in m88rs2000_set_carrieroffset()
140 if (!mclk) in m88rs2000_set_carrieroffset()
143 tmp = (offset * 4096 + (s32)mclk / 2) / (s32)mclk; in m88rs2000_set_carrieroffset()
164 u32 mclk; in m88rs2000_set_symbolrate() local
170 mclk = m88rs2000_get_mclk(fe); in m88rs2000_set_symbolrate()
171 if (!mclk) in m88rs2000_set_symbolrate()
[all …]
Dstv090x.c873 sym /= (state->internal->mclk >> 12); in stv090x_set_srate()
876 sym /= (state->internal->mclk >> 10); in stv090x_set_srate()
879 sym /= (state->internal->mclk >> 7); in stv090x_set_srate()
900 sym /= (state->internal->mclk >> 12); in stv090x_set_max_srate()
903 sym /= (state->internal->mclk >> 10); in stv090x_set_max_srate()
906 sym /= (state->internal->mclk >> 7); in stv090x_set_max_srate()
934 sym /= (state->internal->mclk >> 12); in stv090x_set_min_srate()
937 sym /= (state->internal->mclk >> 10); in stv090x_set_min_srate()
940 sym /= (state->internal->mclk >> 7); in stv090x_set_min_srate()
1470 freq_abs /= (state->internal->mclk / 1000); in stv090x_start_search()
[all …]
/drivers/spi/
Dspi-sun6i.c85 struct clk *mclk; member
220 mclk_rate = clk_get_rate(sspi->mclk); in sun6i_spi_transfer_one()
222 clk_set_rate(sspi->mclk, 2 * spi->max_speed_hz); in sun6i_spi_transfer_one()
223 mclk_rate = clk_get_rate(sspi->mclk); in sun6i_spi_transfer_one()
326 ret = clk_prepare_enable(sspi->mclk); in sun6i_spi_runtime_resume()
344 clk_disable_unprepare(sspi->mclk); in sun6i_spi_runtime_resume()
357 clk_disable_unprepare(sspi->mclk); in sun6i_spi_runtime_suspend()
416 sspi->mclk = devm_clk_get(&pdev->dev, "mod"); in sun6i_spi_probe()
417 if (IS_ERR(sspi->mclk)) { in sun6i_spi_probe()
419 ret = PTR_ERR(sspi->mclk); in sun6i_spi_probe()
Dspi-sun4i.c80 struct clk *mclk; member
235 mclk_rate = clk_get_rate(sspi->mclk); in sun4i_spi_transfer_one()
237 clk_set_rate(sspi->mclk, 2 * spi->max_speed_hz); in sun4i_spi_transfer_one()
238 mclk_rate = clk_get_rate(sspi->mclk); in sun4i_spi_transfer_one()
339 ret = clk_prepare_enable(sspi->mclk); in sun4i_spi_runtime_resume()
361 clk_disable_unprepare(sspi->mclk); in sun4i_spi_runtime_suspend()
420 sspi->mclk = devm_clk_get(&pdev->dev, "mod"); in sun4i_spi_probe()
421 if (IS_ERR(sspi->mclk)) { in sun4i_spi_probe()
423 ret = PTR_ERR(sspi->mclk); in sun4i_spi_probe()
/drivers/mfd/
Dsm501.c392 unsigned long mclk; member
408 unsigned long mclk, in sm501_calc_clock() argument
423 diff = DIV_ROUND_CLOSEST(mclk, divider << shift) - freq; in sm501_calc_clock()
431 clock->mclk = mclk; in sm501_calc_clock()
453 unsigned long mclk; in sm501_calc_pll() local
464 mclk = (24000000UL * m / n) >> k; in sm501_calc_pll()
467 mclk, &best_diff)) { in sm501_calc_pll()
477 return clock->mclk / (clock->divider << clock->shift); in sm501_calc_pll()
491 unsigned long mclk; in sm501_select_clock() local
495 for (mclk = 288000000; mclk <= 336000000; mclk += 48000000) { in sm501_select_clock()
[all …]
/drivers/staging/iio/frequency/
Dad9832.c25 static unsigned long ad9832_calc_freqreg(unsigned long mclk, unsigned long fout) in ad9832_calc_freqreg() argument
29 do_div(freqreg, mclk); in ad9832_calc_freqreg()
38 if (fout > (st->mclk / 2)) in ad9832_write_frequency()
41 regval = ad9832_calc_freqreg(st->mclk, fout); in ad9832_write_frequency()
230 st->mclk = pdata->mclk; in ad9832_probe()
Dad9834.c28 static unsigned int ad9834_calc_freqreg(unsigned long mclk, unsigned long fout) in ad9834_calc_freqreg() argument
32 do_div(freqreg, mclk); in ad9834_calc_freqreg()
41 if (fout > (st->mclk / 2)) in ad9834_write_frequency()
44 regval = ad9834_calc_freqreg(st->mclk, fout); in ad9834_write_frequency()
346 st->mclk = pdata->mclk; in ad9834_probe()
Dad9834.h56 unsigned int mclk; member
91 unsigned int mclk; member
Dad9832.h80 unsigned long mclk; member
117 unsigned long mclk; member
/drivers/clk/
Dclk-u300.c953 struct clk_mclk *mclk = to_mclk(hw); in mclk_clk_prepare() local
957 if (!mclk->is_mspro) { in mclk_clk_prepare()
1119 struct clk_mclk *mclk; in mclk_clk_register() local
1122 mclk = kzalloc(sizeof(struct clk_mclk), GFP_KERNEL); in mclk_clk_register()
1123 if (!mclk) { in mclk_clk_register()
1133 mclk->hw.init = &init; in mclk_clk_register()
1134 mclk->is_mspro = is_mspro; in mclk_clk_register()
1136 clk = clk_register(dev, &mclk->hw); in mclk_clk_register()
1138 kfree(mclk); in mclk_clk_register()
/drivers/gpu/drm/nouveau/nvkm/subdev/fb/
Dramgt215.c456 gt215_ram_lock_pll(struct gt215_ramfuc *fuc, struct gt215_clk_info *mclk) in gt215_ram_lock_pll() argument
458 ram_wr32(fuc, 0x004004, mclk->pll); in gt215_ram_lock_pll()
500 struct gt215_clk_info mclk; in gt215_ram_calc() local
551 ret = gt215_pll_info(device->clk, 0x12, 0x4000, freq, &mclk); in gt215_ram_calc()
602 pll2pll = (!(ctrl & 0x00000008)) && mclk.pll; in gt215_ram_calc()
615 if (mclk.pll && !pll2pll) { in gt215_ram_calc()
616 ram_mask(fuc, 0x004128, 0x003f3141, mclk.clk | 0x00000101); in gt215_ram_calc()
617 gt215_ram_lock_pll(fuc, &mclk); in gt215_ram_calc()
691 gt215_ram_lock_pll(fuc, &mclk); in gt215_ram_calc()
694 if (mclk.pll) { in gt215_ram_calc()
[all …]
/drivers/mmc/host/
Dmmci.c324 host->cclk = host->mclk; in mmci_set_clkreg()
325 } else if (desired >= host->mclk) { in mmci_set_clkreg()
329 host->cclk = host->mclk; in mmci_set_clkreg()
337 clk = DIV_ROUND_UP(host->mclk, desired) - 2; in mmci_set_clkreg()
340 host->cclk = host->mclk / (clk + 2); in mmci_set_clkreg()
346 clk = host->mclk / (2 * desired) - 1; in mmci_set_clkreg()
349 host->cclk = host->mclk / (2 * (clk + 1)); in mmci_set_clkreg()
832 (host->size <= 8 && host->mclk > 50000000))) in mmci_start_data()
1406 host->mclk = clk_get_rate(host->clk); in mmci_set_ios()
1564 host->mclk = clk_get_rate(host->clk); in mmci_probe()
[all …]
/drivers/gpu/drm/amd/amdgpu/
Dci_dpm.c916 u32 sclk, mclk; in ci_apply_state_adjust_rules() local
945 if (ps->performance_levels[i].mclk > max_limits->mclk) in ci_apply_state_adjust_rules()
946 ps->performance_levels[i].mclk = max_limits->mclk; in ci_apply_state_adjust_rules()
955 mclk = ps->performance_levels[ps->performance_level_count - 1].mclk; in ci_apply_state_adjust_rules()
958 mclk = ps->performance_levels[0].mclk; in ci_apply_state_adjust_rules()
965 if (mclk < adev->pm.dpm.vce_states[adev->pm.dpm.vce_level].mclk) in ci_apply_state_adjust_rules()
966 mclk = adev->pm.dpm.vce_states[adev->pm.dpm.vce_level].mclk; in ci_apply_state_adjust_rules()
970 ps->performance_levels[0].mclk = mclk; in ci_apply_state_adjust_rules()
976 if (ps->performance_levels[0].mclk < ps->performance_levels[1].mclk) in ci_apply_state_adjust_rules()
977 ps->performance_levels[0].mclk = ps->performance_levels[1].mclk; in ci_apply_state_adjust_rules()
[all …]

1234