| /kernel/linux/linux-6.6/drivers/clk/mediatek/ |
| D | clk-pll.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 #include <linux/clk-provider.h> 16 #include "clk-pll.h" 25 #define CON0_ISO_EN BIT(1) 35 struct mtk_clk_pll *pll = to_mtk_clk_pll(hw); in mtk_pll_is_prepared() local 37 return (readl(pll->en_addr) & BIT(pll->data->pll_en_bit)) != 0; in mtk_pll_is_prepared() 40 static unsigned long __mtk_pll_recalc_rate(struct mtk_clk_pll *pll, u32 fin, in __mtk_pll_recalc_rate() argument 43 int pcwbits = pll->data->pcwbits; in __mtk_pll_recalc_rate() 49 /* The fractional part of the PLL divider. */ in __mtk_pll_recalc_rate() 50 ibits = pll->data->pcwibits ? pll->data->pcwibits : INTEGER_BITS; in __mtk_pll_recalc_rate() [all …]
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/i915/display/ |
| D | intel_cx0_phy.c | 1 // SPDX-License-Identifier: MIT 29 #define INTEL_CX0_LANE1 BIT(1) 43 hweight8(lane_mask) != 1)) in lane_mask_to_lane() 55 drm_WARN_ON(&i915->drm, !enabled); in assert_dc_off() 66 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_cx0_phy_transaction_begin() 75 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_cx0_phy_transaction_end() 99 drm_err_once(&i915->drm, "Failed to bring PHY %c to idle.\n", phy_name(phy)); in intel_cx0_bus_reset() 117 drm_dbg_kms(&i915->drm, "PHY %c Timeout waiting for message ACK. Status: 0x%x\n", in intel_cx0_wait_for_ack() 120 return -ETIMEDOUT; in intel_cx0_wait_for_ack() 124 drm_dbg_kms(&i915->drm, "PHY %c Error occurred during %s command. Status: 0x%x\n", phy_name(phy), in intel_cx0_wait_for_ack() [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/mediatek/ |
| D | clk-pll.c | 1 // SPDX-License-Identifier: GPL-2.0-only 14 #include "clk-mtk.h" 21 #define CON0_ISO_EN BIT(1) 33 * a divider in the PLL feedback loop which consists of 7 bits for the integer 35 * have a 3 bit power-of-two post divider. 57 struct mtk_clk_pll *pll = to_mtk_clk_pll(hw); in mtk_pll_is_prepared() local 59 return (readl(pll->base_addr + REG_CON0) & CON0_BASE_EN) != 0; in mtk_pll_is_prepared() 62 static unsigned long __mtk_pll_recalc_rate(struct mtk_clk_pll *pll, u32 fin, in __mtk_pll_recalc_rate() argument 65 int pcwbits = pll->data->pcwbits; in __mtk_pll_recalc_rate() 71 /* The fractional part of the PLL divider. */ in __mtk_pll_recalc_rate() [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/tegra/ |
| D | clk-pll.c | 1 // SPDX-License-Identifier: GPL-2.0-only 11 #include <linux/clk-provider.h> 31 #define PLL_MISC_CPCON_MASK ((1 << PLL_MISC_CPCON_WIDTH) - 1) 34 #define PLL_MISC_LFCON_MASK ((1 << PLL_MISC_LFCON_WIDTH) - 1) 37 #define PLL_MISC_VCOCON_MASK ((1 << PLL_MISC_VCOCON_WIDTH) - 1) 159 #define PLLSS_EN_DITHER 1 196 #define UTMIP_PLL_CFG2_FORCE_PD_SAMP_A_POWERUP BIT(1) 207 #define UTMIPLL_HW_PWRDN_CFG0_IDDQ_OVERRIDE BIT(1) 230 #define pll_readl(offset, p) readl_relaxed(p->clk_base + offset) 231 #define pll_readl_base(p) pll_readl(p->params->base_reg, p) [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/tegra/ |
| D | clk-pll.c | 1 // SPDX-License-Identifier: GPL-2.0-only 11 #include <linux/clk-provider.h> 31 #define PLL_MISC_CPCON_MASK ((1 << PLL_MISC_CPCON_WIDTH) - 1) 34 #define PLL_MISC_LFCON_MASK ((1 << PLL_MISC_LFCON_WIDTH) - 1) 37 #define PLL_MISC_VCOCON_MASK ((1 << PLL_MISC_VCOCON_WIDTH) - 1) 159 #define PLLSS_EN_DITHER 1 196 #define UTMIP_PLL_CFG2_FORCE_PD_SAMP_A_POWERUP BIT(1) 207 #define UTMIPLL_HW_PWRDN_CFG0_IDDQ_OVERRIDE BIT(1) 230 #define pll_readl(offset, p) readl_relaxed(p->clk_base + offset) 231 #define pll_readl_base(p) pll_readl(p->params->base_reg, p) [all …]
|
| /kernel/linux/linux-6.6/drivers/media/i2c/ |
| D | ccs-pll.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * drivers/media/i2c/ccs-pll.c 5 * Generic MIPI CCS/SMIA/SMIA++ PLL calculator 8 * Copyright (C) 2011--2012 Nokia Corporation 17 #include "ccs-pll.h" 22 return max_t(u32, 1, a & ~1); in clk_div_even() 28 if (a == 1) in clk_div_even_up() 29 return 1; in clk_div_even_up() 30 return (a + 1) & ~1; in clk_div_even_up() 35 if (a == 1) in is_one_or_even() [all …]
|
| /kernel/linux/linux-6.6/drivers/video/fbdev/aty/ |
| D | mach64_ct.c | 1 // SPDX-License-Identifier: GPL-2.0 18 static int aty_valid_pll_ct (const struct fb_info *info, u32 vclk_per, struct pll_ct *pll); 19 static int aty_dsp_gt (const struct fb_info *info, u32 bpp, struct pll_ct *pll); 20 static int aty_var_to_pll_ct(const struct fb_info *info, u32 vclk_per, u32 bpp, union aty_pll *pll); 21 static u32 aty_pll_to_var_ct(const struct fb_info *info, const union aty_pll *pll); 51 * CLK = ---------------------- 62 * are 1,2,4,8 and for some clocks other values are available too. 68 * XCLK The clock rate of the on-chip memory 75 * SCLK Multi-purpose clock 77 * - MCLK and XCLK use the same FB_DIV [all …]
|
| /kernel/linux/linux-5.10/drivers/video/fbdev/aty/ |
| D | mach64_ct.c | 1 // SPDX-License-Identifier: GPL-2.0 18 static int aty_valid_pll_ct (const struct fb_info *info, u32 vclk_per, struct pll_ct *pll); 19 static int aty_dsp_gt (const struct fb_info *info, u32 bpp, struct pll_ct *pll); 20 static int aty_var_to_pll_ct(const struct fb_info *info, u32 vclk_per, u32 bpp, union aty_pll *pll); 21 static u32 aty_pll_to_var_ct(const struct fb_info *info, const union aty_pll *pll); 53 * CLK = ---------------------- 64 * are 1,2,4,8 and for some clocks other values are available too. 70 * XCLK The clock rate of the on-chip memory 77 * SCLK Multi-purpose clock 79 * - MCLK and XCLK use the same FB_DIV [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/baikal-t1/ |
| D | ccu-pll.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 * Baikal-T1 CCU PLL interface driver 12 #define pr_fmt(fmt) "bt1-ccu-pll: " fmt 20 #include <linux/clk-provider.h> 29 #include "ccu-pll.h" 33 #define CCU_PLL_CTL_RST BIT(1) 49 ((CCU_PLL_CTL_CLKR_MASK >> CCU_PLL_CTL_CLKR_FLD) + 1) 51 ((CCU_PLL_CTL_CLKF_MASK >> (CCU_PLL_CTL_CLKF_FLD + 1)) + 1) 53 ((CCU_PLL_CTL_CLKOD_MASK >> CCU_PLL_CTL_CLKOD_FLD) + 1) 55 ((CCU_PLL_CTL1_BWADJ_MASK >> CCU_PLL_CTL1_BWADJ_FLD) + 1) [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/baikal-t1/ |
| D | ccu-pll.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 * Baikal-T1 CCU PLL interface driver 12 #define pr_fmt(fmt) "bt1-ccu-pll: " fmt 20 #include <linux/clk-provider.h> 29 #include "ccu-pll.h" 33 #define CCU_PLL_CTL_RST BIT(1) 49 ((CCU_PLL_CTL_CLKR_MASK >> CCU_PLL_CTL_CLKR_FLD) + 1) 51 ((CCU_PLL_CTL_CLKF_MASK >> (CCU_PLL_CTL_CLKF_FLD + 1)) + 1) 53 ((CCU_PLL_CTL_CLKOD_MASK >> CCU_PLL_CTL_CLKOD_FLD) + 1) 55 ((CCU_PLL_CTL1_BWADJ_MASK >> CCU_PLL_CTL1_BWADJ_FLD) + 1) [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/meson/ |
| D | clk-pll.c | 1 // SPDX-License-Identifier: GPL-2.0 11 * In the most basic form, a Meson PLL is composed as follows: 13 * PLL 14 * +--------------------------------+ 16 * | +--+ | 17 * in >>-----[ /N ]--->| | +-----+ | 18 * | | |------| DCO |---->> out 19 * | +--------->| | +--v--+ | 20 * | | +--+ | | 22 * | +--[ *(M + (F/Fmax) ]<--+ | [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/rockchip/ |
| D | clk-pll.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 * Author: Xing Zheng <zhengxing@rock-chips.com> 14 #include <linux/clk-provider.h> 51 struct rockchip_clk_pll *pll, unsigned long rate) in rockchip_get_pll_settings() argument 53 const struct rockchip_pll_rate_table *rate_table = pll->rate_table; in rockchip_get_pll_settings() 56 for (i = 0; i < pll->rate_count; i++) { in rockchip_get_pll_settings() 67 struct rockchip_clk_pll *pll = to_rockchip_clk_pll(hw); in rockchip_pll_round_rate() local 68 const struct rockchip_pll_rate_table *rate_table = pll->rate_table; in rockchip_pll_round_rate() 72 for (i = 0; i < pll->rate_count; i++) { in rockchip_pll_round_rate() 78 return rate_table[i - 1].rate; in rockchip_pll_round_rate() [all …]
|
| /kernel/linux/linux-5.10/arch/mips/ath79/ |
| D | clock.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2010-2011 Jaiganesh Narayanan <jnarayanan@atheros.com> 17 #include <linux/clk-provider.h> 20 #include <dt-bindings/clock/ath79-clk.h> 24 #include <asm/mach-ath79/ath79.h> 25 #include <asm/mach-ath79/ar71xx_regs.h> 99 u32 pll; in ar71xx_clocks_init() local 105 pll = __raw_readl(pll_base + AR71XX_PLL_REG_CPU_CONFIG); in ar71xx_clocks_init() 107 div = ((pll >> AR71XX_PLL_FB_SHIFT) & AR71XX_PLL_FB_MASK) + 1; in ar71xx_clocks_init() 110 div = ((pll >> AR71XX_CPU_DIV_SHIFT) & AR71XX_CPU_DIV_MASK) + 1; in ar71xx_clocks_init() [all …]
|
| /kernel/linux/linux-6.6/arch/mips/ath79/ |
| D | clock.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2010-2011 Jaiganesh Narayanan <jnarayanan@atheros.com> 17 #include <linux/clk-provider.h> 20 #include <dt-bindings/clock/ath79-clk.h> 24 #include <asm/mach-ath79/ath79.h> 25 #include <asm/mach-ath79/ar71xx_regs.h> 99 u32 pll; in ar71xx_clocks_init() local 105 pll = __raw_readl(pll_base + AR71XX_PLL_REG_CPU_CONFIG); in ar71xx_clocks_init() 107 div = ((pll >> AR71XX_PLL_FB_SHIFT) & AR71XX_PLL_FB_MASK) + 1; in ar71xx_clocks_init() 110 div = ((pll >> AR71XX_CPU_DIV_SHIFT) & AR71XX_CPU_DIV_MASK) + 1; in ar71xx_clocks_init() [all …]
|
| /kernel/linux/linux-5.10/drivers/media/i2c/ |
| D | smiapp-pll.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * drivers/media/i2c/smiapp-pll.c 7 * Copyright (C) 2011--2012 Nokia Corporation 16 #include "smiapp-pll.h" 21 return max_t(uint32_t, 1, a & ~1); in clk_div_even() 27 if (a == 1) in clk_div_even_up() 28 return 1; in clk_div_even_up() 29 return (a + 1) & ~1; in clk_div_even_up() 34 if (a == 1) in is_one_or_even() 35 return 1; in is_one_or_even() [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/rockchip/ |
| D | clk-pll.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 * Author: Xing Zheng <zhengxing@rock-chips.com> 14 #include <linux/clk-provider.h> 51 struct rockchip_clk_pll *pll, unsigned long rate) in rockchip_get_pll_settings() argument 53 const struct rockchip_pll_rate_table *rate_table = pll->rate_table; in rockchip_get_pll_settings() 56 for (i = 0; i < pll->rate_count; i++) { in rockchip_get_pll_settings() 67 struct rockchip_clk_pll *pll = to_rockchip_clk_pll(hw); in rockchip_pll_round_rate() local 68 const struct rockchip_pll_rate_table *rate_table = pll->rate_table; in rockchip_pll_round_rate() 72 for (i = 0; i < pll->rate_count; i++) { in rockchip_pll_round_rate() 78 return rate_table[i - 1].rate; in rockchip_pll_round_rate() [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/qcom/ |
| D | clk-alpha-pll.c | 1 // SPDX-License-Identifier: GPL-2.0 8 #include <linux/clk-provider.h> 12 #include "clk-alpha-pll.h" 15 #define PLL_MODE(p) ((p)->offset + 0x0) 17 # define PLL_BYPASSNL BIT(1) 34 #define PLL_L_VAL(p) ((p)->offset + (p)->regs[PLL_OFF_L_VAL]) 35 #define PLL_CAL_L_VAL(p) ((p)->offset + (p)->regs[PLL_OFF_CAL_L_VAL]) 36 #define PLL_ALPHA_VAL(p) ((p)->offset + (p)->regs[PLL_OFF_ALPHA_VAL]) 37 #define PLL_ALPHA_VAL_U(p) ((p)->offset + (p)->regs[PLL_OFF_ALPHA_VAL_U]) 39 #define PLL_USER_CTL(p) ((p)->offset + (p)->regs[PLL_OFF_USER_CTL]) [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/meson/ |
| D | clk-pll.c | 1 // SPDX-License-Identifier: GPL-2.0 11 * In the most basic form, a Meson PLL is composed as follows: 13 * PLL 14 * +--------------------------------+ 16 * | +--+ | 17 * in >>-----[ /N ]--->| | +-----+ | 18 * | | |------| DCO |---->> out 19 * | +--------->| | +--v--+ | 20 * | | +--+ | | 22 * | +--[ *(M + (F/Fmax) ]<--+ | [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/sprd/ |
| D | pll.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // Spreadtrum pll clock driver 13 #include "pll.h" 18 #define pindex(pll, member) \ argument 19 (pll->factors[member].shift / (8 * sizeof(pll->regs_num))) 21 #define pshift(pll, member) \ argument 22 (pll->factors[member].shift % (8 * sizeof(pll->regs_num))) 24 #define pwidth(pll, member) \ argument 25 pll->factors[member].width 27 #define pmask(pll, member) \ argument [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/sprd/ |
| D | pll.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // Spreadtrum pll clock driver 13 #include "pll.h" 18 #define pindex(pll, member) \ argument 19 (pll->factors[member].shift / (8 * sizeof(pll->regs_num))) 21 #define pshift(pll, member) \ argument 22 (pll->factors[member].shift % (8 * sizeof(pll->regs_num))) 24 #define pwidth(pll, member) \ argument 25 pll->factors[member].width 27 #define pmask(pll, member) \ argument [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/imx/ |
| D | clk-fracn-gppll.c | 1 // SPDX-License-Identifier: GPL-2.0 7 #include <linux/clk-provider.h> 20 #define CLKMUX_EN BIT(1) 82 PLL_FRACN_GP(594000000U, 198, 0, 1, 0, 8), 83 PLL_FRACN_GP(560000000U, 140, 0, 1, 0, 6), 84 PLL_FRACN_GP(519750000U, 173, 25, 100, 1, 8), 85 PLL_FRACN_GP(498000000U, 166, 0, 1, 0, 8), 86 PLL_FRACN_GP(484000000U, 121, 0, 1, 0, 6), 87 PLL_FRACN_GP(445333333U, 167, 0, 1, 0, 9), 88 PLL_FRACN_GP(400000000U, 200, 0, 1, 0, 12), [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/bcm/ |
| D | clk-iproc-pll.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 #include <linux/clk-provider.h> 13 #include "clk-iproc.h" 19 * PLL MACRO_SELECT modes 0 to 5 choose pre-calculated PLL output frequencies 20 * from a look-up table. Mode 7 allows user to manipulate PLL clock dividers 24 /* number of delay loops waiting for PLL to lock */ 75 struct iproc_pll *pll; member 90 return -EINVAL; in pll_calc_param() 92 residual = target_rate - (ndiv_int * parent_rate); in pll_calc_param() 102 vco_out->ndiv_int = ndiv_int; in pll_calc_param() [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/bcm/ |
| D | clk-iproc-pll.c | 16 #include <linux/clk-provider.h> 23 #include "clk-iproc.h" 29 * PLL MACRO_SELECT modes 0 to 5 choose pre-calculated PLL output frequencies 30 * from a look-up table. Mode 7 allows user to manipulate PLL clock dividers 34 /* number of delay loops waiting for PLL to lock */ 85 struct iproc_pll *pll; member 100 return -EINVAL; in pll_calc_param() 102 residual = target_rate - (ndiv_int * parent_rate); in pll_calc_param() 112 vco_out->ndiv_int = ndiv_int; in pll_calc_param() 113 vco_out->ndiv_frac = ndiv_frac; in pll_calc_param() [all …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/msm/dsi/pll/ |
| D | dsi_pll_14nm.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 #include <linux/clk-provider.h> 13 * DSI PLL 14nm - clock diagram (eg: DSI0): 18 * +----+ | +----+ 19 * dsi0vco_clk ---| n1 |--o--| /8 |-- dsi0pllbyte 20 * +----+ | +----+ 22 * | +----+ | 23 * o---| /2 |--o--|\ 24 * | +----+ | \ +----+ 25 * | | |--| n2 |-- dsi0pll [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/at91/ |
| D | clk-pll.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 #include <linux/clk-provider.h> 15 #define PLL_STATUS_MASK(id) (1 << (1 + (id))) 20 #define PLL_MUL(reg, layout) (((reg) >> (layout)->mul_shift) & \ 21 (layout)->mul_mask) 23 #define PLL_MUL_MASK(layout) ((layout)->mul_mask) 24 #define PLL_MUL_MAX(layout) (PLL_MUL_MASK(layout) + 1) 30 #define PLL_MAX_ID 1 52 return status & PLL_STATUS_MASK(id) ? 1 : 0; in clk_pll_ready() 57 struct clk_pll *pll = to_clk_pll(hw); in clk_pll_prepare() local [all …]
|