/linux/drivers/clk/hisilicon/ |
A D | clk-hi3620.c | 361 val &= ~(1 << mclk->clken_bit); in mmc_clk_set_timing() 365 val = mmc_clk_delay(val, sam, mclk->sam_off, mclk->sam_bits); in mmc_clk_set_timing() 369 val = mmc_clk_delay(val, drv, mclk->drv_off, mclk->drv_bits); in mmc_clk_set_timing() 373 val = mmc_clk_delay(val, div, mclk->div_off, mclk->div_bits); in mmc_clk_set_timing() 377 val |= 1 << mclk->clken_bit; in mmc_clk_set_timing() 414 struct clk_mmc *mclk; in hisi_register_clk_mmc() local 418 mclk = kzalloc(sizeof(*mclk), GFP_KERNEL); in hisi_register_clk_mmc() 419 if (!mclk) in hisi_register_clk_mmc() 427 mclk->hw.init = &init; in hisi_register_clk_mmc() 429 mclk->id = mmc_clk->id; in hisi_register_clk_mmc() [all …]
|
/linux/drivers/gpu/drm/radeon/ |
A D | btc_dpm.c | 2146 mclk = ps->high.mclk; in btc_apply_state_adjust_rules() 2151 mclk = ps->low.mclk; in btc_apply_state_adjust_rules() 2158 ps->low.mclk = mclk; in btc_apply_state_adjust_rules() 2176 mclk = ps->low.mclk; in btc_apply_state_adjust_rules() 2177 if (mclk < ps->medium.mclk) in btc_apply_state_adjust_rules() 2178 mclk = ps->medium.mclk; in btc_apply_state_adjust_rules() 2179 if (mclk < ps->high.mclk) in btc_apply_state_adjust_rules() 2180 mclk = ps->high.mclk; in btc_apply_state_adjust_rules() 2181 ps->low.mclk = mclk; in btc_apply_state_adjust_rules() 2183 ps->medium.mclk = mclk; in btc_apply_state_adjust_rules() [all …]
|
A D | rv730_dpm.c | 118 LPRV7XX_SMC_MCLK_VALUE mclk) in rv730_populate_mclk_value() argument 184 mclk->mclk730.vDLL_CNTL = cpu_to_be32(dll_cntl); in rv730_populate_mclk_value() 185 mclk->mclk730.mclk_value = cpu_to_be32(memory_clock); in rv730_populate_mclk_value() 189 mclk->mclk730.vMPLL_SS = cpu_to_be32(mpll_ss); in rv730_populate_mclk_value() 190 mclk->mclk730.vMPLL_SS2 = cpu_to_be32(mpll_ss2); in rv730_populate_mclk_value() 332 table->initialState.levels[0].mclk.mclk730.vDLL_CNTL = in rv730_populate_smc_initial_state() 334 table->initialState.levels[0].mclk.mclk730.vMPLL_SS = in rv730_populate_smc_initial_state() 340 cpu_to_be32(initial_state->low.mclk); in rv730_populate_smc_initial_state() 414 state->high.mclk); in rv730_program_memory_timing_parameters() 424 state->medium.mclk); in rv730_program_memory_timing_parameters() [all …]
|
A D | rv740_dpm.c | 187 RV7XX_SMC_MCLK_VALUE *mclk) in rv740_populate_mclk_value() argument 270 mclk->mclk770.mclk_value = cpu_to_be32(memory_clock); in rv740_populate_mclk_value() 271 mclk->mclk770.vMPLL_AD_FUNC_CNTL = cpu_to_be32(mpll_ad_func_cntl); in rv740_populate_mclk_value() 272 mclk->mclk770.vMPLL_AD_FUNC_CNTL_2 = cpu_to_be32(mpll_ad_func_cntl_2); in rv740_populate_mclk_value() 273 mclk->mclk770.vMPLL_DQ_FUNC_CNTL = cpu_to_be32(mpll_dq_func_cntl); in rv740_populate_mclk_value() 274 mclk->mclk770.vMPLL_DQ_FUNC_CNTL_2 = cpu_to_be32(mpll_dq_func_cntl_2); in rv740_populate_mclk_value() 275 mclk->mclk770.vMCLK_PWRMGT_CNTL = cpu_to_be32(mclk_pwrmgt_cntl); in rv740_populate_mclk_value() 276 mclk->mclk770.vDLL_CNTL = cpu_to_be32(dll_cntl); in rv740_populate_mclk_value() 277 mclk->mclk770.vMPLL_SS = cpu_to_be32(mpll_ss1); in rv740_populate_mclk_value() 278 mclk->mclk770.vMPLL_SS2 = cpu_to_be32(mpll_ss2); in rv740_populate_mclk_value() [all …]
|
A D | rv770_dpm.c | 389 RV7XX_SMC_MCLK_VALUE *mclk) in rv770_populate_mclk_value() argument 655 pl->mclk, &level->mclk); in rv770_convert_power_level_to_smc() 658 pl->mclk, &level->mclk); in rv770_convert_power_level_to_smc() 661 pl->mclk, &level->mclk); in rv770_convert_power_level_to_smc() 755 state->high.mclk); in rv770_program_memory_timing_parameters() 2182 u32 sclk, mclk; in rv7xx_parse_pplib_clock_info() local 2217 pl->mclk = mclk; in rv7xx_parse_pplib_clock_info() 2262 rdev->pm.dpm.dyn_state.max_clock_voltage_on_ac.mclk = pl->mclk; in rv7xx_parse_pplib_clock_info() 2537 return pl->mclk; in rv770_dpm_get_current_mclk() 2567 return requested_state->low.mclk; in rv770_dpm_get_mclk() [all …]
|
A D | cypress_dpm.c | 651 u32 mclk, in cypress_populate_mvdd_value() argument 725 pl->mclk, in cypress_convert_power_level_to_smc() 726 &level->mclk, in cypress_convert_power_level_to_smc() 732 pl->mclk, in cypress_convert_power_level_to_smc() 733 &level->mclk, in cypress_convert_power_level_to_smc() 834 if (pl->mclk <= in cypress_convert_mc_reg_table_entry_to_smc() 933 new_state->low.mclk)); in cypress_program_memory_timing_parameters() 936 new_state->medium.mclk)); in cypress_program_memory_timing_parameters() 939 new_state->high.mclk)); in cypress_program_memory_timing_parameters() 1049 range_table->mclk[i]; in cypress_retrieve_ac_timing_for_all_ranges() [all …]
|
/linux/sound/soc/atmel/ |
A D | sam9g20_wm8731.c | 49 static struct clk *mclk; variable 62 ret = clk_enable(mclk); in at91sam9g20ek_set_bias_level() 70 clk_disable(mclk); in at91sam9g20ek_set_bias_level() 168 mclk = clk_get(NULL, "pck0"); in at91sam9g20ek_audio_probe() 169 if (IS_ERR(mclk)) { in at91sam9g20ek_audio_probe() 171 ret = PTR_ERR(mclk); in at91sam9g20ek_audio_probe() 188 clk_set_rate(mclk, MCLK_RATE); in at91sam9g20ek_audio_probe() 233 clk_put(mclk); in at91sam9g20ek_audio_probe() 234 mclk = NULL; in at91sam9g20ek_audio_probe() 244 clk_disable(mclk); in at91sam9g20ek_audio_remove() [all …]
|
/linux/sound/soc/ti/ |
A D | davinci-evm.c | 25 struct clk *mclk; member 36 if (drvdata->mclk) in evm_startup() 37 return clk_prepare_enable(drvdata->mclk); in evm_startup() 49 clk_disable_unprepare(drvdata->mclk); in evm_shutdown() 389 struct clk *mclk; in davinci_evm_probe() local 418 if (PTR_ERR(mclk) == -EPROBE_DEFER) { in davinci_evm_probe() 420 } else if (IS_ERR(mclk)) { in davinci_evm_probe() 422 mclk = NULL; in davinci_evm_probe() 429 drvdata->mclk = mclk; in davinci_evm_probe() 434 if (!drvdata->mclk) { in davinci_evm_probe() [all …]
|
/linux/sound/soc/mxs/ |
A D | mxs-sgtl5000.c | 26 u32 mclk; in mxs_sgtl5000_hw_params() local 32 mclk = 256 * rate; in mxs_sgtl5000_hw_params() 35 mclk = 512 * rate; in mxs_sgtl5000_hw_params() 40 ret = snd_soc_dai_set_sysclk(codec_dai, SGTL5000_SYSCLK, mclk, 0); in mxs_sgtl5000_hw_params() 43 mclk / 1000000, mclk / 1000 % 1000); in mxs_sgtl5000_hw_params() 48 ret = snd_soc_dai_set_sysclk(cpu_dai, MXS_SAIF_MCLK, mclk, 0); in mxs_sgtl5000_hw_params() 51 mclk / 1000000, mclk / 1000 % 1000); in mxs_sgtl5000_hw_params()
|
/linux/sound/soc/rockchip/ |
A D | rk3399_gru_sound.c | 68 unsigned int mclk; in rockchip_sound_max98357a_hw_params() local 71 mclk = params_rate(params) * SOUND_FS; in rockchip_sound_max98357a_hw_params() 76 __func__, mclk, ret); in rockchip_sound_max98357a_hw_params() 89 unsigned int mclk; in rockchip_sound_rt5514_hw_params() local 92 mclk = params_rate(params) * SOUND_FS; in rockchip_sound_rt5514_hw_params() 102 mclk, SND_SOC_CLOCK_IN); in rockchip_sound_rt5514_hw_params() 121 int mclk, ret; in rockchip_sound_da7219_hw_params() local 132 mclk = 12288000; in rockchip_sound_da7219_hw_params() 138 mclk = 11289600; in rockchip_sound_da7219_hw_params() 219 unsigned int mclk; in rockchip_sound_dmic_hw_params() local [all …]
|
A D | rockchip_spdif.c | 36 struct clk *mclk; member 72 clk_disable_unprepare(spdif->mclk); in rk_spdif_runtime_suspend() 83 ret = clk_prepare_enable(spdif->mclk); in rk_spdif_runtime_resume() 100 clk_disable_unprepare(spdif->mclk); in rk_spdif_runtime_resume() 113 int srate, mclk; in rk_spdif_hw_params() local 117 mclk = srate * 128; in rk_spdif_hw_params() 134 ret = clk_set_rate(spdif->mclk, mclk); in rk_spdif_hw_params() 316 spdif->mclk = devm_clk_get(&pdev->dev, "mclk"); in rk_spdif_probe() 317 if (IS_ERR(spdif->mclk)) in rk_spdif_probe() 318 return PTR_ERR(spdif->mclk); in rk_spdif_probe()
|
/linux/sound/soc/codecs/ |
A D | wm8731.c | 46 struct clk *mclk; member 249 u32 mclk; member 327 if (coeff_div[i].rate == rate && coeff_div[i].mclk == mclk) in get_coeff() 391 if (wm8731->mclk && clk_set_rate(wm8731->mclk, freq)) in wm8731_set_dai_sysclk() 494 if (wm8731->mclk) { in wm8731_set_bias_level() 517 if (wm8731->mclk) in wm8731_set_bias_level() 674 if (IS_ERR(wm8731->mclk)) { in wm8731_spi_probe() 675 ret = PTR_ERR(wm8731->mclk); in wm8731_spi_probe() 677 wm8731->mclk = NULL; in wm8731_spi_probe() 738 if (IS_ERR(wm8731->mclk)) { in wm8731_i2c_probe() [all …]
|
A D | cs4234.c | 36 struct clk *mclk; member 448 int mclk = cs4234->mclk_rate; in cs4234_dai_rule_rate() local 451 .min = mclk / clamp(mclk / 30000, 256, 512), in cs4234_dai_rule_rate() 452 .max = mclk / clamp(mclk / 50000, 256, 512), in cs4234_dai_rule_rate() 455 .min = mclk / clamp(mclk / 60000, 128, 256), in cs4234_dai_rule_rate() 456 .max = mclk / clamp(mclk / 100000, 128, 256), in cs4234_dai_rule_rate() 701 clk_disable_unprepare(cs4234->mclk); in cs4234_shutdown() 708 ret = clk_prepare_enable(cs4234->mclk); in cs4234_powerup() 717 clk_disable_unprepare(cs4234->mclk); in cs4234_powerup() 768 if (IS_ERR(cs4234->mclk)) { in cs4234_i2c_probe() [all …]
|
/linux/sound/soc/intel/boards/ |
A D | cht_bsw_rt5672.c | 34 struct clk *mclk; member 66 if (ctx->mclk) { in platform_clock_control() 67 ret = clk_prepare_enable(ctx->mclk); in platform_clock_control() 99 if (ctx->mclk) in platform_clock_control() 100 clk_disable_unprepare(ctx->mclk); in platform_clock_control() 238 if (ctx->mclk) { in cht_codec_init() 249 ret = clk_prepare_enable(ctx->mclk); in cht_codec_init() 251 clk_disable_unprepare(ctx->mclk); in cht_codec_init() 498 if (IS_ERR(drv->mclk)) { in snd_cht_mc_probe() 501 PTR_ERR(drv->mclk)); in snd_cht_mc_probe() [all …]
|
A D | cht_bsw_max98090_ti.c | 36 struct clk *mclk; member 62 ret = clk_prepare_enable(ctx->mclk); in platform_clock_control() 69 clk_disable_unprepare(ctx->mclk); in platform_clock_control() 238 ret = clk_prepare_enable(ctx->mclk); in cht_codec_init() 240 clk_disable_unprepare(ctx->mclk); in cht_codec_init() 242 ret = clk_set_rate(ctx->mclk, CHT_PLAT_CLK_3_HZ); in cht_codec_init() 580 if (IS_ERR(drv->mclk)) { in snd_cht_mc_probe() 583 mclk_name, PTR_ERR(drv->mclk)); in snd_cht_mc_probe() 584 return PTR_ERR(drv->mclk); in snd_cht_mc_probe() 595 ret_val = clk_prepare_enable(drv->mclk); in snd_cht_mc_probe() [all …]
|
A D | kbl_rt5663_rt5514_max98927.c | 56 struct clk *mclk; member 95 ret = clk_set_rate(priv->mclk, 24000000); in platform_clock_control() 102 ret = clk_prepare_enable(priv->mclk); in platform_clock_control() 113 clk_disable_unprepare(priv->mclk); in platform_clock_control() 120 clk_disable_unprepare(priv->mclk); in platform_clock_control() 124 clk_disable_unprepare(priv->mclk); in platform_clock_control() 692 if (IS_ERR(priv->mclk)) in kabylake_set_bias_level() 703 if (!__clk_is_enabled(priv->mclk)) in kabylake_set_bias_level() 706 clk_disable_unprepare(priv->mclk); in kabylake_set_bias_level() 806 if (IS_ERR(ctx->mclk)) { in kabylake_audio_probe() [all …]
|
/linux/drivers/media/dvb-frontends/ |
A D | stv0900_sw.c | 295 u32 mclk, in stv0900_get_symbol_rate() argument 310 intval1 = (mclk) >> 16; in stv0900_get_symbol_rate() 333 symb /= (mclk >> 12); in stv0900_set_symbol_rate() 336 symb /= (mclk >> 10); in stv0900_set_symbol_rate() 339 symb /= (mclk >> 7); in stv0900_set_symbol_rate() 356 symb /= (mclk >> 12); in stv0900_set_max_symbol_rate() 359 symb /= (mclk >> 10); in stv0900_set_max_symbol_rate() 362 symb /= (mclk >> 7); in stv0900_set_max_symbol_rate() 383 symb /= (mclk >> 12); in stv0900_set_min_symbol_rate() 387 symb /= (mclk >> 10); in stv0900_set_min_symbol_rate() [all …]
|
A D | stv6110.c | 28 u32 mclk; member 210 ((((priv->mclk / 1000000) - 16) & 0x1f) << 3); in stv6110_init() 239 freq = divider * (priv->mclk / 1000); in stv6110_get_frequency() 256 frequency, priv->mclk); in stv6110_set_frequency() 261 ((((priv->mclk / 1000000) - 16) & 0x1f) << 3); in stv6110_set_frequency() 290 p_calc = (priv->mclk / 100000); in stv6110_set_frequency() 295 p_calc_opt = (priv->mclk / 100000); in stv6110_set_frequency() 299 ref = priv->mclk / ((1 << (r_div_opt + 1)) * (1 << (p + 1))); in stv6110_set_frequency() 329 vco_freq = divider * ((priv->mclk / 1000) / ((1 << (r_div_opt + 1)))); in stv6110_set_frequency() 417 priv->mclk = config->mclk; in stv6110_attach()
|
/linux/sound/soc/cirrus/ |
A D | ep93xx-i2s.c | 74 struct clk *mclk; member 114 clk_prepare_enable(info->mclk); in ep93xx_i2s_enable() 161 clk_disable_unprepare(info->mclk); in ep93xx_i2s_disable() 333 div = clk_get_rate(info->mclk) / params_rate(params); in ep93xx_i2s_hw_params() 343 err = clk_set_rate(info->sclk, clk_get_rate(info->mclk) / sdiv); in ep93xx_i2s_hw_params() 363 return clk_set_rate(info->mclk, freq); in ep93xx_i2s_set_sysclk() 454 info->mclk = clk_get(&pdev->dev, "mclk"); in ep93xx_i2s_probe() 455 if (IS_ERR(info->mclk)) { in ep93xx_i2s_probe() 456 err = PTR_ERR(info->mclk); in ep93xx_i2s_probe() 490 clk_put(info->mclk); in ep93xx_i2s_probe() [all …]
|
/linux/sound/soc/tegra/ |
A D | tegra_wm8903.c | 36 unsigned int mclk; in tegra_wm8903_mclk_rate() local 42 mclk = 128 * srate; in tegra_wm8903_mclk_rate() 45 mclk = 256 * srate; in tegra_wm8903_mclk_rate() 49 while (mclk < 6000000) in tegra_wm8903_mclk_rate() 50 mclk *= 2; in tegra_wm8903_mclk_rate() 52 return mclk; in tegra_wm8903_mclk_rate()
|
/linux/sound/soc/fsl/ |
A D | fsl_mqs.c | 35 struct clk *mclk; member 56 mclk_rate = clk_get_rate(mqs_priv->mclk); in fsl_mqs_hw_params() 235 mqs_priv->mclk = devm_clk_get(&pdev->dev, "mclk"); in fsl_mqs_probe() 236 if (IS_ERR(mqs_priv->mclk)) { in fsl_mqs_probe() 238 PTR_ERR(mqs_priv->mclk)); in fsl_mqs_probe() 239 ret = PTR_ERR(mqs_priv->mclk); in fsl_mqs_probe() 276 ret = clk_prepare_enable(mqs_priv->mclk); in fsl_mqs_runtime_resume() 303 clk_disable_unprepare(mqs_priv->mclk); in fsl_mqs_runtime_suspend()
|
/linux/sound/soc/intel/skylake/ |
A D | skl-ssp-clk.c | 97 ipc->mclk.hdr.type = DMA_CLK_CONTROLS; in skl_fill_clk_ipc() 99 ipc->mclk.hdr.size = sizeof(struct skl_dmactrl_mclk_cfg) - in skl_fill_clk_ipc() 133 ipc->mclk.mclk = 0; in skl_send_clk_dma_control() 135 ipc->mclk.mclk = 1; in skl_send_clk_dma_control() 137 ipc->mclk.keep_running = enable; in skl_send_clk_dma_control() 138 ipc->mclk.warm_up_over = enable; in skl_send_clk_dma_control() 139 ipc->mclk.clk_stop_over = !enable; in skl_send_clk_dma_control() 140 data = (u8 *)&ipc->mclk; in skl_send_clk_dma_control()
|
A D | skl-nhlt.c | 264 clk_src = get_clk_src(i2s_config->mclk, in skl_get_ssp_clks() 267 clk_src = get_clk_src(i2s_config_ext->mclk, in skl_get_ssp_clks() 292 static void skl_get_mclk(struct skl_dev *skl, struct skl_ssp_clk *mclk, in skl_get_mclk() argument 308 clk_src = get_clk_src(i2s_config->mclk, in skl_get_mclk() 310 clkdiv = i2s_config->mclk.mdivr & in skl_get_mclk() 313 clk_src = get_clk_src(i2s_config_ext->mclk, in skl_get_mclk() 315 clkdiv = i2s_config_ext->mclk.mdivr[0] & in skl_get_mclk() 331 mclk[id].rate_cfg[0].rate = parent->rate/div_ratio; in skl_get_mclk() 332 mclk[id].rate_cfg[0].config = &fmt->fmt_config[0]; in skl_get_mclk() 333 mclk[id].parent_name = parent->name; in skl_get_mclk()
|
/linux/arch/powerpc/boot/dts/ |
A D | mpc5121.dtsi | 357 clock-names = "ipg", "mclk"; 369 clock-names = "ipg", "mclk"; 381 clock-names = "ipg", "mclk"; 393 clock-names = "ipg", "mclk"; 405 clock-names = "ipg", "mclk"; 417 clock-names = "ipg", "mclk"; 429 clock-names = "ipg", "mclk"; 441 clock-names = "ipg", "mclk"; 453 clock-names = "ipg", "mclk"; 465 clock-names = "ipg", "mclk"; [all …]
|
/linux/arch/arm64/boot/dts/freescale/ |
A D | fsl-ls1028a-kontron-sl28-var3-ads2.dts | 48 simple-audio-card,mclk-fs = <256>; 106 clocks = <&mclk>; 107 clock-names = "mclk"; 108 assigned-clocks = <&mclk>; 122 mclk: clock-mclk@f130080 { label
|