Home
last modified time | relevance | path

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

12

/Linux-v4.19/drivers/clk/qcom/
Dclk-spmi-pmic-div.c32 struct clkdiv { struct
41 static inline struct clkdiv *to_clkdiv(struct clk_hw *hw) in to_clkdiv() argument
43 return container_of(hw, struct clkdiv, hw); in to_clkdiv()
59 static bool is_spmi_pmic_clkdiv_enabled(struct clkdiv *clkdiv) in is_spmi_pmic_clkdiv_enabled() argument
63 regmap_read(clkdiv->regmap, clkdiv->base + REG_EN_CTL, &val); in is_spmi_pmic_clkdiv_enabled()
69 __spmi_pmic_clkdiv_set_enable_state(struct clkdiv *clkdiv, bool enable, in __spmi_pmic_clkdiv_set_enable_state() argument
73 unsigned int ns = clkdiv->cxo_period_ns; in __spmi_pmic_clkdiv_set_enable_state()
76 ret = regmap_update_bits(clkdiv->regmap, clkdiv->base + REG_EN_CTL, in __spmi_pmic_clkdiv_set_enable_state()
89 static int spmi_pmic_clkdiv_set_enable_state(struct clkdiv *clkdiv, bool enable) in spmi_pmic_clkdiv_set_enable_state() argument
93 regmap_read(clkdiv->regmap, clkdiv->base + REG_DIV_CTL1, &div_factor); in spmi_pmic_clkdiv_set_enable_state()
[all …]
/Linux-v4.19/drivers/cpufreq/
Ds3c2412-cpufreq.c120 unsigned long clkdiv; in s3c2412_cpufreq_setdivs() local
123 olddiv = clkdiv = __raw_readl(S3C2410_CLKDIVN); in s3c2412_cpufreq_setdivs()
127 clkdiv &= ~S3C2412_CLKDIVN_ARMDIVN; in s3c2412_cpufreq_setdivs()
128 clkdiv &= ~S3C2412_CLKDIVN_HDIVN_MASK; in s3c2412_cpufreq_setdivs()
129 clkdiv &= ~S3C2412_CLKDIVN_PDIVN; in s3c2412_cpufreq_setdivs()
132 clkdiv |= S3C2412_CLKDIVN_ARMDIVN; in s3c2412_cpufreq_setdivs()
134 clkdiv |= ((cfg->divs.h_divisor / cfg->divs.arm_divisor) - 1); in s3c2412_cpufreq_setdivs()
137 clkdiv |= S3C2412_CLKDIVN_PDIVN; in s3c2412_cpufreq_setdivs()
139 s3c_freq_dbg("%s: div %08lx => %08lx\n", __func__, olddiv, clkdiv); in s3c2412_cpufreq_setdivs()
140 __raw_writel(clkdiv, S3C2410_CLKDIVN); in s3c2412_cpufreq_setdivs()
Ds3c2440-cpufreq.c144 unsigned long clkdiv, camdiv; in s3c2440_cpufreq_setdivs() local
149 clkdiv = __raw_readl(S3C2410_CLKDIVN); in s3c2440_cpufreq_setdivs()
152 clkdiv &= ~(S3C2440_CLKDIVN_HDIVN_MASK | S3C2440_CLKDIVN_PDIVN); in s3c2440_cpufreq_setdivs()
157 clkdiv |= S3C2440_CLKDIVN_HDIVN_1; in s3c2440_cpufreq_setdivs()
161 clkdiv |= S3C2440_CLKDIVN_HDIVN_2; in s3c2440_cpufreq_setdivs()
167 clkdiv |= S3C2440_CLKDIVN_HDIVN_3_6; in s3c2440_cpufreq_setdivs()
173 clkdiv |= S3C2440_CLKDIVN_HDIVN_4_8; in s3c2440_cpufreq_setdivs()
181 clkdiv |= S3C2440_CLKDIVN_PDIVN; in s3c2440_cpufreq_setdivs()
191 __raw_writel(clkdiv, S3C2410_CLKDIVN); in s3c2440_cpufreq_setdivs()
Ds3c2410-cpufreq.c35 u32 clkdiv = 0; in s3c2410_cpufreq_setdivs() local
38 clkdiv |= S3C2410_CLKDIVN_HDIVN; in s3c2410_cpufreq_setdivs()
41 clkdiv |= S3C2410_CLKDIVN_PDIVN; in s3c2410_cpufreq_setdivs()
43 __raw_writel(clkdiv, S3C2410_CLKDIVN); in s3c2410_cpufreq_setdivs()
/Linux-v4.19/drivers/media/rc/
Dtango-ir.c166 u64 clkrate, clkdiv; in tango_ir_probe() local
219 clkdiv = clkrate * NEC_TIME_BASE; in tango_ir_probe()
220 do_div(clkdiv, 1000000); in tango_ir_probe()
222 val = NEC_CAP(31) | GPIO_SEL(12) | clkdiv; in tango_ir_probe()
225 clkdiv = clkrate * RC5_TIME_BASE; in tango_ir_probe()
226 do_div(clkdiv, 1000000); in tango_ir_probe()
229 writel_relaxed(clkdiv, ir->rc5_base + IR_RC5_CLK_DIV); in tango_ir_probe()
232 clkdiv = clkrate * RC6_TIME_BASE; in tango_ir_probe()
233 do_div(clkdiv, RC6_CARRIER); in tango_ir_probe()
236 writel_relaxed((clkdiv >> 2) << 18 | clkdiv, ir->rc6_base + RC6_CLKDIV); in tango_ir_probe()
/Linux-v4.19/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.c124 u32 clkdiv; in efm32_spi_setup_transfer() local
134 clkdiv = 0; in efm32_spi_setup_transfer()
136 clkdiv = 64 * (DIV_ROUND_UP(2 * clkfreq, speed) - 4); in efm32_spi_setup_transfer()
138 if (clkdiv > (1U << 21)) in efm32_spi_setup_transfer()
141 efm32_spi_write32(ddata, clkdiv, REG_CLKDIV); in efm32_spi_setup_transfer()
/Linux-v4.19/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";
Demev2-clock.txt21 - compatible: Should be "renesas,emev2-smu-clkdiv"
40 compatible = "renesas,emev2-smu-clkdiv";
87 compatible = "renesas,emev2-smu-clkdiv";
/Linux-v4.19/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-v4.19/drivers/w1/masters/
Dmxc_w1.c104 unsigned int clkdiv; in mxc_w1_probe() local
125 clkdiv = DIV_ROUND_CLOSEST(clkrate, 1000000); in mxc_w1_probe()
126 clkrate /= clkdiv; in mxc_w1_probe()
142 writeb(clkdiv - 1, mdev->regs + MXC_W1_TIME_DIVIDER); in mxc_w1_probe()
/Linux-v4.19/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-v4.19/sound/soc/adi/
Daxi-spdif.c81 unsigned int clkdiv, stat; in axi_spdif_hw_params() local
98 clkdiv = DIV_ROUND_CLOSEST(clk_get_rate(spdif->clk_ref), in axi_spdif_hw_params()
100 clkdiv <<= AXI_SPDIF_CTRL_CLKDIV_OFFSET; in axi_spdif_hw_params()
104 AXI_SPDIF_CTRL_CLKDIV_MASK, clkdiv); in axi_spdif_hw_params()
/Linux-v4.19/sound/soc/codecs/
Dadau1701.c301 static int adau1701_reset(struct snd_soc_component *component, unsigned int clkdiv, in adau1701_reset() argument
309 if (clkdiv != ADAU1707_CLKDIV_UNSET && in adau1701_reset()
312 switch (clkdiv) { in adau1701_reset()
333 adau1701->pll_clkdiv = clkdiv; in adau1701_reset()
348 if (clkdiv != ADAU1707_CLKDIV_UNSET) { in adau1701_reset()
440 unsigned int clkdiv = adau1701->sysclk / params_rate(params); in adau1701_hw_params() local
449 if (clkdiv != adau1701->pll_clkdiv) { in adau1701_hw_params()
450 ret = adau1701_reset(component, clkdiv, params_rate(params)); in adau1701_hw_params()
/Linux-v4.19/drivers/pwm/
Dpwm-mediatek.c145 u32 clkdiv = 0, cnt_period, cnt_duty, reg_width = PWMDWIDTH, in mtk_pwm_config() local
161 clkdiv++; in mtk_pwm_config()
166 if (clkdiv > PWM_CLK_DIV_MAX) { in mtk_pwm_config()
182 mtk_pwm_writel(pc, pwm->hwpwm, PWMCON, BIT(15) | clkdiv); in mtk_pwm_config()
Dpwm-tiehrpwm.c166 unsigned int clkdiv, hspclkdiv; in set_prescale_div() local
168 for (clkdiv = 0; clkdiv <= CLKDIV_MAX; clkdiv++) { in set_prescale_div()
181 *prescale_div = (1 << clkdiv) * in set_prescale_div()
184 *tb_clk_div = (clkdiv << TBCTL_CLKDIV_SHIFT) | in set_prescale_div()
/Linux-v4.19/drivers/iio/adc/
Dlpc18xx_adc.c126 unsigned int clkdiv; in lpc18xx_adc_probe() local
151 clkdiv = DIV_ROUND_UP(rate, LPC18XX_ADC_CLK_TARGET); in lpc18xx_adc_probe()
178 adc->cr_reg = (clkdiv << LPC18XX_ADC_CR_CLKDIV_SHIFT) | in lpc18xx_adc_probe()
/Linux-v4.19/sound/soc/fsl/
Dwm1133-ev1.c39 unsigned int clkdiv; member
134 WM8350_DAC_CLKDIV, wm8350_audio[i].clkdiv); in wm1133_ev1_hw_params()
137 WM8350_ADC_CLKDIV, wm8350_audio[i].clkdiv); in wm1133_ev1_hw_params()
/Linux-v4.19/drivers/i2c/busses/
Di2c-efm32.c316 u32 clkdiv; in efm32_i2c_probe() local
405 clkdiv = DIV_ROUND_UP(rate, 8 * ddata->frequency) - 1; in efm32_i2c_probe()
406 if (clkdiv >= 0x200) { in efm32_i2c_probe()
415 rate, ddata->frequency, (unsigned long)clkdiv); in efm32_i2c_probe()
416 efm32_i2c_write32(ddata, REG_CLKDIV, REG_CLKDIV_DIV(clkdiv)); in efm32_i2c_probe()
/Linux-v4.19/drivers/gpu/drm/exynos/
Dexynos7_drm_decon.c149 u32 clkdiv; in decon_calc_clkdiv() local
152 clkdiv = DIV_ROUND_UP(clk_get_rate(ctx->vclk), ideal_clk); in decon_calc_clkdiv()
154 return (clkdiv < 0x100) ? clkdiv : 0xff; in decon_calc_clkdiv()
161 u32 val, clkdiv; in decon_commit() local
210 clkdiv = decon_calc_clkdiv(ctx, mode); in decon_commit()
211 if (clkdiv > 1) { in decon_commit()
212 val = VCLKCON1_CLKVAL_NUM_VCLK(clkdiv - 1); in decon_commit()
Dexynos_drm_fimd.c192 u32 clkdiv; member
386 u32 clkdiv; in fimd_atomic_check() local
411 clkdiv = DIV_ROUND_CLOSEST(lcd_rate, ideal_clk); in fimd_atomic_check()
412 if (clkdiv >= 0x200) { in fimd_atomic_check()
417 ctx->clkdiv = (clkdiv < 0x100) ? clkdiv : 0xff; in fimd_atomic_check()
549 if (ctx->clkdiv > 1) in fimd_commit()
550 val |= VIDCON0_CLKVAL_F(ctx->clkdiv - 1) | VIDCON0_CLKDIR; in fimd_commit()
/Linux-v4.19/sound/soc/intel/skylake/
Dskl-nhlt.c393 u32 clkdiv, div_ratio; in skl_get_mclk() local
404 clkdiv = i2s_config->mclk.mdivr & in skl_get_mclk()
409 clkdiv = i2s_config_ext->mclk.mdivr[0] & in skl_get_mclk()
416 if (clkdiv != SKL_MCLK_DIV_RATIO_MASK) in skl_get_mclk()
418 div_ratio = clkdiv + 2; in skl_get_mclk()
/Linux-v4.19/drivers/tty/serial/
Defm32-uart.c353 u32 clkdiv; in efm32_uart_set_termios() local
396 clkdiv = (DIV_ROUND_CLOSEST(4 * port->uartclk, 16 * baud) - 4) << 6; in efm32_uart_set_termios()
421 efm32_uart_write32(efm_port, clkdiv, UARTn_CLKDIV); in efm32_uart_set_termios()
560 u32 route, clkdiv, frame; in efm32_uart_console_get_options() local
571 clkdiv = efm32_uart_read32(efm_port, UARTn_CLKDIV); in efm32_uart_console_get_options()
574 16 * (4 + (clkdiv >> 6))); in efm32_uart_console_get_options()
/Linux-v4.19/drivers/gpu/drm/tilcdc/
Dtilcdc_crtc.c217 unsigned int clkdiv; in tilcdc_crtc_set_clk() local
220 clkdiv = 2; /* first try using a standard divider of 2 */ in tilcdc_crtc_set_clk()
225 ret = clk_set_rate(priv->clk, req_rate * clkdiv); in tilcdc_crtc_set_clk()
242 clkdiv = DIV_ROUND_CLOSEST(clk_rate, req_rate); in tilcdc_crtc_set_clk()
251 real_rate = clkdiv * req_rate; in tilcdc_crtc_set_clk()
263 tilcdc_crtc->lcd_fck_rate, crtc->mode.clock, clkdiv); in tilcdc_crtc_set_clk()
266 tilcdc_write(dev, LCDC_CTRL_REG, LCDC_CLK_DIVISOR(clkdiv) | in tilcdc_crtc_set_clk()

12