/linux/drivers/clk/ |
H A D | clk-fixed-rate_test.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * KUnit test for clk fixed rate basic type 6 #include <linux/clk-provider.h> 17 #include "clk-fixed-rate_test.h" 20 * struct clk_hw_fixed_rate_kunit_params - Parameters to pass to __clk_hw_register_fixed_rate() 24 * @parent_name: parent name of clk 25 * @parent_hw: clk_hw pointer to parent of clk 26 * @parent_data: parent_data describing parent of clk 30 * @clk_fixed_flags: fixed rate specific clk flags 51 hw = __clk_hw_register_fixed_rate(params->dev, params->np, in clk_hw_register_fixed_rate_kunit_init() [all …]
|
H A D | clk-gpio.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2013 - 2014 Texas Instruments Incorporated - https://www.ti.com 12 #include <linux/clk-provider.h> 26 * prepare - clk_(un)prepare are functional and control a gpio that can sleep 27 * enable - clk_enable and clk_disable are functional & control 28 * non-sleeping gpio 29 * rate - inherits rate from parent. No clk_set_rate support 30 * parent - fixed parent. No clk_set_parent support 34 * struct clk_gpio - gpio gated clock 36 * @hw: handle between common and hardware-specific interfaces [all …]
|
H A 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 …]
|
H A 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 …]
|
/linux/drivers/clk/tegra/ |
H A 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 …]
|
/linux/include/linux/ |
H A 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 chang 60 unsigned long rate; global() member 1414 divider_round_rate(struct clk_hw * hw,unsigned long rate,unsigned long * prate,const struct clk_div_table * table,u8 width,unsigned long flags) divider_round_rate() argument 1423 divider_ro_round_rate(struct clk_hw * hw,unsigned long rate,unsigned long * prate,const struct clk_div_table * table,u8 width,unsigned long flags,unsigned int val) divider_ro_round_rate() argument [all...] |
/linux/drivers/clk/sunxi/ |
H A 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 …]
|
H A D | clk-factors.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Adjustable factor-based clock implementation 8 #include <linux/clk-provider.h> 16 #include "clk-factors.h" 19 * DOC: basic adjustable factor-based clock 22 * prepare - clk_prepare only ensures that parents are prepared 23 * enable - clk_enable only ensures that parents are enabled 24 * rate - rate is adjustable. 25 * clk->rate = (parent->rate * N * (K + 1) >> P) / (M + 1) 26 * parent - fixed parent. No clk_set_parent support [all …]
|
/linux/drivers/clk/at91/ |
H A 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 …]
|
/linux/drivers/clk/bcm/ |
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() 53 return (u64)reg_div + ((u64)1 << div->u.s.frac_width); in scaled_div_value() 61 return (u64)div->u.fixed; in scaled_div_min() 72 return (u64)div->u.fixed; in scaled_div_max() 74 reg_div = ((u32)1 << div->u.s.width) - 1; in scaled_div_max() 89 return (u32)(scaled_div - ((u64)1 << div->u.s.frac_width)); in divider() [all …]
|
H A D | clk-kona.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 16 #include <linux/clk-provider.h> 20 /* The common clock framework uses u8 to represent a parent index */ 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) [all …]
|
/linux/drivers/clk/davinci/ |
H A 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> 78 * OMAP-L138 system reference guide recommends a wait for 4 OSCIN/CLKIN 85 /* From OMAP-L138 datasheet table 6-4. Units are micro seconds */ 89 * From OMAP-L138 datasheet table 6-4; assuming prediv = 1, sqrt(pllm) = 4 95 * struct davinci_pll_clk - Main PLL clock (aka PLLOUT) 117 unsigned long rate = parent_rate; in davinci_pll_recalc_rate() local [all …]
|
/linux/drivers/clk/st/ |
H A D | clkgen-fsyn.c | 1 // SPDX-License-Identifier: GPL-2.0-only 15 #include <linux/clk-provider.h> 129 { .name = "clk-s-c0-fs0-ch0", }, 130 { .name = "clk-s-c0-fs0-ch1", }, 131 { .name = "clk-s-c0-fs0-ch2", }, 132 { .name = "clk-s-c0-fs0-ch3", }, 186 { .name = "clk-s-d0-fs0-ch0", }, 187 { .name = "clk-s-d0-fs0-ch1", }, 188 { .name = "clk-s-d0-fs0-ch2", }, 189 { .name = "clk-s-d0-fs0-ch3", }, [all …]
|
/linux/Documentation/devicetree/bindings/sound/ |
H A D | nvidia,tegra20-i2s.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/sound/nvidia,tegra20-i2s.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 15 - Thierry Reding <treding@nvidia.com> 16 - Jon Hunter <jonathanh@nvidia.com> 20 const: nvidia,tegra20-i2s 28 reset-names: 40 dma-names: 42 - const: rx [all …]
|
H A D | nvidia,tegra20-spdif.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/sound/nvidia,tegra20-spdif.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 16 - Thierry Reding <treding@nvidia.com> 17 - Jon Hunter <jonathanh@nvidia.com> 20 - $ref: dai-common.yaml# 24 const: nvidia,tegra20-spdif 38 clock-names: 40 - const: out [all …]
|
/linux/Documentation/networking/devlink/ |
H A D | ice.rst | 1 .. SPDX-License-Identifier: GPL-2.0 13 .. list-table:: Generic parameters implemented 16 * - Name 17 - Mode 18 - Notes 19 * - ``enable_roce`` 20 - runtime 21 - mutually exclusive with ``enable_iwarp`` 22 * - ``enable_iwarp`` 23 - runtime [all …]
|
/linux/Documentation/devicetree/bindings/ufs/ |
H A D | ufs-common.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/ufs/ufs-common.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Alim Akhtar <alim.akhtar@samsung.com> 11 - Avri Altman <avri.altman@wdc.com> 16 clock-names: true 18 freq-table-hz: 21 - description: Minimum frequency for given clock in Hz 22 - description: Maximum frequency for given clock in Hz [all …]
|
/linux/Documentation/devicetree/bindings/clock/ |
H A D | samsung,s5pv210-audss-clock.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/clock/samsung,s5pv210-audss-clock.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Chanwoo Choi <cw00.choi@samsung.com> 11 - Krzysztof Kozlowski <krzk@kernel.org> 12 - Sylwester Nawrocki <s.nawrocki@samsung.com> 13 - Tomasz Figa <tomasz.figa@gmail.com> 17 include/dt-bindings/clock/s5pv210-audss.h header. 21 const: samsung,s5pv210-audss-clock [all …]
|
/linux/drivers/clk/mvebu/ |
H A D | dove-divider.c | 1 // SPDX-License-Identifier: GPL-2.0 8 #include <linux/clk-provider.h> 15 #include "dove-divider.h" 56 val = readl_relaxed(dc->base + DIV_CTRL0); in dove_get_divider() 57 val >>= dc->div_bit_start; in dove_get_divider() 59 divider = val & ~(~0 << dc->div_bit_size); in dove_get_divider() 61 if (dc->divider_table) in dove_get_divider() 62 divider = dc->divider_table[divider]; in dove_get_divider() 67 static int dove_calc_divider(const struct dove_clk *dc, unsigned long rate, in dove_calc_divider() argument 72 divider = DIV_ROUND_CLOSEST(parent_rate, rate); in dove_calc_divider() [all …]
|
H A D | ap-cpu-clk.c | 1 // SPDX-License-Identifier: GPL-2.0+ 11 #define pr_fmt(fmt) "ap-cpu-clk: " fmt 13 #include <linux/clk-provider.h> 150 cpu_clkdiv_reg = clk->pll_regs->divider_reg + in ap_cpu_clk_recalc_rate() 151 (clk->cluster * clk->pll_regs->cluster_offset); in ap_cpu_clk_recalc_rate() 152 regmap_read(clk->pll_cr_base, cpu_clkdiv_reg, &cpu_clkdiv_ratio); in ap_cpu_clk_recalc_rate() 153 cpu_clkdiv_ratio &= clk->pll_regs->divider_mask; in ap_cpu_clk_recalc_rate() 154 cpu_clkdiv_ratio >>= clk->pll_regs->divider_offset; in ap_cpu_clk_recalc_rate() 159 static int ap_cpu_clk_set_rate(struct clk_hw *hw, unsigned long rate, in ap_cpu_clk_set_rate() argument 163 int ret, reg, divider = parent_rate / rate; in ap_cpu_clk_set_rate() [all …]
|
/linux/Documentation/devicetree/bindings/interconnect/ |
H A D | samsung,exynos-bus.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/interconnect/samsung,exynos-bus.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Chanwoo Choi <cw00.choi@samsung.com> 11 - Krzysztof Kozlowski <krzk@kernel.org> 15 sub-blocks in SoC. Most Exynos SoCs share the common architecture for buses. 20 sub-blocks. 22 The Exynos SoC includes the various sub-blocks which have the each AXI bus. 24 line. The power line might be shared among one more sub-blocks. So, we can [all …]
|
/linux/drivers/clk/zynqmp/ |
H A D | divider.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2016-2019 Xilinx 11 #include <linux/clk-provider.h> 13 #include "clk-zynqmp.h" 19 * prepare - clk_prepare only ensures that parents are prepared 20 * enable - clk_enable only ensures that parents are enabled 21 * rate - rate is adjustable. clk->rate = ceiling(parent->rate / divisor) 22 * parent - fixed parent. No clk_set_parent support 28 #define CLK_FRAC BIT(13) /* has a fractional parent */ 29 #define CUSTOM_FLAG_CLK_FRAC BIT(0) /* has a fractional parent in custom type flag */ [all …]
|
/linux/arch/sh/kernel/cpu/sh2a/ |
H A D | clock-sh7269.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * arch/sh/kernel/cpu/sh2a/clock-sh7269.c 25 /* Fixed 32 KHz root clock for RTC */ 27 .rate = 32768, 31 * Default rate for the root input clock, reset this with clk_set_rate() 35 .rate = 13340000, 40 return clk->parent->rate * PLL_RATE; in pll_recalc() 49 .parent = &extal_clk, 55 return clk->parent->rate / 8; in peripheral0_recalc() 64 .parent = &pll_clk, [all …]
|
/linux/arch/mips/boot/dts/econet/ |
H A D | en751221.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 /dts-v1/; 6 #address-cells = <1>; 7 #size-cells = <1>; 10 compatible = "fixed-clock"; 11 #clock-cells = <0>; 12 clock-frequency = <200000000>; /* 200 MHz */ 16 #address-cells = <1>; 17 #size-cells = <0>; 26 cpuintc: interrupt-controller { [all …]
|
/linux/drivers/watchdog/ |
H A D | ixp4xx_wdt.c | 1 // SPDX-License-Identifier: GPL-2.0-only 26 unsigned long rate; member 55 __raw_writel(IXP4XX_WDT_KEY, iwdt->base + IXP4XX_OSWK_OFFSET); in ixp4xx_wdt_start() 56 __raw_writel(0, iwdt->base + IXP4XX_OSWE_OFFSET); in ixp4xx_wdt_start() 57 __raw_writel(wdd->timeout * iwdt->rate, in ixp4xx_wdt_start() 58 iwdt->base + IXP4XX_OSWT_OFFSET); in ixp4xx_wdt_start() 60 iwdt->base + IXP4XX_OSWE_OFFSET); in ixp4xx_wdt_start() 61 __raw_writel(0, iwdt->base + IXP4XX_OSWK_OFFSET); in ixp4xx_wdt_start() 70 __raw_writel(IXP4XX_WDT_KEY, iwdt->base + IXP4XX_OSWK_OFFSET); in ixp4xx_wdt_stop() 71 __raw_writel(0, iwdt->base + IXP4XX_OSWE_OFFSET); in ixp4xx_wdt_stop() [all …]
|