| /kernel/linux/linux-6.6/drivers/clk/tegra/ |
| D | clk-periph-fixed.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 #include <linux/clk-provider.h> 19 struct tegra_clk_periph_fixed *fixed = to_tegra_clk_periph_fixed(hw); in tegra_clk_periph_fixed_is_enabled() local 20 u32 mask = 1 << (fixed->num % 32), value; in tegra_clk_periph_fixed_is_enabled() 22 value = readl(fixed->base + fixed->regs->enb_reg); in tegra_clk_periph_fixed_is_enabled() 24 value = readl(fixed->base + fixed->regs->rst_reg); in tegra_clk_periph_fixed_is_enabled() 34 struct tegra_clk_periph_fixed *fixed = to_tegra_clk_periph_fixed(hw); in tegra_clk_periph_fixed_enable() local 35 u32 mask = 1 << (fixed->num % 32); in tegra_clk_periph_fixed_enable() 37 writel(mask, fixed->base + fixed->regs->enb_set_reg); in tegra_clk_periph_fixed_enable() 44 struct tegra_clk_periph_fixed *fixed = to_tegra_clk_periph_fixed(hw); in tegra_clk_periph_fixed_disable() local [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/tegra/ |
| D | clk-periph-fixed.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 #include <linux/clk-provider.h> 19 struct tegra_clk_periph_fixed *fixed = to_tegra_clk_periph_fixed(hw); in tegra_clk_periph_fixed_is_enabled() local 20 u32 mask = 1 << (fixed->num % 32), value; in tegra_clk_periph_fixed_is_enabled() 22 value = readl(fixed->base + fixed->regs->enb_reg); in tegra_clk_periph_fixed_is_enabled() 24 value = readl(fixed->base + fixed->regs->rst_reg); in tegra_clk_periph_fixed_is_enabled() 34 struct tegra_clk_periph_fixed *fixed = to_tegra_clk_periph_fixed(hw); in tegra_clk_periph_fixed_enable() local 35 u32 mask = 1 << (fixed->num % 32); in tegra_clk_periph_fixed_enable() 37 writel(mask, fixed->base + fixed->regs->enb_set_reg); in tegra_clk_periph_fixed_enable() 44 struct tegra_clk_periph_fixed *fixed = to_tegra_clk_periph_fixed(hw); in tegra_clk_periph_fixed_disable() local [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/renesas/ |
| D | rcar-gen2-cpg.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * R-Car Gen2 Clock Pulse Generator 10 #include <linux/clk-provider.h> 18 #include "renesas-cpg-mssr.h" 19 #include "rcar-gen2-cpg.h" 39 * prepare - clk_prepare only ensures that parents are prepared 40 * enable - clk_enable only ensures that parents are enabled 41 * rate - rate is adjustable. clk->rate = parent->rate * mult / 32 42 * parent - fixed parent. No clk_set_parent support 60 val = (readl(zclk->reg) & CPG_FRQCRC_ZFC_MASK) >> CPG_FRQCRC_ZFC_SHIFT; in cpg_z_clk_recalc_rate() [all …]
|
| D | rcar-gen3-cpg.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * R-Car Gen3 Clock Pulse Generator 5 * Copyright (C) 2015-2018 Glider bvba 8 * Based on clk-rcar-gen3.c 16 #include <linux/clk-provider.h> 25 #include "renesas-cpg-mssr.h" 26 #include "rcar-gen3-cpg.h" 63 csn->saved = readl(csn->reg); in cpg_simple_notifier_call() 67 writel(csn->saved, csn->reg); in cpg_simple_notifier_call() 76 csn->nb.notifier_call = cpg_simple_notifier_call; in cpg_simple_notifier_register() [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/renesas/ |
| D | rcar-gen2-cpg.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * R-Car Gen2 Clock Pulse Generator 10 #include <linux/clk-provider.h> 18 #include "renesas-cpg-mssr.h" 19 #include "rcar-gen2-cpg.h" 39 * prepare - clk_prepare only ensures that parents are prepared 40 * enable - clk_enable only ensures that parents are enabled 41 * rate - rate is adjustable. clk->rate = parent->rate * mult / 32 42 * parent - fixed parent. No clk_set_parent support 60 val = (readl(zclk->reg) & CPG_FRQCRC_ZFC_MASK) >> CPG_FRQCRC_ZFC_SHIFT; in cpg_z_clk_recalc_rate() [all …]
|
| D | rcar-gen3-cpg.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * R-Car Gen3 Clock Pulse Generator 5 * Copyright (C) 2015-2018 Glider bvba 8 * Based on clk-rcar-gen3.c 16 #include <linux/clk-provider.h> 25 #include "renesas-cpg-mssr.h" 26 #include "rcar-cpg-lib.h" 27 #include "rcar-gen3-cpg.h" 59 val = readl(pll_clk->pllcr_reg) & CPG_PLLnCR_STC_MASK; in cpg_pll_clk_recalc_rate() 62 return parent_rate * mult * pll_clk->fixed_mult; in cpg_pll_clk_recalc_rate() [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/ |
| D | clk-fixed-factor.c | 1 // SPDX-License-Identifier: GPL-2.0 6 #include <linux/clk-provider.h> 13 * DOC: basic fixed multiplier and divider clock that cannot gate 16 * prepare - clk_prepare only ensures that parents are prepared 17 * enable - clk_enable only ensures that parents are enabled 18 * rate - rate is fixed. clk->rate = parent->rate / div * mult 19 * parent - fixed parent. No clk_set_parent support 26 unsigned long long int rate; in clk_factor_recalc_rate() local 28 rate = (unsigned long long int)parent_rate * fix->mult; in clk_factor_recalc_rate() 29 do_div(rate, fix->div); in clk_factor_recalc_rate() [all …]
|
| D | clk-fixed-rate.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2010-2011 Canonical Ltd <jeremy.kerr@canonical.com> 4 * Copyright (C) 2011-2012 Mike Turquette, Linaro Ltd <mturquette@linaro.org> 6 * Fixed rate clock implementation 9 #include <linux/clk-provider.h> 18 * DOC: basic fixed-rate clock that cannot gate 21 * prepare - clk_(un)prepare only ensures parents are prepared 22 * enable - clk_enable only ensures parents are enabled 23 * rate - rate is always a fixed value. No clk_set_rate support 24 * parent - fixed parent. No clk_set_parent support [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/ |
| D | clk-fixed-rate.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2010-2011 Canonical Ltd <jeremy.kerr@canonical.com> 4 * Copyright (C) 2011-2012 Mike Turquette, Linaro Ltd <mturquette@linaro.org> 6 * Fixed rate clock implementation 9 #include <linux/clk-provider.h> 18 * DOC: basic fixed-rate clock that cannot gate 21 * prepare - clk_(un)prepare only ensures parents are prepared 22 * enable - clk_enable only ensures parents are enabled 23 * rate - rate is always a fixed value. No clk_set_rate support 24 * parent - fixed parent. No clk_set_parent support [all …]
|
| D | clk-fixed-factor.c | 1 // SPDX-License-Identifier: GPL-2.0 6 #include <linux/clk-provider.h> 13 * DOC: basic fixed multiplier and divider clock that cannot gate 16 * prepare - clk_prepare only ensures that parents are prepared 17 * enable - clk_enable only ensures that parents are enabled 18 * rate - rate is fixed. clk->rate = parent->rate / div * mult 19 * parent - fixed parent. No clk_set_parent support 26 unsigned long long int rate; in clk_factor_recalc_rate() local 28 rate = (unsigned long long int)parent_rate * fix->mult; in clk_factor_recalc_rate() 29 do_div(rate, fix->div); in clk_factor_recalc_rate() [all …]
|
| /kernel/linux/linux-6.6/Documentation/devicetree/bindings/clock/ti/ |
| D | fixed-factor-clock.txt | 1 Binding for TI fixed factor rate clock sources. 3 Binding status: Unstable - ABI compatibility may be broken in the future 8 [1] Documentation/devicetree/bindings/clock/clock-bindings.txt 12 - compatible : shall be "ti,fixed-factor-clock". 13 - #clock-cells : from common clock binding; shall be set to 0. 14 - ti,clock-div: fixed divider. 15 - ti,clock-mult: fixed multiplier. 16 - clocks: parent clock. 19 - clock-output-names : from common clock binding. 20 - ti,autoidle-shift: bit shift of the autoidle enable bit for the clock, [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/clock/ti/ |
| D | fixed-factor-clock.txt | 1 Binding for TI fixed factor rate clock sources. 3 Binding status: Unstable - ABI compatibility may be broken in the future 8 [1] Documentation/devicetree/bindings/clock/clock-bindings.txt 12 - compatible : shall be "ti,fixed-factor-clock". 13 - #clock-cells : from common clock binding; shall be set to 0. 14 - ti,clock-div: fixed divider. 15 - ti,clock-mult: fixed multiplier. 16 - clocks: parent clock. 19 - ti,autoidle-shift: bit shift of the autoidle enable bit for the clock, 21 - reg: offset for the autoidle register of this clock, see [2] [all …]
|
| /kernel/linux/linux-5.10/include/linux/ |
| D | clk-provider.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * Copyright (c) 2010-2011 Jeremy Kerr <jeremy.kerr@canonical.com> 4 * Copyright (C) 2011-2012 Linaro Ltd <mturquette@linaro.org> 14 * top-level framework. custom flags for dealing with hardware specifics 19 #define CLK_SET_RATE_GATE BIT(0) /* must be gated across rate change */ 20 #define CLK_SET_PARENT_GATE BIT(1) /* must be gated across re-parent */ 21 #define CLK_SET_RATE_PARENT BIT(2) /* propagate rate change up one level */ 25 #define CLK_GET_RATE_NOCACHE BIT(6) /* do not use the cached clk rate */ 26 #define CLK_SET_RATE_NO_REPARENT BIT(7) /* don't re-parent on rate change */ 29 #define CLK_SET_RATE_UNGATE BIT(10) /* clock needs to run to set rate */ [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/samsung/ |
| D | clk.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 13 #include <linux/clk-provider.h> 14 #include "clk-pll.h" 19 * @lock: maintains exclusion between callbacks for a given clock-provider. 52 * struct samsung_fixed_rate_clock: information about fixed-rate clock 54 * @name: name of this fixed-rate clock. 55 * @parent_name: optional parent clock name. 56 * @flags: optional fixed-rate clock flags. 57 * @fixed-rate: fixed clock rate of this clock. 77 * struct samsung_fixed_factor_clock: information about fixed-factor clock [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/samsung/ |
| D | clk.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 13 #include <linux/clk-provider.h> 14 #include "clk-pll.h" 20 * @lock: maintains exclusion between callbacks for a given clock-provider. 53 * struct samsung_fixed_rate_clock: information about fixed-rate clock 55 * @name: name of this fixed-rate clock. 56 * @parent_name: optional parent clock name. 57 * @flags: optional fixed-rate clock flags. 58 * @fixed-rate: fixed clock rate of this clock. 78 * struct samsung_fixed_factor_clock: information about fixed-factor clock [all …]
|
| /kernel/linux/linux-6.6/include/linux/ |
| D | clk-provider.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * Copyright (c) 2010-2011 Jeremy Kerr <jeremy.kerr@canonical.com> 4 * Copyright (C) 2011-2012 Linaro Ltd <mturquette@linaro.org> 14 * top-level framework. custom flags for dealing with hardware specifics 19 #define CLK_SET_RATE_GATE BIT(0) /* must be gated across rate change */ 20 #define CLK_SET_PARENT_GATE BIT(1) /* must be gated across re-parent */ 21 #define CLK_SET_RATE_PARENT BIT(2) /* propagate rate change up one level */ 25 #define CLK_GET_RATE_NOCACHE BIT(6) /* do not use the cached clk rate */ 26 #define CLK_SET_RATE_NO_REPARENT BIT(7) /* don't re-parent on rate change */ 29 #define CLK_SET_RATE_UNGATE BIT(10) /* clock needs to run to set rate */ [all …]
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/msm/disp/dpu1/ |
| D | dpu_core_perf.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. 16 * struct dpu_core_perf_params - definition of performance parameters 19 * @core_clk_rate: core clock rate request 28 * struct dpu_core_perf_tune - definition of performance tuning control 36 * struct dpu_core_perf - definition of core performance context 37 * @perf_cfg: Platform-specific performance configuration 38 * @core_clk_rate: current core clock rate 39 * @max_core_clk_rate: maximum allowable core clock rate 42 * @fix_core_clk_rate: fixed core clock request in Hz used in mode 2 [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/sunxi/ |
| D | clk-sunxi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 9 #include <linux/clk-provider.h> 14 #include <linux/reset-controller.h> 19 #include "clk-factors.h" 27 * sun4i_get_pll1_factors() - calculates n, k, m, p factors for PLL1 28 * PLL1 rate is calculated as follows 29 * rate = (parent_rate * n * (k + 1) >> p) / (m + 1); 38 div = req->rate / 6000000; in sun4i_get_pll1_factors() 39 req->rate = 6000000 * div; in sun4i_get_pll1_factors() 42 req->m = 0; in sun4i_get_pll1_factors() [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/sunxi/ |
| D | clk-sunxi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 9 #include <linux/clk-provider.h> 14 #include <linux/reset-controller.h> 19 #include "clk-factors.h" 27 * sun4i_get_pll1_factors() - calculates n, k, m, p factors for PLL1 28 * PLL1 rate is calculated as follows 29 * rate = (parent_rate * n * (k + 1) >> p) / (m + 1); 38 div = req->rate / 6000000; in sun4i_get_pll1_factors() 39 req->rate = 6000000 * div; in sun4i_get_pll1_factors() 42 req->m = 0; in sun4i_get_pll1_factors() [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/clock/ |
| D | nvidia,tegra124-car.txt | 4 Documentation/devicetree/bindings/clock/clock-bindings.txt 10 - compatible : Should be "nvidia,tegra124-car" or "nvidia,tegra132-car" 11 - reg : Should contain CAR registers location and length 12 - clocks : Should contain phandle and clock specifiers for two clocks: 13 the 32 KHz "32k_in", and the board-specific oscillator "osc". 14 - #clock-cells : Should be 1. 17 <dt-bindings/clock/tegra124-car-common.h> (which covers IDs common 18 to Tegra124 and Tegra132) and <dt-bindings/clock/tegra124-car.h> 19 (for Tegra124-specific clocks). 20 - #reset-cells : Should be 1. [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/at91/ |
| D | clk-audio-pll.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 * Quentin Schulz <quentin.schulz@free-electrons.com> 9 * The Sama5d2 SoC has two audio PLLs (PMC and PAD) that shares the same parent 10 * (FRAC). FRAC can output between 620 and 700MHz and only multiply the rate of 11 * its own parent. PMC and PAD can then divide the FRAC rate to best match the 12 * asked rate. 15 * enable - clk_enable writes nd, fracr parameters and enables PLL 16 * rate - rate is adjustable. 17 * clk->rate = parent->rate * ((nd + 1) + (fracr / 2^22)) 18 * parent - fixed parent. No clk_set_parent support [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/at91/ |
| D | clk-audio-pll.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 * Quentin Schulz <quentin.schulz@free-electrons.com> 9 * The Sama5d2 SoC has two audio PLLs (PMC and PAD) that shares the same parent 10 * (FRAC). FRAC can output between 620 and 700MHz and only multiply the rate of 11 * its own parent. PMC and PAD can then divide the FRAC rate to best match the 12 * asked rate. 15 * enable - clk_enable writes nd, fracr parameters and enables PLL 16 * rate - rate is adjustable. 17 * clk->rate = parent->rate * ((nd + 1) + (fracr / 2^22)) 18 * parent - fixed parent. No clk_set_parent support [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/bcm/ |
| D | clk-kona.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 #include "clk-kona.h" 12 #include <linux/clk-provider.h> 27 /* Produces a mask of set bits covering a range of a 32-bit value */ 30 return ((1 << width) - 1) << shift; in bitfield_mask() 52 return (u64)reg_div + ((u64)1 << div->u.s.frac_width); in scaled_div_value() 68 combined <<= div->u.s.frac_width; in scaled_div_build() 78 return (u64)div->u.fixed; in scaled_div_min() 89 return (u64)div->u.fixed; in scaled_div_max() 91 reg_div = ((u32)1 << div->u.s.width) - 1; in scaled_div_max() [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/bcm/ |
| D | clk-kona.c | 15 #include "clk-kona.h" 20 #include <linux/clk-provider.h> 35 /* Produces a mask of set bits covering a range of a 32-bit value */ 38 return ((1 << width) - 1) << shift; in bitfield_mask() 60 return (u64)reg_div + ((u64)1 << div->u.s.frac_width); in scaled_div_value() 76 combined <<= div->u.s.frac_width; in scaled_div_build() 86 return (u64)div->u.fixed; in scaled_div_min() 97 return (u64)div->u.fixed; in scaled_div_max() 99 reg_div = ((u32)1 << div->u.s.width) - 1; in scaled_div_max() 114 return (u32)(scaled_div - ((u64)1 << div->u.s.frac_width)); in divider() [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/davinci/ |
| D | pll.c | 1 // SPDX-License-Identifier: GPL-2.0 7 * Based on arch/arm/mach-davinci/clock.c 8 * Copyright (C) 2006-2007 Texas Instruments. 9 * Copyright (C) 2008-2009 Deep Root Systems, LLC 12 #include <linux/clk-provider.h> 24 #include <linux/platform_data/clk-davinci-pll.h> 80 * OMAP-L138 system reference guide recommends a wait for 4 OSCIN/CLKIN 87 /* From OMAP-L138 datasheet table 6-4. Units are micro seconds */ 91 * From OMAP-L138 datasheet table 6-4; assuming prediv = 1, sqrt(pllm) = 4 97 * struct davinci_pll_clk - Main PLL clock (aka PLLOUT) [all …]
|