Home
last modified time | relevance | path

Searched refs:clkrate (Results 1 – 25 of 31) sorted by relevance

12

/linux-6.12.1/arch/arm/mach-omap1/
Di2c.c97 i2c_pdata[ints[1] - 1].clkrate = ints[2]; in omap_i2c_bus_setup()
98 i2c_pdata[ints[1] - 1].clkrate |= OMAP_I2C_CMDLINE_SETUP; in omap_i2c_bus_setup()
113 if (i2c_pdata[i].clkrate & OMAP_I2C_CMDLINE_SETUP) { in omap_register_i2c_bus_cmdline()
114 i2c_pdata[i].clkrate &= ~OMAP_I2C_CMDLINE_SETUP; in omap_register_i2c_bus_cmdline()
133 int __init omap_register_i2c_bus(int bus_id, u32 clkrate, in omap_register_i2c_bus() argument
147 if (!i2c_pdata[bus_id - 1].clkrate) in omap_register_i2c_bus()
148 i2c_pdata[bus_id - 1].clkrate = clkrate; in omap_register_i2c_bus()
150 i2c_pdata[bus_id - 1].clkrate &= ~OMAP_I2C_CMDLINE_SETUP; in omap_register_i2c_bus()
Di2c.h18 extern int omap_register_i2c_bus(int bus_id, u32 clkrate,
23 static inline int omap_register_i2c_bus(int bus_id, u32 clkrate, in omap_register_i2c_bus() argument
/linux-6.12.1/drivers/w1/masters/
Dmxc_w1.c94 unsigned long clkrate; in mxc_w1_probe() local
111 clkrate = clk_get_rate(mdev->clk); in mxc_w1_probe()
112 if (clkrate < 10000000) in mxc_w1_probe()
116 clkdiv = DIV_ROUND_CLOSEST(clkrate, 1000000); in mxc_w1_probe()
117 clkrate /= clkdiv; in mxc_w1_probe()
118 if ((clkrate < 980000) || (clkrate > 1020000)) in mxc_w1_probe()
120 "Incorrect time base frequency %lu Hz\n", clkrate); in mxc_w1_probe()
/linux-6.12.1/drivers/pwm/
Dpwm-apple.c36 u64 clkrate; member
56 on_cycles = mul_u64_u64_div_u64(fpwm->clkrate, in apple_pwm_apply()
61 off_cycles = mul_u64_u64_div_u64(fpwm->clkrate, in apple_pwm_apply()
91 state->duty_cycle = DIV64_U64_ROUND_UP((u64)on_cycles * NSEC_PER_SEC, fpwm->clkrate); in apple_pwm_get_state()
93 NSEC_PER_SEC, fpwm->clkrate); in apple_pwm_get_state()
130 fpwm->clkrate = clk_get_rate(clk); in apple_pwm_probe()
131 if (fpwm->clkrate > NSEC_PER_SEC) in apple_pwm_probe()
Dpwm-atmel.c192 unsigned long clkrate, in atmel_pwm_calculate_cprd_and_pres() argument
201 cycles *= clkrate; in atmel_pwm_calculate_cprd_and_pres()
227 unsigned long clkrate, unsigned long cprd, in atmel_pwm_calculate_cdty() argument
232 cycles *= clkrate; in atmel_pwm_calculate_cdty()
301 unsigned long clkrate = clk_get_rate(atmel_pwm->clk); in atmel_pwm_apply() local
312 atmel_pwm_calculate_cdty(state, clkrate, cprd, pres, &cdty); in atmel_pwm_apply()
317 ret = atmel_pwm_calculate_cprd_and_pres(chip, clkrate, state, &cprd, in atmel_pwm_apply()
325 atmel_pwm_calculate_cdty(state, clkrate, cprd, pres, &cdty); in atmel_pwm_apply()
Dpwm-imx27.c225 unsigned long long clkrate; in pwm_imx27_apply() local
229 clkrate = clk_get_rate(imx->clk_per); in pwm_imx27_apply()
230 c = clkrate * state->period; in pwm_imx27_apply()
238 c = clkrate * state->duty_cycle; in pwm_imx27_apply()
/linux-6.12.1/drivers/watchdog/
Dst_lpc_wdt.c46 unsigned long clkrate; member
82 unsigned long clkrate = st_wdog->clkrate; in st_wdog_load_timer() local
84 writel_relaxed(timeout * clkrate, st_wdog->base + LPC_LPA_LSB_OFF); in st_wdog_load_timer()
197 st_wdog->clkrate = clk_get_rate(st_wdog->clk); in st_wdog_probe()
199 if (!st_wdog->clkrate) { in st_wdog_probe()
203 st_wdog_dev.max_timeout = 0xFFFFFFFF / st_wdog->clkrate; in st_wdog_probe()
/linux-6.12.1/drivers/i2c/busses/
Di2c-lpc2k.c350 u32 clkrate; in i2c_lpc2k_probe() local
390 clkrate = clk_get_rate(i2c->clk); in i2c_lpc2k_probe()
391 if (clkrate == 0) { in i2c_lpc2k_probe()
397 clkrate = clkrate / bus_clk_rate; in i2c_lpc2k_probe()
399 scl_high = (clkrate * I2C_STD_MODE_DUTY) / 100; in i2c_lpc2k_probe()
401 scl_high = (clkrate * I2C_FAST_MODE_DUTY) / 100; in i2c_lpc2k_probe()
403 scl_high = (clkrate * I2C_FAST_MODE_PLUS_DUTY) / 100; in i2c_lpc2k_probe()
406 writel(clkrate - scl_high, i2c->base + LPC24XX_I2SCLL); in i2c_lpc2k_probe()
/linux-6.12.1/sound/soc/fsl/
Dlpc3xxx-i2s.c38 static void __lpc3xxx_find_clkdiv(u32 *clkx, u32 *clky, int freq, int xbytes, u32 clkrate) in __lpc3xxx_find_clkdiv() argument
49 clkrate = clkrate / 100; in __lpc3xxx_find_clkdiv()
50 baseclk = clkrate; in __lpc3xxx_find_clkdiv()
189 __lpc3xxx_find_clkdiv(&clkx, &clky, i2s_info_p->freq, xfersize, i2s_info_p->clkrate); in lpc3xxx_i2s_hw_params()
193 dev_dbg(dev, "Base clock rate : %d\n", i2s_info_p->clkrate); in lpc3xxx_i2s_hw_params()
329 i2s_info_p->clkrate = clk_get_rate(i2s_info_p->clk); in lpc32xx_i2s_probe()
330 if (i2s_info_p->clkrate == 0) in lpc32xx_i2s_probe()
Dlpc3xxx-i2s.h22 u32 clkrate; member
/linux-6.12.1/drivers/rtc/
Drtc-st-lpc.c45 unsigned long clkrate; member
96 do_div(lpt, rtc->clkrate); in st_rtc_read_time()
110 lpt = (unsigned long long)secs * rtc->clkrate; in st_rtc_set_time()
168 lpa = (unsigned long long)alarm_secs * rtc->clkrate; in st_rtc_set_alarm()
236 rtc->clkrate = clk_get_rate(rtc->clk); in st_rtc_probe()
237 if (!rtc->clkrate) { in st_rtc_probe()
248 do_div(rtc->rtc_dev->range_max, rtc->clkrate); in st_rtc_probe()
/linux-6.12.1/drivers/mtd/nand/raw/
Dlpc32xx_mlc.c233 uint32_t clkrate, tmp; in lpc32xx_nand_setup() local
240 clkrate = clk_get_rate(host->clk); in lpc32xx_nand_setup()
241 if (clkrate == 0) in lpc32xx_nand_setup()
242 clkrate = 104000000; in lpc32xx_nand_setup()
258 tmp |= MLCTIMEREG_TCEA_DELAY(clkrate / host->ncfg->tcea_delay + 1); in lpc32xx_nand_setup()
259 tmp |= MLCTIMEREG_BUSY_DELAY(clkrate / host->ncfg->busy_delay + 1); in lpc32xx_nand_setup()
260 tmp |= MLCTIMEREG_NAND_TA(clkrate / host->ncfg->nand_ta + 1); in lpc32xx_nand_setup()
261 tmp |= MLCTIMEREG_RD_HIGH(clkrate / host->ncfg->rd_high + 1); in lpc32xx_nand_setup()
262 tmp |= MLCTIMEREG_RD_LOW(clkrate / host->ncfg->rd_low); in lpc32xx_nand_setup()
263 tmp |= MLCTIMEREG_WR_HIGH(clkrate / host->ncfg->wr_high + 1); in lpc32xx_nand_setup()
[all …]
Dlpc32xx_slc.c238 uint32_t clkrate, tmp; in lpc32xx_nand_setup() local
251 clkrate = clk_get_rate(host->clk); in lpc32xx_nand_setup()
252 if (clkrate == 0) in lpc32xx_nand_setup()
253 clkrate = LPC32XX_DEF_BUS_RATE; in lpc32xx_nand_setup()
257 SLCTAC_WWIDTH(clkrate, host->ncfg->wwidth) | in lpc32xx_nand_setup()
258 SLCTAC_WHOLD(clkrate, host->ncfg->whold) | in lpc32xx_nand_setup()
259 SLCTAC_WSETUP(clkrate, host->ncfg->wsetup) | in lpc32xx_nand_setup()
261 SLCTAC_RWIDTH(clkrate, host->ncfg->rwidth) | in lpc32xx_nand_setup()
262 SLCTAC_RHOLD(clkrate, host->ncfg->rhold) | in lpc32xx_nand_setup()
263 SLCTAC_RSETUP(clkrate, host->ncfg->rsetup); in lpc32xx_nand_setup()
Ds3c2410.c287 unsigned long clkrate = clk_get_rate(info->clk); in s3c2410_nand_setrate() local
293 info->clk_rate = clkrate; in s3c2410_nand_setrate()
294 clkrate /= 1000; /* turn clock into kHz for ease of use */ in s3c2410_nand_setrate()
297 tacls = s3c_nand_calc_rate(plat->tacls, clkrate, tacls_max); in s3c2410_nand_setrate()
298 twrph0 = s3c_nand_calc_rate(plat->twrph0, clkrate, 8); in s3c2410_nand_setrate()
299 twrph1 = s3c_nand_calc_rate(plat->twrph1, clkrate, 8); in s3c2410_nand_setrate()
313 tacls, to_ns(tacls, clkrate), twrph0, to_ns(twrph0, clkrate), in s3c2410_nand_setrate()
314 twrph1, to_ns(twrph1, clkrate)); in s3c2410_nand_setrate()
/linux-6.12.1/drivers/spi/
Dspi-npcm-fiu.c242 unsigned long clkrate; member
252 unsigned long clkrate; member
561 if (fiu->clkrate != chip->clkrate) { in npcm_fiu_exec_op()
562 ret = clk_set_rate(fiu->clk, chip->clkrate); in npcm_fiu_exec_op()
565 chip->clkrate, fiu->clkrate); in npcm_fiu_exec_op()
567 fiu->clkrate = chip->clkrate; in npcm_fiu_exec_op()
676 chip->clkrate = spi->max_speed_hz; in npcm_fiu_setup()
678 fiu->clkrate = clk_get_rate(fiu->clk); in npcm_fiu_setup()
Dspi-fsl-dspi.c597 unsigned long clkrate) in hz_to_spi_baud() argument
608 scale_needed = clkrate / speed_hz; in hz_to_spi_baud()
609 if (clkrate % speed_hz) in hz_to_spi_baud()
627 speed_hz, clkrate); in hz_to_spi_baud()
634 unsigned long clkrate) in ns_delay_scale() argument
641 scale_needed = div_u64_rem((u64)delay_ns * clkrate, NSEC_PER_SEC, in ns_delay_scale()
661 delay_ns, clkrate); in ns_delay_scale()
1008 unsigned long clkrate; in dspi_setup() local
1054 clkrate = clk_get_rate(dspi->clk); in dspi_setup()
1055 hz_to_spi_baud(&pbr, &br, spi->max_speed_hz, clkrate); in dspi_setup()
[all …]
/linux-6.12.1/Documentation/devicetree/bindings/sound/
Dda7218.txt40 - dlg,dmic1-clkrate-hz : DMic1 clock frequency (Hz).
46 - dlg,dmic2-clkrate-hz : DMic2 clock frequency (Hz).
91 dlg,dmic1-clkrate-hz = <3000000>;
94 dlg,dmic2-clkrate-hz = <3000000>;
/linux-6.12.1/drivers/ata/
Dpata_imx.c59 unsigned long clkrate; in pata_imx_set_timing() local
62 clkrate = clk_get_rate(priv->clk); in pata_imx_set_timing()
65 !clkrate) in pata_imx_set_timing()
68 T = 1000000000 / clkrate; in pata_imx_set_timing()
/linux-6.12.1/drivers/net/dsa/sja1105/
Dsja1105_ptp.c611 s64 clkrate; in sja1105_ptp_adjfine() local
614 clkrate = (s64)scaled_ppm * SJA1105_CC_MULT_NUM; in sja1105_ptp_adjfine()
615 clkrate = div_s64(clkrate, SJA1105_CC_MULT_DEM); in sja1105_ptp_adjfine()
618 clkrate = SJA1105_CC_MULT + clkrate; in sja1105_ptp_adjfine()
619 WARN_ON(abs(clkrate) >= GENMASK_ULL(31, 0)); in sja1105_ptp_adjfine()
620 clkrate32 = clkrate; in sja1105_ptp_adjfine()
/linux-6.12.1/drivers/mmc/host/
Dpxamci.c55 unsigned long clkrate; member
174 clks = (unsigned long long)data->timeout_ns * host->clkrate; in pxamci_setup_data()
445 unsigned long rate = host->clkrate; in pxamci_set_ios()
663 host->clkrate = clk_get_rate(host->clk); in pxamci_probe()
668 mmc->f_min = (host->clkrate + 63) / 64; in pxamci_probe()
669 mmc->f_max = (mmc_has_26MHz()) ? 26000000 : host->clkrate; in pxamci_probe()
/linux-6.12.1/include/linux/platform_data/
Di2c-omap.h33 u32 clkrate; member
/linux-6.12.1/drivers/gpu/ipu-v3/
Dipu-di.c440 unsigned long rate, clkrate; in ipu_di_config_clock() local
443 clkrate = clk_get_rate(di->clk_ipu); in ipu_di_config_clock()
444 div = DIV_ROUND_CLOSEST(clkrate, sig->mode.pixelclock); in ipu_di_config_clock()
446 rate = clkrate / div; in ipu_di_config_clock()
/linux-6.12.1/drivers/mtd/spi-nor/controllers/
Dhisi-sfc.c84 u32 clkrate; member
155 ret = clk_set_rate(host->clk, priv->clkrate); in hisi_spi_nor_prep()
361 &priv->clkrate); in hisi_spi_nor_register()
/linux-6.12.1/drivers/gpu/drm/arm/
Dhdlcd_drv.c212 unsigned long clkrate = clk_get_rate(hdlcd->clk); in hdlcd_show_pxlclock() local
215 seq_printf(m, "hw : %lu\n", clkrate); in hdlcd_show_pxlclock()
/linux-6.12.1/drivers/gpu/drm/tiny/
Darcpgu.c344 unsigned long clkrate = clk_get_rate(arcpgu->clk); in arcpgu_show_pxlclock() local
347 seq_printf(m, "hw : %lu\n", clkrate); in arcpgu_show_pxlclock()

12