29
29
#define R9A06G032_SYSCTRL_USB_H2MODE (1<<1)
30
30
#define R9A06G032_SYSCTRL_DMAMUX 0xA0
31
31
32
+ /**
33
+ * struct r9a06g032_gate - clock-related control bits
34
+ * @gate: clock enable/disable
35
+ * @reset: clock module reset (active low)
36
+ * @ready: enables NoC forwarding of read/write requests to device,
37
+ * (eg. device is ready to handle read/write requests)
38
+ * @midle: request to idle the NoC interconnect
39
+ *
40
+ * Each of these fields describes a single bit in a register,
41
+ * which controls some aspect of clock gating. The @gate field
42
+ * is mandatory, this one enables/disables the clock. The
43
+ * other fields are optional, with zero indicating "not used".
44
+ *
45
+ * In most cases there is a @reset bit which needs to be
46
+ * de-asserted to bring the module out of reset.
47
+ *
48
+ * Modules may also need to signal when they are @ready to
49
+ * handle requests (read/writes) from the NoC interconnect.
50
+ *
51
+ * Similarly, the @midle bit is used to idle the master.
52
+ */
32
53
struct r9a06g032_gate {
33
54
u16 gate , reset , ready , midle ;
34
55
/* Unused fields omitted to save space */
@@ -43,7 +64,34 @@ enum gate_type {
43
64
K_DUALGATE /* special for UARTs */
44
65
};
45
66
46
- /* This is used to describe a clock for instantiation */
67
+ /**
68
+ * struct r9a06g032_clkdesc - describe a single clock
69
+ * @name: string describing this clock
70
+ * @managed: boolean indicating if this clock should be
71
+ * started/stopped as part of power management
72
+ * @type: see enum @gate_type
73
+ * @index: the ID of this clock element
74
+ * @source: the ID+1 of the parent clock element.
75
+ * Root clock uses ID of ~0 (PARENT_ID);
76
+ * @gate: clock enable/disable
77
+ * @div_min: smallest permitted clock divider
78
+ * @div_max: largest permitted clock divider
79
+ * @reg: clock divider register offset, in 32-bit words
80
+ * @div_table: optional list of fixed clock divider values;
81
+ * must be in ascending order, zero for unused
82
+ * @div: divisor for fixed-factor clock
83
+ * @mul: multiplier for fixed-factor clock
84
+ * @group: UART group, 0=UART0/1/2, 1=UART3/4/5/6/7
85
+ * @sel: select either g1/r1 or g2/r2 as clock source
86
+ * @g1: 1st source gate (clock enable/disable)
87
+ * @r1: 1st source reset (module reset)
88
+ * @g2: 2nd source gate (clock enable/disable)
89
+ * @r2: 2nd source reset (module reset)
90
+ *
91
+ * Describes a single element in the clock tree hierarchy.
92
+ * As there are quite a large number of clock elements, this
93
+ * structure is packed tightly to conserve space.
94
+ */
47
95
struct r9a06g032_clkdesc {
48
96
const char * name ;
49
97
uint32_t managed :1 ;
0 commit comments