Home
last modified time | relevance | path

Searched refs:div_mask (Results 1 – 25 of 30) sorted by relevance

12

/linux-6.1.9/drivers/clk/imx/
Dclk-pllv3.c51 u32 div_mask; member
114 u32 div = (readl_relaxed(pll->base) >> pll->div_shift) & pll->div_mask; in clk_pllv3_recalc_rate()
142 val &= ~(pll->div_mask << pll->div_shift); in clk_pllv3_set_rate()
162 u32 div = readl_relaxed(pll->base) & pll->div_mask; in clk_pllv3_sys_recalc_rate()
197 val &= ~pll->div_mask; in clk_pllv3_sys_set_rate()
219 u32 div = readl_relaxed(pll->base) & pll->div_mask; in clk_pllv3_av_recalc_rate()
284 val &= ~pll->div_mask; in clk_pllv3_av_set_rate()
352 mf.mfi = (readl_relaxed(pll->base) & pll->div_mask) ? 22 : 20; in clk_pllv3_vf610_recalc_rate()
375 val &= ~pll->div_mask; /* clear bit for mfi=20 */ in clk_pllv3_vf610_set_rate()
377 val |= pll->div_mask; /* set bit for mfi=22 */ in clk_pllv3_vf610_set_rate()
[all …]
Dclk-fixup-div.c12 #define div_mask(d) ((1 << (d->width)) - 1) macro
66 if (value > div_mask(div)) in clk_fixup_div_set_rate()
67 value = div_mask(div); in clk_fixup_div_set_rate()
72 val &= ~(div_mask(div) << div->shift); in clk_fixup_div_set_rate()
Dclk.h105 #define imx_clk_pllv3(type, name, parent_name, base, div_mask) \ argument
106 to_clk(imx_clk_hw_pllv3(type, name, parent_name, base, div_mask))
257 const char *parent_name, void __iomem *base, u32 div_mask);
/linux-6.1.9/drivers/clk/rockchip/
Dclk-half-divider.c11 #define div_mask(width) ((1 << (width)) - 1) macro
29 val &= div_mask(divider->width); in clk_half_divider_recalc_rate()
46 maxdiv = div_mask(width); in clk_half_divider_bestdiv()
88 bestdiv = div_mask(width); in clk_half_divider_bestdiv()
118 value = min_t(unsigned int, value, div_mask(divider->width)); in clk_half_divider_set_rate()
126 val = div_mask(divider->width) << (divider->shift + 16); in clk_half_divider_set_rate()
129 val &= ~(div_mask(divider->width) << divider->shift); in clk_half_divider_set_rate()
/linux-6.1.9/drivers/clk/tegra/
Dclk-utils.c10 #define div_mask(w) ((1 << (w)) - 1) macro
39 if (divider_ux1 > div_mask(width)) in div_frac_get()
40 return div_mask(width); in div_frac_get()
Dclk-divider.c15 #define div_mask(d) ((1 << (d->width)) - 1) macro
17 #define get_max_div(d) div_mask(d)
49 div = (reg >> divider->shift) & div_mask(divider); in clk_frac_div_recalc_rate()
96 val &= ~(div_mask(divider) << divider->shift); in clk_frac_div_set_rate()
/linux-6.1.9/sound/soc/mediatek/mt8192/
Dmt8192-afe-clk.c416 int div_mask; member
431 .div_mask = APLL12_CK_DIV0_MASK,
444 .div_mask = APLL12_CK_DIV1_MASK,
457 .div_mask = APLL12_CK_DIV2_MASK,
470 .div_mask = APLL12_CK_DIV3_MASK,
483 .div_mask = APLL12_CK_DIV4_MASK,
496 .div_mask = APLL12_CK_DIVB_MASK,
506 .div_mask = APLL12_CK_DIV5_MASK,
519 .div_mask = APLL12_CK_DIV6_MASK,
532 .div_mask = APLL12_CK_DIV7_MASK,
[all …]
/linux-6.1.9/drivers/clk/hisilicon/
Dclkdivider-hi6220.c19 #define div_mask(width) ((1 << (width)) - 1) macro
52 val &= div_mask(dclk->width); in hi6220_clkdiv_recalc_rate()
82 data &= ~(div_mask(dclk->width) << dclk->shift); in hi6220_clkdiv_set_rate()
117 max_div = div_mask(width) + 1; in hi6220_register_clkdiv()
/linux-6.1.9/drivers/i2c/busses/
Di2c-brcmstb.c83 u32 div_mask; member
115 .div_mask = 0
120 .div_mask = 0
125 .div_mask = 0
130 .div_mask = 0
135 .div_mask = BSC_CTL_REG_DIV_CLK_MASK
140 .div_mask = BSC_CTL_REG_DIV_CLK_MASK
145 .div_mask = BSC_CTL_REG_DIV_CLK_MASK
150 .div_mask = BSC_CTL_REG_DIV_CLK_MASK
544 bsc_clk[i].div_mask); in brcmstb_i2c_set_bus_speed()
/linux-6.1.9/drivers/clk/
Dclk-vt8500.c23 unsigned int div_mask; member
118 u32 div = readl(cdev->div_reg) & cdev->div_mask; in vt8500_dclk_recalc_rate()
121 if ((cdev->div_mask == 0x3F) && (div & BIT(5))) in vt8500_dclk_recalc_rate()
126 div = (cdev->div_mask + 1); in vt8500_dclk_recalc_rate()
150 if ((cdev->div_mask == 0x3F) && (divisor > 31)) { in vt8500_dclk_round_rate()
169 if (divisor == cdev->div_mask + 1) in vt8500_dclk_set_rate()
173 if ((cdev->div_mask == 0x3F) && (divisor > 31)) { in vt8500_dclk_set_rate()
181 if (divisor > cdev->div_mask) { in vt8500_dclk_set_rate()
262 dev_clk->div_mask = 0x1f; in vtwm_device_clk_init()
264 of_property_read_u32(node, "divisor-mask", &dev_clk->div_mask); in vtwm_device_clk_init()
/linux-6.1.9/sound/soc/fsl/
Dfsl_mqs.c56 int div_mask; member
96 mqs_priv->soc->div_mask, in fsl_mqs_hw_params()
323 .div_mask = MQS_CLK_DIV_MASK,
336 .div_mask = IMX6SX_GPR2_MQS_CLK_DIV_MASK,
349 .div_mask = GENMASK(15, 8),
/linux-6.1.9/include/linux/
Dsh_clk.h60 unsigned int div_mask; member
157 .div_mask = SH_CLK_DIV4_MSK, \
181 .div_mask = SH_CLK_DIV6_MSK, \
193 .div_mask = SH_CLK_DIV6_MSK, \
/linux-6.1.9/drivers/clk/actions/
Dowl-factor.c157 val &= div_mask(factor_hw); in owl_factor_helper_recalc_rate()
192 if (val > div_mask(factor_hw)) in owl_factor_helper_set_rate()
193 val = div_mask(factor_hw); in owl_factor_helper_set_rate()
197 reg &= ~(div_mask(factor_hw) << factor_hw->shift); in owl_factor_helper_set_rate()
Dowl-factor.h58 #define div_mask(d) ((1 << ((d)->width)) - 1) macro
/linux-6.1.9/drivers/clk/samsung/
Dclk-cpu.c230 unsigned long div = 0, div_mask = DIV_MASK; in exynos_cpuclk_post_rate_change() local
252 div_mask |= E4210_DIV0_ATB_MASK; in exynos_cpuclk_post_rate_change()
255 exynos_set_safe_div(base, div, div_mask); in exynos_cpuclk_post_rate_change()
340 unsigned long div = 0, div_mask = DIV_MASK; in exynos5433_cpuclk_post_rate_change() local
351 exynos5433_set_safe_div(base, div, div_mask); in exynos5433_cpuclk_post_rate_change()
/linux-6.1.9/drivers/sh/clk/
Dcpg.c123 idx = (sh_clk_read(clk) >> clk->enable_bit) & clk->div_mask; in sh_clk_div_recalc()
139 value &= ~(clk->div_mask << clk->enable_bit); in sh_clk_div_set_rate()
152 if (clk->div_mask == SH_CLK_DIV6_MSK) { in sh_clk_div_enable()
175 val |= clk->div_mask; in sh_clk_div_disable()
/linux-6.1.9/drivers/clk/at91/
Dclk-peripheral.c172 periph->layout->div_mask | periph->layout->cmd | in clk_sam9x5_peripheral_set()
174 field_prep(periph->layout->div_mask, periph->div) | in clk_sam9x5_peripheral_set()
241 periph->div = field_get(periph->layout->div_mask, status); in clk_sam9x5_peripheral_recalc_rate()
479 if (layout->div_mask) in at91_clk_register_sam9x5_peripheral()
Dclk-sam9x60-pll.c345 core->layout->div_mask | ena_msk, in sam9x60_div_pll_set_div()
367 cdiv = (val & core->layout->div_mask) >> core->layout->div_shift; in sam9x60_div_pll_set()
454 for (divid = 1; divid < core->layout->div_mask; divid++) { in sam9x60_div_pll_compute_div()
513 cdiv = (val & core->layout->div_mask) >> core->layout->div_shift; in sam9x60_div_pll_set_rate_chg()
569 cdiv = (val & core.layout->div_mask) >> core.layout->div_shift; in sam9x60_div_pll_notifier_fn()
Dpmc.h61 u32 div_mask; member
98 u32 div_mask; member
Dat91sam9n12.c71 .div_mask = GENMASK(17, 16),
/linux-6.1.9/drivers/clk/mmp/
Dclk-mix.c26 unsigned int div_mask = (1 << mix->reg_info.width_div) - 1; in _get_maxdiv() local
31 return div_mask; in _get_maxdiv()
33 return 1 << div_mask; in _get_maxdiv()
40 return div_mask + 1; in _get_maxdiv()
/linux-6.1.9/drivers/clk/nxp/
Dclk-lpc32xx.c920 #define div_mask(width) ((1 << (width)) - 1) macro
952 val &= div_mask(divider->width); in clk_divider_recalc_rate()
968 bestdiv &= div_mask(divider->width); in clk_divider_round_rate()
988 div_mask(divider->width) << divider->shift, in clk_divider_set_rate()
1475 static void __init lpc32xx_clk_div_quirk(u32 reg, u32 div_mask, u32 gate) in lpc32xx_clk_div_quirk() argument
1481 if (!(val & div_mask)) { in lpc32xx_clk_div_quirk()
1483 val |= BIT(__ffs(div_mask)); in lpc32xx_clk_div_quirk()
1486 regmap_update_bits(clk_regmap, reg, gate | div_mask, val); in lpc32xx_clk_div_quirk()
/linux-6.1.9/drivers/mfd/
Ddb8500-prcmu.c522 u32 div_mask; member
529 .div_mask = PRCM_DSITVCLK_DIV_DSI0_ESC_CLK_DIV_MASK,
534 .div_mask = PRCM_DSITVCLK_DIV_DSI1_ESC_CLK_DIV_MASK,
539 .div_mask = PRCM_DSITVCLK_DIV_DSI2_ESC_CLK_DIV_MASK,
645 u32 div_mask; in prcmu_config_clkout() local
655 div_mask = PRCM_CLKOCR_CLKODIV0_MASK; in prcmu_config_clkout()
660 div_mask = PRCM_CLKOCR_CLKODIV1_MASK; in prcmu_config_clkout()
671 if (val & div_mask) { in prcmu_config_clkout()
678 if ((val & mask & ~div_mask) != bits) { in prcmu_config_clkout()
1534 div = ((div & dsiescclk[n].div_mask) >> (dsiescclk[n].div_shift)); in dsiescclk_rate()
[all …]
/linux-6.1.9/drivers/clk/xilinx/
Dclk-xlnx-clock-wizard.c53 #define div_mask(width) ((1 << (width)) - 1) macro
133 val &= div_mask(divider->width); in clk_wzrd_recalc_rate()
216 div = val & div_mask(divider->width); in clk_wzrd_recalc_ratef()
/linux-6.1.9/drivers/gpu/drm/msm/dsi/phy/
Ddsi_phy_14nm.c598 #define div_mask(width) ((1 << (width)) - 1) macro
612 val &= div_mask(width); in dsi_pll_14nm_postdiv_recalc_rate()
654 val &= ~(div_mask(width) << shift); in dsi_pll_14nm_postdiv_set_rate()

12