Lines Matching full:masks
35 do_div(rate, factor->ftbl[i].num * factor->masks->factor); in clk_factor_round_rate()
54 struct mmp_clk_factor_masks *masks = factor->masks; in clk_factor_recalc_rate() local
61 num = (val >> masks->num_shift) & masks->num_mask; in clk_factor_recalc_rate()
64 den = (val >> masks->den_shift) & masks->den_mask; in clk_factor_recalc_rate()
71 do_div(rate, num * factor->masks->factor); in clk_factor_recalc_rate()
81 struct mmp_clk_factor_masks *masks = factor->masks; in clk_factor_set_rate() local
90 do_div(rate, factor->ftbl[i].num * factor->masks->factor); in clk_factor_set_rate()
103 val &= ~(masks->num_mask << masks->num_shift); in clk_factor_set_rate()
104 val |= (factor->ftbl[i].num & masks->num_mask) << masks->num_shift; in clk_factor_set_rate()
106 val &= ~(masks->den_mask << masks->den_shift); in clk_factor_set_rate()
107 val |= (factor->ftbl[i].den & masks->den_mask) << masks->den_shift; in clk_factor_set_rate()
120 struct mmp_clk_factor_masks *masks = factor->masks; in clk_factor_init() local
131 num = (val >> masks->num_shift) & masks->num_mask; in clk_factor_init()
134 den = (val >> masks->den_shift) & masks->den_mask; in clk_factor_init()
141 val &= ~(masks->num_mask << masks->num_shift); in clk_factor_init()
142 val |= (factor->ftbl[0].num & masks->num_mask) << in clk_factor_init()
143 masks->num_shift; in clk_factor_init()
145 val &= ~(masks->den_mask << masks->den_shift); in clk_factor_init()
146 val |= (factor->ftbl[0].den & masks->den_mask) << in clk_factor_init()
147 masks->den_shift; in clk_factor_init()
150 if (!(val & masks->enable_mask) || i >= factor->ftbl_cnt) { in clk_factor_init()
151 val |= masks->enable_mask; in clk_factor_init()
170 struct mmp_clk_factor_masks *masks, in mmp_clk_register_factor() argument
178 if (!masks) { in mmp_clk_register_factor()
189 factor->masks = masks; in mmp_clk_register_factor()