Home
last modified time | relevance | path

Searched refs:cpuclk (Results 1 - 17 of 17) sorted by relevance

/kernel/linux/linux-6.6/drivers/clk/rockchip/
H A Dclk-cpu.c68 struct rockchip_cpuclk *cpuclk, unsigned long rate) in rockchip_get_cpuclk_settings()
71 cpuclk->rate_table; in rockchip_get_cpuclk_settings()
74 for (i = 0; i < cpuclk->rate_count; i++) { in rockchip_get_cpuclk_settings()
85 struct rockchip_cpuclk *cpuclk = to_rockchip_cpuclk_hw(hw); in rockchip_cpuclk_recalc_rate() local
86 const struct rockchip_cpuclk_reg_data *reg_data = cpuclk->reg_data; in rockchip_cpuclk_recalc_rate()
87 u32 clksel0 = readl_relaxed(cpuclk->reg_base + reg_data->core_reg[0]); in rockchip_cpuclk_recalc_rate()
98 static void rockchip_cpuclk_set_dividers(struct rockchip_cpuclk *cpuclk, in rockchip_cpuclk_set_dividers() argument
112 writel(clksel->val, cpuclk->reg_base + clksel->reg); in rockchip_cpuclk_set_dividers()
116 static void rockchip_cpuclk_set_pre_muxs(struct rockchip_cpuclk *cpuclk, in rockchip_cpuclk_set_pre_muxs() argument
130 writel(clksel->val, cpuclk in rockchip_cpuclk_set_pre_muxs()
67 rockchip_get_cpuclk_settings( struct rockchip_cpuclk *cpuclk, unsigned long rate) rockchip_get_cpuclk_settings() argument
134 rockchip_cpuclk_set_post_muxs(struct rockchip_cpuclk *cpuclk, const struct rockchip_cpuclk_rate_table *rate) rockchip_cpuclk_set_post_muxs() argument
152 rockchip_cpuclk_pre_rate_change(struct rockchip_cpuclk *cpuclk, struct clk_notifier_data *ndata) rockchip_cpuclk_pre_rate_change() argument
223 rockchip_cpuclk_post_rate_change(struct rockchip_cpuclk *cpuclk, struct clk_notifier_data *ndata) rockchip_cpuclk_post_rate_change() argument
287 struct rockchip_cpuclk *cpuclk = to_rockchip_cpuclk_nb(nb); rockchip_cpuclk_notifier_cb() local
306 struct rockchip_cpuclk *cpuclk; rockchip_clk_register_cpuclk() local
[all...]
/kernel/linux/linux-5.10/drivers/clk/rockchip/
H A Dclk-cpu.c72 struct rockchip_cpuclk *cpuclk, unsigned long rate) in rockchip_get_cpuclk_settings()
75 cpuclk->rate_table; in rockchip_get_cpuclk_settings()
78 for (i = 0; i < cpuclk->rate_count; i++) { in rockchip_get_cpuclk_settings()
89 struct rockchip_cpuclk *cpuclk = to_rockchip_cpuclk_hw(hw); in rockchip_cpuclk_recalc_rate() local
90 const struct rockchip_cpuclk_reg_data *reg_data = cpuclk->reg_data; in rockchip_cpuclk_recalc_rate()
91 u32 clksel0 = readl_relaxed(cpuclk->reg_base + reg_data->core_reg); in rockchip_cpuclk_recalc_rate()
102 static void rockchip_cpuclk_set_dividers(struct rockchip_cpuclk *cpuclk, in rockchip_cpuclk_set_dividers() argument
116 writel(clksel->val, cpuclk->reg_base + clksel->reg); in rockchip_cpuclk_set_dividers()
120 static int rockchip_cpuclk_pre_rate_change(struct rockchip_cpuclk *cpuclk, in rockchip_cpuclk_pre_rate_change() argument
123 const struct rockchip_cpuclk_reg_data *reg_data = cpuclk in rockchip_cpuclk_pre_rate_change()
71 rockchip_get_cpuclk_settings( struct rockchip_cpuclk *cpuclk, unsigned long rate) rockchip_get_cpuclk_settings() argument
183 rockchip_cpuclk_post_rate_change(struct rockchip_cpuclk *cpuclk, struct clk_notifier_data *ndata) rockchip_cpuclk_post_rate_change() argument
233 struct rockchip_cpuclk *cpuclk = to_rockchip_cpuclk_nb(nb); rockchip_cpuclk_notifier_cb() local
252 struct rockchip_cpuclk *cpuclk; rockchip_clk_register_cpuclk() local
[all...]
/kernel/linux/linux-5.10/drivers/clk/mvebu/
H A Dclk-cpu.c51 struct cpu_clk *cpuclk = to_cpu_clk(hwclk); in clk_cpu_recalc_rate() local
54 reg = readl(cpuclk->reg_base + SYS_CTRL_CLK_DIVIDER_VALUE_OFFSET); in clk_cpu_recalc_rate()
55 div = (reg >> (cpuclk->cpu * 8)) & SYS_CTRL_CLK_DIVIDER_MASK; in clk_cpu_recalc_rate()
78 struct cpu_clk *cpuclk = to_cpu_clk(hwclk); in clk_cpu_off_set_rate() local
83 reg = (readl(cpuclk->reg_base + SYS_CTRL_CLK_DIVIDER_VALUE_OFFSET) in clk_cpu_off_set_rate()
84 & (~(SYS_CTRL_CLK_DIVIDER_MASK << (cpuclk->cpu * 8)))) in clk_cpu_off_set_rate()
85 | (div << (cpuclk->cpu * 8)); in clk_cpu_off_set_rate()
86 writel(reg, cpuclk->reg_base + SYS_CTRL_CLK_DIVIDER_VALUE_OFFSET); in clk_cpu_off_set_rate()
88 reload_mask = 1 << (20 + cpuclk->cpu); in clk_cpu_off_set_rate()
90 reg = readl(cpuclk in clk_cpu_off_set_rate()
113 struct cpu_clk *cpuclk = to_cpu_clk(hwclk); clk_cpu_on_set_rate() local
168 struct cpu_clk *cpuclk; of_cpu_clk_setup() local
[all...]
/kernel/linux/linux-6.6/drivers/clk/mvebu/
H A Dclk-cpu.c51 struct cpu_clk *cpuclk = to_cpu_clk(hwclk); in clk_cpu_recalc_rate() local
54 reg = readl(cpuclk->reg_base + SYS_CTRL_CLK_DIVIDER_VALUE_OFFSET); in clk_cpu_recalc_rate()
55 div = (reg >> (cpuclk->cpu * 8)) & SYS_CTRL_CLK_DIVIDER_MASK; in clk_cpu_recalc_rate()
78 struct cpu_clk *cpuclk = to_cpu_clk(hwclk); in clk_cpu_off_set_rate() local
83 reg = (readl(cpuclk->reg_base + SYS_CTRL_CLK_DIVIDER_VALUE_OFFSET) in clk_cpu_off_set_rate()
84 & (~(SYS_CTRL_CLK_DIVIDER_MASK << (cpuclk->cpu * 8)))) in clk_cpu_off_set_rate()
85 | (div << (cpuclk->cpu * 8)); in clk_cpu_off_set_rate()
86 writel(reg, cpuclk->reg_base + SYS_CTRL_CLK_DIVIDER_VALUE_OFFSET); in clk_cpu_off_set_rate()
88 reload_mask = 1 << (20 + cpuclk->cpu); in clk_cpu_off_set_rate()
90 reg = readl(cpuclk in clk_cpu_off_set_rate()
113 struct cpu_clk *cpuclk = to_cpu_clk(hwclk); clk_cpu_on_set_rate() local
168 struct cpu_clk *cpuclk; of_cpu_clk_setup() local
[all...]
/kernel/linux/linux-5.10/drivers/clk/samsung/
H A Dclk-cpu.c150 struct exynos_cpuclk *cpuclk, void __iomem *base) in exynos_cpuclk_pre_rate_change()
152 const struct exynos_cpuclk_cfg_data *cfg_data = cpuclk->cfg; in exynos_cpuclk_pre_rate_change()
153 unsigned long alt_prate = clk_hw_get_rate(cpuclk->alt_parent); in exynos_cpuclk_pre_rate_change()
165 spin_lock_irqsave(cpuclk->lock, flags); in exynos_cpuclk_pre_rate_change()
173 if (cpuclk->flags & CLK_CPU_HAS_DIV1) { in exynos_cpuclk_pre_rate_change()
194 if (cpuclk->flags & CLK_CPU_NEEDS_DEBUG_ALT_DIV) { in exynos_cpuclk_pre_rate_change()
215 if (cpuclk->flags & CLK_CPU_HAS_DIV1) { in exynos_cpuclk_pre_rate_change()
221 spin_unlock_irqrestore(cpuclk->lock, flags); in exynos_cpuclk_pre_rate_change()
227 struct exynos_cpuclk *cpuclk, void __iomem *base) in exynos_cpuclk_post_rate_change()
229 const struct exynos_cpuclk_cfg_data *cfg_data = cpuclk in exynos_cpuclk_post_rate_change()
149 exynos_cpuclk_pre_rate_change(struct clk_notifier_data *ndata, struct exynos_cpuclk *cpuclk, void __iomem *base) exynos_cpuclk_pre_rate_change() argument
226 exynos_cpuclk_post_rate_change(struct clk_notifier_data *ndata, struct exynos_cpuclk *cpuclk, void __iomem *base) exynos_cpuclk_post_rate_change() argument
277 exynos5433_cpuclk_pre_rate_change(struct clk_notifier_data *ndata, struct exynos_cpuclk *cpuclk, void __iomem *base) exynos5433_cpuclk_pre_rate_change() argument
337 exynos5433_cpuclk_post_rate_change(struct clk_notifier_data *ndata, struct exynos_cpuclk *cpuclk, void __iomem *base) exynos5433_cpuclk_post_rate_change() argument
364 struct exynos_cpuclk *cpuclk; exynos_cpuclk_notifier_cb() local
387 struct exynos_cpuclk *cpuclk; exynos5433_cpuclk_notifier_cb() local
409 struct exynos_cpuclk *cpuclk; exynos_register_cpu_clock() local
[all...]
/kernel/linux/linux-6.6/drivers/clk/samsung/
H A Dclk-cpu.c150 struct exynos_cpuclk *cpuclk, void __iomem *base) in exynos_cpuclk_pre_rate_change()
152 const struct exynos_cpuclk_cfg_data *cfg_data = cpuclk->cfg; in exynos_cpuclk_pre_rate_change()
153 unsigned long alt_prate = clk_hw_get_rate(cpuclk->alt_parent); in exynos_cpuclk_pre_rate_change()
165 spin_lock_irqsave(cpuclk->lock, flags); in exynos_cpuclk_pre_rate_change()
173 if (cpuclk->flags & CLK_CPU_HAS_DIV1) { in exynos_cpuclk_pre_rate_change()
194 if (cpuclk->flags & CLK_CPU_NEEDS_DEBUG_ALT_DIV) { in exynos_cpuclk_pre_rate_change()
215 if (cpuclk->flags & CLK_CPU_HAS_DIV1) { in exynos_cpuclk_pre_rate_change()
221 spin_unlock_irqrestore(cpuclk->lock, flags); in exynos_cpuclk_pre_rate_change()
227 struct exynos_cpuclk *cpuclk, void __iomem *base) in exynos_cpuclk_post_rate_change()
229 const struct exynos_cpuclk_cfg_data *cfg_data = cpuclk in exynos_cpuclk_post_rate_change()
149 exynos_cpuclk_pre_rate_change(struct clk_notifier_data *ndata, struct exynos_cpuclk *cpuclk, void __iomem *base) exynos_cpuclk_pre_rate_change() argument
226 exynos_cpuclk_post_rate_change(struct clk_notifier_data *ndata, struct exynos_cpuclk *cpuclk, void __iomem *base) exynos_cpuclk_post_rate_change() argument
277 exynos5433_cpuclk_pre_rate_change(struct clk_notifier_data *ndata, struct exynos_cpuclk *cpuclk, void __iomem *base) exynos5433_cpuclk_pre_rate_change() argument
337 exynos5433_cpuclk_post_rate_change(struct clk_notifier_data *ndata, struct exynos_cpuclk *cpuclk, void __iomem *base) exynos5433_cpuclk_post_rate_change() argument
364 struct exynos_cpuclk *cpuclk; exynos_cpuclk_notifier_cb() local
387 struct exynos_cpuclk *cpuclk; exynos5433_cpuclk_notifier_cb() local
409 struct exynos_cpuclk *cpuclk; exynos_register_cpu_clock() local
[all...]
/kernel/linux/linux-5.10/drivers/cpufreq/
H A Dsh-cpufreq.c48 struct clk *cpuclk = &per_cpu(sh_cpuclk, cpu); in __sh_cpufreq_target() local
59 freq = clk_round_rate(cpuclk, target->freq * 1000); in __sh_cpufreq_target()
71 clk_set_rate(cpuclk, freq); in __sh_cpufreq_target()
92 struct clk *cpuclk = &per_cpu(sh_cpuclk, policy->cpu); in sh_cpufreq_verify() local
95 freq_table = cpuclk->nr_freqs ? cpuclk->freq_table : NULL; in sh_cpufreq_verify()
101 policy->min = (clk_round_rate(cpuclk, 1) + 500) / 1000; in sh_cpufreq_verify()
102 policy->max = (clk_round_rate(cpuclk, ~0UL) + 500) / 1000; in sh_cpufreq_verify()
111 struct clk *cpuclk = &per_cpu(sh_cpuclk, cpu); in sh_cpufreq_cpu_init() local
117 cpuclk in sh_cpufreq_cpu_init()
142 struct clk *cpuclk = &per_cpu(sh_cpuclk, cpu); sh_cpufreq_cpu_exit() local
[all...]
/kernel/linux/linux-6.6/drivers/cpufreq/
H A Dsh-cpufreq.c47 struct clk *cpuclk = &per_cpu(sh_cpuclk, cpu); in __sh_cpufreq_target() local
58 freq = clk_round_rate(cpuclk, target->freq * 1000); in __sh_cpufreq_target()
70 clk_set_rate(cpuclk, freq); in __sh_cpufreq_target()
91 struct clk *cpuclk = &per_cpu(sh_cpuclk, policy->cpu); in sh_cpufreq_verify() local
94 freq_table = cpuclk->nr_freqs ? cpuclk->freq_table : NULL; in sh_cpufreq_verify()
100 policy->min = (clk_round_rate(cpuclk, 1) + 500) / 1000; in sh_cpufreq_verify()
101 policy->max = (clk_round_rate(cpuclk, ~0UL) + 500) / 1000; in sh_cpufreq_verify()
110 struct clk *cpuclk = &per_cpu(sh_cpuclk, cpu); in sh_cpufreq_cpu_init() local
116 cpuclk in sh_cpufreq_cpu_init()
141 struct clk *cpuclk = &per_cpu(sh_cpuclk, cpu); sh_cpufreq_cpu_exit() local
[all...]
/kernel/linux/linux-5.10/arch/mips/txx9/generic/
H A Dsetup_tx4939.c101 unsigned int cpuclk = 0; in tx4939_setup() local
122 cpuclk = txx9_master_clock * 20 / 2; in tx4939_setup()
125 cpuclk = cpuclk / 3 * 4 /* / 6 * 8 */; break; in tx4939_setup()
127 cpuclk = cpuclk / 2 * 3 /* / 6 * 9 */; break; in tx4939_setup()
129 cpuclk = cpuclk / 3 * 5 /* / 6 * 10 */; break; in tx4939_setup()
131 cpuclk = cpuclk / in tx4939_setup()
[all...]
H A Dsetup_tx4927.c92 unsigned int cpuclk = 0; in tx4927_setup() local
126 cpuclk = txx9_gbus_clock * 2; break; in tx4927_setup()
129 cpuclk = txx9_gbus_clock * 5 / 2; break; in tx4927_setup()
132 cpuclk = txx9_gbus_clock * 3; break; in tx4927_setup()
135 cpuclk = txx9_gbus_clock * 4; break; in tx4927_setup()
137 txx9_cpu_clock = cpuclk; in tx4927_setup()
142 cpuclk = txx9_cpu_clock; in tx4927_setup()
147 txx9_gbus_clock = cpuclk / 2; break; in tx4927_setup()
150 txx9_gbus_clock = cpuclk * 2 / 5; break; in tx4927_setup()
153 txx9_gbus_clock = cpuclk / in tx4927_setup()
[all...]
H A Dsetup_tx4938.c97 unsigned int cpuclk = 0; in tx4938_setup() local
132 cpuclk = txx9_gbus_clock * 2; break; in tx4938_setup()
135 cpuclk = txx9_gbus_clock * 5 / 2; break; in tx4938_setup()
138 cpuclk = txx9_gbus_clock * 3; break; in tx4938_setup()
141 cpuclk = txx9_gbus_clock * 4; break; in tx4938_setup()
144 cpuclk = txx9_gbus_clock * 9 / 2; break; in tx4938_setup()
146 txx9_cpu_clock = cpuclk; in tx4938_setup()
151 cpuclk = txx9_cpu_clock; in tx4938_setup()
156 txx9_gbus_clock = cpuclk / 2; break; in tx4938_setup()
159 txx9_gbus_clock = cpuclk * in tx4938_setup()
[all...]
/kernel/linux/linux-5.10/drivers/clk/qcom/
H A Dclk-cpu-8996.c208 struct clk_cpu_8996_mux *cpuclk = to_clk_cpu_8996_mux_hw(hw); in clk_cpu_8996_mux_get_parent() local
209 u32 mask = GENMASK(cpuclk->width - 1, 0); in clk_cpu_8996_mux_get_parent()
212 regmap_read(clkr->regmap, cpuclk->reg, &val); in clk_cpu_8996_mux_get_parent()
213 val >>= cpuclk->shift; in clk_cpu_8996_mux_get_parent()
221 struct clk_cpu_8996_mux *cpuclk = to_clk_cpu_8996_mux_hw(hw); in clk_cpu_8996_mux_set_parent() local
222 u32 mask = GENMASK(cpuclk->width + cpuclk->shift - 1, cpuclk->shift); in clk_cpu_8996_mux_set_parent()
226 val <<= cpuclk->shift; in clk_cpu_8996_mux_set_parent()
228 return regmap_update_bits(clkr->regmap, cpuclk in clk_cpu_8996_mux_set_parent()
234 struct clk_cpu_8996_mux *cpuclk = to_clk_cpu_8996_mux_hw(hw); clk_cpu_8996_mux_determine_rate() local
459 struct clk_cpu_8996_mux *cpuclk = to_clk_cpu_8996_mux_nb(nb); cpu_clk_notifier_cb() local
[all...]
/kernel/linux/linux-6.6/arch/mips/txx9/generic/
H A Dsetup_tx4927.c92 unsigned int cpuclk = 0; in tx4927_setup() local
126 cpuclk = txx9_gbus_clock * 2; break; in tx4927_setup()
129 cpuclk = txx9_gbus_clock * 5 / 2; break; in tx4927_setup()
132 cpuclk = txx9_gbus_clock * 3; break; in tx4927_setup()
135 cpuclk = txx9_gbus_clock * 4; break; in tx4927_setup()
137 txx9_cpu_clock = cpuclk; in tx4927_setup()
142 cpuclk = txx9_cpu_clock; in tx4927_setup()
147 txx9_gbus_clock = cpuclk / 2; break; in tx4927_setup()
150 txx9_gbus_clock = cpuclk * 2 / 5; break; in tx4927_setup()
153 txx9_gbus_clock = cpuclk / in tx4927_setup()
[all...]
H A Dsetup_tx4938.c97 unsigned int cpuclk = 0; in tx4938_setup() local
132 cpuclk = txx9_gbus_clock * 2; break; in tx4938_setup()
135 cpuclk = txx9_gbus_clock * 5 / 2; break; in tx4938_setup()
138 cpuclk = txx9_gbus_clock * 3; break; in tx4938_setup()
141 cpuclk = txx9_gbus_clock * 4; break; in tx4938_setup()
144 cpuclk = txx9_gbus_clock * 9 / 2; break; in tx4938_setup()
146 txx9_cpu_clock = cpuclk; in tx4938_setup()
151 cpuclk = txx9_cpu_clock; in tx4938_setup()
156 txx9_gbus_clock = cpuclk / 2; break; in tx4938_setup()
159 txx9_gbus_clock = cpuclk * in tx4938_setup()
[all...]
/kernel/linux/linux-5.10/arch/mips/cavium-octeon/
H A Doct_ilm.c33 u64 cpuclk, avg, max, min; in show_latency() local
36 cpuclk = octeon_get_clock_rate(); in show_latency()
38 max = (curr_li.max_latency * 1000000000) / cpuclk; in show_latency()
39 min = (curr_li.min_latency * 1000000000) / cpuclk; in show_latency()
40 avg = (curr_li.latency_sum * 1000000000) / (cpuclk * curr_li.interrupt_cnt); in show_latency()
/kernel/linux/linux-6.6/arch/mips/cavium-octeon/
H A Doct_ilm.c33 u64 cpuclk, avg, max, min; in oct_ilm_show() local
36 cpuclk = octeon_get_clock_rate(); in oct_ilm_show()
38 max = (curr_li.max_latency * 1000000000) / cpuclk; in oct_ilm_show()
39 min = (curr_li.min_latency * 1000000000) / cpuclk; in oct_ilm_show()
40 avg = (curr_li.latency_sum * 1000000000) / (cpuclk * curr_li.interrupt_cnt); in oct_ilm_show()
/kernel/linux/linux-6.6/drivers/clk/qcom/
H A Dclk-cpu-8996.c277 struct clk_cpu_8996_pmux *cpuclk = to_clk_cpu_8996_pmux_hw(hw); in clk_cpu_8996_pmux_get_parent() local
280 regmap_read(clkr->regmap, cpuclk->reg, &val); in clk_cpu_8996_pmux_get_parent()
288 struct clk_cpu_8996_pmux *cpuclk = to_clk_cpu_8996_pmux_hw(hw); in clk_cpu_8996_pmux_set_parent() local
293 return regmap_update_bits(clkr->regmap, cpuclk->reg, PMUX_MASK, val); in clk_cpu_8996_pmux_set_parent()
549 struct clk_cpu_8996_pmux *cpuclk = to_clk_cpu_8996_pmux_nb(nb); in cpu_clk_notifier_cb() local
554 qcom_cpu_clk_msm8996_acd_init(cpuclk->clkr.regmap); in cpu_clk_notifier_cb()
566 clk_cpu_8996_pmux_set_parent(&cpuclk->clkr.hw, SMUX_INDEX); in cpu_clk_notifier_cb()
573 clk_cpu_8996_pmux_set_parent(&cpuclk->clkr.hw, ACD_INDEX); in cpu_clk_notifier_cb()

Completed in 14 milliseconds