• Home
  • Raw
  • Download

Lines Matching full:group

31  * struct mstp_clock_group - MSTP gating clocks group
33 * @data: clock specifier translation for clocks in this group
38 * @clks: clocks in this group
53 * @group: MSTP clocks group
58 struct mstp_clock_group *group; member
63 static inline u32 cpg_mstp_read(struct mstp_clock_group *group, in cpg_mstp_read() argument
66 return group->width_8bit ? readb(reg) : readl(reg); in cpg_mstp_read()
69 static inline void cpg_mstp_write(struct mstp_clock_group *group, u32 val, in cpg_mstp_write() argument
72 group->width_8bit ? writeb(val, reg) : writel(val, reg); in cpg_mstp_write()
78 struct mstp_clock_group *group = clock->group; in cpg_mstp_clock_endisable() local
84 spin_lock_irqsave(&group->lock, flags); in cpg_mstp_clock_endisable()
86 value = cpg_mstp_read(group, group->smstpcr); in cpg_mstp_clock_endisable()
91 cpg_mstp_write(group, value, group->smstpcr); in cpg_mstp_clock_endisable()
93 if (!group->mstpsr) { in cpg_mstp_clock_endisable()
95 cpg_mstp_read(group, group->smstpcr); in cpg_mstp_clock_endisable()
96 barrier_data(group->smstpcr); in cpg_mstp_clock_endisable()
99 spin_unlock_irqrestore(&group->lock, flags); in cpg_mstp_clock_endisable()
101 if (!enable || !group->mstpsr) in cpg_mstp_clock_endisable()
105 if (!(cpg_mstp_read(group, group->mstpsr) & bitmask)) in cpg_mstp_clock_endisable()
112 group->smstpcr, clock->bit_index); in cpg_mstp_clock_endisable()
132 struct mstp_clock_group *group = clock->group; in cpg_mstp_clock_is_enabled() local
135 if (group->mstpsr) in cpg_mstp_clock_is_enabled()
136 value = cpg_mstp_read(group, group->mstpsr); in cpg_mstp_clock_is_enabled()
138 value = cpg_mstp_read(group, group->smstpcr); in cpg_mstp_clock_is_enabled()
151 struct mstp_clock_group *group) in cpg_mstp_clock_register() argument
173 clock->group = group; in cpg_mstp_clock_register()
186 struct mstp_clock_group *group; in cpg_mstp_clocks_init() local
191 group = kzalloc(struct_size(group, clks, MSTP_MAX_CLOCKS), GFP_KERNEL); in cpg_mstp_clocks_init()
192 if (!group) in cpg_mstp_clocks_init()
195 clks = group->clks; in cpg_mstp_clocks_init()
196 spin_lock_init(&group->lock); in cpg_mstp_clocks_init()
197 group->data.clks = clks; in cpg_mstp_clocks_init()
199 group->smstpcr = of_iomap(np, 0); in cpg_mstp_clocks_init()
200 group->mstpsr = of_iomap(np, 1); in cpg_mstp_clocks_init()
202 if (group->smstpcr == NULL) { in cpg_mstp_clocks_init()
204 kfree(group); in cpg_mstp_clocks_init()
209 group->width_8bit = true; in cpg_mstp_clocks_init()
243 clkidx, group); in cpg_mstp_clocks_init()
245 group->data.clk_num = max(group->data.clk_num, in cpg_mstp_clocks_init()
262 of_clk_add_provider(np, of_clk_src_onecell_get, &group->data); in cpg_mstp_clocks_init()