Home
last modified time | relevance | path

Searched +full:fixed +full:- +full:rate (Results 1 – 25 of 1085) sorted by relevance

12345678910>>...44

/Linux-v6.6/drivers/clk/
Dclk-fixed-rate.c1 // 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 …]
Dclk-fixed-factor.c1 // 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 …]
Dclk-loongson1.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Clock driver for Loongson-1 SoC
5 * Copyright (C) 2012-2023 Keguang Zhang <keguang.zhang@gmail.com>
9 #include <linux/clk-provider.h>
17 #include <dt-bindings/clock/loongson,ls1x-clk.h>
26 u32 fixed; member
64 const struct ls1x_clk_pll_data *d = ls1x_clk->data; in ls1x_pll_recalc_rate()
65 u32 val, rate; in ls1x_pll_recalc_rate() local
67 val = readl(ls1x_clk->reg); in ls1x_pll_recalc_rate()
68 rate = d->fixed; in ls1x_pll_recalc_rate()
[all …]
/Linux-v6.6/drivers/clk/sunxi/
Dclk-a10-hosc.c1 // SPDX-License-Identifier: GPL-2.0-or-later
8 #include <linux/clk-provider.h>
20 struct clk_fixed_rate *fixed; in sun4i_osc_clk_setup() local
22 const char *clk_name = node->name; in sun4i_osc_clk_setup()
23 u32 rate; in sun4i_osc_clk_setup() local
25 if (of_property_read_u32(node, "clock-frequency", &rate)) in sun4i_osc_clk_setup()
28 /* allocate fixed-rate and gate clock structs */ in sun4i_osc_clk_setup()
29 fixed = kzalloc(sizeof(struct clk_fixed_rate), GFP_KERNEL); in sun4i_osc_clk_setup()
30 if (!fixed) in sun4i_osc_clk_setup()
36 of_property_read_string(node, "clock-output-names", &clk_name); in sun4i_osc_clk_setup()
[all …]
Dclk-sunxi.c1 // 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 …]
/Linux-v6.6/drivers/clk/tegra/
Dclk-periph-fixed.c1 // 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 …]
/Linux-v6.6/drivers/clk/renesas/
Drcar-gen2-cpg.c1 // 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 …]
Drcar-gen3-cpg.c1 // 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 …]
/Linux-v6.6/drivers/clk/qcom/
Dcommon.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
10 #include <linux/clk-provider.h>
11 #include <linux/reset-controller.h>
15 #include "clk-rcg.h"
16 #include "clk-regmap.h"
27 struct freq_tbl *qcom_find_freq(const struct freq_tbl *f, unsigned long rate) in qcom_find_freq() argument
32 if (!f->freq) in qcom_find_freq()
35 for (; f->freq; f++) in qcom_find_freq()
36 if (rate <= f->freq) in qcom_find_freq()
[all …]
/Linux-v6.6/drivers/gpu/drm/amd/display/modules/freesync/
Dfreesync.c2 * Copyright 2016-2023 Advanced Micro Devices, Inc.
34 /* Refresh rate ramp at a fixed rate of 65 Hz/second */
38 /* Threshold to exit/exit BTR (to avoid frequent enter-exits at the lower limit) */
42 /* Threshold to exit fixed refresh rate */
44 /* Number of consecutive frames to check before entering/exiting fixed refresh */
71 core_freesync->dc = dc; in mod_freesync_create()
72 return &core_freesync->public; in mod_freesync_create()
117 * 10000) * stream->timing.h_total, in calc_duration_in_us_from_v_total()
118 stream->timing.pix_clk_100hz)); in calc_duration_in_us_from_v_total()
135 frame_duration_in_ns) * (stream->timing.pix_clk_100hz / 10)), in mod_freesync_calc_v_total_from_refresh()
[all …]
/Linux-v6.6/arch/arm64/boot/dts/xilinx/
Dzynqmp-sck-kv-g-revB.dtso1 // SPDX-License-Identifier: GPL-2.0
5 * (C) Copyright 2020 - 2022, Xilinx, Inc.
6 * (C) Copyright 2022 - 2023, Advanced Micro Devices, Inc.
11 #include <dt-bindings/gpio/gpio.h>
12 #include <dt-bindings/net/ti-dp83867.h>
13 #include <dt-bindings/phy/phy.h>
14 #include <dt-bindings/pinctrl/pinctrl-zynqmp.h>
16 /dts-v1/;
19 &i2c1 { /* I2C_SCK C23/C24 - MIO from SOM */
20 #address-cells = <1>;
[all …]
Dzynqmp-sck-kv-g-revA.dtso1 // SPDX-License-Identifier: GPL-2.0
5 * (C) Copyright 2020 - 2022, Xilinx, Inc.
6 * (C) Copyright 2022 - 2023, Advanced Micro Devices, Inc.
9 * "A" - A01 board un-modified (NXP)
10 * "Y" - A01 board modified with legacy interposer (Nexperia)
11 * "Z" - A01 board modified with Diode interposer
16 #include <dt-bindings/gpio/gpio.h>
17 #include <dt-bindings/net/ti-dp83867.h>
18 #include <dt-bindings/phy/phy.h>
19 #include <dt-bindings/pinctrl/pinctrl-zynqmp.h>
[all …]
Dzynqmp-zc1751-xm015-dc1.dts1 // SPDX-License-Identifier: GPL-2.0+
3 * dts file for Xilinx ZynqMP zc1751-xm015-dc1
5 * (C) Copyright 2015 - 2022, Xilinx, Inc.
6 * (C) Copyright 2022 - 2023, Advanced Micro Devices, Inc.
11 /dts-v1/;
14 #include "zynqmp-clk-ccf.dtsi"
15 #include <dt-bindings/phy/phy.h>
16 #include <dt-bindings/gpio/gpio.h>
17 #include <dt-bindings/pinctrl/pinctrl-zynqmp.h>
20 model = "ZynqMP zc1751-xm015-dc1 RevA";
[all …]
/Linux-v6.6/arch/mips/bcm63xx/
Dclk.c23 unsigned int rate; member
33 if (clk->set && (clk->usage++) == 0) in clk_enable_unlocked()
34 clk->set(clk, 1); in clk_enable_unlocked()
39 if (clk->set && (--clk->usage) == 0) in clk_disable_unlocked()
40 clk->set(clk, 0); in clk_disable_unlocked()
92 if (clk->id == 0) in enetx_set()
355 .rate = (50 * 1000 * 1000),
403 return clk->rate; in clk_get_rate()
408 int clk_set_rate(struct clk *clk, unsigned long rate) in clk_set_rate() argument
414 long clk_round_rate(struct clk *clk, unsigned long rate) in clk_round_rate() argument
[all …]
/Linux-v6.6/drivers/clk/actions/
Dowl-pll.c1 // SPDX-License-Identifier: GPL-2.0+
6 // Author: David Liu <liuwei@actions-semi.com>
11 #include <linux/clk-provider.h>
16 #include "owl-pll.h"
18 static u32 owl_pll_calculate_mul(struct owl_pll_hw *pll_hw, unsigned long rate) in owl_pll_calculate_mul() argument
22 mul = DIV_ROUND_CLOSEST(rate, pll_hw->bfreq); in owl_pll_calculate_mul()
23 if (mul < pll_hw->min_mul) in owl_pll_calculate_mul()
24 mul = pll_hw->min_mul; in owl_pll_calculate_mul()
25 else if (mul > pll_hw->max_mul) in owl_pll_calculate_mul()
26 mul = pll_hw->max_mul; in owl_pll_calculate_mul()
[all …]
/Linux-v6.6/Documentation/devicetree/bindings/clock/
Dfixed-mmio-clock.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
4 $id: http://devicetree.org/schemas/clock/fixed-mmio-clock.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Simple memory mapped IO fixed-rate clock sources
10 This binding describes a fixed-rate clock for which the frequency can
11 be read from a single 32-bit memory mapped I/O register.
17 - Jan Kotas <jank@cadence.com>
21 const: fixed-mmio-clock
26 "#clock-cells":
[all …]
/Linux-v6.6/Documentation/devicetree/bindings/clock/ti/
Dfixed-factor-clock.txt1 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 …]
/Linux-v6.6/drivers/gpu/drm/msm/disp/dpu1/
Ddpu_core_perf.h1 /* 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 …]
/Linux-v6.6/drivers/clk/samsung/
Dclk.h1 /* 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.
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
80 * @name: name of this fixed-factor clock.
[all …]
/Linux-v6.6/drivers/clk/davinci/
Dpll.c1 // 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 …]
/Linux-v6.6/Documentation/devicetree/bindings/sound/
Daudio-graph-port.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/sound/audio-graph-port.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
15 port-base:
16 $ref: /schemas/graph.yaml#/$defs/port-base
18 convert-rate:
19 $ref: /schemas/sound/dai-params.yaml#/$defs/dai-sample-rate
20 convert-channels:
[all …]
/Linux-v6.6/sound/soc/
Dsoc-utils-test.c1 // SPDX-License-Identifier: GPL-2.0-only
13 u32 rate; member
21 /* rate fmt channels tdm_width tdm_slots slot_multiple bclk */
63 /* Fixed 8-slot TDM, other values from params */
81 /* Fixed 32-bit TDM, other values from params */
99 /* Fixed 6-slot 24-bit TDM, other values from params */
119 unsigned int rate, snd_pcm_format_t fmt, in test_tdm_params_to_bclk_one() argument
130 hw_param_interval(&params, SNDRV_PCM_HW_PARAM_RATE)->min = rate; in test_tdm_params_to_bclk_one()
131 hw_param_interval(&params, SNDRV_PCM_HW_PARAM_RATE)->max = rate; in test_tdm_params_to_bclk_one()
132 hw_param_interval(&params, SNDRV_PCM_HW_PARAM_CHANNELS)->min = channels; in test_tdm_params_to_bclk_one()
[all …]
/Linux-v6.6/drivers/clk/uniphier/
Dclk-uniphier-fixed-rate.c1 // SPDX-License-Identifier: GPL-2.0-or-later
7 #include <linux/clk-provider.h>
10 #include "clk-uniphier.h"
16 struct clk_fixed_rate *fixed; in uniphier_clk_register_fixed_rate() local
20 /* allocate fixed-rate clock */ in uniphier_clk_register_fixed_rate()
21 fixed = devm_kzalloc(dev, sizeof(*fixed), GFP_KERNEL); in uniphier_clk_register_fixed_rate()
22 if (!fixed) in uniphier_clk_register_fixed_rate()
23 return ERR_PTR(-ENOMEM); in uniphier_clk_register_fixed_rate()
31 fixed->fixed_rate = data->fixed_rate; in uniphier_clk_register_fixed_rate()
32 fixed->hw.init = &init; in uniphier_clk_register_fixed_rate()
[all …]
/Linux-v6.6/include/linux/
Dclk-provider.h1 /* 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 …]
/Linux-v6.6/drivers/clk/at91/
Dclk-audio-pll.c1 // SPDX-License-Identifier: GPL-2.0-or-later
7 * Quentin Schulz <quentin.schulz@free-electrons.com>
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
21 * enable - clk_enable writes qdpmc, and enables PMC output
[all …]

12345678910>>...44