Home
last modified time | relevance | path

Searched refs:clkdiv (Results 1 – 25 of 52) sorted by relevance

123

/Linux-v5.10/drivers/clk/qcom/
Dclk-spmi-pmic-div.c24 struct clkdiv { struct
33 static inline struct clkdiv *to_clkdiv(struct clk_hw *hw) in to_clkdiv() argument
35 return container_of(hw, struct clkdiv, hw); in to_clkdiv()
51 static bool is_spmi_pmic_clkdiv_enabled(struct clkdiv *clkdiv) in is_spmi_pmic_clkdiv_enabled() argument
55 regmap_read(clkdiv->regmap, clkdiv->base + REG_EN_CTL, &val); in is_spmi_pmic_clkdiv_enabled()
61 __spmi_pmic_clkdiv_set_enable_state(struct clkdiv *clkdiv, bool enable, in __spmi_pmic_clkdiv_set_enable_state() argument
65 unsigned int ns = clkdiv->cxo_period_ns; in __spmi_pmic_clkdiv_set_enable_state()
68 ret = regmap_update_bits(clkdiv->regmap, clkdiv->base + REG_EN_CTL, in __spmi_pmic_clkdiv_set_enable_state()
81 static int spmi_pmic_clkdiv_set_enable_state(struct clkdiv *clkdiv, bool enable) in spmi_pmic_clkdiv_set_enable_state() argument
85 regmap_read(clkdiv->regmap, clkdiv->base + REG_DIV_CTL1, &div_factor); in spmi_pmic_clkdiv_set_enable_state()
[all …]
/Linux-v5.10/drivers/cpufreq/
Ds3c2412-cpufreq.c126 unsigned long clkdiv; in s3c2412_cpufreq_setdivs() local
129 olddiv = clkdiv = s3c24xx_read_clkdivn(); in s3c2412_cpufreq_setdivs()
133 clkdiv &= ~S3C2412_CLKDIVN_ARMDIVN; in s3c2412_cpufreq_setdivs()
134 clkdiv &= ~S3C2412_CLKDIVN_HDIVN_MASK; in s3c2412_cpufreq_setdivs()
135 clkdiv &= ~S3C2412_CLKDIVN_PDIVN; in s3c2412_cpufreq_setdivs()
138 clkdiv |= S3C2412_CLKDIVN_ARMDIVN; in s3c2412_cpufreq_setdivs()
140 clkdiv |= ((cfg->divs.h_divisor / cfg->divs.arm_divisor) - 1); in s3c2412_cpufreq_setdivs()
143 clkdiv |= S3C2412_CLKDIVN_PDIVN; in s3c2412_cpufreq_setdivs()
145 s3c_freq_dbg("%s: div %08lx => %08lx\n", __func__, olddiv, clkdiv); in s3c2412_cpufreq_setdivs()
146 s3c24xx_write_clkdivn(clkdiv); in s3c2412_cpufreq_setdivs()
Ds3c2440-cpufreq.c154 unsigned long clkdiv, camdiv; in s3c2440_cpufreq_setdivs() local
159 clkdiv = s3c24xx_read_clkdivn(); in s3c2440_cpufreq_setdivs()
162 clkdiv &= ~(S3C2440_CLKDIVN_HDIVN_MASK | S3C2440_CLKDIVN_PDIVN); in s3c2440_cpufreq_setdivs()
167 clkdiv |= S3C2440_CLKDIVN_HDIVN_1; in s3c2440_cpufreq_setdivs()
171 clkdiv |= S3C2440_CLKDIVN_HDIVN_2; in s3c2440_cpufreq_setdivs()
177 clkdiv |= S3C2440_CLKDIVN_HDIVN_3_6; in s3c2440_cpufreq_setdivs()
183 clkdiv |= S3C2440_CLKDIVN_HDIVN_4_8; in s3c2440_cpufreq_setdivs()
191 clkdiv |= S3C2440_CLKDIVN_PDIVN; in s3c2440_cpufreq_setdivs()
201 s3c24xx_write_clkdivn(clkdiv); in s3c2440_cpufreq_setdivs()
Ds3c2410-cpufreq.c32 u32 clkdiv = 0; in s3c2410_cpufreq_setdivs() local
35 clkdiv |= S3C2410_CLKDIVN_HDIVN; in s3c2410_cpufreq_setdivs()
38 clkdiv |= S3C2410_CLKDIVN_PDIVN; in s3c2410_cpufreq_setdivs()
40 s3c24xx_write_clkdivn(clkdiv); in s3c2410_cpufreq_setdivs()
/Linux-v5.10/drivers/media/rc/
Dtango-ir.c160 u64 clkrate, clkdiv; in tango_ir_probe() local
205 clkdiv = clkrate * NEC_TIME_BASE; in tango_ir_probe()
206 do_div(clkdiv, 1000000); in tango_ir_probe()
208 val = NEC_CAP(31) | GPIO_SEL(12) | clkdiv; in tango_ir_probe()
211 clkdiv = clkrate * RC5_TIME_BASE; in tango_ir_probe()
212 do_div(clkdiv, 1000000); in tango_ir_probe()
215 writel_relaxed(clkdiv, ir->rc5_base + IR_RC5_CLK_DIV); in tango_ir_probe()
218 clkdiv = clkrate * RC6_TIME_BASE; in tango_ir_probe()
219 do_div(clkdiv, RC6_CARRIER); in tango_ir_probe()
222 writel_relaxed((clkdiv >> 2) << 18 | clkdiv, ir->rc6_base + RC6_CLKDIV); in tango_ir_probe()
/Linux-v5.10/drivers/spi/
Dspi-cavium.h46 uint64_t clkdiv:13; member
78 uint64_t clkdiv:13;
85 uint64_t clkdiv:13; member
111 uint64_t clkdiv:13;
118 uint64_t clkdiv:13; member
142 uint64_t clkdiv:13;
150 uint64_t clkdiv:13; member
180 uint64_t clkdiv:13;
187 uint64_t clkdiv:13; member
217 uint64_t clkdiv:13;
Dspi-cavium.c36 unsigned int clkdiv; in octeon_spi_do_transfer() local
48 clkdiv = p->sys_freq / (2 * xfer->speed_hz); in octeon_spi_do_transfer()
52 mpi_cfg.s.clkdiv = clkdiv; in octeon_spi_do_transfer()
Dspi-efm32.c109 u32 clkdiv; in efm32_spi_setup_transfer() local
119 clkdiv = 0; in efm32_spi_setup_transfer()
121 clkdiv = 64 * (DIV_ROUND_UP(2 * clkfreq, speed) - 4); in efm32_spi_setup_transfer()
123 if (clkdiv > (1U << 21)) in efm32_spi_setup_transfer()
126 efm32_spi_write32(ddata, clkdiv, REG_CLKDIV); in efm32_spi_setup_transfer()
/Linux-v5.10/Documentation/devicetree/bindings/clock/
Dqcom,spmi-clkdiv.txt1 Qualcomm Technologies, Inc. SPMI PMIC clock divider (clkdiv)
3 clkdiv configures the clock frequency of a set of outputs on the PMIC.
14 Definition: must be "qcom,spmi-clkdiv".
46 compatible = "qcom,spmi-clkdiv";
Drenesas,emev2-smu.txt21 - compatible: Should be "renesas,emev2-smu-clkdiv"
40 compatible = "renesas,emev2-smu-clkdiv";
87 compatible = "renesas,emev2-smu-clkdiv";
/Linux-v5.10/drivers/hwtracing/intel_th/
Dpti.c27 unsigned int clkdiv; member
113 return scnprintf(buf, PAGE_SIZE, "%d\n", 1u << pti->clkdiv); in clock_divider_show()
131 pti->clkdiv = val; in clock_divider_store()
159 ctl |= pti->clkdiv << __ffs(PTI_CLKDIV); in intel_th_pti_activate()
183 pti->clkdiv = (ctl & PTI_CLKDIV) >> __ffs(PTI_CLKDIV); in read_hw_config()
188 if (!pti->clkdiv) in read_hw_config()
189 pti->clkdiv = 1; in read_hw_config()
/Linux-v5.10/drivers/w1/masters/
Dmxc_w1.c95 unsigned int clkdiv; in mxc_w1_probe() local
116 clkdiv = DIV_ROUND_CLOSEST(clkrate, 1000000); in mxc_w1_probe()
117 clkrate /= clkdiv; in mxc_w1_probe()
132 writeb(clkdiv - 1, mdev->regs + MXC_W1_TIME_DIVIDER); in mxc_w1_probe()
/Linux-v5.10/arch/arm/boot/dts/
Demev2.dtsi72 compatible = "renesas,emev2-smu-clkdiv";
84 compatible = "renesas,emev2-smu-clkdiv";
103 compatible = "renesas,emev2-smu-clkdiv";
109 compatible = "renesas,emev2-smu-clkdiv";
115 compatible = "renesas,emev2-smu-clkdiv";
121 compatible = "renesas,emev2-smu-clkdiv";
/Linux-v5.10/sound/soc/adi/
Daxi-spdif.c80 unsigned int clkdiv, stat; in axi_spdif_hw_params() local
97 clkdiv = DIV_ROUND_CLOSEST(clk_get_rate(spdif->clk_ref), in axi_spdif_hw_params()
99 clkdiv <<= AXI_SPDIF_CTRL_CLKDIV_OFFSET; in axi_spdif_hw_params()
103 AXI_SPDIF_CTRL_CLKDIV_MASK, clkdiv); in axi_spdif_hw_params()
/Linux-v5.10/arch/arm/mach-s3c/
Dcpufreq-utils-s3c24xx.c81 void s3c24xx_write_clkdivn(u32 clkdiv) in s3c24xx_write_clkdivn() argument
83 __raw_writel(clkdiv, S3C2410_CLKDIVN); in s3c24xx_write_clkdivn()
/Linux-v5.10/sound/soc/codecs/
Dadau1701.c300 static int adau1701_reset(struct snd_soc_component *component, unsigned int clkdiv, in adau1701_reset() argument
308 if (clkdiv != ADAU1707_CLKDIV_UNSET && in adau1701_reset()
311 switch (clkdiv) { in adau1701_reset()
332 adau1701->pll_clkdiv = clkdiv; in adau1701_reset()
347 if (clkdiv != ADAU1707_CLKDIV_UNSET) { in adau1701_reset()
439 unsigned int clkdiv = adau1701->sysclk / params_rate(params); in adau1701_hw_params() local
448 if (clkdiv != adau1701->pll_clkdiv) { in adau1701_hw_params()
449 ret = adau1701_reset(component, clkdiv, params_rate(params)); in adau1701_hw_params()
/Linux-v5.10/drivers/iio/adc/
Dlpc18xx_adc.c122 unsigned int clkdiv; in lpc18xx_adc_probe() local
146 clkdiv = DIV_ROUND_UP(rate, LPC18XX_ADC_CLK_TARGET); in lpc18xx_adc_probe()
172 adc->cr_reg = (clkdiv << LPC18XX_ADC_CR_CLKDIV_SHIFT) | in lpc18xx_adc_probe()
/Linux-v5.10/sound/soc/fsl/
Dwm1133-ev1.c34 unsigned int clkdiv; member
129 WM8350_DAC_CLKDIV, wm8350_audio[i].clkdiv); in wm1133_ev1_hw_params()
132 WM8350_ADC_CLKDIV, wm8350_audio[i].clkdiv); in wm1133_ev1_hw_params()
/Linux-v5.10/drivers/i2c/busses/
Di2c-efm32.c313 u32 clkdiv; in efm32_i2c_probe() local
392 clkdiv = DIV_ROUND_UP(rate, 8 * ddata->frequency) - 1; in efm32_i2c_probe()
393 if (clkdiv >= 0x200) { in efm32_i2c_probe()
402 rate, ddata->frequency, (unsigned long)clkdiv); in efm32_i2c_probe()
403 efm32_i2c_write32(ddata, REG_CLKDIV, REG_CLKDIV_DIV(clkdiv)); in efm32_i2c_probe()
/Linux-v5.10/sound/soc/intel/skylake/
Dskl-nhlt.c299 u32 clkdiv, div_ratio; in skl_get_mclk() local
310 clkdiv = i2s_config->mclk.mdivr & in skl_get_mclk()
315 clkdiv = i2s_config_ext->mclk.mdivr[0] & in skl_get_mclk()
322 if (clkdiv != SKL_MCLK_DIV_RATIO_MASK) in skl_get_mclk()
324 div_ratio = clkdiv + 2; in skl_get_mclk()
/Linux-v5.10/drivers/pwm/
Dpwm-mediatek.c125 u32 clkdiv = 0, cnt_period, cnt_duty, reg_width = PWMDWIDTH, in pwm_mediatek_config() local
142 clkdiv++; in pwm_mediatek_config()
147 if (clkdiv > PWM_CLK_DIV_MAX) { in pwm_mediatek_config()
163 pwm_mediatek_writel(pc, pwm->hwpwm, PWMCON, BIT(15) | clkdiv); in pwm_mediatek_config()
Dpwm-tiehrpwm.c153 unsigned int clkdiv, hspclkdiv; in set_prescale_div() local
155 for (clkdiv = 0; clkdiv <= CLKDIV_MAX; clkdiv++) { in set_prescale_div()
168 *prescale_div = (1 << clkdiv) * in set_prescale_div()
171 *tb_clk_div = (clkdiv << TBCTL_CLKDIV_SHIFT) | in set_prescale_div()
/Linux-v5.10/drivers/gpu/drm/exynos/
Dexynos7_drm_decon.c144 u32 clkdiv; in decon_calc_clkdiv() local
147 clkdiv = DIV_ROUND_UP(clk_get_rate(ctx->vclk), ideal_clk); in decon_calc_clkdiv()
149 return (clkdiv < 0x100) ? clkdiv : 0xff; in decon_calc_clkdiv()
156 u32 val, clkdiv; in decon_commit() local
205 clkdiv = decon_calc_clkdiv(ctx, mode); in decon_commit()
206 if (clkdiv > 1) { in decon_commit()
207 val = VCLKCON1_CLKVAL_NUM_VCLK(clkdiv - 1); in decon_commit()
/Linux-v5.10/drivers/tty/serial/
Defm32-uart.c349 u32 clkdiv; in efm32_uart_set_termios() local
392 clkdiv = (DIV_ROUND_CLOSEST(4 * port->uartclk, 16 * baud) - 4) << 6; in efm32_uart_set_termios()
417 efm32_uart_write32(efm_port, clkdiv, UARTn_CLKDIV); in efm32_uart_set_termios()
556 u32 route, clkdiv, frame; in efm32_uart_console_get_options() local
567 clkdiv = efm32_uart_read32(efm_port, UARTn_CLKDIV); in efm32_uart_console_get_options()
570 16 * (4 + (clkdiv >> 6))); in efm32_uart_console_get_options()
/Linux-v5.10/drivers/video/fbdev/
Ds3c2410fb.c374 int clkdiv; in s3c2410fb_activate_var() local
376 clkdiv = DIV_ROUND_UP(s3c2410fb_calc_pixclk(fbi, var->pixclock), 2); in s3c2410fb_activate_var()
384 --clkdiv; in s3c2410fb_activate_var()
385 if (clkdiv < 0) in s3c2410fb_activate_var()
386 clkdiv = 0; in s3c2410fb_activate_var()
389 if (clkdiv < 2) in s3c2410fb_activate_var()
390 clkdiv = 2; in s3c2410fb_activate_var()
393 fbi->regs.lcdcon1 |= S3C2410_LCDCON1_CLKVAL(clkdiv); in s3c2410fb_activate_var()

123