Lines Matching refs:map

67 	struct berlin2_div_map map;  member
78 struct berlin2_div_map *map = &div->map; in berlin2_div_is_enabled() local
84 reg = readl_relaxed(div->base + map->gate_offs); in berlin2_div_is_enabled()
85 reg >>= map->gate_shift; in berlin2_div_is_enabled()
96 struct berlin2_div_map *map = &div->map; in berlin2_div_enable() local
102 reg = readl_relaxed(div->base + map->gate_offs); in berlin2_div_enable()
103 reg |= BIT(map->gate_shift); in berlin2_div_enable()
104 writel_relaxed(reg, div->base + map->gate_offs); in berlin2_div_enable()
115 struct berlin2_div_map *map = &div->map; in berlin2_div_disable() local
121 reg = readl_relaxed(div->base + map->gate_offs); in berlin2_div_disable()
122 reg &= ~BIT(map->gate_shift); in berlin2_div_disable()
123 writel_relaxed(reg, div->base + map->gate_offs); in berlin2_div_disable()
132 struct berlin2_div_map *map = &div->map; in berlin2_div_set_parent() local
139 reg = readl_relaxed(div->base + map->pll_switch_offs); in berlin2_div_set_parent()
141 reg &= ~BIT(map->pll_switch_shift); in berlin2_div_set_parent()
143 reg |= BIT(map->pll_switch_shift); in berlin2_div_set_parent()
144 writel_relaxed(reg, div->base + map->pll_switch_offs); in berlin2_div_set_parent()
148 reg = readl_relaxed(div->base + map->pll_select_offs); in berlin2_div_set_parent()
149 reg &= ~(PLL_SELECT_MASK << map->pll_select_shift); in berlin2_div_set_parent()
150 reg |= (index - 1) << map->pll_select_shift; in berlin2_div_set_parent()
151 writel_relaxed(reg, div->base + map->pll_select_offs); in berlin2_div_set_parent()
163 struct berlin2_div_map *map = &div->map; in berlin2_div_get_parent() local
171 reg = readl_relaxed(div->base + map->pll_switch_offs); in berlin2_div_get_parent()
172 reg &= BIT(map->pll_switch_shift); in berlin2_div_get_parent()
174 reg = readl_relaxed(div->base + map->pll_select_offs); in berlin2_div_get_parent()
175 reg >>= map->pll_select_shift; in berlin2_div_get_parent()
190 struct berlin2_div_map *map = &div->map; in berlin2_div_recalc_rate() local
196 divsw = readl_relaxed(div->base + map->div_switch_offs) & in berlin2_div_recalc_rate()
197 (1 << map->div_switch_shift); in berlin2_div_recalc_rate()
198 div3sw = readl_relaxed(div->base + map->div3_switch_offs) & in berlin2_div_recalc_rate()
199 (1 << map->div3_switch_shift); in berlin2_div_recalc_rate()
210 reg = readl_relaxed(div->base + map->div_select_offs); in berlin2_div_recalc_rate()
211 reg >>= map->div_select_shift; in berlin2_div_recalc_rate()
238 berlin2_div_register(const struct berlin2_div_map *map, in berlin2_div_register() argument
253 memcpy(&div->map, map, sizeof(*map)); in berlin2_div_register()