| /kernel/linux/linux-4.19/drivers/cpufreq/ |
| D | s3c64xx-cpufreq.c | 17 #include <linux/clk.h> 63 old_freq = clk_get_rate(policy->clk) / 1000; in s3c64xx_cpufreq_set_target() 64 new_freq = s3c64xx_freq_table[index].frequency; in s3c64xx_cpufreq_set_target() 70 dvfs->vddarm_min, in s3c64xx_cpufreq_set_target() 71 dvfs->vddarm_max); in s3c64xx_cpufreq_set_target() 80 ret = clk_set_rate(policy->clk, new_freq * 1000); in s3c64xx_cpufreq_set_target() 90 dvfs->vddarm_min, in s3c64xx_cpufreq_set_target() 91 dvfs->vddarm_max); in s3c64xx_cpufreq_set_target() 95 if (clk_set_rate(policy->clk, old_freq * 1000) < 0) in s3c64xx_cpufreq_set_target() 103 pr_debug("Set actual frequency %lukHz\n", in s3c64xx_cpufreq_set_target() [all …]
|
| D | s3c24xx-cpufreq.c | 2 * Copyright (c) 2006-2008 Simtec Electronics 6 * S3C24XX CPU Frequency scaling 21 #include <linux/clk.h> 32 #include <plat/cpu-freq-core.h> 34 #include <mach/regs-clock.h> 46 static struct clk *_clk_mpll; 47 static struct clk *_clk_xtal; 48 static struct clk *clk_fclk; 49 static struct clk *clk_hclk; 50 static struct clk *clk_pclk; [all …]
|
| D | s3c2416-cpufreq.c | 19 #include <linux/clk.h> 28 struct clk *armdiv; 29 struct clk *armclk; 30 struct clk *hclk; 50 /* pseudo-frequency for dvs mode */ 53 /* frequency to sleep and reboot in 64 /* S3C2416 only supports changing the voltage in the dvs-mode. 97 /* return our pseudo-frequency when in dvs mode */ in s3c2416_cpufreq_get_speed() 98 if (s3c_freq->is_dvs) in s3c2416_cpufreq_get_speed() 101 return clk_get_rate(s3c_freq->armclk) / 1000; in s3c2416_cpufreq_get_speed() [all …]
|
| D | arm_big_little.c | 22 #include <linux/clk.h> 61 static struct clk *clk[MAX_CLUSTERS]; variable 66 static unsigned int clk_little_max; /* Maximum clock frequency (Little) */ 106 u32 rate = clk_get_rate(clk[cur_cluster]) / 1000; in clk_get_cpu_rate() 153 ret = clk_set_rate(clk[new_cluster], new_rate * 1000); in bL_cpufreq_set_rate() 159 * current design of the clk core layer. To work around this in bL_cpufreq_set_rate() 161 * correct. This needs to be removed once clk core is fixed. in bL_cpufreq_set_rate() 163 if (clk_get_rate(clk[new_cluster]) != new_rate * 1000) in bL_cpufreq_set_rate() 164 ret = -EIO; in bL_cpufreq_set_rate() 200 if (clk_set_rate(clk[old_cluster], new_rate * 1000)) in bL_cpufreq_set_rate() [all …]
|
| /kernel/linux/linux-5.10/drivers/cpufreq/ |
| D | s3c64xx-cpufreq.c | 1 // SPDX-License-Identifier: GPL-2.0-only 14 #include <linux/clk.h> 58 old_freq = clk_get_rate(policy->clk) / 1000; in s3c64xx_cpufreq_set_target() 59 new_freq = s3c64xx_freq_table[index].frequency; in s3c64xx_cpufreq_set_target() 65 dvfs->vddarm_min, in s3c64xx_cpufreq_set_target() 66 dvfs->vddarm_max); in s3c64xx_cpufreq_set_target() 75 ret = clk_set_rate(policy->clk, new_freq * 1000); in s3c64xx_cpufreq_set_target() 85 dvfs->vddarm_min, in s3c64xx_cpufreq_set_target() 86 dvfs->vddarm_max); in s3c64xx_cpufreq_set_target() 90 if (clk_set_rate(policy->clk, old_freq * 1000) < 0) in s3c64xx_cpufreq_set_target() [all …]
|
| D | s3c24xx-cpufreq.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2006-2008 Simtec Electronics 7 * S3C24XX CPU Frequency scaling 18 #include <linux/clk.h> 24 #include <linux/soc/samsung/s3c-cpufreq-core.h> 25 #include <linux/soc/samsung/s3c-pm.h> 39 static struct clk *_clk_mpll; 40 static struct clk *_clk_xtal; 41 static struct clk *clk_fclk; 42 static struct clk *clk_hclk; [all …]
|
| D | vexpress-spc-cpufreq.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2013 - 2019 ARM Ltd. 14 #include <linux/clk.h> 51 static struct clk *clk[MAX_CLUSTERS]; variable 56 static unsigned int clk_little_max; /* Maximum clock frequency (Little) */ 93 u32 rate = clk_get_rate(clk[cur_cluster]) / 1000; in clk_get_cpu_rate() 130 ret = clk_set_rate(clk[new_cluster], new_rate * 1000); in ve_spc_cpufreq_set_rate() 136 * current design of the clk core layer. To work around this in ve_spc_cpufreq_set_rate() 138 * correct. This needs to be removed once clk core is fixed. in ve_spc_cpufreq_set_rate() 140 if (clk_get_rate(clk[new_cluster]) != new_rate * 1000) in ve_spc_cpufreq_set_rate() [all …]
|
| D | s3c2416-cpufreq.c | 1 // SPDX-License-Identifier: GPL-2.0-only 16 #include <linux/clk.h> 25 struct clk *armdiv; 26 struct clk *armclk; 27 struct clk *hclk; 47 /* pseudo-frequency for dvs mode */ 50 /* frequency to sleep and reboot in 61 /* S3C2416 only supports changing the voltage in the dvs-mode. 94 /* return our pseudo-frequency when in dvs mode */ in s3c2416_cpufreq_get_speed() 95 if (s3c_freq->is_dvs) in s3c2416_cpufreq_get_speed() [all …]
|
| D | armada-37xx-cpufreq.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * CPU frequency scaling support for Armada 37xx platform. 7 * Gregory CLEMENT <gregory.clement@free-electrons.com> 10 #include <linux/clk.h> 26 #include "cpufreq-dt.h" 28 /* Clk register set */ 124 pr_err("Unsupported CPU frequency %d MHz\n", freq/1000000); in armada_37xx_cpu_freq_info_get() 166 * Set cpu divider based on the pre-computed array in in armada37xx_cpufreq_dvfs_setup() 186 * Find out the armada 37x supported AVS value whose voltage value is 187 * the round-up closest to the target voltage value. [all …]
|
| /kernel/linux/linux-4.19/arch/arm/kernel/ |
| D | smp_twd.c | 13 #include <linux/clk.h> 31 static struct clk *twd_clk; 40 static int twd_shutdown(struct clock_event_device *clk) in twd_shutdown() argument 46 static int twd_set_oneshot(struct clock_event_device *clk) in twd_set_oneshot() argument 54 static int twd_set_periodic(struct clock_event_device *clk) in twd_set_periodic() argument 97 struct clock_event_device *clk = raw_cpu_ptr(twd_evt); in twd_timer_stop() local 99 twd_shutdown(clk); in twd_timer_stop() 100 disable_percpu_irq(clk->irq); in twd_timer_stop() 106 * Updates clockevent frequency when the cpu frequency changes. 107 * Called on the cpu that is changing frequency with interrupts disabled. [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/net/ |
| D | qca,ar803x.yaml | 1 # SPDX-License-Identifier: GPL-2.0+ 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Andrew Lunn <andrew@lunn.ch> 11 - Florian Fainelli <f.fainelli@gmail.com> 12 - Heiner Kallweit <hkallweit1@gmail.com> 18 - $ref: ethernet-phy.yaml# 21 qca,clk-out-frequency: 22 description: Clock output frequency in Hertz. 26 qca,clk-out-strength: [all …]
|
| /kernel/linux/linux-4.19/drivers/devfreq/ |
| D | exynos-bus.c | 2 * Generic Exynos Bus frequency driver with DEVFREQ Framework 7 * This driver support Exynos Bus frequency feature by using 15 #include <linux/clk.h> 17 #include <linux/devfreq-event.h> 41 struct clk *clk; member 47 * Control the devfreq-event device to get the current state of bus 54 for (i = 0; i < bus->edev_count; i++) { \ 55 if (!bus->edev[i]) \ 57 ret = devfreq_event_##ops(bus->edev[i]); \ 75 for (i = 0; i < bus->edev_count; i++) { in exynos_bus_get_event() [all …]
|
| /kernel/linux/linux-5.10/arch/arm/kernel/ |
| D | smp_twd.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 #include <linux/clk.h> 28 static struct clk *twd_clk; 37 static int twd_shutdown(struct clock_event_device *clk) in twd_shutdown() argument 43 static int twd_set_oneshot(struct clock_event_device *clk) in twd_set_oneshot() argument 51 static int twd_set_periodic(struct clock_event_device *clk) in twd_set_periodic() argument 94 struct clock_event_device *clk = raw_cpu_ptr(twd_evt); in twd_timer_stop() local 96 twd_shutdown(clk); in twd_timer_stop() 97 disable_percpu_irq(clk->irq); in twd_timer_stop() 101 * Updates clockevent frequency when the cpu frequency changes. [all …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/subdev/clk/ |
| D | gm20b.c | 19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 #include <subdev/clk.h> 89 #define DFS_DET_RANGE 6 /* -2^6 ... 2^6-1 */ 90 #define SDM_DIN_RANGE 12 /* -2^12 ... 2^12-1 */ 99 .coeff_slope = -165230, 136 /* safe frequency we can use at minimum voltage */ 160 gm20b_pllg_read_mnp(struct gm20b_clk *clk, struct gm20b_pll *pll) in gm20b_pllg_read_mnp() argument 162 struct nvkm_subdev *subdev = &clk->base.base.subdev; in gm20b_pllg_read_mnp() 163 struct nvkm_device *device = subdev->device; in gm20b_pllg_read_mnp() 166 gk20a_pllg_read_mnp(&clk->base, &pll->base); in gm20b_pllg_read_mnp() [all …]
|
| /kernel/linux/linux-4.19/drivers/gpu/drm/nouveau/nvkm/subdev/clk/ |
| D | gm20b.c | 19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 #include <subdev/clk.h> 89 #define DFS_DET_RANGE 6 /* -2^6 ... 2^6-1 */ 90 #define SDM_DIN_RANGE 12 /* -2^12 ... 2^12-1 */ 99 .coeff_slope = -165230, 136 /* safe frequency we can use at minimum voltage */ 160 gm20b_pllg_read_mnp(struct gm20b_clk *clk, struct gm20b_pll *pll) in gm20b_pllg_read_mnp() argument 162 struct nvkm_subdev *subdev = &clk->base.base.subdev; in gm20b_pllg_read_mnp() 163 struct nvkm_device *device = subdev->device; in gm20b_pllg_read_mnp() 166 gk20a_pllg_read_mnp(&clk->base, &pll->base); in gm20b_pllg_read_mnp() [all …]
|
| /kernel/linux/linux-5.10/drivers/pwm/ |
| D | pwm-brcmstb.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 11 #include <linux/clk.h> 41 * Maximum control word value allowed when variable-frequency PWM is used as a 42 * clock for the constant-frequency PMW. 57 struct clk *clk; member 65 return __raw_readl(p->base + offset); in brcmstb_pwm_readl() 67 return readl_relaxed(p->base + offset); in brcmstb_pwm_readl() 74 __raw_writel(value, p->base + offset); in brcmstb_pwm_writel() 76 writel_relaxed(value, p->base + offset); in brcmstb_pwm_writel() 85 * Fv is derived from the variable frequency output. The variable frequency [all …]
|
| /kernel/linux/linux-4.19/drivers/sh/clk/ |
| D | core.c | 4 * Copyright (C) 2005 - 2010 Paul Mundt 8 * Copyright (C) 2004 - 2008 Nokia Corporation 29 #include <linux/clk.h> 39 void clk_rate_table_build(struct clk *clk, in clk_rate_table_build() argument 49 clk->nr_freqs = nr_freqs; in clk_rate_table_build() 55 if (src_table->divisors && i < src_table->nr_divisors) in clk_rate_table_build() 56 div = src_table->divisors[i]; in clk_rate_table_build() 58 if (src_table->multipliers && i < src_table->nr_multipliers) in clk_rate_table_build() 59 mult = src_table->multipliers[i]; in clk_rate_table_build() 64 freq = clk->parent->rate * mult / div; in clk_rate_table_build() [all …]
|
| /kernel/linux/linux-5.10/drivers/sh/clk/ |
| D | core.c | 4 * Copyright (C) 2005 - 2010 Paul Mundt 8 * Copyright (C) 2004 - 2008 Nokia Corporation 29 #include <linux/clk.h> 39 void clk_rate_table_build(struct clk *clk, in clk_rate_table_build() argument 49 clk->nr_freqs = nr_freqs; in clk_rate_table_build() 55 if (src_table->divisors && i < src_table->nr_divisors) in clk_rate_table_build() 56 div = src_table->divisors[i]; in clk_rate_table_build() 58 if (src_table->multipliers && i < src_table->nr_multipliers) in clk_rate_table_build() 59 mult = src_table->multipliers[i]; in clk_rate_table_build() 64 freq = clk->parent->rate * mult / div; in clk_rate_table_build() [all …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/ |
| D | dcn30_clk_mgr_smu_msg.c | 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 43 CTX->logger 65 } while (max_retries--); in dcn30_smu_wait_for_response() 199 /* Returns the actual frequency that was set in MHz, 0 on failure */ 200 unsigned int dcn30_smu_set_hard_min_by_freq(struct clk_mgr_internal *clk_mgr, PPCLK_e clk, uint16_t… in dcn30_smu_set_hard_min_by_freq() argument 204 /* bits 23:16 for clock type, lower 16 bits for frequency in MHz */ in dcn30_smu_set_hard_min_by_freq() 205 uint32_t param = (clk << 16) | freq_mhz; in dcn30_smu_set_hard_min_by_freq() 207 smu_print("SMU Set hard min by freq: clk = %d, freq_mhz = %d MHz\n", clk, freq_mhz); in dcn30_smu_set_hard_min_by_freq() 212 smu_print("SMU Frequency set = %d MHz\n", response); in dcn30_smu_set_hard_min_by_freq() 217 /* Returns the actual frequency that was set in MHz, 0 on failure */ [all …]
|
| /kernel/linux/linux-4.19/drivers/pwm/ |
| D | pwm-brcmstb.c | 20 #include <linux/clk.h> 50 * Maximum control word value allowed when variable-frequency PWM is used as a 51 * clock for the constant-frequency PMW. 66 struct clk *clk; member 74 return __raw_readl(p->base + offset); in brcmstb_pwm_readl() 76 return readl_relaxed(p->base + offset); in brcmstb_pwm_readl() 83 __raw_writel(value, p->base + offset); in brcmstb_pwm_writel() 85 writel_relaxed(value, p->base + offset); in brcmstb_pwm_writel() 94 * Fv is derived from the variable frequency output. The variable frequency 97 * W = cword, if cword < 2 ^ 15 else 16-bit 2's complement of cword [all …]
|
| /kernel/linux/linux-5.10/drivers/i2c/busses/ |
| D | i2c-s3c2410.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* linux/drivers/i2c/busses/i2c-s3c2410.c 22 #include <linux/clk.h> 34 #include <linux/platform_data/i2c-s3c2410.h> 111 struct clk *clk; member 127 .name = "s3c2410-i2c", 130 .name = "s3c2440-i2c", 133 .name = "s3c2440-hdmiphy-i2c", 143 { .compatible = "samsung,s3c2410-i2c", .data = (void *)0 }, 144 { .compatible = "samsung,s3c2440-i2c", .data = (void *)QUIRK_S3C2440 }, [all …]
|
| D | i2c-digicolor.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 #include <linux/clk.h> 50 struct clk *clk; member 51 unsigned int frequency; member 73 writeb_relaxed(cmd | II_COMMAND_GO, i2c->regs + II_COMMAND); in dc_i2c_cmd() 78 u8 addr = (msg->addr & 0x7f) << 1; in dc_i2c_addr_cmd() 80 if (msg->flags & I2C_M_RD) in dc_i2c_addr_cmd() 88 writeb_relaxed(data, i2c->regs + II_DATA); in dc_i2c_data() 99 dc_i2c_write_byte(i2c, i2c->msg->buf[i2c->msgbuf_ptr++]); in dc_i2c_write_buf() 104 bool last = (i2c->msgbuf_ptr + 1 == i2c->msg->len); in dc_i2c_next_read() [all …]
|
| /kernel/linux/linux-4.19/drivers/i2c/busses/ |
| D | i2c-digicolor.c | 13 #include <linux/clk.h> 54 struct clk *clk; member 55 unsigned int frequency; member 77 writeb_relaxed(cmd | II_COMMAND_GO, i2c->regs + II_COMMAND); in dc_i2c_cmd() 82 u8 addr = (msg->addr & 0x7f) << 1; in dc_i2c_addr_cmd() 84 if (msg->flags & I2C_M_RD) in dc_i2c_addr_cmd() 92 writeb_relaxed(data, i2c->regs + II_DATA); in dc_i2c_data() 103 dc_i2c_write_byte(i2c, i2c->msg->buf[i2c->msgbuf_ptr++]); in dc_i2c_write_buf() 108 bool last = (i2c->msgbuf_ptr + 1 == i2c->msg->len); in dc_i2c_next_read() 115 i2c->state = STATE_STOP; in dc_i2c_stop() [all …]
|
| D | i2c-s3c2410.c | 1 /* linux/drivers/i2c/busses/i2c-s3c2410.c 31 #include <linux/clk.h> 43 #include <linux/platform_data/i2c-s3c2410.h> 121 struct clk *clk; member 137 .name = "s3c2410-i2c", 140 .name = "s3c2440-i2c", 143 .name = "s3c2440-hdmiphy-i2c", 153 { .compatible = "samsung,s3c2410-i2c", .data = (void *)0 }, 154 { .compatible = "samsung,s3c2440-i2c", .data = (void *)QUIRK_S3C2440 }, 155 { .compatible = "samsung,s3c2440-hdmiphy-i2c", [all …]
|
| /kernel/linux/linux-5.10/drivers/clocksource/ |
| D | mps2-timer.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 #include <linux/clk.h> 51 writel_relaxed(val, to_mps2_clkevt(c)->reg + offset); in clockevent_mps2_writel() 72 u32 clock_count_per_tick = to_mps2_clkevt(ce)->clock_count_per_tick; in mps2_timer_set_periodic() 84 u32 status = readl_relaxed(ce->reg + TIMER_INT); in mps2_timer_interrupt() 91 writel_relaxed(1, ce->reg + TIMER_INT); in mps2_timer_interrupt() 93 ce->clkevt.event_handler(&ce->clkevt); in mps2_timer_interrupt() 101 struct clk *clk = NULL; in mps2_clockevent_init() local 105 const char *name = "mps2-clkevt"; in mps2_clockevent_init() 107 ret = of_property_read_u32(np, "clock-frequency", &rate); in mps2_clockevent_init() [all …]
|