/kernel/linux/linux-5.10/drivers/cpufreq/ |
H A D | s3c2440-cpufreq.c | 47 static struct clk *hclk; variable 70 unsigned long hclk, fclk, armclk; in s3c2440_cpufreq_calcdivs() local 75 hclk_max = cfg->max.hclk; in s3c2440_cpufreq_calcdivs() 77 s3c_freq_dbg("%s: fclk is %lu, armclk %lu, max hclk %lu\n", in s3c2440_cpufreq_calcdivs() 93 hclk = (fclk / hdiv); in s3c2440_cpufreq_calcdivs() 94 if (hclk <= hclk_max || within_khz(hclk, hclk_max)) in s3c2440_cpufreq_calcdivs() 98 s3c_freq_dbg("%s: hclk %lu, div %d\n", __func__, hclk, hdiv); in s3c2440_cpufreq_calcdivs() 103 pdiv = (hclk > cf in s3c2440_cpufreq_calcdivs() [all...] |
H A D | s3c2412-cpufreq.c | 44 static struct clk *hclk; variable 52 unsigned long hclk, fclk, armclk, armdiv_clk; in s3c2412_cpufreq_calcdivs() local 57 hclk_max = cfg->max.hclk; in s3c2412_cpufreq_calcdivs() 59 /* We can't run hclk above armclk as at the best we have to in s3c2412_cpufreq_calcdivs() 60 * have armclk and hclk in dvs mode. */ in s3c2412_cpufreq_calcdivs() 69 cfg->freq.hclk, cfg->freq.pclk); in s3c2412_cpufreq_calcdivs() 85 cfg->freq.hclk = hclk = armdiv_clk / hdiv; in s3c2412_cpufreq_calcdivs() 91 cfg->freq.armclk = dvs ? hclk : armdiv_clk; in s3c2412_cpufreq_calcdivs() 93 s3c_freq_dbg("%s: armclk %lu, hclk in s3c2412_cpufreq_calcdivs() [all...] |
H A D | s3c2410-cpufreq.c | 45 unsigned long hclk, fclk, pclk; in s3c2410_cpufreq_calcdivs() local 50 hclk_max = cfg->max.hclk; in s3c2410_cpufreq_calcdivs() 54 s3c_freq_dbg("%s: fclk is %lu, max hclk %lu\n", in s3c2410_cpufreq_calcdivs() 57 hdiv = (fclk > cfg->max.hclk) ? 2 : 1; in s3c2410_cpufreq_calcdivs() 58 hclk = fclk / hdiv; in s3c2410_cpufreq_calcdivs() 60 if (hclk > cfg->max.hclk) { in s3c2410_cpufreq_calcdivs() 61 s3c_freq_dbg("%s: hclk too big\n", __func__); in s3c2410_cpufreq_calcdivs() 65 pdiv = (hclk > cfg->max.pclk) ? 2 : 1; in s3c2410_cpufreq_calcdivs() 66 pclk = hclk / pdi in s3c2410_cpufreq_calcdivs() [all...] |
H A D | s3c2416-cpufreq.c | 27 struct clk *hclk; member 130 pr_debug("cpufreq: switching armclk to hclk (%lukHz)\n", in s3c2416_cpufreq_enter_dvs() 131 clk_get_rate(s3c_freq->hclk) / 1000); in s3c2416_cpufreq_enter_dvs() 132 ret = clk_set_parent(s3c_freq->armclk, s3c_freq->hclk); in s3c2416_cpufreq_enter_dvs() 134 pr_err("cpufreq: Failed to switch armclk to hclk: %d\n", ret); in s3c2416_cpufreq_enter_dvs() 188 /* force armdiv to hclk frequency for transition from dvs*/ in s3c2416_cpufreq_leave_dvs() 189 if (clk_get_rate(s3c_freq->armdiv) > clk_get_rate(s3c_freq->hclk)) { in s3c2416_cpufreq_leave_dvs() 190 pr_debug("cpufreq: force armdiv to hclk frequency (%lukHz)\n", in s3c2416_cpufreq_leave_dvs() 191 clk_get_rate(s3c_freq->hclk) / 1000); in s3c2416_cpufreq_leave_dvs() 193 clk_get_rate(s3c_freq->hclk) / 100 in s3c2416_cpufreq_leave_dvs() [all...] |
H A D | s3c24xx-cpufreq.c | 60 unsigned long fclk, pclk, hclk, armclk; in s3c_cpufreq_getcur() local 63 cfg->freq.hclk = hclk = clk_get_rate(clk_hclk); in s3c_cpufreq_getcur() 70 cfg->freq.hclk_tns = 1000000000 / (cfg->freq.hclk / 10); in s3c_cpufreq_getcur() 72 cfg->divs.h_divisor = fclk / hclk; in s3c_cpufreq_getcur() 81 cfg->freq.hclk = pll / cfg->divs.h_divisor; in s3c_cpufreq_calc() 84 /* convert hclk into 10ths of nanoseconds for io calcs */ in s3c_cpufreq_calc() 85 cfg->freq.hclk_tns = 1000000000 / (cfg->freq.hclk / 10); in s3c_cpufreq_calc() 101 cfg->freq.hclk, cfg->divs.h_divisor, in s3c_cpufreq_show() 183 if (cpu_new.freq.hclk ! in s3c_cpufreq_settarget() [all...] |
H A D | s3c24xx-cpufreq-debugfs.c | 33 f->fclk, f->hclk, f->pclk, f->armclk); in show_max() 77 cfg->freq.hclk, print_ns(cfg->freq.hclk_tns)); in info_show() 78 seq_printf(seq, " PCLK %ld Hz\n", cfg->freq.hclk); in info_show() 122 seq_printf(seq, "hclk period is %lu.%lu ns\n", print_ns(cfg->freq.hclk_tns)); in io_show()
|
/kernel/linux/linux-5.10/arch/arm/mach-s3c/ |
H A D | iotiming-s3c2410.c | 107 s3c_freq_iodbg("%s: cyc=%d, hclk=%lu, shift=%d => div %d\n", in calc_0124() 132 static int calc_tacp(unsigned int cyc, unsigned long hclk, unsigned long *v) in calc_tacp() argument 155 s3c_freq_iodbg("%s: cyc=%u, nwait=%d, hclk=%lu => div=%u\n", in calc_tacc() 216 unsigned long hclk = cfg->freq.hclk_tns; in s3c2410_calc_bank() local 230 ret = calc_0124(bt->tacs, hclk, &res, S3C2410_BANKCON_Tacs_SHIFT); in s3c2410_calc_bank() 231 ret |= calc_0124(bt->tcos, hclk, &res, S3C2410_BANKCON_Tcos_SHIFT); in s3c2410_calc_bank() 232 ret |= calc_0124(bt->tcah, hclk, &res, S3C2410_BANKCON_Tcah_SHIFT); in s3c2410_calc_bank() 233 ret |= calc_0124(bt->tcoh, hclk, &res, S3C2410_BANKCON_Tcoh_SHIFT); in s3c2410_calc_bank() 238 ret |= calc_tacp(bt->tacp, hclk, &res); in s3c2410_calc_bank() 239 ret |= calc_tacc(bt->tacc, bt->nwait_en, hclk, in s3c2410_calc_bank() 295 unsigned long hclk = cfg->freq.hclk_tns; s3c2410_iotiming_getbank() local 316 unsigned long hclk = cfg->freq.hclk_tns; s3c2410_iotiming_debugfs() local [all...] |
H A D | iotiming-s3c2412.c | 94 unsigned int hclk = cfg->freq.hclk_tns; in s3c2412_calc_bank() local 97 bt->smbidcyr = calc_timing(bt->idcy, hclk, &err); in s3c2412_calc_bank() 98 bt->smbwstrd = calc_timing(bt->wstrd, hclk, &err); in s3c2412_calc_bank() 99 bt->smbwstwr = calc_timing(bt->wstwr, hclk, &err); in s3c2412_calc_bank() 100 bt->smbwstoen = calc_timing(bt->wstoen, hclk, &err); in s3c2412_calc_bank() 101 bt->smbwstwen = calc_timing(bt->wstwen, hclk, &err); in s3c2412_calc_bank() 102 bt->smbwstbrd = calc_timing(bt->wstbrd, hclk, &err); in s3c2412_calc_bank() 271 refresh = (cfg->freq.hclk / 100) * (board->refresh / 10); in s3c2412_cpufreq_setrefresh()
|
H A D | mach-osiris-dvs.c | 44 return f->armclk == f->hclk; in is_dvs() 63 freqs->old.armclk, freqs->old.hclk, in osiris_dvs_notify() 64 freqs->new.armclk, freqs->new.hclk); in osiris_dvs_notify()
|
/kernel/linux/linux-5.10/arch/arm/mach-mv78xx0/ |
H A D | common.c | 50 int hclk; in get_hclk() local 57 hclk = 166666667; in get_hclk() 60 hclk = 200000000; in get_hclk() 63 hclk = 266666667; in get_hclk() 66 hclk = 333333333; in get_hclk() 69 hclk = 400000000; in get_hclk() 76 return hclk; in get_hclk() 79 static void get_pclk_l2clk(int hclk, int core_index, int *pclk, int *l2clk) in get_pclk_l2clk() argument 97 *pclk = ((u64)hclk * (2 + (cfg & 0xf))) >> 1; in get_pclk_l2clk() 388 int hclk; in mv78xx0_init() local [all...] |
/kernel/linux/linux-6.6/arch/arm/mach-mv78xx0/ |
H A D | common.c | 47 int hclk; in get_hclk() local 54 hclk = 166666667; in get_hclk() 57 hclk = 200000000; in get_hclk() 60 hclk = 266666667; in get_hclk() 63 hclk = 333333333; in get_hclk() 66 hclk = 400000000; in get_hclk() 73 return hclk; in get_hclk() 76 static void get_pclk_l2clk(int hclk, int core_index, int *pclk, int *l2clk) in get_pclk_l2clk() argument 94 *pclk = ((u64)hclk * (2 + (cfg & 0xf))) >> 1; in get_pclk_l2clk() 408 int hclk; in mv78xx0_init() local [all...] |
/kernel/linux/linux-5.10/drivers/soc/qcom/ |
H A D | qcom_gsbi.c | 111 struct clk *hclk; member 183 gsbi->hclk = devm_clk_get(&pdev->dev, "iface"); in gsbi_probe() 184 if (IS_ERR(gsbi->hclk)) in gsbi_probe() 185 return PTR_ERR(gsbi->hclk); in gsbi_probe() 187 clk_prepare_enable(gsbi->hclk); in gsbi_probe() 218 clk_disable_unprepare(gsbi->hclk); in gsbi_probe() 226 clk_disable_unprepare(gsbi->hclk); in gsbi_remove()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/cadence/ |
H A D | macb_pci.c | 69 plat_data.hclk = clk_register_fixed_rate(&pdev->dev, "hclk", NULL, 0, in macb_probe() 71 if (IS_ERR(plat_data.hclk)) { in macb_probe() 72 err = PTR_ERR(plat_data.hclk); in macb_probe() 100 clk_unregister(plat_data.hclk); in macb_probe() 115 clk_unregister(plat_data->hclk); in macb_remove()
|
/kernel/linux/linux-6.6/drivers/net/ethernet/cadence/ |
H A D | macb_pci.c | 69 plat_data.hclk = clk_register_fixed_rate(&pdev->dev, "hclk", NULL, 0, in macb_probe() 71 if (IS_ERR(plat_data.hclk)) { in macb_probe() 72 err = PTR_ERR(plat_data.hclk); in macb_probe() 100 clk_unregister(plat_data.hclk); in macb_probe() 115 clk_unregister(plat_data->hclk); in macb_remove()
|
/kernel/linux/linux-5.10/drivers/crypto/rockchip/ |
H A D | rk3288_crypto.c | 37 err = clk_prepare_enable(dev->hclk); in rk_crypto_enable_clk() 39 dev_err(dev->dev, "[%s:%d], Couldn't enable clock hclk\n", in rk_crypto_enable_clk() 51 clk_disable_unprepare(dev->hclk); in rk_crypto_enable_clk() 63 clk_disable_unprepare(dev->hclk); in rk_crypto_disable_clk() 190 crypto_info->hclk = devm_clk_get(&pdev->dev, "hclk"); in rk_crypto_probe() 191 if (IS_ERR(crypto_info->hclk)) { in rk_crypto_probe() 192 err = PTR_ERR(crypto_info->hclk); in rk_crypto_probe()
|
/kernel/linux/linux-5.10/sound/soc/rockchip/ |
H A D | rockchip_spdif.c | 37 struct clk *hclk; member 71 clk_disable_unprepare(spdif->hclk); in rk_spdif_runtime_suspend() 87 ret = clk_prepare_enable(spdif->hclk); in rk_spdif_runtime_resume() 90 dev_err(spdif->dev, "hclk clock enable failed %d\n", ret); in rk_spdif_runtime_resume() 100 clk_disable_unprepare(spdif->hclk); in rk_spdif_runtime_resume() 309 spdif->hclk = devm_clk_get(&pdev->dev, "hclk"); in rk_spdif_probe() 310 if (IS_ERR(spdif->hclk)) in rk_spdif_probe() 311 return PTR_ERR(spdif->hclk); in rk_spdif_probe() 322 spdif->regmap = devm_regmap_init_mmio_clk(&pdev->dev, "hclk", reg in rk_spdif_probe() [all...] |
H A D | rockchip_pdm.c | 32 struct clk *hclk; member 353 clk_disable_unprepare(pdm->hclk); in rockchip_pdm_runtime_suspend() 369 ret = clk_prepare_enable(pdm->hclk); in rockchip_pdm_runtime_resume() 520 pdm->hclk = devm_clk_get(&pdev->dev, "pdm_hclk"); in rockchip_pdm_probe() 521 if (IS_ERR(pdm->hclk)) in rockchip_pdm_probe() 522 return PTR_ERR(pdm->hclk); in rockchip_pdm_probe() 524 ret = clk_prepare_enable(pdm->hclk); in rockchip_pdm_probe() 559 clk_disable_unprepare(pdm->hclk); in rockchip_pdm_probe() 573 clk_disable_unprepare(pdm->hclk); in rockchip_pdm_remove()
|
/kernel/linux/linux-6.6/sound/soc/rockchip/ |
H A D | rockchip_spdif.c | 37 struct clk *hclk; member 73 clk_disable_unprepare(spdif->hclk); in rk_spdif_runtime_suspend() 89 ret = clk_prepare_enable(spdif->hclk); in rk_spdif_runtime_resume() 92 dev_err(spdif->dev, "hclk clock enable failed %d\n", ret); in rk_spdif_runtime_resume() 102 clk_disable_unprepare(spdif->hclk); in rk_spdif_runtime_resume() 314 spdif->hclk = devm_clk_get(&pdev->dev, "hclk"); in rk_spdif_probe() 315 if (IS_ERR(spdif->hclk)) in rk_spdif_probe() 316 return PTR_ERR(spdif->hclk); in rk_spdif_probe() 326 spdif->regmap = devm_regmap_init_mmio_clk(&pdev->dev, "hclk", reg in rk_spdif_probe() [all...] |
H A D | rockchip_pdm.c | 34 struct clk *hclk; member 416 clk_disable_unprepare(pdm->hclk); in rockchip_pdm_runtime_suspend() 432 ret = clk_prepare_enable(pdm->hclk); in rockchip_pdm_runtime_resume() 615 pdm->hclk = devm_clk_get(&pdev->dev, "pdm_hclk"); in rockchip_pdm_probe() 616 if (IS_ERR(pdm->hclk)) in rockchip_pdm_probe() 617 return PTR_ERR(pdm->hclk); in rockchip_pdm_probe() 619 ret = clk_prepare_enable(pdm->hclk); in rockchip_pdm_probe() 659 clk_disable_unprepare(pdm->hclk); in rockchip_pdm_probe() 673 clk_disable_unprepare(pdm->hclk); in rockchip_pdm_remove()
|
/kernel/linux/linux-6.6/drivers/char/hw_random/ |
H A D | jh7110-trng.c | 98 struct clk *hclk; member 241 clk_disable_unprepare(trng->hclk); in starfive_trng_cleanup() 306 trng->hclk = devm_clk_get(&pdev->dev, "hclk"); in starfive_trng_probe() 307 if (IS_ERR(trng->hclk)) in starfive_trng_probe() 308 return dev_err_probe(&pdev->dev, PTR_ERR(trng->hclk), in starfive_trng_probe() 321 clk_prepare_enable(trng->hclk); in starfive_trng_probe() 344 clk_disable_unprepare(trng->hclk); in starfive_trng_probe() 356 clk_disable_unprepare(trng->hclk); in starfive_trng_suspend() 366 clk_prepare_enable(trng->hclk); in starfive_trng_resume() [all...] |
/kernel/linux/linux-5.10/drivers/clk/samsung/ |
H A D | clk-s5pv210-audss.c | 71 struct clk *hclk, *pll_ref, *pll_in, *cdclk, *sclk_audio; in s5pv210_audss_clk_probe() local 90 hclk = devm_clk_get(&pdev->dev, "hclk"); in s5pv210_audss_clk_probe() 91 if (IS_ERR(hclk)) { in s5pv210_audss_clk_probe() 92 dev_err(&pdev->dev, "failed to get hclk clock\n"); in s5pv210_audss_clk_probe() 93 return PTR_ERR(hclk); in s5pv210_audss_clk_probe() 144 hclk_p = __clk_get_name(hclk); in s5pv210_audss_clk_probe()
|
/kernel/linux/linux-6.6/drivers/soc/qcom/ |
H A D | qcom_gsbi.c | 111 struct clk *hclk; member 181 gsbi->hclk = devm_clk_get_enabled(&pdev->dev, "iface"); in gsbi_probe() 182 if (IS_ERR(gsbi->hclk)) in gsbi_probe() 183 return PTR_ERR(gsbi->hclk); in gsbi_probe() 219 clk_disable_unprepare(gsbi->hclk); in gsbi_remove()
|
/kernel/linux/linux-6.6/drivers/clk/samsung/ |
H A D | clk-s5pv210-audss.c | 70 struct clk *hclk, *pll_ref, *pll_in, *cdclk, *sclk_audio; in s5pv210_audss_clk_probe() local 86 hclk = devm_clk_get(&pdev->dev, "hclk"); in s5pv210_audss_clk_probe() 87 if (IS_ERR(hclk)) { in s5pv210_audss_clk_probe() 88 dev_err(&pdev->dev, "failed to get hclk clock\n"); in s5pv210_audss_clk_probe() 89 return PTR_ERR(hclk); in s5pv210_audss_clk_probe() 140 hclk_p = __clk_get_name(hclk); in s5pv210_audss_clk_probe()
|
/kernel/linux/linux-5.10/drivers/mmc/host/ |
H A D | tmio_mmc.c | 62 divisor = host->pdata->hclk / new_clock; in tmio_mmc_set_clock() 131 if (!pdata || !pdata->hclk) in tmio_mmc_probe() 164 host->mmc->f_max = pdata->hclk; in tmio_mmc_probe() 165 host->mmc->f_min = pdata->hclk / 512; in tmio_mmc_probe()
|
/kernel/linux/linux-6.6/drivers/crypto/starfive/ |
H A D | jh7110-cryp.c | 147 cryp->hclk = devm_clk_get(&pdev->dev, "hclk"); in starfive_cryp_probe() 148 if (IS_ERR(cryp->hclk)) in starfive_cryp_probe() 149 return dev_err_probe(&pdev->dev, PTR_ERR(cryp->hclk), in starfive_cryp_probe() 174 clk_prepare_enable(cryp->hclk); in starfive_cryp_probe() 226 clk_disable_unprepare(cryp->hclk); in starfive_cryp_probe() 256 clk_disable_unprepare(cryp->hclk); in starfive_cryp_remove()
|