Lines Matching refs:pll
46 if (!(pllctl_reg_read(data->pll, stat) & PLLSTAT_GOSTAT_MASK)) in wait_for_completion()
53 pllctl_reg_clrbits(data->pll, ctl, PLLCTL_PLLENSRC_MASK | in bypass_main_pll()
68 if (data->pll == MAIN_PLL) in configure_mult_div()
69 pllctl_reg_write(data->pll, mult, pllm & PLLM_MULT_LO_MASK); in configure_mult_div()
71 clrsetbits_le32(keystone_pll_regs[data->pll].reg0, in configure_mult_div()
77 clrsetbits_le32(keystone_pll_regs[data->pll].reg0, in configure_mult_div()
82 clrsetbits_le32(keystone_pll_regs[data->pll].reg1, in configure_mult_div()
86 clrsetbits_le32(keystone_pll_regs[data->pll].reg0, in configure_mult_div()
100 tmp = pllctl_reg_read(data->pll, secctl); in configure_main_pll()
104 setbits_le32(keystone_pll_regs[data->pll].reg1, in configure_main_pll()
110 pllctl_reg_setbits(data->pll, secctl, SECCTL_BYPASS_MASK); in configure_main_pll()
111 pllctl_reg_setbits(data->pll, ctl, PLLCTL_PLLPWRDN_MASK); in configure_main_pll()
115 pllctl_reg_clrbits(data->pll, ctl, PLLCTL_PLLPWRDN_MASK); in configure_main_pll()
123 pllctl_reg_rmw(data->pll, secctl, SECCTL_OP_DIV_MASK, in configure_main_pll()
130 offset = pllctl_reg(data->pll, div1) + i; in configure_main_pll()
132 offset = pllctl_reg(data->pll, div4) + (i - 3); in configure_main_pll()
141 pllctl_reg_setbits(data->pll, alnctl, alnctl_val); in configure_main_pll()
146 pllctl_reg_setbits(data->pll, cmd, PLLSTAT_GOSTAT_MASK); in configure_main_pll()
151 pllctl_reg_setbits(data->pll, ctl, PLLCTL_PLLRST_MASK); in configure_main_pll()
153 pllctl_reg_clrbits(data->pll, ctl, PLLCTL_PLLRST_MASK); in configure_main_pll()
157 pllctl_reg_clrbits(data->pll, secctl, SECCTL_BYPASS_MASK); in configure_main_pll()
158 pllctl_reg_setbits(data->pll, ctl, PLLCTL_PLLEN_MASK); in configure_main_pll()
166 if (cpu_is_k2hk() && data->pll == TETRIS_PLL) in configure_secondary_pll()
170 setbits_le32(keystone_pll_regs[data->pll].reg1, CFG_PLLCTL1_ENSAT_MASK); in configure_secondary_pll()
171 setbits_le32(keystone_pll_regs[data->pll].reg0, in configure_secondary_pll()
177 clrsetbits_le32(keystone_pll_regs[data->pll].reg0, in configure_secondary_pll()
183 setbits_le32(keystone_pll_regs[data->pll].reg1, CFG_PLLCTL1_RST_MASK); in configure_secondary_pll()
188 if (data->pll == PASS_PLL && cpu_is_k2hk()) in configure_secondary_pll()
191 clrbits_le32(keystone_pll_regs[data->pll].reg1, CFG_PLLCTL1_RST_MASK); in configure_secondary_pll()
196 clrbits_le32(keystone_pll_regs[data->pll].reg0, in configure_secondary_pll()
200 if (cpu_is_k2hk() && data->pll == TETRIS_PLL) in configure_secondary_pll()
206 if (data->pll == MAIN_PLL) in init_pll()
221 int pll; in init_plls() local
223 for (pll = MAIN_PLL; pll < MAX_PLL_COUNT; pll++) { in init_plls()
224 data = get_pll_init_data(pll); in init_plls()
279 static unsigned long pll_freq_get(int pll) in pll_freq_get() argument
285 if (pll == MAIN_PLL) { in pll_freq_get()
287 if (pllctl_reg_read(pll, ctl) & PLLCTL_PLLEN_MASK) { in pll_freq_get()
293 (pllctl_reg_read(pll, mult) & in pll_freq_get()
295 output_div = ((pllctl_reg_read(pll, secctl) & in pll_freq_get()
302 switch (pll) { in pll_freq_get()