Lines Matching refs:cpuclk

51 	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->reg_base + SYS_CTRL_CLK_DIVIDER_CTRL_OFFSET) in clk_cpu_off_set_rate()
92 writel(reg, cpuclk->reg_base + SYS_CTRL_CLK_DIVIDER_CTRL_OFFSET); in clk_cpu_off_set_rate()
95 reg = readl(cpuclk->reg_base + SYS_CTRL_CLK_DIVIDER_CTRL_OFFSET) in clk_cpu_off_set_rate()
97 writel(reg, cpuclk->reg_base + SYS_CTRL_CLK_DIVIDER_CTRL_OFFSET); in clk_cpu_off_set_rate()
102 writel(reg, cpuclk->reg_base + SYS_CTRL_CLK_DIVIDER_CTRL_OFFSET); in clk_cpu_off_set_rate()
113 struct cpu_clk *cpuclk = to_cpu_clk(hwclk); in clk_cpu_on_set_rate() local
119 if (!cpuclk->pmu_dfs) in clk_cpu_on_set_rate()
124 reg = readl(cpuclk->reg_base + SYS_CTRL_CLK_DIVIDER_CTRL2_OFFSET); in clk_cpu_on_set_rate()
138 reg = readl(cpuclk->pmu_dfs); in clk_cpu_on_set_rate()
141 writel(reg, cpuclk->pmu_dfs); in clk_cpu_on_set_rate()
143 reg = readl(cpuclk->reg_base + SYS_CTRL_CLK_DIVIDER_CTRL_OFFSET); in clk_cpu_on_set_rate()
146 writel(reg, cpuclk->reg_base + SYS_CTRL_CLK_DIVIDER_CTRL_OFFSET); in clk_cpu_on_set_rate()
148 return mvebu_pmsu_dfs_request(cpuclk->cpu); in clk_cpu_on_set_rate()
168 struct cpu_clk *cpuclk; in of_cpu_clk_setup() local
187 cpuclk = kcalloc(ncpus, sizeof(*cpuclk), GFP_KERNEL); in of_cpu_clk_setup()
188 if (WARN_ON(!cpuclk)) in of_cpu_clk_setup()
210 cpuclk[cpu].parent_name = of_clk_get_parent_name(node, 0); in of_cpu_clk_setup()
211 cpuclk[cpu].clk_name = clk_name; in of_cpu_clk_setup()
212 cpuclk[cpu].cpu = cpu; in of_cpu_clk_setup()
213 cpuclk[cpu].reg_base = clock_complex_base; in of_cpu_clk_setup()
215 cpuclk[cpu].pmu_dfs = pmu_dfs_base + 4 * cpu; in of_cpu_clk_setup()
216 cpuclk[cpu].hw.init = &init; in of_cpu_clk_setup()
218 init.name = cpuclk[cpu].clk_name; in of_cpu_clk_setup()
221 init.parent_names = &cpuclk[cpu].parent_name; in of_cpu_clk_setup()
224 clk = clk_register(NULL, &cpuclk[cpu].hw); in of_cpu_clk_setup()
237 kfree(cpuclk[ncpus].clk_name); in of_cpu_clk_setup()
239 kfree(cpuclk); in of_cpu_clk_setup()