Lines Matching refs:mdiv
617 unsigned int mdiv; in iproc_clk_recalc_rate() local
623 val = readl(pll->control_base + ctrl->mdiv.offset); in iproc_clk_recalc_rate()
624 mdiv = (val >> ctrl->mdiv.shift) & bit_mask(ctrl->mdiv.width); in iproc_clk_recalc_rate()
625 if (mdiv == 0) in iproc_clk_recalc_rate()
626 mdiv = 256; in iproc_clk_recalc_rate()
629 rate = parent_rate / (mdiv * 2); in iproc_clk_recalc_rate()
631 rate = parent_rate / mdiv; in iproc_clk_recalc_rate()
677 val = readl(pll->control_base + ctrl->mdiv.offset); in iproc_clk_set_rate()
679 val &= ~(bit_mask(ctrl->mdiv.width) << ctrl->mdiv.shift); in iproc_clk_set_rate()
681 val &= ~(bit_mask(ctrl->mdiv.width) << ctrl->mdiv.shift); in iproc_clk_set_rate()
682 val |= div << ctrl->mdiv.shift; in iproc_clk_set_rate()
684 iproc_pll_write(pll, pll->control_base, ctrl->mdiv.offset, val); in iproc_clk_set_rate()