| /linux/drivers/clk/bcm/ |
| H A D | clk-kona.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 16 #include <linux/clk-provider.h> 24 #define BAD_CLK_NAME ((const char *)-1) 33 #define FLAG_SET(obj, type, flag) ((obj)->flags |= FLAG(type, flag)) 34 #define FLAG_CLEAR(obj, type, flag) ((obj)->flags &= ~(FLAG(type, flag))) 35 #define FLAG_FLIP(obj, type, flag) ((obj)->flags ^= FLAG(type, flag)) 36 #define FLAG_TEST(obj, type, flag) (!!((obj)->flags & FLAG(type, flag))) 40 #define ccu_policy_exists(ccu_policy) ((ccu_policy)->enable.offset != 0) 44 #define policy_exists(policy) ((policy)->offset != 0) 55 #define hyst_exists(hyst) ((hyst)->offset != 0) [all …]
|
| H A D | clk-kona.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 #include "clk-kona.h" 12 #include <linux/clk-provider.h> 28 /* Produces a mask of set bits covering a range of a 32-bit value */ 31 return ((1 << width) - 1) << shift; in bitfield_mask() 48 /* Divider and scaling helpers */ 50 /* Convert a divider into the scaled divisor value it represents. */ 53 return (u64)reg_div + ((u64)1 << div->u.s.frac_width); in scaled_div_value() 56 /* The scaled minimum divisor representable by a divider */ 61 return (u64)div->u.fixed; in scaled_div_min() [all …]
|
| H A D | clk-kona-setup.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 #include "clk-kona.h" 13 #define selector_clear_exists(sel) ((sel)->width = 0) 20 struct ccu_policy *ccu_policy = &ccu->policy; in ccu_data_offsets_valid() 23 limit = ccu->range - sizeof(u32); in ccu_data_offsets_valid() 26 if (ccu_policy->enable.offset > limit) { in ccu_data_offsets_valid() 27 pr_err("%s: bad policy enable offset for %s " in ccu_data_offsets_valid() 29 ccu->name, ccu_policy->enable.offset, limit); in ccu_data_offsets_valid() 32 if (ccu_policy->control.offset > limit) { in ccu_data_offsets_valid() 33 pr_err("%s: bad policy control offset for %s " in ccu_data_offsets_valid() [all …]
|
| H A D | clk-bcm2835.c | 1 // SPDX-License-Identifier: GPL-2.0+ 27 #include <linux/clk-provider.h> 38 #include <dt-bindings/clock/bcm2835.h> 45 # define CM_DIV_FRAC_MASK GENMASK(CM_DIV_FRAC_BITS - 1, 0) 253 # define A2W_PLL_FRAC_MASK ((1 << A2W_PLL_FRAC_BITS) - 1) 337 writel(CM_PASSWORD | val, cprman->regs + reg); in cprman_write() 342 return readl(cprman->regs + reg); in cprman_read() 355 spin_lock(&cprman->regs_lock); in bcm2835_measure_tcnt_mux() 372 dev_err(cprman->dev, "timeout waiting for OSCCOUNT\n"); in bcm2835_measure_tcnt_mux() 383 dev_err(cprman->dev, "timeout waiting for !BUSY\n"); in bcm2835_measure_tcnt_mux() [all …]
|
| /linux/drivers/clk/xilinx/ |
| H A D | clk-xlnx-clock-wizard.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2013 - 2021 Xilinx 14 #include <linux/clk-provider.h> 88 /* Divider limits, from UG572 Table 3-4 for Ultrascale+ */ 112 #define div_mask(width) ((1 << (width)) - 1) 114 /* Extract divider instance from clock hardware instance */ 125 * struct clk_wzrd - Clock wizard private data structure 148 * struct clk_wzrd_divider - clock divider specific to clk_wzrd 150 * @hw: handle between common and hardware-specific interfaces 151 * @base: base address of register containing the divider [all …]
|
| H A D | xlnx_vcu.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2016 - 2017 Xilinx, Inc. 11 #include <linux/clk-provider.h> 17 #include <linux/mfd/syscon/xlnx-vcu.h> 23 #include <dt-bindings/clock/xlnx-vcu.h> 51 * struct xvcu_device - Xilinx VCU init device structure 59 * @pll_post: handle for the VCU PLL post divider 84 * struct xvcu_pll_cfg - Helper data 85 * @fbdiv: The integer portion of the feedback divider to the PLL 206 * xvcu_read - Read from the VCU register space [all …]
|
| /linux/drivers/clk/tegra/ |
| H A D | clk.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 9 #include <linux/clk-provider.h> 73 * struct tegra_clk_sync_source - external clock source from codec 75 * @hw: handle between common and hardware-specific interfaces 95 * struct tegra_clk_frac_div - fractional divider clock 97 * @hw: handle between common and hardware-specific interfaces 98 * @reg: register containing divider 99 * @flags: hardware-specific flags 100 * @shift: shift to the divider bit field 101 * @width: width of the divider bit field [all …]
|
| H A D | clk-periph.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 #include <linux/clk-provider.h> 17 const struct clk_ops *mux_ops = periph->mux_ops; in clk_periph_get_parent() 18 struct clk_hw *mux_hw = &periph->mux.hw; in clk_periph_get_parent() 22 return mux_ops->get_parent(mux_hw); in clk_periph_get_parent() 28 const struct clk_ops *mux_ops = periph->mux_ops; in clk_periph_set_parent() 29 struct clk_hw *mux_hw = &periph->mux.hw; in clk_periph_set_parent() 33 return mux_ops->set_parent(mux_hw, index); in clk_periph_set_parent() 40 const struct clk_ops *div_ops = periph->div_ops; in clk_periph_recalc_rate() 41 struct clk_hw *div_hw = &periph->divider.hw; in clk_periph_recalc_rate() [all …]
|
| /linux/drivers/clk/meson/ |
| H A D | clk-regmap.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 11 #include <linux/clk-provider.h> 15 * struct clk_regmap - regmap backed clock 17 * @hw: handle between common and hardware-specific interfaces 39 * struct clk_regmap_gate_data - regmap backed gate specific data 41 * @offset: offset of the register controlling gate 43 * @flags: hardware-specific flags 49 unsigned int offset; member 57 return (struct clk_regmap_gate_data *)clk->data; in clk_get_regmap_gate_data() 64 * struct clk_regmap_div_data - regmap backed adjustable divider specific data [all …]
|
| /linux/drivers/clk/ |
| H A D | clk-milbeaut.c | 1 // SPDX-License-Identifier: GPL-2.0 7 #include <linux/clk-provider.h> 17 #define CLKSEL(n) (((n) - 1) * 4 + M10V_CLKSEL1) 20 #define M10V_PLL1DIV2 "pll1-2" 22 #define M10V_PLL2DIV2 "pll2-2" 24 #define M10V_PLL6DIV2 "pll6-2" 25 #define M10V_PLL6DIV3 "pll6-3" 27 #define M10V_PLL7DIV2 "pll7-2" 28 #define M10V_PLL7DIV5 "pll7-5" 31 #define M10V_PLL10DIV2 "pll10-2" [all …]
|
| /linux/drivers/clk/renesas/ |
| H A D | rzv2h-cpg.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 15 * struct pll - Structure for PLL configuration 17 * @offset: STBY register offset 22 unsigned int offset:9; member 30 .offset = _offset, \ 43 * struct ddiv - Structure for dynamic switching divider 45 * @offset: register offset 46 * @shift: position of the divider bit 47 * @width: width of the divider 49 * @no_rmw: flag to indicate if the register is read-modify-write [all …]
|
| /linux/drivers/clk/sprd/ |
| H A D | div.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 // Spreadtrum divider clock driver 14 * struct sprd_div_internal - Internal divider description 15 * @shift: Bit offset of the divider in its register 16 * @width: Width of the divider field in its register 18 * That structure represents a single divider, and is meant to be 23 s32 offset; member 30 .offset = _offset, \
|
| /linux/drivers/clk/mvebu/ |
| H A D | clk-corediv.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * MVEBU Core divider clock 7 * Ezequiel Garcia <ezequiel.garcia@free-electrons.com> 12 #include <linux/clk-provider.h> 22 * This structure describes the hardware details (bit offset and mask) 23 * to configure one particular core divider clock. Those hardware 30 unsigned int offset; member 36 * divider clocks on a given SoC. Amongst others, it points to the 37 * array of core divider clock descriptors for this SoC, as well as 50 * This structure represents one core divider clock for the clock [all …]
|
| /linux/drivers/clk/samsung/ |
| H A D | clk-cpu.c | 1 // SPDX-License-Identifier: GPL-2.0-only 12 * blocks which includes mux and divider blocks. There are a number of other 37 #include <linux/clk-provider.h> 40 #include "clk-cpu.h" 48 * struct exynos_cpuclk_regs - Register offsets for CPU related clocks 49 * @mux_sel: offset of CPU MUX_SEL register (for selecting MUX clock parent) 50 * @mux_stat: offset of CPU MUX_STAT register (for checking MUX clock status) 51 * @div_cpu0: offset of CPU DIV0 register (for modifying divider values) 52 * @div_cpu1: offset of CPU DIV1 register (for modifying divider values) 53 * @div_stat_cpu0: offset of CPU DIV0_STAT register (for checking DIV status) [all …]
|
| /linux/drivers/iio/imu/inv_mpu6050/ |
| H A D | inv_mpu_iio.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 10 #include <linux/i2c-mux.h> 25 * struct inv_mpu6050_reg_map - Notable registers. 26 * @sample_rate_div: Divider applied to gyro output rate. 43 * @accl_offset: Controls the accelerometer calibration offset. 44 * @gyro_offset: Controls the gyroscope calibration offset. 102 * struct inv_mpu6050_chip_config - Cached chip configuration data. 111 * @wom_en: Wake-on-Motion enabled 116 * @divider: chip sample rate divider (sample rate divider - 1) 133 u8 divider; member [all …]
|
| /linux/drivers/clk/at91/ |
| H A D | clk-pll.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 #include <linux/clk-provider.h> 20 #define PLL_MUL(reg, layout) (((reg) >> (layout)->mul_shift) & \ 21 (layout)->mul_mask) 23 #define PLL_MUL_MASK(layout) ((layout)->mul_mask) 58 struct regmap *regmap = pll->regmap; in clk_pll_prepare() 59 const struct clk_pll_layout *layout = pll->layout; in clk_pll_prepare() 61 pll->characteristics; in clk_pll_prepare() 62 u8 id = pll->id; in clk_pll_prepare() 64 int offset = PLL_REG(id); in clk_pll_prepare() local [all …]
|
| /linux/drivers/clk/sunxi-ng/ |
| H A D | ccu_div.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 9 #include <linux/clk-provider.h> 15 * struct ccu_div_internal - Internal divider description 16 * @shift: Bit offset of the divider in its register 17 * @width: Width of the divider field in its register 18 * @max: Maximum value allowed for that divider. This is the 21 * @flags: clk_divider flags to apply on this divider 22 * @table: Divider table pointer (if applicable) 24 * That structure represents a single divider, and is meant to be 36 u32 offset; member [all …]
|
| /linux/drivers/cpufreq/ |
| H A D | armada-37xx-cpufreq.c | 1 // SPDX-License-Identifier: GPL-2.0+ 7 * Gregory CLEMENT <gregory.clement@free-electrons.com> 24 #include "cpufreq-dt.h" 69 * divider, a VDD level, etc... 100 u8 divider[LOAD_LEVEL_NR]; member 105 {.cpu_freq_max = 1200*1000*1000, .divider = {1, 2, 4, 6} }, 106 {.cpu_freq_max = 1000*1000*1000, .divider = {1, 2, 4, 5} }, 107 {.cpu_freq_max = 800*1000*1000, .divider = {1, 2, 3, 4} }, 108 {.cpu_freq_max = 600*1000*1000, .divider = {2, 4, 5, 6} }, 129 struct regmap *clk_base, u8 *divider) in armada37xx_cpufreq_dvfs_setup() argument [all …]
|
| /linux/drivers/video/fbdev/aty/ |
| H A D | mach64_ct.c | 1 // SPDX-License-Identifier: GPL-2.0 23 u8 aty_ld_pll_ct(int offset, const struct atyfb_par *par) in aty_ld_pll_ct() argument 27 aty_st_8(CLOCK_CNTL_ADDR, (offset << 2) & PLL_ADDR, par); in aty_ld_pll_ct() 32 static void aty_st_pll_ct(int offset, u8 val, const struct atyfb_par *par) in aty_st_pll_ct() argument 35 aty_st_8(CLOCK_CNTL_ADDR, ((offset << 2) & PLL_ADDR) | PLL_WR_EN, par); in aty_st_pll_ct() 38 aty_st_8(CLOCK_CNTL_ADDR, ((offset << 2) & PLL_ADDR) & ~PLL_WR_EN, par); in aty_st_pll_ct() 51 * CLK = ---------------------- 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 …]
|
| /linux/drivers/mfd/ |
| H A D | sm501.c | 1 // SPDX-License-Identifier: GPL-2.0-only 19 #include <linux/platform_data/i2c-gpio.h> 25 #include <linux/sm501-regs.h> 135 unsigned long misct = smc501_readl(sm->regs + SM501_MISC_TIMING); in sm501_dump_clk() 136 unsigned long pm0 = smc501_readl(sm->regs + SM501_POWER_MODE_0_CLOCK); in sm501_dump_clk() 137 unsigned long pm1 = smc501_readl(sm->regs + SM501_POWER_MODE_1_CLOCK); in sm501_dump_clk() 138 unsigned long pmc = smc501_readl(sm->regs + SM501_POWER_MODE_CONTROL); in sm501_dump_clk() 163 dev_dbg(sm->dev, "MISCT=%08lx, PM0=%08lx, PM1=%08lx\n", in sm501_dump_clk() 166 dev_dbg(sm->dev, "PLL2 = %ld.%ld MHz (%ld), SDCLK0=%08lx, SDCLK1=%08lx\n", in sm501_dump_clk() 169 dev_dbg(sm->dev, "SDRAM: PM0=%ld, PM1=%ld\n", sdclk0, sdclk1); in sm501_dump_clk() [all …]
|
| /linux/drivers/clk/qcom/ |
| H A D | clk-regmap-mux-div.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 10 #include <linux/clk-provider.h> 11 #include "clk-regmap.h" 14 * struct mux_div_clk - combined mux/divider clock 15 * @reg_offset: offset of the mux/divider register 16 * @hid_width: number of bits in half integer divider 20 * @div: the divider raw configuration value 23 * @clkr: handle between common and hardware-specific interfaces
|
| /linux/drivers/net/wireless/broadcom/b43/ |
| H A D | phy_a.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 9 #define B43_PHY_VERSION_OFDM B43_PHY_OFDM(0x00) /* Versioning register for A-PHY */ 31 #define B43_PHY_OTABLEOFF 0x03FF /* OFDM table offset (see below) */ 52 #define B43_PHY_DIVSRCHIDX B43_PHY_OFDM(0xA8) /* Divider search gain/index */ 56 #define B43_PHY_DIVSRCHGAINBACK B43_PHY_OFDM(0xAD) /* Divider search gain back */ 57 #define B43_PHY_DIVSRCHGAINCHNG B43_PHY_OFDM(0xAE) /* Divider search gain change */ 65 #define B43_OFDMTAB(number, offset) (((number) << B43_PHY_OTABLENR_SHIFT) | (offset)) argument 98 u16 b43_ofdmtab_read16(struct b43_wldev *dev, u16 table, u16 offset); 100 u16 offset, u16 value); 101 u32 b43_ofdmtab_read32(struct b43_wldev *dev, u16 table, u16 offset); [all …]
|
| /linux/drivers/iio/adc/ |
| H A D | cpcap-adc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 8 * Copyright (C) 2009-2010 Motorola, Inc. 27 #include <linux/mfd/motorola-cpcap.h> 86 * struct cpcap_adc_ato - timing settings for cpcap adc 103 * struct cpcap_adc - cpcap adc device driver data 125 * enum cpcap_adc_channel - cpcap adc channels 156 * enum cpcap_adc_timing - cpcap adc timing options 168 * struct cpcap_adc_phasing_tbl - cpcap phasing table 169 * @offset: offset in the phasing table 171 * @divider: divider in the phasing table [all …]
|
| /linux/Documentation/devicetree/bindings/clock/ |
| H A D | arm,syscon-icst.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/clock/arm,syscon-icst.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Linus Walleij <linusw@kernel.org> 19 an ICST clock request after a write to the 32 bit register at an offset 22 writing a special token to another offset in the system controller. 25 connects the low 8 bits of the VDW (missing one bit), hard-wires RDW to 26 different values and sometimes also hard-wires the output divider. They 28 the value on the pins, not the resulting output divider). [all …]
|
| /linux/drivers/clk/sunxi/ |
| H A D | clk-mod0.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 9 #include <linux/clk-provider.h> 15 #include "clk-factors.h" 18 * sun4i_a10_get_mod0_factors() - calculates m, n factors for MOD0-style clocks 29 if (req->rate > req->parent_rate) in sun4i_a10_get_mod0_factors() 30 req->rate = req->parent_rate; in sun4i_a10_get_mod0_factors() 32 div = DIV_ROUND_UP(req->parent_rate, req->rate); in sun4i_a10_get_mod0_factors() 45 req->rate = (req->parent_rate >> calcp) / calcm; in sun4i_a10_get_mod0_factors() 46 req->m = calcm - 1; in sun4i_a10_get_mod0_factors() 47 req->p = calcp; in sun4i_a10_get_mod0_factors() [all …]
|