Lines Matching refs:pll

431 	struct k210_pll *pll = to_k210_pll(clk);  in k210_pll_set_rate()  local
450 reg = readl(pll->reg); in k210_pll_set_rate()
459 writel(reg, pll->reg); in k210_pll_set_rate()
473 struct k210_pll *pll = to_k210_pll(clk); in k210_pll_get_rate() local
475 u32 reg = readl(pll->reg); in k210_pll_get_rate()
494 static void k210_pll_waitfor_lock(struct k210_pll *pll) in k210_pll_waitfor_lock() argument
496 u32 mask = GENMASK(pll->width - 1, 0) << pll->shift; in k210_pll_waitfor_lock()
499 u32 reg = readl(pll->lock); in k210_pll_waitfor_lock()
504 reg |= BIT(pll->shift + K210_PLL_CLEAR_SLIP); in k210_pll_waitfor_lock()
505 writel(reg, pll->lock); in k210_pll_waitfor_lock()
512 struct k210_pll *pll = to_k210_pll(clk); in k210_pll_enable() local
513 u32 reg = readl(pll->reg); in k210_pll_enable()
519 writel(reg, pll->reg); in k210_pll_enable()
523 writel(reg, pll->reg); in k210_pll_enable()
525 writel(reg, pll->reg); in k210_pll_enable()
529 writel(reg, pll->reg); in k210_pll_enable()
531 k210_pll_waitfor_lock(pll); in k210_pll_enable()
534 writel(reg, pll->reg); in k210_pll_enable()
541 struct k210_pll *pll = to_k210_pll(clk); in k210_pll_disable() local
542 u32 reg = readl(pll->reg); in k210_pll_disable()
550 writel(reg, pll->reg); in k210_pll_disable()
553 writel(reg, pll->reg); in k210_pll_disable()
567 struct k210_pll *pll) in k210_register_pll_struct() argument
570 struct clk *clk = &pll->clk; in k210_register_pll_struct()
583 struct k210_pll *pll; in k210_register_pll() local
585 pll = kzalloc(sizeof(*pll), GFP_KERNEL); in k210_register_pll()
586 if (!pll) in k210_register_pll()
588 pll->reg = reg; in k210_register_pll()
589 pll->lock = lock; in k210_register_pll()
590 pll->shift = shift; in k210_register_pll()
591 pll->width = width; in k210_register_pll()
593 clk = k210_register_pll_struct(name, parent_name, pll); in k210_register_pll()
595 kfree(pll); in k210_register_pll()