/kernel/linux/linux-5.10/drivers/cpufreq/ |
H A D | s3c2440-cpufreq.c | 46 static struct clk *fclk; variable 70 unsigned long hclk, fclk, armclk; in s3c2440_cpufreq_calcdivs() local 73 fclk = cfg->freq.fclk; in s3c2440_cpufreq_calcdivs() 77 s3c_freq_dbg("%s: fclk is %lu, armclk %lu, max hclk %lu\n", in s3c2440_cpufreq_calcdivs() 78 __func__, fclk, armclk, hclk_max); in s3c2440_cpufreq_calcdivs() 80 if (armclk > fclk) { in s3c2440_cpufreq_calcdivs() 81 pr_warn("%s: armclk > fclk\n", __func__); in s3c2440_cpufreq_calcdivs() 82 armclk = fclk; in s3c2440_cpufreq_calcdivs() 86 if (armclk < fclk in s3c2440_cpufreq_calcdivs() 209 run_freq_for(unsigned long max_hclk, unsigned long fclk, int *divs, struct cpufreq_frequency_table *table, size_t table_size) run_freq_for() argument [all...] |
H A D | s3c2412-cpufreq.c | 43 static struct clk *fclk; variable 52 unsigned long hclk, fclk, armclk, armdiv_clk; in s3c2412_cpufreq_calcdivs() local 55 fclk = cfg->freq.fclk; in s3c2412_cpufreq_calcdivs() 65 s3c_freq_dbg("%s: fclk=%lu, armclk=%lu, hclk_max=%lu\n", in s3c2412_cpufreq_calcdivs() 66 __func__, fclk, armclk, hclk_max); in s3c2412_cpufreq_calcdivs() 68 __func__, cfg->freq.fclk, cfg->freq.armclk, in s3c2412_cpufreq_calcdivs() 71 armdiv = fclk / armclk; in s3c2412_cpufreq_calcdivs() 79 armdiv_clk = fclk / armdiv; in s3c2412_cpufreq_calcdivs() 148 clk_set_parent(armclk, cfg->divs.dvs ? hclk : fclk); in s3c2412_cpufreq_setdivs() [all...] |
H A D | s3c2410-cpufreq.c | 45 unsigned long hclk, fclk, pclk; in s3c2410_cpufreq_calcdivs() local 49 fclk = cfg->freq.fclk; in s3c2410_cpufreq_calcdivs() 52 cfg->freq.armclk = fclk; in s3c2410_cpufreq_calcdivs() 54 s3c_freq_dbg("%s: fclk is %lu, max hclk %lu\n", in s3c2410_cpufreq_calcdivs() 55 __func__, fclk, hclk_max); in s3c2410_cpufreq_calcdivs() 57 hdiv = (fclk > cfg->max.hclk) ? 2 : 1; in s3c2410_cpufreq_calcdivs() 58 hclk = fclk / hdiv; in s3c2410_cpufreq_calcdivs() 84 .fclk = 200000000, 137 s3c2410_cpufreq_info.max.fclk in s3c2410a_cpufreq_add() [all...] |
H A D | s3c24xx-cpufreq.c | 60 unsigned long fclk, pclk, hclk, armclk; in s3c_cpufreq_getcur() local 62 cfg->freq.fclk = fclk = clk_get_rate(clk_fclk); in s3c_cpufreq_getcur() 68 cfg->pll.frequency = fclk; in s3c_cpufreq_getcur() 72 cfg->divs.h_divisor = fclk / hclk; in s3c_cpufreq_getcur() 73 cfg->divs.p_divisor = fclk / pclk; in s3c_cpufreq_getcur() 80 cfg->freq.fclk = pll; in s3c_cpufreq_calc() 100 pfx, cfg->pll.frequency, cfg->freq.fclk, cfg->freq.armclk, in s3c_cpufreq_show() 170 cpu_new.freq.fclk = cpu_new.pll.frequency; in s3c_cpufreq_settarget() 205 s3c_cpufreq_updateclk(clk_fclk, cpu_new.freq.fclk); in s3c_cpufreq_settarget() [all...] |
H A D | s3c24xx-cpufreq-debugfs.c | 33 f->fclk, f->hclk, f->pclk, f->armclk); in show_max() 75 seq_printf(seq, " FCLK %ld Hz\n", cfg->freq.fclk); in info_show()
|
/kernel/linux/linux-6.6/drivers/usb/host/ |
H A D | ehci-sh.c | 13 struct clk *iclk, *fclk; member 114 priv->fclk = devm_clk_get(&pdev->dev, "usb_fck"); in ehci_hcd_sh_probe() 115 if (IS_ERR(priv->fclk)) in ehci_hcd_sh_probe() 116 priv->fclk = NULL; in ehci_hcd_sh_probe() 122 clk_enable(priv->fclk); in ehci_hcd_sh_probe() 139 clk_disable(priv->fclk); in ehci_hcd_sh_probe() 157 clk_disable(priv->fclk); in ehci_hcd_sh_remove()
|
H A D | ohci-at91.c | 54 struct clk *fclk; member 78 clk_set_rate(ohci_at91->fclk, 48000000); in at91_start_clock() 81 clk_prepare_enable(ohci_at91->fclk); in at91_start_clock() 90 clk_disable_unprepare(ohci_at91->fclk); in at91_stop_clock() 215 ohci_at91->fclk = devm_clk_get(dev, "uhpck"); in usb_hcd_at91_probe() 216 if (IS_ERR(ohci_at91->fclk)) { in usb_hcd_at91_probe() 218 retval = PTR_ERR(ohci_at91->fclk); in usb_hcd_at91_probe()
|
/kernel/linux/linux-5.10/drivers/usb/host/ |
H A D | ehci-sh.c | 13 struct clk *iclk, *fclk; member 115 priv->fclk = devm_clk_get(&pdev->dev, "usb_fck"); in ehci_hcd_sh_probe() 116 if (IS_ERR(priv->fclk)) in ehci_hcd_sh_probe() 117 priv->fclk = NULL; in ehci_hcd_sh_probe() 123 clk_enable(priv->fclk); in ehci_hcd_sh_probe() 140 clk_disable(priv->fclk); in ehci_hcd_sh_probe() 158 clk_disable(priv->fclk); in ehci_hcd_sh_remove()
|
H A D | ohci-at91.c | 53 struct clk *fclk; member 78 clk_set_rate(ohci_at91->fclk, 48000000); in at91_start_clock() 81 clk_prepare_enable(ohci_at91->fclk); in at91_start_clock() 90 clk_disable_unprepare(ohci_at91->fclk); in at91_stop_clock() 202 ohci_at91->fclk = devm_clk_get(dev, "uhpck"); in usb_hcd_at91_probe() 203 if (IS_ERR(ohci_at91->fclk)) { in usb_hcd_at91_probe() 205 retval = PTR_ERR(ohci_at91->fclk); in usb_hcd_at91_probe()
|
/kernel/linux/linux-6.6/drivers/clk/nuvoton/ |
H A D | clk-ma35d1-pll.c | 146 unsigned long tmp, fout, fclk, diff; in ma35d1_pll_find_closest() local 153 fclk = div_u64(parent_rate * n, m); in ma35d1_pll_find_closest() 156 fclk = div_u64(fclk, 100); in ma35d1_pll_find_closest() 158 if (fclk < PLL_FCLK_MIN_FREQ || in ma35d1_pll_find_closest() 159 fclk > PLL_FCLK_MAX_FREQ) in ma35d1_pll_find_closest() 162 fout = div_u64(fclk, p); in ma35d1_pll_find_closest()
|
/kernel/linux/linux-5.10/drivers/media/dvb-frontends/ |
H A D | s5h1420.c | 39 u32 fclk; member 368 tmp = state->fclk / tmp; in s5h1420_read_status() 475 do_div(val, (state->fclk / 1000)); in s5h1420_setsymbolrate() 501 * divide fclk by 1000000 to get the correct value. */ in s5h1420_setfreqoffset() 502 val = -(int) ((freqoffset * (1<<24)) / (state->fclk / 1000000)); in s5h1420_setfreqoffset() 529 * divide fclk by 1000000 to get the correct value. */ in s5h1420_getfreqoffset() 530 val = (((-val) * (state->fclk/1000000)) / (1<<24)); in s5h1420_getfreqoffset() 666 /* set s5h1420 fclk PLL according to desired symbol rate */ in s5h1420_set_frontend() 668 state->fclk = 80000000; in s5h1420_set_frontend() 670 state->fclk in s5h1420_set_frontend() [all...] |
H A D | cx24110.c | 231 u32 tmp, fclk, BDRI; in cx24110_set_symbolrate() local 251 fclk=90999000UL/2; in cx24110_set_symbolrate() 255 fclk=60666000UL; in cx24110_set_symbolrate() 259 fclk=80888000UL; in cx24110_set_symbolrate() 263 fclk=90999000UL; in cx24110_set_symbolrate() 265 dprintk("cx24110 debug: fclk %d Hz\n",fclk); in cx24110_set_symbolrate() 275 BDRI=fclk>>2; in cx24110_set_symbolrate() 288 dprintk("fclk = %d\n", fclk); in cx24110_set_symbolrate() [all...] |
/kernel/linux/linux-6.6/drivers/media/dvb-frontends/ |
H A D | s5h1420.c | 39 u32 fclk; member 368 tmp = state->fclk / tmp; in s5h1420_read_status() 475 do_div(val, (state->fclk / 1000)); in s5h1420_setsymbolrate() 501 * divide fclk by 1000000 to get the correct value. */ in s5h1420_setfreqoffset() 502 val = -(int) ((freqoffset * (1<<24)) / (state->fclk / 1000000)); in s5h1420_setfreqoffset() 529 * divide fclk by 1000000 to get the correct value. */ in s5h1420_getfreqoffset() 530 val = (((-val) * (state->fclk/1000000)) / (1<<24)); in s5h1420_getfreqoffset() 666 /* set s5h1420 fclk PLL according to desired symbol rate */ in s5h1420_set_frontend() 668 state->fclk = 80000000; in s5h1420_set_frontend() 670 state->fclk in s5h1420_set_frontend() [all...] |
H A D | cx24110.c | 231 u32 tmp, fclk, BDRI; in cx24110_set_symbolrate() local 251 fclk=90999000UL/2; in cx24110_set_symbolrate() 255 fclk=60666000UL; in cx24110_set_symbolrate() 259 fclk=80888000UL; in cx24110_set_symbolrate() 263 fclk=90999000UL; in cx24110_set_symbolrate() 265 dprintk("cx24110 debug: fclk %d Hz\n",fclk); in cx24110_set_symbolrate() 275 BDRI=fclk>>2; in cx24110_set_symbolrate() 288 dprintk("fclk = %d\n", fclk); in cx24110_set_symbolrate() [all...] |
/kernel/linux/linux-5.10/drivers/clocksource/ |
H A D | timer-ti-dm.c | 179 if (unlikely(!timer) || IS_ERR(timer->fclk)) in omap_dm_timer_set_source() 208 if (clk_hw_get_num_parents(__clk_get_hw(timer->fclk)) < 2) in omap_dm_timer_set_source() 218 ret = clk_set_parent(timer->fclk, parent); in omap_dm_timer_set_source() 247 timer->fclk = clk_get(&timer->pdev->dev, "fck"); in omap_dm_timer_prepare() 248 if (WARN_ON_ONCE(IS_ERR(timer->fclk))) { in omap_dm_timer_prepare() 249 dev_err(&timer->pdev->dev, ": No fclk handle.\n"); in omap_dm_timer_prepare() 420 clk_put(timer->fclk); in omap_dm_timer_free() 479 if (timer && !IS_ERR(timer->fclk)) in omap_dm_timer_get_fclk() 480 return timer->fclk; in omap_dm_timer_get_fclk() 530 rate = clk_get_rate(timer->fclk); in omap_dm_timer_stop() [all...] |
/kernel/linux/linux-6.6/drivers/clocksource/ |
H A D | timer-ti-dm.c | 122 struct clk *fclk; member 418 if (unlikely(!timer) || IS_ERR(timer->fclk)) in omap_dm_timer_set_source() 447 if (clk_hw_get_num_parents(__clk_get_hw(timer->fclk)) < 2) in omap_dm_timer_set_source() 457 ret = clk_set_parent(timer->fclk, parent); in omap_dm_timer_set_source() 729 if (timer && !IS_ERR(timer->fclk)) in omap_dm_timer_get_fclk() 730 return timer->fclk; in omap_dm_timer_get_fclk() 1136 timer->fclk = devm_clk_get(dev, "fck"); in omap_dm_timer_probe() 1137 if (IS_ERR(timer->fclk)) in omap_dm_timer_probe() 1138 return PTR_ERR(timer->fclk); in omap_dm_timer_probe() 1141 ret = devm_clk_notifier_register(dev, timer->fclk, in omap_dm_timer_probe() [all...] |
/kernel/linux/linux-5.10/arch/sh/drivers/pci/ |
H A D | pcie-sh7786.c | 26 struct clk *fclk, phy_clk; member 225 port->fclk = clk_get(NULL, fclk_name); in pcie_clk_init() 226 if (IS_ERR(port->fclk)) { in pcie_clk_init() 227 ret = PTR_ERR(port->fclk); in pcie_clk_init() 231 clk_enable(port->fclk); in pcie_clk_init() 251 clk_disable(port->fclk); in pcie_clk_init() 252 clk_put(port->fclk); in pcie_clk_init()
|
/kernel/linux/linux-6.6/arch/sh/drivers/pci/ |
H A D | pcie-sh7786.c | 26 struct clk *fclk, phy_clk; member 224 port->fclk = clk_get(NULL, fclk_name); in pcie_clk_init() 225 if (IS_ERR(port->fclk)) { in pcie_clk_init() 226 ret = PTR_ERR(port->fclk); in pcie_clk_init() 230 clk_enable(port->fclk); in pcie_clk_init() 250 clk_disable(port->fclk); in pcie_clk_init() 251 clk_put(port->fclk); in pcie_clk_init()
|
/kernel/linux/linux-5.10/drivers/iio/adc/ |
H A D | ad7192.c | 182 u32 fclk; member 499 fadc = DIV_ROUND_CLOSEST(st->fclk, in ad7192_get_available_filter_freq() 503 fadc = DIV_ROUND_CLOSEST(st->fclk, in ad7192_get_available_filter_freq() 507 fadc = DIV_ROUND_CLOSEST(st->fclk, AD7192_MODE_RATE(st->mode)); in ad7192_get_available_filter_freq() 628 fadc = DIV_ROUND_CLOSEST(st->fclk, in ad7192_get_3db_filter_freq() 676 *val = st->fclk / in ad7192_read_raw() 727 div = st->fclk / (val * st->f_order * 1024); in ad7192_write_raw() 976 st->fclk = AD7192_INT_FREQ_MHZ; in ad7192_probe() 992 st->fclk = clk_get_rate(st->mclk); in ad7192_probe() 993 if (!ad7192_valid_external_frequency(st->fclk)) { in ad7192_probe() [all...] |
H A D | ad7124.c | 265 unsigned int fclk, odr_sel_bits; in ad7124_set_channel_odr() local 268 fclk = clk_get_rate(st->mclk); in ad7124_set_channel_odr() 276 odr_sel_bits = DIV_ROUND_CLOSEST(fclk, odr * 32); in ad7124_set_channel_odr() 289 DIV_ROUND_CLOSEST(fclk, odr_sel_bits * 32); in ad7124_set_channel_odr() 662 unsigned int val, fclk, power_mode; in ad7124_setup() local 665 fclk = clk_get_rate(st->mclk); in ad7124_setup() 666 if (!fclk) in ad7124_setup() 672 fclk); in ad7124_setup() 673 if (fclk != ad7124_master_clk_freq_hz[power_mode]) { in ad7124_setup() 674 ret = clk_set_rate(st->mclk, fclk); in ad7124_setup() [all...] |
/kernel/linux/linux-6.6/drivers/iio/adc/ |
H A D | ad7124.c | 262 unsigned int fclk, odr_sel_bits; in ad7124_set_channel_odr() local 264 fclk = clk_get_rate(st->mclk); in ad7124_set_channel_odr() 272 odr_sel_bits = DIV_ROUND_CLOSEST(fclk, odr * 32); in ad7124_set_channel_odr() 282 st->channels[channel].cfg.odr = DIV_ROUND_CLOSEST(fclk, odr_sel_bits * 32); in ad7124_set_channel_odr() 891 unsigned int fclk, power_mode; in ad7124_setup() local 894 fclk = clk_get_rate(st->mclk); in ad7124_setup() 895 if (!fclk) in ad7124_setup() 901 fclk); in ad7124_setup() 902 if (fclk != ad7124_master_clk_freq_hz[power_mode]) { in ad7124_setup() 903 ret = clk_set_rate(st->mclk, fclk); in ad7124_setup() [all...] |
/kernel/linux/linux-5.10/drivers/pwm/ |
H A D | pwm-omap-dmtimer.c | 159 struct clk *fclk; in pwm_omap_dmtimer_config() local 168 fclk = omap->pdata->get_fclk(omap->dm_timer); in pwm_omap_dmtimer_config() 169 if (!fclk) { in pwm_omap_dmtimer_config() 170 dev_err(chip->dev, "invalid pmtimer fclk\n"); in pwm_omap_dmtimer_config() 174 clk_rate = clk_get_rate(fclk); in pwm_omap_dmtimer_config() 176 dev_err(chip->dev, "invalid pmtimer fclk rate\n"); in pwm_omap_dmtimer_config()
|
/kernel/linux/linux-6.6/drivers/pwm/ |
H A D | pwm-omap-dmtimer.c | 159 struct clk *fclk; in pwm_omap_dmtimer_config() local 168 fclk = omap->pdata->get_fclk(omap->dm_timer); in pwm_omap_dmtimer_config() 169 if (!fclk) { in pwm_omap_dmtimer_config() 170 dev_err(chip->dev, "invalid pmtimer fclk\n"); in pwm_omap_dmtimer_config() 174 clk_rate = clk_get_rate(fclk); in pwm_omap_dmtimer_config() 176 dev_err(chip->dev, "invalid pmtimer fclk rate\n"); in pwm_omap_dmtimer_config()
|
/kernel/linux/linux-5.10/drivers/i2c/busses/ |
H A D | i2c-omap.c | 355 struct clk *fclk; in omap_i2c_init() local 374 fclk = clk_get(omap->dev, "fck"); in omap_i2c_init() 375 if (IS_ERR(fclk)) { in omap_i2c_init() 376 error = PTR_ERR(fclk); in omap_i2c_init() 382 fclk_rate = clk_get_rate(fclk); in omap_i2c_init() 383 clk_put(fclk); in omap_i2c_init() 404 * The filter is iclk (fclk for HS) period. in omap_i2c_init() 413 fclk = clk_get(omap->dev, "fck"); in omap_i2c_init() 414 if (IS_ERR(fclk)) { in omap_i2c_init() 415 error = PTR_ERR(fclk); in omap_i2c_init() [all...] |
/kernel/linux/linux-6.6/drivers/i2c/busses/ |
H A D | i2c-omap.c | 355 struct clk *fclk; in omap_i2c_init() local 374 fclk = clk_get(omap->dev, "fck"); in omap_i2c_init() 375 if (IS_ERR(fclk)) { in omap_i2c_init() 376 error = PTR_ERR(fclk); in omap_i2c_init() 382 fclk_rate = clk_get_rate(fclk); in omap_i2c_init() 383 clk_put(fclk); in omap_i2c_init() 404 * The filter is iclk (fclk for HS) period. in omap_i2c_init() 413 fclk = clk_get(omap->dev, "fck"); in omap_i2c_init() 414 if (IS_ERR(fclk)) { in omap_i2c_init() 415 error = PTR_ERR(fclk); in omap_i2c_init() [all...] |