Lines Matching refs:pwd
128 struct __prci_wrpll_data *pwd) in __prci_wrpll_read_cfg0() argument
130 __prci_wrpll_unpack(&pwd->c, __prci_readl(pd, pwd->cfg0_offs)); in __prci_wrpll_read_cfg0()
148 struct __prci_wrpll_data *pwd, in __prci_wrpll_write_cfg0() argument
151 __prci_writel(__prci_wrpll_pack(c), pwd->cfg0_offs, pd); in __prci_wrpll_write_cfg0()
153 memcpy(&pwd->c, c, sizeof(*c)); in __prci_wrpll_write_cfg0()
164 struct __prci_wrpll_data *pwd, in __prci_wrpll_write_cfg1() argument
167 __prci_writel(enable, pwd->cfg1_offs, pd); in __prci_wrpll_write_cfg1()
181 struct __prci_wrpll_data *pwd = pc->pwd; in sifive_prci_wrpll_recalc_rate() local
183 return wrpll_calc_output_rate(&pwd->c, parent_rate); in sifive_prci_wrpll_recalc_rate()
191 struct __prci_wrpll_data *pwd = pc->pwd; in sifive_prci_wrpll_round_rate() local
194 memcpy(&c, &pwd->c, sizeof(c)); in sifive_prci_wrpll_round_rate()
205 struct __prci_wrpll_data *pwd = pc->pwd; in sifive_prci_wrpll_set_rate() local
209 r = wrpll_configure_for_rate(&pwd->c, rate, parent_rate); in sifive_prci_wrpll_set_rate()
213 if (pwd->enable_bypass) in sifive_prci_wrpll_set_rate()
214 pwd->enable_bypass(pd); in sifive_prci_wrpll_set_rate()
216 __prci_wrpll_write_cfg0(pd, pwd, &pwd->c); in sifive_prci_wrpll_set_rate()
218 udelay(wrpll_calc_max_lock_us(&pwd->c)); in sifive_prci_wrpll_set_rate()
226 struct __prci_wrpll_data *pwd = pc->pwd; in sifive_clk_is_enabled() local
230 r = __prci_readl(pd, pwd->cfg1_offs); in sifive_clk_is_enabled()
241 struct __prci_wrpll_data *pwd = pc->pwd; in sifive_prci_clock_enable() local
247 __prci_wrpll_write_cfg1(pd, pwd, PRCI_COREPLLCFG1_CKE_MASK); in sifive_prci_clock_enable()
249 if (pwd->disable_bypass) in sifive_prci_clock_enable()
250 pwd->disable_bypass(pd); in sifive_prci_clock_enable()
258 struct __prci_wrpll_data *pwd = pc->pwd; in sifive_prci_clock_disable() local
262 if (pwd->enable_bypass) in sifive_prci_clock_disable()
263 pwd->enable_bypass(pd); in sifive_prci_clock_disable()
265 r = __prci_readl(pd, pwd->cfg1_offs); in sifive_prci_clock_disable()
268 __prci_wrpll_write_cfg1(pd, pwd, r); in sifive_prci_clock_disable()
529 if (pic->pwd) in __prci_register_clocks()
530 __prci_wrpll_read_cfg0(pd, pic->pwd); in __prci_register_clocks()