14
14
#include "clk-pll.h"
15
15
16
16
/**
17
- * struct samsung_clk_provider: information about clock provider
18
- * @reg_base: virtual address for the register base.
19
- * @dev: clock provider device needed for runtime PM.
20
- * @lock: maintains exclusion between callbacks for a given clock-provider.
21
- * @clk_data: holds clock related data like clk_hw* and number of clocks.
17
+ * struct samsung_clk_provider - information about clock provider
18
+ * @reg_base: virtual address for the register base
19
+ * @dev: clock provider device needed for runtime PM
20
+ * @lock: maintains exclusion between callbacks for a given clock-provider
21
+ * @clk_data: holds clock related data like clk_hw* and number of clocks
22
22
*/
23
23
struct samsung_clk_provider {
24
24
void __iomem * reg_base ;
@@ -29,10 +29,10 @@ struct samsung_clk_provider {
29
29
};
30
30
31
31
/**
32
- * struct samsung_clock_alias: information about mux clock
33
- * @id: platform specific id of the clock.
34
- * @dev_name: name of the device to which this clock belongs.
35
- * @alias: optional clock alias name to be assigned to this clock.
32
+ * struct samsung_clock_alias - information about mux clock
33
+ * @id: platform specific id of the clock
34
+ * @dev_name: name of the device to which this clock belongs
35
+ * @alias: optional clock alias name to be assigned to this clock
36
36
*/
37
37
struct samsung_clock_alias {
38
38
unsigned int id ;
@@ -50,12 +50,12 @@ struct samsung_clock_alias {
50
50
#define MHZ (1000 * 1000)
51
51
52
52
/**
53
- * struct samsung_fixed_rate_clock: information about fixed-rate clock
54
- * @id: platform specific id of the clock.
55
- * @name: name of this fixed-rate clock.
56
- * @parent_name: optional parent clock name.
57
- * @flags: optional fixed-rate clock flags.
58
- * @fixed_rate: fixed clock rate of this clock.
53
+ * struct samsung_fixed_rate_clock - information about fixed-rate clock
54
+ * @id: platform specific id of the clock
55
+ * @name: name of this fixed-rate clock
56
+ * @parent_name: optional parent clock name
57
+ * @flags: optional fixed-rate clock flags
58
+ * @fixed_rate: fixed clock rate of this clock
59
59
*/
60
60
struct samsung_fixed_rate_clock {
61
61
unsigned int id ;
@@ -75,13 +75,13 @@ struct samsung_fixed_rate_clock {
75
75
}
76
76
77
77
/**
78
- * struct samsung_fixed_factor_clock: information about fixed-factor clock
79
- * @id: platform specific id of the clock.
80
- * @name: name of this fixed-factor clock.
81
- * @parent_name: parent clock name.
82
- * @mult: fixed multiplication factor.
83
- * @div: fixed division factor.
84
- * @flags: optional fixed-factor clock flags.
78
+ * struct samsung_fixed_factor_clock - information about fixed-factor clock
79
+ * @id: platform specific id of the clock
80
+ * @name: name of this fixed-factor clock
81
+ * @parent_name: parent clock name
82
+ * @mult: fixed multiplication factor
83
+ * @div: fixed division factor
84
+ * @flags: optional fixed-factor clock flags
85
85
*/
86
86
struct samsung_fixed_factor_clock {
87
87
unsigned int id ;
@@ -103,16 +103,16 @@ struct samsung_fixed_factor_clock {
103
103
}
104
104
105
105
/**
106
- * struct samsung_mux_clock: information about mux clock
107
- * @id: platform specific id of the clock.
108
- * @name: name of this mux clock.
109
- * @parent_names: array of pointer to parent clock names.
110
- * @num_parents: number of parents listed in @parent_names.
111
- * @flags: optional flags for basic clock.
112
- * @offset: offset of the register for configuring the mux.
113
- * @shift: starting bit location of the mux control bit-field in @reg.
114
- * @width: width of the mux control bit-field in @reg.
115
- * @mux_flags: flags for mux-type clock.
106
+ * struct samsung_mux_clock - information about mux clock
107
+ * @id: platform specific id of the clock
108
+ * @name: name of this mux clock
109
+ * @parent_names: array of pointer to parent clock names
110
+ * @num_parents: number of parents listed in @parent_names
111
+ * @flags: optional flags for basic clock
112
+ * @offset: offset of the register for configuring the mux
113
+ * @shift: starting bit location of the mux control bit-field in @reg
114
+ * @width: width of the mux control bit-field in @reg
115
+ * @mux_flags: flags for mux-type clock
116
116
*/
117
117
struct samsung_mux_clock {
118
118
unsigned int id ;
@@ -146,16 +146,16 @@ struct samsung_mux_clock {
146
146
__MUX(_id, cname, pnames, o, s, w, f, mf)
147
147
148
148
/**
149
- * struct samsung_div_clock: information about div clock
150
- * @id: platform specific id of the clock.
151
- * @name: name of this div clock.
152
- * @parent_name: name of the parent clock.
153
- * @flags: optional flags for basic clock.
154
- * @offset: offset of the register for configuring the div.
155
- * @shift: starting bit location of the div control bit-field in @reg.
156
- * @width: width of the bitfield.
157
- * @div_flags: flags for div-type clock.
158
- * @table: array of divider/value pairs ending with a div set to 0.
149
+ * struct samsung_div_clock - information about div clock
150
+ * @id: platform specific id of the clock
151
+ * @name: name of this div clock
152
+ * @parent_name: name of the parent clock
153
+ * @flags: optional flags for basic clock
154
+ * @offset: offset of the register for configuring the div
155
+ * @shift: starting bit location of the div control bit-field in @reg
156
+ * @width: width of the bitfield
157
+ * @div_flags: flags for div-type clock
158
+ * @table: array of divider/value pairs ending with a div set to 0
159
159
*/
160
160
struct samsung_div_clock {
161
161
unsigned int id ;
@@ -192,14 +192,14 @@ struct samsung_div_clock {
192
192
__DIV(_id, cname, pname, o, s, w, 0, 0, t)
193
193
194
194
/**
195
- * struct samsung_gate_clock: information about gate clock
196
- * @id: platform specific id of the clock.
197
- * @name: name of this gate clock.
198
- * @parent_name: name of the parent clock.
199
- * @flags: optional flags for basic clock.
200
- * @offset: offset of the register for configuring the gate.
201
- * @bit_idx: bit index of the gate control bit-field in @reg.
202
- * @gate_flags: flags for gate-type clock.
195
+ * struct samsung_gate_clock - information about gate clock
196
+ * @id: platform specific id of the clock
197
+ * @name: name of this gate clock
198
+ * @parent_name: name of the parent clock
199
+ * @flags: optional flags for basic clock
200
+ * @offset: offset of the register for configuring the gate
201
+ * @bit_idx: bit index of the gate control bit-field in @reg
202
+ * @gate_flags: flags for gate-type clock
203
203
*/
204
204
struct samsung_gate_clock {
205
205
unsigned int id ;
@@ -228,25 +228,25 @@ struct samsung_gate_clock {
228
228
#define PNAME (x ) static const char * const x[] __initconst
229
229
230
230
/**
231
- * struct samsung_clk_reg_dump: register dump of clock controller registers.
232
- * @offset: clock register offset from the controller base address.
233
- * @value: the value to be register at offset.
231
+ * struct samsung_clk_reg_dump - register dump of clock controller registers
232
+ * @offset: clock register offset from the controller base address
233
+ * @value: the value to be register at offset
234
234
*/
235
235
struct samsung_clk_reg_dump {
236
236
u32 offset ;
237
237
u32 value ;
238
238
};
239
239
240
240
/**
241
- * struct samsung_pll_clock: information about pll clock
242
- * @id: platform specific id of the clock.
243
- * @name: name of this pll clock.
244
- * @parent_name: name of the parent clock.
245
- * @flags: optional flags for basic clock.
246
- * @con_offset: offset of the register for configuring the PLL.
247
- * @lock_offset: offset of the register for locking the PLL.
248
- * @type: Type of PLL to be registered.
249
- * @rate_table: array of PLL settings for possible PLL rates.
241
+ * struct samsung_pll_clock - information about pll clock
242
+ * @id: platform specific id of the clock
243
+ * @name: name of this pll clock
244
+ * @parent_name: name of the parent clock
245
+ * @flags: optional flags for basic clock
246
+ * @con_offset: offset of the register for configuring the PLL
247
+ * @lock_offset: offset of the register for locking the PLL
248
+ * @type: type of PLL to be registered
249
+ * @rate_table: array of PLL settings for possible PLL rates
250
250
*/
251
251
struct samsung_pll_clock {
252
252
unsigned int id ;
@@ -305,39 +305,51 @@ struct samsung_clock_reg_cache {
305
305
unsigned int rsuspend_num ;
306
306
};
307
307
308
+ /**
309
+ * struct samsung_cmu_info - all clocks information needed for CMU registration
310
+ * @pll_clks: list of PLL clocks
311
+ * @nr_pll_clks: count of clocks in @pll_clks
312
+ * @mux_clks: list of mux clocks
313
+ * @nr_mux_clks: count of clocks in @mux_clks
314
+ * @div_clks: list of div clocks
315
+ * @nr_div_clks: count of clocks in @div_clks
316
+ * @gate_clks: list of gate clocks
317
+ * @nr_gate_clks: count of clocks in @gate_clks
318
+ * @fixed_clks: list of fixed clocks
319
+ * @nr_fixed_clks: count clocks in @fixed_clks
320
+ * @fixed_factor_clks: list of fixed factor clocks
321
+ * @nr_fixed_factor_clks: count of clocks in @fixed_factor_clks
322
+ * @nr_clk_ids: total number of clocks with IDs assigned
323
+ * @cpu_clks: list of CPU clocks
324
+ * @nr_cpu_clks: count of clocks in @cpu_clks
325
+ * @clk_regs: list of clock registers
326
+ * @nr_clk_regs: count of clock registers in @clk_regs
327
+ * @suspend_regs: list of clock registers to set before suspend
328
+ * @nr_suspend_regs: count of clock registers in @suspend_regs
329
+ * @clk_name: name of the parent clock needed for CMU register access
330
+ */
308
331
struct samsung_cmu_info {
309
- /* list of pll clocks and respective count */
310
332
const struct samsung_pll_clock * pll_clks ;
311
333
unsigned int nr_pll_clks ;
312
- /* list of mux clocks and respective count */
313
334
const struct samsung_mux_clock * mux_clks ;
314
335
unsigned int nr_mux_clks ;
315
- /* list of div clocks and respective count */
316
336
const struct samsung_div_clock * div_clks ;
317
337
unsigned int nr_div_clks ;
318
- /* list of gate clocks and respective count */
319
338
const struct samsung_gate_clock * gate_clks ;
320
339
unsigned int nr_gate_clks ;
321
- /* list of fixed clocks and respective count */
322
340
const struct samsung_fixed_rate_clock * fixed_clks ;
323
341
unsigned int nr_fixed_clks ;
324
- /* list of fixed factor clocks and respective count */
325
342
const struct samsung_fixed_factor_clock * fixed_factor_clks ;
326
343
unsigned int nr_fixed_factor_clks ;
327
- /* total number of clocks with IDs assigned*/
328
344
unsigned int nr_clk_ids ;
329
- /* list of cpu clocks and respective count */
330
345
const struct samsung_cpu_clock * cpu_clks ;
331
346
unsigned int nr_cpu_clks ;
332
347
333
- /* list and number of clocks registers */
334
348
const unsigned long * clk_regs ;
335
349
unsigned int nr_clk_regs ;
336
350
337
- /* list and number of clocks registers to set before suspend */
338
351
const struct samsung_clk_reg_dump * suspend_regs ;
339
352
unsigned int nr_suspend_regs ;
340
- /* name of the parent clock needed for CMU register access */
341
353
const char * clk_name ;
342
354
};
343
355
0 commit comments