2 * linux/arch/arm/mach-omap24xx/clock.h
4 * Copyright (C) 2005 Texas Instruments Inc.
5 * Richard Woodruff <r-woodruff2@ti.com>
8 * Copyright (C) 2004 Nokia corporation
9 * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
10 * Based on clocks.h by Tony Lindgren, Gordon McNutt and RidgeRun, Inc
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
17 #ifndef __ARCH_ARM_MACH_OMAP2_CLOCK_H
18 #define __ARCH_ARM_MACH_OMAP2_CLOCK_H
20 static void omap2_sys_clk_recalc(struct clk * clk);
21 static void omap2_clksel_recalc(struct clk * clk);
22 static void omap2_followparent_recalc(struct clk * clk);
23 static void omap2_propagate_rate(struct clk * clk);
24 static void omap2_mpu_recalc(struct clk * clk);
25 static int omap2_select_table_rate(struct clk * clk, unsigned long rate);
26 static long omap2_round_to_table_rate(struct clk * clk, unsigned long rate);
27 static void omap2_clk_disable(struct clk *clk);
28 static void omap2_sys_clk_recalc(struct clk * clk);
29 static u32 omap2_clksel_to_divisor(u32 div_sel, u32 field_val);
30 static u32 omap2_clksel_get_divisor(struct clk *clk);
32 /* REVISIT: should use a clock flag for this, not a magic number */
33 #define PARENT_CONTROLS_CLOCK 0xff
35 #define RATE_IN_242X (1 << 0)
36 #define RATE_IN_243X (1 << 1)
38 /* Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated.
39 * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU,CM_CLKSEL_DSP
40 * CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL CM_CLKSEL2_PLL, CM_CLKSEL_MDM
43 unsigned long xtal_speed; /* crystal rate */
44 unsigned long dpll_speed; /* dpll: out*xtal*M/(N-1)table_recalc */
45 unsigned long mpu_speed; /* speed of MPU */
46 unsigned long cm_clksel_mpu; /* mpu divider */
47 unsigned long cm_clksel_dsp; /* dsp+iva1 div(2420), iva2.1(2430) */
48 unsigned long cm_clksel_gfx; /* gfx dividers */
49 unsigned long cm_clksel1_core; /* major subsystem dividers */
50 unsigned long cm_clksel1_pll; /* m,n */
51 unsigned long cm_clksel2_pll; /* dpllx1 or x2 out */
52 unsigned long cm_clksel_mdm; /* modem dividers 2430 only */
53 unsigned long base_sdrc_rfr; /* base refresh timing for a set */
57 /* Mask for clksel which support parent settign in set_rate */
58 #define SRC_SEL_MASK (CM_CORE_SEL1 | CM_CORE_SEL2 | CM_WKUP_SEL1 | \
59 CM_PLL_SEL1 | CM_PLL_SEL2 | CM_SYSCLKOUT_SEL1)
61 /* Mask for clksel regs which support rate operations */
62 #define SRC_RATE_SEL_MASK (CM_MPU_SEL1 | CM_DSP_SEL1 | CM_GFX_SEL1 | \
63 CM_MODEM_SEL1 | CM_CORE_SEL1 | CM_CORE_SEL2 | \
64 CM_WKUP_SEL1 | CM_PLL_SEL1 | CM_PLL_SEL2 | \
68 * The OMAP2 processor can be run at several discrete 'PRCM configurations'.
69 * These configurations are characterized by voltage and speed for clocks.
70 * The device is only validated for certain combinations. One way to express
71 * these combinations is via the 'ratio's' which the clocks operate with
72 * respect to each other. These ratio sets are for a given voltage/DPLL
73 * setting. All configurations can be described by a DPLL setting and a ratio
74 * There are 3 ratio sets for the 2430 and X ratio sets for 2420.
76 * 2430 differs from 2420 in that there are no more phase synchronizers used.
77 * They both have a slightly different clock domain setup. 2420(iva1,dsp) vs
78 * 2430 (iva2.1, NOdsp, mdm)
81 /* Core fields for cm_clksel, not ratio governed */
82 #define RX_CLKSEL_DSS1 (0x10 << 8)
83 #define RX_CLKSEL_DSS2 (0x0 << 13)
84 #define RX_CLKSEL_SSI (0x5 << 20)
86 /*-------------------------------------------------------------------------
88 *-------------------------------------------------------------------------*/
90 /* 2430 Ratio's, 2430-Ratio Config 1 */
91 #define R1_CLKSEL_L3 (4 << 0)
92 #define R1_CLKSEL_L4 (2 << 5)
93 #define R1_CLKSEL_USB (4 << 25)
94 #define R1_CM_CLKSEL1_CORE_VAL R1_CLKSEL_USB | RX_CLKSEL_SSI | \
95 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
96 R1_CLKSEL_L4 | R1_CLKSEL_L3
97 #define R1_CLKSEL_MPU (2 << 0)
98 #define R1_CM_CLKSEL_MPU_VAL R1_CLKSEL_MPU
99 #define R1_CLKSEL_DSP (2 << 0)
100 #define R1_CLKSEL_DSP_IF (2 << 5)
101 #define R1_CM_CLKSEL_DSP_VAL R1_CLKSEL_DSP | R1_CLKSEL_DSP_IF
102 #define R1_CLKSEL_GFX (2 << 0)
103 #define R1_CM_CLKSEL_GFX_VAL R1_CLKSEL_GFX
104 #define R1_CLKSEL_MDM (4 << 0)
105 #define R1_CM_CLKSEL_MDM_VAL R1_CLKSEL_MDM
107 /* 2430-Ratio Config 2 */
108 #define R2_CLKSEL_L3 (6 << 0)
109 #define R2_CLKSEL_L4 (2 << 5)
110 #define R2_CLKSEL_USB (2 << 25)
111 #define R2_CM_CLKSEL1_CORE_VAL R2_CLKSEL_USB | RX_CLKSEL_SSI | \
112 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
113 R2_CLKSEL_L4 | R2_CLKSEL_L3
114 #define R2_CLKSEL_MPU (2 << 0)
115 #define R2_CM_CLKSEL_MPU_VAL R2_CLKSEL_MPU
116 #define R2_CLKSEL_DSP (2 << 0)
117 #define R2_CLKSEL_DSP_IF (3 << 5)
118 #define R2_CM_CLKSEL_DSP_VAL R2_CLKSEL_DSP | R2_CLKSEL_DSP_IF
119 #define R2_CLKSEL_GFX (2 << 0)
120 #define R2_CM_CLKSEL_GFX_VAL R2_CLKSEL_GFX
121 #define R2_CLKSEL_MDM (6 << 0)
122 #define R2_CM_CLKSEL_MDM_VAL R2_CLKSEL_MDM
124 /* 2430-Ratio Bootm (BYPASS) */
125 #define RB_CLKSEL_L3 (1 << 0)
126 #define RB_CLKSEL_L4 (1 << 5)
127 #define RB_CLKSEL_USB (1 << 25)
128 #define RB_CM_CLKSEL1_CORE_VAL RB_CLKSEL_USB | RX_CLKSEL_SSI | \
129 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
130 RB_CLKSEL_L4 | RB_CLKSEL_L3
131 #define RB_CLKSEL_MPU (1 << 0)
132 #define RB_CM_CLKSEL_MPU_VAL RB_CLKSEL_MPU
133 #define RB_CLKSEL_DSP (1 << 0)
134 #define RB_CLKSEL_DSP_IF (1 << 5)
135 #define RB_CM_CLKSEL_DSP_VAL RB_CLKSEL_DSP | RB_CLKSEL_DSP_IF
136 #define RB_CLKSEL_GFX (1 << 0)
137 #define RB_CM_CLKSEL_GFX_VAL RB_CLKSEL_GFX
138 #define RB_CLKSEL_MDM (1 << 0)
139 #define RB_CM_CLKSEL_MDM_VAL RB_CLKSEL_MDM
141 /* 2420 Ratio Equivalents */
142 #define RXX_CLKSEL_VLYNQ (0x12 << 15)
143 #define RXX_CLKSEL_SSI (0x8 << 20)
145 /* 2420-PRCM III 532MHz core */
146 #define RIII_CLKSEL_L3 (4 << 0) /* 133MHz */
147 #define RIII_CLKSEL_L4 (2 << 5) /* 66.5MHz */
148 #define RIII_CLKSEL_USB (4 << 25) /* 33.25MHz */
149 #define RIII_CM_CLKSEL1_CORE_VAL RIII_CLKSEL_USB | RXX_CLKSEL_SSI | \
150 RXX_CLKSEL_VLYNQ | RX_CLKSEL_DSS2 | \
151 RX_CLKSEL_DSS1 | RIII_CLKSEL_L4 | \
153 #define RIII_CLKSEL_MPU (2 << 0) /* 266MHz */
154 #define RIII_CM_CLKSEL_MPU_VAL RIII_CLKSEL_MPU
155 #define RIII_CLKSEL_DSP (3 << 0) /* c5x - 177.3MHz */
156 #define RIII_CLKSEL_DSP_IF (2 << 5) /* c5x - 88.67MHz */
157 #define RIII_SYNC_DSP (1 << 7) /* Enable sync */
158 #define RIII_CLKSEL_IVA (6 << 8) /* iva1 - 88.67MHz */
159 #define RIII_SYNC_IVA (1 << 13) /* Enable sync */
160 #define RIII_CM_CLKSEL_DSP_VAL RIII_SYNC_IVA | RIII_CLKSEL_IVA | \
161 RIII_SYNC_DSP | RIII_CLKSEL_DSP_IF | \
163 #define RIII_CLKSEL_GFX (2 << 0) /* 66.5MHz */
164 #define RIII_CM_CLKSEL_GFX_VAL RIII_CLKSEL_GFX
166 /* 2420-PRCM II 600MHz core */
167 #define RII_CLKSEL_L3 (6 << 0) /* 100MHz */
168 #define RII_CLKSEL_L4 (2 << 5) /* 50MHz */
169 #define RII_CLKSEL_USB (2 << 25) /* 50MHz */
170 #define RII_CM_CLKSEL1_CORE_VAL RII_CLKSEL_USB | \
171 RXX_CLKSEL_SSI | RXX_CLKSEL_VLYNQ | \
172 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
173 RII_CLKSEL_L4 | RII_CLKSEL_L3
174 #define RII_CLKSEL_MPU (2 << 0) /* 300MHz */
175 #define RII_CM_CLKSEL_MPU_VAL RII_CLKSEL_MPU
176 #define RII_CLKSEL_DSP (3 << 0) /* c5x - 200MHz */
177 #define RII_CLKSEL_DSP_IF (2 << 5) /* c5x - 100MHz */
178 #define RII_SYNC_DSP (0 << 7) /* Bypass sync */
179 #define RII_CLKSEL_IVA (3 << 8) /* iva1 - 200MHz */
180 #define RII_SYNC_IVA (0 << 13) /* Bypass sync */
181 #define RII_CM_CLKSEL_DSP_VAL RII_SYNC_IVA | RII_CLKSEL_IVA | \
182 RII_SYNC_DSP | RII_CLKSEL_DSP_IF | \
184 #define RII_CLKSEL_GFX (2 << 0) /* 50MHz */
185 #define RII_CM_CLKSEL_GFX_VAL RII_CLKSEL_GFX
187 /* 2420-PRCM I 660MHz core */
188 #define RI_CLKSEL_L3 (4 << 0) /* 165MHz */
189 #define RI_CLKSEL_L4 (2 << 5) /* 82.5MHz */
190 #define RI_CLKSEL_USB (4 << 25) /* 41.25MHz */
191 #define RI_CM_CLKSEL1_CORE_VAL RI_CLKSEL_USB | \
192 RXX_CLKSEL_SSI | RXX_CLKSEL_VLYNQ | \
193 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
194 RI_CLKSEL_L4 | RI_CLKSEL_L3
195 #define RI_CLKSEL_MPU (2 << 0) /* 330MHz */
196 #define RI_CM_CLKSEL_MPU_VAL RI_CLKSEL_MPU
197 #define RI_CLKSEL_DSP (3 << 0) /* c5x - 220MHz */
198 #define RI_CLKSEL_DSP_IF (2 << 5) /* c5x - 110MHz */
199 #define RI_SYNC_DSP (1 << 7) /* Activate sync */
200 #define RI_CLKSEL_IVA (4 << 8) /* iva1 - 165MHz */
201 #define RI_SYNC_IVA (0 << 13) /* Bypass sync */
202 #define RI_CM_CLKSEL_DSP_VAL RI_SYNC_IVA | RI_CLKSEL_IVA | \
203 RI_SYNC_DSP | RI_CLKSEL_DSP_IF | \
205 #define RI_CLKSEL_GFX (1 << 0) /* 165MHz */
206 #define RI_CM_CLKSEL_GFX_VAL RI_CLKSEL_GFX
208 /* 2420-PRCM VII (boot) */
209 #define RVII_CLKSEL_L3 (1 << 0)
210 #define RVII_CLKSEL_L4 (1 << 5)
211 #define RVII_CLKSEL_DSS1 (1 << 8)
212 #define RVII_CLKSEL_DSS2 (0 << 13)
213 #define RVII_CLKSEL_VLYNQ (1 << 15)
214 #define RVII_CLKSEL_SSI (1 << 20)
215 #define RVII_CLKSEL_USB (1 << 25)
217 #define RVII_CM_CLKSEL1_CORE_VAL RVII_CLKSEL_USB | RVII_CLKSEL_SSI | \
218 RVII_CLKSEL_VLYNQ | RVII_CLKSEL_DSS2 | \
219 RVII_CLKSEL_DSS1 | RVII_CLKSEL_L4 | RVII_CLKSEL_L3
221 #define RVII_CLKSEL_MPU (1 << 0) /* all divide by 1 */
222 #define RVII_CM_CLKSEL_MPU_VAL RVII_CLKSEL_MPU
224 #define RVII_CLKSEL_DSP (1 << 0)
225 #define RVII_CLKSEL_DSP_IF (1 << 5)
226 #define RVII_SYNC_DSP (0 << 7)
227 #define RVII_CLKSEL_IVA (1 << 8)
228 #define RVII_SYNC_IVA (0 << 13)
229 #define RVII_CM_CLKSEL_DSP_VAL RVII_SYNC_IVA | RVII_CLKSEL_IVA | RVII_SYNC_DSP | \
230 RVII_CLKSEL_DSP_IF | RVII_CLKSEL_DSP
232 #define RVII_CLKSEL_GFX (1 << 0)
233 #define RVII_CM_CLKSEL_GFX_VAL RVII_CLKSEL_GFX
235 /*-------------------------------------------------------------------------
236 * 2430 Target modes: Along with each configuration the CPU has several
237 * modes which goes along with them. Modes mainly are the addition of
238 * describe DPLL combinations to go along with a ratio.
239 *-------------------------------------------------------------------------*/
241 /* Hardware governed */
242 #define MX_48M_SRC (0 << 3)
243 #define MX_54M_SRC (0 << 5)
244 #define MX_APLLS_CLIKIN_12 (3 << 23)
245 #define MX_APLLS_CLIKIN_13 (2 << 23)
246 #define MX_APLLS_CLIKIN_19_2 (0 << 23)
249 * 2430 - standalone, 2*ref*M/(n+1), M/N is for exactness not relock speed
250 * #2 (ratio1) baseport-target
251 * #5a (ratio1) baseport-target, target DPLL = 266*2 = 532MHz
253 #define M5A_DPLL_MULT_12 (133 << 12)
254 #define M5A_DPLL_DIV_12 (5 << 8)
255 #define M5A_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
256 M5A_DPLL_DIV_12 | M5A_DPLL_MULT_12 | \
258 #define M5A_DPLL_MULT_13 (266 << 12)
259 #define M5A_DPLL_DIV_13 (12 << 8)
260 #define M5A_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
261 M5A_DPLL_DIV_13 | M5A_DPLL_MULT_13 | \
263 #define M5A_DPLL_MULT_19 (180 << 12)
264 #define M5A_DPLL_DIV_19 (12 << 8)
265 #define M5A_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
266 M5A_DPLL_DIV_19 | M5A_DPLL_MULT_19 | \
268 /* #5b (ratio1) target DPLL = 200*2 = 400MHz */
269 #define M5B_DPLL_MULT_12 (50 << 12)
270 #define M5B_DPLL_DIV_12 (2 << 8)
271 #define M5B_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
272 M5B_DPLL_DIV_12 | M5B_DPLL_MULT_12 | \
274 #define M5B_DPLL_MULT_13 (200 << 12)
275 #define M5B_DPLL_DIV_13 (12 << 8)
277 #define M5B_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
278 M5B_DPLL_DIV_13 | M5B_DPLL_MULT_13 | \
280 #define M5B_DPLL_MULT_19 (125 << 12)
281 #define M5B_DPLL_DIV_19 (31 << 8)
282 #define M5B_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
283 M5B_DPLL_DIV_19 | M5B_DPLL_MULT_19 | \
287 * #3 (ratio2) baseport-target, target DPLL = 330*2 = 660MHz
289 #define M3_DPLL_MULT_12 (55 << 12)
290 #define M3_DPLL_DIV_12 (1 << 8)
291 #define M3_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
292 M3_DPLL_DIV_12 | M3_DPLL_MULT_12 | \
294 #define M3_DPLL_MULT_13 (330 << 12)
295 #define M3_DPLL_DIV_13 (12 << 8)
296 #define M3_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
297 M3_DPLL_DIV_13 | M3_DPLL_MULT_13 | \
299 #define M3_DPLL_MULT_19 (275 << 12)
300 #define M3_DPLL_DIV_19 (15 << 8)
301 #define M3_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
302 M3_DPLL_DIV_19 | M3_DPLL_MULT_19 | \
305 #define MB_DPLL_MULT (1 << 12)
306 #define MB_DPLL_DIV (0 << 8)
307 #define MB_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | MB_DPLL_DIV |\
308 MB_DPLL_MULT | MX_APLLS_CLIKIN_12
310 #define MB_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | MB_DPLL_DIV |\
311 MB_DPLL_MULT | MX_APLLS_CLIKIN_13
313 #define MB_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | MB_DPLL_DIV |\
314 MB_DPLL_MULT | MX_APLLS_CLIKIN_19
317 * 2430 - chassis (sedna)
318 * 165 (ratio1) same as above #2
320 * 133 (ratio2) same as above #4
321 * 110 (ratio2) same as above #3
326 /* PRCM I target DPLL = 2*330MHz = 660MHz */
327 #define MI_DPLL_MULT_12 (55 << 12)
328 #define MI_DPLL_DIV_12 (1 << 8)
329 #define MI_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
330 MI_DPLL_DIV_12 | MI_DPLL_MULT_12 | \
334 * 2420 Equivalent - mode registers
335 * PRCM II , target DPLL = 2*300MHz = 600MHz
337 #define MII_DPLL_MULT_12 (50 << 12)
338 #define MII_DPLL_DIV_12 (1 << 8)
339 #define MII_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
340 MII_DPLL_DIV_12 | MII_DPLL_MULT_12 | \
342 #define MII_DPLL_MULT_13 (300 << 12)
343 #define MII_DPLL_DIV_13 (12 << 8)
344 #define MII_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
345 MII_DPLL_DIV_13 | MII_DPLL_MULT_13 | \
348 /* PRCM III target DPLL = 2*266 = 532MHz*/
349 #define MIII_DPLL_MULT_12 (133 << 12)
350 #define MIII_DPLL_DIV_12 (5 << 8)
351 #define MIII_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
352 MIII_DPLL_DIV_12 | MIII_DPLL_MULT_12 | \
354 #define MIII_DPLL_MULT_13 (266 << 12)
355 #define MIII_DPLL_DIV_13 (12 << 8)
356 #define MIII_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
357 MIII_DPLL_DIV_13 | MIII_DPLL_MULT_13 | \
360 /* PRCM VII (boot bypass) */
361 #define MVII_CM_CLKSEL1_PLL_12_VAL MB_CM_CLKSEL1_PLL_12_VAL
362 #define MVII_CM_CLKSEL1_PLL_13_VAL MB_CM_CLKSEL1_PLL_13_VAL
364 /* High and low operation value */
365 #define MX_CLKSEL2_PLL_2x_VAL (2 << 0)
366 #define MX_CLKSEL2_PLL_1x_VAL (1 << 0)
369 * These represent optimal values for common parts, it won't work for all.
370 * As long as you scale down, most parameters are still work, they just
371 * become sub-optimal. The RFR value goes in the opposite direction. If you
372 * don't adjust it down as your clock period increases the refresh interval
373 * will not be met. Setting all parameters for complete worst case may work,
374 * but may cut memory performance by 2x. Due to errata the DLLs need to be
375 * unlocked and their value needs run time calibration. A dynamic call is
376 * need for that as no single right value exists acorss production samples.
378 * Only the FULL speed values are given. Current code is such that rate
379 * changes must be made at DPLLoutx2. The actual value adjustment for low
380 * frequency operation will be handled by omap_set_performance()
382 * By having the boot loader boot up in the fastest L4 speed available likely
383 * will result in something which you can switch between.
385 #define V24XX_SDRC_RFR_CTRL_165MHz (0x00044c00 | 1)
386 #define V24XX_SDRC_RFR_CTRL_133MHz (0x0003de00 | 1)
387 #define V24XX_SDRC_RFR_CTRL_100MHz (0x0002da01 | 1)
388 #define V24XX_SDRC_RFR_CTRL_110MHz (0x0002da01 | 1) /* Need to calc */
389 #define V24XX_SDRC_RFR_CTRL_BYPASS (0x00005000 | 1) /* Need to calc */
391 /* MPU speed defines */
392 #define S12M 12000000
393 #define S13M 13000000
394 #define S19M 19200000
395 #define S26M 26000000
396 #define S100M 100000000
397 #define S133M 133000000
398 #define S150M 150000000
399 #define S165M 165000000
400 #define S200M 200000000
401 #define S266M 266000000
402 #define S300M 300000000
403 #define S330M 330000000
404 #define S400M 400000000
405 #define S532M 532000000
406 #define S600M 600000000
407 #define S660M 660000000
409 /*-------------------------------------------------------------------------
410 * Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated.
411 * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU,
412 * CM_CLKSEL_DSP, CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL,
413 * CM_CLKSEL2_PLL, CM_CLKSEL_MDM
415 * Filling in table based on H4 boards and 2430-SDPs variants available.
416 * There are quite a few more rates combinations which could be defined.
418 * When multiple values are defined the start up will try and choose the
419 * fastest one. If a 'fast' value is defined, then automatically, the /2
420 * one should be included as it can be used. Generally having more that
421 * one fast set does not make sense, as static timings need to be changed
422 * to change the set. The exception is the bypass setting which is
423 * availble for low power bypass.
425 * Note: This table needs to be sorted, fastest to slowest.
426 *-------------------------------------------------------------------------*/
427 static struct prcm_config rate_table[] = {
429 {S12M, S660M, S330M, RI_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */
430 RI_CM_CLKSEL_DSP_VAL, RI_CM_CLKSEL_GFX_VAL,
431 RI_CM_CLKSEL1_CORE_VAL, MI_CM_CLKSEL1_PLL_12_VAL,
432 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_165MHz,
436 {S12M, S600M, S300M, RII_CM_CLKSEL_MPU_VAL, /* 300MHz ARM */
437 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
438 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_12_VAL,
439 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_100MHz,
442 {S13M, S600M, S300M, RII_CM_CLKSEL_MPU_VAL, /* 300MHz ARM */
443 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
444 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_13_VAL,
445 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_100MHz,
448 /* PRCM III - FAST */
449 {S12M, S532M, S266M, RIII_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
450 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
451 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_12_VAL,
452 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_133MHz,
455 {S13M, S532M, S266M, RIII_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
456 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
457 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_13_VAL,
458 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_133MHz,
462 {S12M, S300M, S150M, RII_CM_CLKSEL_MPU_VAL, /* 150MHz ARM */
463 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
464 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_12_VAL,
465 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_100MHz,
468 {S13M, S300M, S150M, RII_CM_CLKSEL_MPU_VAL, /* 150MHz ARM */
469 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
470 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_13_VAL,
471 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_100MHz,
474 /* PRCM III - SLOW */
475 {S12M, S266M, S133M, RIII_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
476 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
477 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_12_VAL,
478 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_133MHz,
481 {S13M, S266M, S133M, RIII_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
482 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
483 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_13_VAL,
484 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_133MHz,
487 /* PRCM-VII (boot-bypass) */
488 {S12M, S12M, S12M, RVII_CM_CLKSEL_MPU_VAL, /* 12MHz ARM*/
489 RVII_CM_CLKSEL_DSP_VAL, RVII_CM_CLKSEL_GFX_VAL,
490 RVII_CM_CLKSEL1_CORE_VAL, MVII_CM_CLKSEL1_PLL_12_VAL,
491 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_BYPASS,
494 /* PRCM-VII (boot-bypass) */
495 {S13M, S13M, S13M, RVII_CM_CLKSEL_MPU_VAL, /* 13MHz ARM */
496 RVII_CM_CLKSEL_DSP_VAL, RVII_CM_CLKSEL_GFX_VAL,
497 RVII_CM_CLKSEL1_CORE_VAL, MVII_CM_CLKSEL1_PLL_13_VAL,
498 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_BYPASS,
501 /* PRCM #3 - ratio2 (ES2) - FAST */
502 {S13M, S660M, S330M, R2_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */
503 R2_CM_CLKSEL_DSP_VAL, R2_CM_CLKSEL_GFX_VAL,
504 R2_CM_CLKSEL1_CORE_VAL, M3_CM_CLKSEL1_PLL_13_VAL,
505 MX_CLKSEL2_PLL_2x_VAL, R2_CM_CLKSEL_MDM_VAL,
506 V24XX_SDRC_RFR_CTRL_110MHz,
509 /* PRCM #5a - ratio1 - FAST */
510 {S13M, S532M, S266M, R1_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
511 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
512 R1_CM_CLKSEL1_CORE_VAL, M5A_CM_CLKSEL1_PLL_13_VAL,
513 MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL,
514 V24XX_SDRC_RFR_CTRL_133MHz,
517 /* PRCM #5b - ratio1 - FAST */
518 {S13M, S400M, S200M, R1_CM_CLKSEL_MPU_VAL, /* 200MHz ARM */
519 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
520 R1_CM_CLKSEL1_CORE_VAL, M5B_CM_CLKSEL1_PLL_13_VAL,
521 MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL,
522 V24XX_SDRC_RFR_CTRL_100MHz,
525 /* PRCM #3 - ratio2 (ES2) - SLOW */
526 {S13M, S330M, S165M, R2_CM_CLKSEL_MPU_VAL, /* 165MHz ARM */
527 R2_CM_CLKSEL_DSP_VAL, R2_CM_CLKSEL_GFX_VAL,
528 R2_CM_CLKSEL1_CORE_VAL, M3_CM_CLKSEL1_PLL_13_VAL,
529 MX_CLKSEL2_PLL_1x_VAL, R2_CM_CLKSEL_MDM_VAL,
530 V24XX_SDRC_RFR_CTRL_110MHz,
533 /* PRCM #5a - ratio1 - SLOW */
534 {S13M, S266M, S133M, R1_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
535 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
536 R1_CM_CLKSEL1_CORE_VAL, M5A_CM_CLKSEL1_PLL_13_VAL,
537 MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL,
538 V24XX_SDRC_RFR_CTRL_133MHz,
541 /* PRCM #5b - ratio1 - SLOW*/
542 {S13M, S200M, S100M, R1_CM_CLKSEL_MPU_VAL, /* 100MHz ARM */
543 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
544 R1_CM_CLKSEL1_CORE_VAL, M5B_CM_CLKSEL1_PLL_13_VAL,
545 MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL,
546 V24XX_SDRC_RFR_CTRL_100MHz,
549 /* PRCM-boot/bypass */
550 {S13M, S13M, S13M, RB_CM_CLKSEL_MPU_VAL, /* 13Mhz */
551 RB_CM_CLKSEL_DSP_VAL, RB_CM_CLKSEL_GFX_VAL,
552 RB_CM_CLKSEL1_CORE_VAL, MB_CM_CLKSEL1_PLL_13_VAL,
553 MX_CLKSEL2_PLL_2x_VAL, RB_CM_CLKSEL_MDM_VAL,
554 V24XX_SDRC_RFR_CTRL_BYPASS,
557 /* PRCM-boot/bypass */
558 {S12M, S12M, S12M, RB_CM_CLKSEL_MPU_VAL, /* 12Mhz */
559 RB_CM_CLKSEL_DSP_VAL, RB_CM_CLKSEL_GFX_VAL,
560 RB_CM_CLKSEL1_CORE_VAL, MB_CM_CLKSEL1_PLL_12_VAL,
561 MX_CLKSEL2_PLL_2x_VAL, RB_CM_CLKSEL_MDM_VAL,
562 V24XX_SDRC_RFR_CTRL_BYPASS,
565 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
568 /*-------------------------------------------------------------------------
571 * NOTE:In many cases here we are assigning a 'default' parent. In many
572 * cases the parent is selectable. The get/set parent calls will also
575 * Many some clocks say always_enabled, but they can be auto idled for
576 * power savings. They will always be available upon clock request.
578 * Several sources are given initial rates which may be wrong, this will
579 * be fixed up in the init func.
581 * Things are broadly separated below by clock domains. It is
582 * noteworthy that most periferals have dependencies on multiple clock
583 * domains. Many get their interface clocks from the L4 domain, but get
584 * functional clocks from fixed sources or other core domain derived
586 *-------------------------------------------------------------------------*/
588 /* Base external input clocks */
589 static struct clk func_32k_ck = {
590 .name = "func_32k_ck",
592 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
593 RATE_FIXED | ALWAYS_ENABLED,
596 /* Typical 12/13MHz in standalone mode, will be 26Mhz in chassis mode */
597 static struct clk osc_ck = { /* (*12, *13, 19.2, *26, 38.4)MHz */
599 .rate = 26000000, /* fixed up in clock init */
600 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
601 RATE_FIXED | RATE_PROPAGATES,
604 /* With out modem likely 12MHz, with modem likely 13MHz */
605 static struct clk sys_ck = { /* (*12, *13, 19.2, 26, 38.4)MHz */
606 .name = "sys_ck", /* ~ ref_clk also */
609 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
610 RATE_FIXED | ALWAYS_ENABLED | RATE_PROPAGATES,
611 .rate_offset = 6, /* sysclkdiv 1 or 2, already handled or no boot */
612 .recalc = &omap2_sys_clk_recalc,
615 static struct clk alt_ck = { /* Typical 54M or 48M, may not exist */
618 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
619 RATE_FIXED | ALWAYS_ENABLED | RATE_PROPAGATES,
620 .recalc = &omap2_propagate_rate,
624 * Analog domain root source clocks
627 /* dpll_ck, is broken out in to special cases through clksel */
628 static struct clk dpll_ck = {
630 .parent = &sys_ck, /* Can be func_32k also */
631 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
632 RATE_PROPAGATES | RATE_CKCTL | CM_PLL_SEL1,
633 .recalc = &omap2_clksel_recalc,
636 static struct clk apll96_ck = {
640 .flags = CLOCK_IN_OMAP242X |CLOCK_IN_OMAP243X |
641 RATE_FIXED | RATE_PROPAGATES,
642 .enable_reg = (void __iomem *)&CM_CLKEN_PLL,
644 .recalc = &omap2_propagate_rate,
647 static struct clk apll54_ck = {
651 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
652 RATE_FIXED | RATE_PROPAGATES,
653 .enable_reg = (void __iomem *)&CM_CLKEN_PLL,
655 .recalc = &omap2_propagate_rate,
659 * PRCM digital base sources
661 static struct clk func_54m_ck = {
662 .name = "func_54m_ck",
663 .parent = &apll54_ck, /* can also be alt_clk */
665 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
666 RATE_FIXED | CM_PLL_SEL1 | RATE_PROPAGATES,
668 .enable_reg = (void __iomem *)&CM_CLKEN_PLL,
669 .enable_bit = PARENT_CONTROLS_CLOCK,
670 .recalc = &omap2_propagate_rate,
673 static struct clk core_ck = {
675 .parent = &dpll_ck, /* can also be 32k */
676 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
677 ALWAYS_ENABLED | RATE_PROPAGATES,
678 .recalc = &omap2_propagate_rate,
681 static struct clk sleep_ck = { /* sys_clk or 32k */
683 .parent = &func_32k_ck,
685 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
686 .recalc = &omap2_propagate_rate,
689 static struct clk func_96m_ck = {
690 .name = "func_96m_ck",
691 .parent = &apll96_ck,
693 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
694 RATE_FIXED | RATE_PROPAGATES,
695 .enable_reg = (void __iomem *)&CM_CLKEN_PLL,
696 .enable_bit = PARENT_CONTROLS_CLOCK,
697 .recalc = &omap2_propagate_rate,
700 static struct clk func_48m_ck = {
701 .name = "func_48m_ck",
702 .parent = &apll96_ck, /* 96M or Alt */
704 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
705 RATE_FIXED | CM_PLL_SEL1 | RATE_PROPAGATES,
707 .enable_reg = (void __iomem *)&CM_CLKEN_PLL,
708 .enable_bit = PARENT_CONTROLS_CLOCK,
709 .recalc = &omap2_propagate_rate,
712 static struct clk func_12m_ck = {
713 .name = "func_12m_ck",
714 .parent = &func_48m_ck,
716 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
717 RATE_FIXED | RATE_PROPAGATES,
718 .recalc = &omap2_propagate_rate,
719 .enable_reg = (void __iomem *)&CM_CLKEN_PLL,
720 .enable_bit = PARENT_CONTROLS_CLOCK,
723 /* Secure timer, only available in secure mode */
724 static struct clk wdt1_osc_ck = {
725 .name = "ck_wdt1_osc",
727 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
728 .recalc = &omap2_followparent_recalc,
731 static struct clk sys_clkout = {
732 .name = "sys_clkout",
733 .parent = &func_54m_ck,
735 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
736 CM_SYSCLKOUT_SEL1 | RATE_CKCTL,
738 .enable_reg = (void __iomem *)&PRCM_CLKOUT_CTRL,
741 .recalc = &omap2_clksel_recalc,
744 /* In 2430, new in 2420 ES2 */
745 static struct clk sys_clkout2 = {
746 .name = "sys_clkout2",
747 .parent = &func_54m_ck,
749 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
750 CM_SYSCLKOUT_SEL1 | RATE_CKCTL,
752 .enable_reg = (void __iomem *)&PRCM_CLKOUT_CTRL,
755 .recalc = &omap2_clksel_recalc,
758 static struct clk emul_ck = {
760 .parent = &func_54m_ck,
761 .flags = CLOCK_IN_OMAP242X,
762 .enable_reg = (void __iomem *)&PRCM_CLKEMUL_CTRL,
764 .recalc = &omap2_propagate_rate,
772 * INT_M_FCLK, INT_M_I_CLK
774 * - Individual clocks are hardware managed.
775 * - Base divider comes from: CM_CLKSEL_MPU
778 static struct clk mpu_ck = { /* Control cpu */
781 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | RATE_CKCTL |
782 ALWAYS_ENABLED | CM_MPU_SEL1 | DELAYED_APP |
783 CONFIG_PARTICIPANT | RATE_PROPAGATES,
784 .rate_offset = 0, /* bits 0-4 */
785 .recalc = &omap2_clksel_recalc,
789 * DSP (2430-IVA2.1) (2420-UMA+IVA1) clock domain
791 * 2430: IVA2.1_FCLK, IVA2.1_ICLK
792 * 2420: UMA_FCLK, UMA_ICLK, IVA_MPU, IVA_COP
794 static struct clk iva2_1_fck = {
795 .name = "iva2_1_fck",
797 .flags = CLOCK_IN_OMAP243X | RATE_CKCTL | CM_DSP_SEL1 |
798 DELAYED_APP | RATE_PROPAGATES |
801 .enable_reg = (void __iomem *)&CM_FCLKEN_DSP,
803 .recalc = &omap2_clksel_recalc,
806 static struct clk iva2_1_ick = {
807 .name = "iva2_1_ick",
808 .parent = &iva2_1_fck,
809 .flags = CLOCK_IN_OMAP243X | RATE_CKCTL | CM_DSP_SEL1 |
810 DELAYED_APP | CONFIG_PARTICIPANT,
812 .recalc = &omap2_clksel_recalc,
816 * Won't be too specific here. The core clock comes into this block
817 * it is divided then tee'ed. One branch goes directly to xyz enable
818 * controls. The other branch gets further divided by 2 then possibly
819 * routed into a synchronizer and out of clocks abc.
821 static struct clk dsp_fck = {
824 .flags = CLOCK_IN_OMAP242X | RATE_CKCTL | CM_DSP_SEL1 |
825 DELAYED_APP | CONFIG_PARTICIPANT | RATE_PROPAGATES,
827 .enable_reg = (void __iomem *)&CM_FCLKEN_DSP,
829 .recalc = &omap2_clksel_recalc,
832 static struct clk dsp_ick = {
833 .name = "dsp_ick", /* apparently ipi and isp */
835 .flags = CLOCK_IN_OMAP242X | RATE_CKCTL | CM_DSP_SEL1 |
836 DELAYED_APP | CONFIG_PARTICIPANT,
838 .enable_reg = (void __iomem *)&CM_ICLKEN_DSP,
839 .enable_bit = 1, /* for ipi */
840 .recalc = &omap2_clksel_recalc,
843 static struct clk iva1_ifck = {
846 .flags = CLOCK_IN_OMAP242X | CM_DSP_SEL1 | RATE_CKCTL |
847 CONFIG_PARTICIPANT | RATE_PROPAGATES | DELAYED_APP,
849 .enable_reg = (void __iomem *)&CM_FCLKEN_DSP,
851 .recalc = &omap2_clksel_recalc,
854 /* IVA1 mpu/int/i/f clocks are /2 of parent */
855 static struct clk iva1_mpu_int_ifck = {
856 .name = "iva1_mpu_int_ifck",
857 .parent = &iva1_ifck,
858 .flags = CLOCK_IN_OMAP242X | RATE_CKCTL | CM_DSP_SEL1,
859 .enable_reg = (void __iomem *)&CM_FCLKEN_DSP,
861 .recalc = &omap2_clksel_recalc,
866 * L3 clocks are used for both interface and functional clocks to
867 * multiple entities. Some of these clocks are completely managed
868 * by hardware, and some others allow software control. Hardware
869 * managed ones general are based on directly CLK_REQ signals and
870 * various auto idle settings. The functional spec sets many of these
871 * as 'tie-high' for their enables.
874 * L3-Interconnect, SMS, GPMC, SDRC, OCM_RAM, OCM_ROM, SDMA
879 * GPMC memories and SDRC have timing and clock sensitive registers which
880 * may very well need notification when the clock changes. Currently for low
881 * operating points, these are taken care of in sleep.S.
883 static struct clk core_l3_ck = { /* Used for ick and fck, interconnect */
884 .name = "core_l3_ck",
886 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
887 RATE_CKCTL | ALWAYS_ENABLED | CM_CORE_SEL1 |
888 DELAYED_APP | CONFIG_PARTICIPANT |
891 .recalc = &omap2_clksel_recalc,
894 static struct clk usb_l4_ick = { /* FS-USB interface clock */
895 .name = "usb_l4_ick",
896 .parent = &core_l3_ck,
897 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
898 RATE_CKCTL | CM_CORE_SEL1 | DELAYED_APP |
900 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
903 .recalc = &omap2_clksel_recalc,
907 * SSI is in L3 management domain, its direct parent is core not l3,
908 * many core power domain entities are grouped into the L3 clock
910 * SSI_SSR_FCLK, SSI_SST_FCLK, SSI_L4_CLIK
912 * ssr = core/1/2/3/4/5, sst = 1/2 ssr.
914 static struct clk ssi_ssr_sst_fck = {
917 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
918 RATE_CKCTL | CM_CORE_SEL1 | DELAYED_APP,
919 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE, /* bit 1 */
922 .recalc = &omap2_clksel_recalc,
929 * GFX_CG1(2d), GFX_CG2(3d)
931 * GFX_FCLK runs from L3, and is divided by (1,2,3,4)
932 * The 2d and 3d clocks run at a hardware determined
933 * divided value of fclk.
936 static struct clk gfx_3d_fck = {
937 .name = "gfx_3d_fck",
938 .parent = &core_l3_ck,
939 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
940 RATE_CKCTL | CM_GFX_SEL1,
941 .enable_reg = (void __iomem *)&CM_FCLKEN_GFX,
944 .recalc = &omap2_clksel_recalc,
947 static struct clk gfx_2d_fck = {
948 .name = "gfx_2d_fck",
949 .parent = &core_l3_ck,
950 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
951 RATE_CKCTL | CM_GFX_SEL1,
952 .enable_reg = (void __iomem *)&CM_FCLKEN_GFX,
955 .recalc = &omap2_clksel_recalc,
958 static struct clk gfx_ick = {
959 .name = "gfx_ick", /* From l3 */
960 .parent = &core_l3_ck,
961 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
963 .enable_reg = (void __iomem *)&CM_ICLKEN_GFX, /* bit 0 */
965 .recalc = &omap2_followparent_recalc,
969 * Modem clock domain (2430)
974 static struct clk mdm_ick = { /* used both as a ick and fck */
977 .flags = CLOCK_IN_OMAP243X | RATE_CKCTL | CM_MODEM_SEL1 |
978 DELAYED_APP | CONFIG_PARTICIPANT,
980 .enable_reg = (void __iomem *)&CM_ICLKEN_MDM,
982 .recalc = &omap2_clksel_recalc,
985 static struct clk mdm_osc_ck = {
986 .name = "mdm_osc_ck",
989 .flags = CLOCK_IN_OMAP243X | RATE_FIXED,
990 .enable_reg = (void __iomem *)&CM_FCLKEN_MDM,
992 .recalc = &omap2_followparent_recalc,
996 * L4 clock management domain
998 * This domain contains lots of interface clocks from the L4 interface, some
999 * functional clocks. Fixed APLL functional source clocks are managed in
1002 static struct clk l4_ck = { /* used both as an ick and fck */
1004 .parent = &core_l3_ck,
1005 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1006 RATE_CKCTL | ALWAYS_ENABLED | CM_CORE_SEL1 |
1007 DELAYED_APP | RATE_PROPAGATES,
1009 .recalc = &omap2_clksel_recalc,
1012 static struct clk ssi_l4_ick = {
1013 .name = "ssi_l4_ick",
1015 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | RATE_CKCTL,
1016 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE, /* bit 1 */
1018 .recalc = &omap2_followparent_recalc,
1024 * DSS_L4_ICLK, DSS_L3_ICLK,
1025 * DSS_CLK1, DSS_CLK2, DSS_54MHz_CLK
1027 * DSS is both initiator and target.
1029 static struct clk dss_ick = { /* Enables both L3,L4 ICLK's */
1031 .parent = &l4_ck, /* really both l3 and l4 */
1032 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | RATE_CKCTL,
1033 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1035 .recalc = &omap2_followparent_recalc,
1038 static struct clk dss1_fck = {
1040 .parent = &core_ck, /* Core or sys */
1041 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1042 RATE_CKCTL | CM_CORE_SEL1 | DELAYED_APP,
1043 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1047 .recalc = &omap2_clksel_recalc,
1050 static struct clk dss2_fck = { /* Alt clk used in power management */
1052 .parent = &sys_ck, /* fixed at sys_ck or 48MHz */
1053 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1054 RATE_CKCTL | CM_CORE_SEL1 | RATE_FIXED |
1056 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1059 .recalc = &omap2_followparent_recalc,
1062 static struct clk dss_54m_fck = { /* Alt clk used in power management */
1063 .name = "dss_54m_fck", /* 54m tv clk */
1064 .parent = &func_54m_ck,
1066 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1067 RATE_FIXED | RATE_PROPAGATES,
1068 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1070 .recalc = &omap2_propagate_rate,
1074 * CORE power domain ICLK & FCLK defines.
1075 * Many of the these can have more than one possible parent. Entries
1076 * here will likely have an L4 interface parent, and may have multiple
1077 * functional clock parents.
1079 static struct clk gpt1_ick = {
1082 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1083 .enable_reg = (void __iomem *)&CM_ICLKEN_WKUP, /* Bit0 */
1085 .recalc = &omap2_followparent_recalc,
1088 static struct clk gpt1_fck = {
1090 .parent = &func_32k_ck,
1091 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1093 .enable_reg = (void __iomem *)&CM_FCLKEN_WKUP, /* Bit0 */
1096 .recalc = &omap2_followparent_recalc,
1099 static struct clk gpt2_ick = {
1102 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1103 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* Bit4 */
1105 .recalc = &omap2_followparent_recalc,
1108 static struct clk gpt2_fck = {
1110 .parent = &func_32k_ck,
1111 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1113 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1116 .recalc = &omap2_followparent_recalc,
1119 static struct clk gpt3_ick = {
1122 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1123 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* Bit5 */
1125 .recalc = &omap2_followparent_recalc,
1128 static struct clk gpt3_fck = {
1130 .parent = &func_32k_ck,
1131 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1133 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1136 .recalc = &omap2_followparent_recalc,
1139 static struct clk gpt4_ick = {
1142 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1143 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* Bit6 */
1145 .recalc = &omap2_followparent_recalc,
1148 static struct clk gpt4_fck = {
1150 .parent = &func_32k_ck,
1151 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1153 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1156 .recalc = &omap2_followparent_recalc,
1159 static struct clk gpt5_ick = {
1162 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1163 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* Bit7 */
1165 .recalc = &omap2_followparent_recalc,
1168 static struct clk gpt5_fck = {
1170 .parent = &func_32k_ck,
1171 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1173 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1176 .recalc = &omap2_followparent_recalc,
1179 static struct clk gpt6_ick = {
1182 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1184 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* bit8 */
1185 .recalc = &omap2_followparent_recalc,
1188 static struct clk gpt6_fck = {
1190 .parent = &func_32k_ck,
1191 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1193 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1196 .recalc = &omap2_followparent_recalc,
1199 static struct clk gpt7_ick = {
1202 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1203 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* bit9 */
1205 .recalc = &omap2_followparent_recalc,
1208 static struct clk gpt7_fck = {
1210 .parent = &func_32k_ck,
1211 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1213 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1216 .recalc = &omap2_followparent_recalc,
1219 static struct clk gpt8_ick = {
1222 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1223 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* bit10 */
1225 .recalc = &omap2_followparent_recalc,
1228 static struct clk gpt8_fck = {
1230 .parent = &func_32k_ck,
1231 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1233 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1236 .recalc = &omap2_followparent_recalc,
1239 static struct clk gpt9_ick = {
1242 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1243 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1245 .recalc = &omap2_followparent_recalc,
1248 static struct clk gpt9_fck = {
1250 .parent = &func_32k_ck,
1251 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1253 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1256 .recalc = &omap2_followparent_recalc,
1259 static struct clk gpt10_ick = {
1260 .name = "gpt10_ick",
1262 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1263 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1265 .recalc = &omap2_followparent_recalc,
1268 static struct clk gpt10_fck = {
1269 .name = "gpt10_fck",
1270 .parent = &func_32k_ck,
1271 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1273 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1276 .recalc = &omap2_followparent_recalc,
1279 static struct clk gpt11_ick = {
1280 .name = "gpt11_ick",
1282 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1283 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1285 .recalc = &omap2_followparent_recalc,
1288 static struct clk gpt11_fck = {
1289 .name = "gpt11_fck",
1290 .parent = &func_32k_ck,
1291 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1293 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1296 .recalc = &omap2_followparent_recalc,
1299 static struct clk gpt12_ick = {
1300 .name = "gpt12_ick",
1302 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1303 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* bit14 */
1305 .recalc = &omap2_followparent_recalc,
1308 static struct clk gpt12_fck = {
1309 .name = "gpt12_fck",
1310 .parent = &func_32k_ck,
1311 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1313 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1316 .recalc = &omap2_followparent_recalc,
1319 static struct clk mcbsp1_ick = {
1320 .name = "mcbsp1_ick",
1322 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1323 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* bit16 */
1325 .recalc = &omap2_followparent_recalc,
1328 static struct clk mcbsp1_fck = {
1329 .name = "mcbsp1_fck",
1330 .parent = &func_96m_ck,
1331 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1332 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1334 .recalc = &omap2_followparent_recalc,
1337 static struct clk mcbsp2_ick = {
1338 .name = "mcbsp2_ick",
1340 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1341 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1343 .recalc = &omap2_followparent_recalc,
1346 static struct clk mcbsp2_fck = {
1347 .name = "mcbsp2_fck",
1348 .parent = &func_96m_ck,
1349 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1350 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1352 .recalc = &omap2_followparent_recalc,
1355 static struct clk mcbsp3_ick = {
1356 .name = "mcbsp3_ick",
1358 .flags = CLOCK_IN_OMAP243X,
1359 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
1361 .recalc = &omap2_followparent_recalc,
1364 static struct clk mcbsp3_fck = {
1365 .name = "mcbsp3_fck",
1366 .parent = &func_96m_ck,
1367 .flags = CLOCK_IN_OMAP243X,
1368 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1370 .recalc = &omap2_followparent_recalc,
1373 static struct clk mcbsp4_ick = {
1374 .name = "mcbsp4_ick",
1376 .flags = CLOCK_IN_OMAP243X,
1377 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
1379 .recalc = &omap2_followparent_recalc,
1382 static struct clk mcbsp4_fck = {
1383 .name = "mcbsp4_fck",
1384 .parent = &func_96m_ck,
1385 .flags = CLOCK_IN_OMAP243X,
1386 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1388 .recalc = &omap2_followparent_recalc,
1391 static struct clk mcbsp5_ick = {
1392 .name = "mcbsp5_ick",
1394 .flags = CLOCK_IN_OMAP243X,
1395 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
1397 .recalc = &omap2_followparent_recalc,
1400 static struct clk mcbsp5_fck = {
1401 .name = "mcbsp5_fck",
1402 .parent = &func_96m_ck,
1403 .flags = CLOCK_IN_OMAP243X,
1404 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1406 .recalc = &omap2_followparent_recalc,
1409 static struct clk mcspi1_ick = {
1410 .name = "mcspi_ick",
1413 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1414 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1416 .recalc = &omap2_followparent_recalc,
1419 static struct clk mcspi1_fck = {
1420 .name = "mcspi_fck",
1422 .parent = &func_48m_ck,
1423 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1424 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1426 .recalc = &omap2_followparent_recalc,
1429 static struct clk mcspi2_ick = {
1430 .name = "mcspi_ick",
1433 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1434 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1436 .recalc = &omap2_followparent_recalc,
1439 static struct clk mcspi2_fck = {
1440 .name = "mcspi_fck",
1442 .parent = &func_48m_ck,
1443 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1444 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1446 .recalc = &omap2_followparent_recalc,
1449 static struct clk mcspi3_ick = {
1450 .name = "mcspi_ick",
1453 .flags = CLOCK_IN_OMAP243X,
1454 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
1456 .recalc = &omap2_followparent_recalc,
1459 static struct clk mcspi3_fck = {
1460 .name = "mcspi_fck",
1462 .parent = &func_48m_ck,
1463 .flags = CLOCK_IN_OMAP243X,
1464 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1466 .recalc = &omap2_followparent_recalc,
1469 static struct clk uart1_ick = {
1470 .name = "uart1_ick",
1472 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1473 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1475 .recalc = &omap2_followparent_recalc,
1478 static struct clk uart1_fck = {
1479 .name = "uart1_fck",
1480 .parent = &func_48m_ck,
1481 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1482 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1484 .recalc = &omap2_followparent_recalc,
1487 static struct clk uart2_ick = {
1488 .name = "uart2_ick",
1490 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1491 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1493 .recalc = &omap2_followparent_recalc,
1496 static struct clk uart2_fck = {
1497 .name = "uart2_fck",
1498 .parent = &func_48m_ck,
1499 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1500 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1502 .recalc = &omap2_followparent_recalc,
1505 static struct clk uart3_ick = {
1506 .name = "uart3_ick",
1508 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1509 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
1511 .recalc = &omap2_followparent_recalc,
1514 static struct clk uart3_fck = {
1515 .name = "uart3_fck",
1516 .parent = &func_48m_ck,
1517 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1518 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1520 .recalc = &omap2_followparent_recalc,
1523 static struct clk gpios_ick = {
1524 .name = "gpios_ick",
1526 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1527 .enable_reg = (void __iomem *)&CM_ICLKEN_WKUP,
1529 .recalc = &omap2_followparent_recalc,
1532 static struct clk gpios_fck = {
1533 .name = "gpios_fck",
1534 .parent = &func_32k_ck,
1535 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1536 .enable_reg = (void __iomem *)&CM_FCLKEN_WKUP,
1538 .recalc = &omap2_followparent_recalc,
1541 static struct clk mpu_wdt_ick = {
1542 .name = "mpu_wdt_ick",
1544 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1545 .enable_reg = (void __iomem *)&CM_ICLKEN_WKUP,
1547 .recalc = &omap2_followparent_recalc,
1550 static struct clk mpu_wdt_fck = {
1551 .name = "mpu_wdt_fck",
1552 .parent = &func_32k_ck,
1553 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1554 .enable_reg = (void __iomem *)&CM_FCLKEN_WKUP,
1556 .recalc = &omap2_followparent_recalc,
1559 static struct clk sync_32k_ick = {
1560 .name = "sync_32k_ick",
1562 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1563 .enable_reg = (void __iomem *)&CM_ICLKEN_WKUP,
1565 .recalc = &omap2_followparent_recalc,
1567 static struct clk wdt1_ick = {
1570 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1571 .enable_reg = (void __iomem *)&CM_ICLKEN_WKUP,
1573 .recalc = &omap2_followparent_recalc,
1575 static struct clk omapctrl_ick = {
1576 .name = "omapctrl_ick",
1578 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1579 .enable_reg = (void __iomem *)&CM_ICLKEN_WKUP,
1581 .recalc = &omap2_followparent_recalc,
1583 static struct clk icr_ick = {
1586 .flags = CLOCK_IN_OMAP243X,
1587 .enable_reg = (void __iomem *)&CM_ICLKEN_WKUP,
1589 .recalc = &omap2_followparent_recalc,
1592 static struct clk cam_ick = {
1595 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1596 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1598 .recalc = &omap2_followparent_recalc,
1601 static struct clk cam_fck = {
1603 .parent = &func_96m_ck,
1604 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1605 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1607 .recalc = &omap2_followparent_recalc,
1610 static struct clk mailboxes_ick = {
1611 .name = "mailboxes_ick",
1613 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1614 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1616 .recalc = &omap2_followparent_recalc,
1619 static struct clk wdt4_ick = {
1622 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1623 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1625 .recalc = &omap2_followparent_recalc,
1628 static struct clk wdt4_fck = {
1630 .parent = &func_32k_ck,
1631 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1632 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1634 .recalc = &omap2_followparent_recalc,
1637 static struct clk wdt3_ick = {
1640 .flags = CLOCK_IN_OMAP242X,
1641 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1643 .recalc = &omap2_followparent_recalc,
1646 static struct clk wdt3_fck = {
1648 .parent = &func_32k_ck,
1649 .flags = CLOCK_IN_OMAP242X,
1650 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1652 .recalc = &omap2_followparent_recalc,
1655 static struct clk mspro_ick = {
1656 .name = "mspro_ick",
1658 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1659 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1661 .recalc = &omap2_followparent_recalc,
1664 static struct clk mspro_fck = {
1665 .name = "mspro_fck",
1666 .parent = &func_96m_ck,
1667 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1668 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1670 .recalc = &omap2_followparent_recalc,
1673 static struct clk mmc_ick = {
1676 .flags = CLOCK_IN_OMAP242X,
1677 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1679 .recalc = &omap2_followparent_recalc,
1682 static struct clk mmc_fck = {
1684 .parent = &func_96m_ck,
1685 .flags = CLOCK_IN_OMAP242X,
1686 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1688 .recalc = &omap2_followparent_recalc,
1691 static struct clk fac_ick = {
1694 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1695 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1697 .recalc = &omap2_followparent_recalc,
1700 static struct clk fac_fck = {
1702 .parent = &func_12m_ck,
1703 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1704 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1706 .recalc = &omap2_followparent_recalc,
1709 static struct clk eac_ick = {
1712 .flags = CLOCK_IN_OMAP242X,
1713 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1715 .recalc = &omap2_followparent_recalc,
1718 static struct clk eac_fck = {
1720 .parent = &func_96m_ck,
1721 .flags = CLOCK_IN_OMAP242X,
1722 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1724 .recalc = &omap2_followparent_recalc,
1727 static struct clk hdq_ick = {
1730 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1731 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1733 .recalc = &omap2_followparent_recalc,
1736 static struct clk hdq_fck = {
1738 .parent = &func_12m_ck,
1739 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1740 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1742 .recalc = &omap2_followparent_recalc,
1745 static struct clk i2c2_ick = {
1749 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1750 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1752 .recalc = &omap2_followparent_recalc,
1755 static struct clk i2c2_fck = {
1758 .parent = &func_12m_ck,
1759 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1760 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1762 .recalc = &omap2_followparent_recalc,
1765 static struct clk i2chs2_fck = {
1766 .name = "i2chs_fck",
1768 .parent = &func_96m_ck,
1769 .flags = CLOCK_IN_OMAP243X,
1770 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1772 .recalc = &omap2_followparent_recalc,
1775 static struct clk i2c1_ick = {
1779 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1780 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1782 .recalc = &omap2_followparent_recalc,
1785 static struct clk i2c1_fck = {
1788 .parent = &func_12m_ck,
1789 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1790 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1792 .recalc = &omap2_followparent_recalc,
1795 static struct clk i2chs1_fck = {
1796 .name = "i2chs_fck",
1798 .parent = &func_96m_ck,
1799 .flags = CLOCK_IN_OMAP243X,
1800 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1802 .recalc = &omap2_followparent_recalc,
1805 static struct clk vlynq_ick = {
1806 .name = "vlynq_ick",
1807 .parent = &core_l3_ck,
1808 .flags = CLOCK_IN_OMAP242X,
1809 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1811 .recalc = &omap2_followparent_recalc,
1814 static struct clk vlynq_fck = {
1815 .name = "vlynq_fck",
1816 .parent = &func_96m_ck,
1817 .flags = CLOCK_IN_OMAP242X | RATE_CKCTL | CM_CORE_SEL1 | DELAYED_APP,
1818 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1821 .recalc = &omap2_followparent_recalc,
1824 static struct clk sdrc_ick = {
1827 .flags = CLOCK_IN_OMAP243X,
1828 .enable_reg = (void __iomem *)&CM_ICLKEN3_CORE,
1830 .recalc = &omap2_followparent_recalc,
1833 static struct clk des_ick = {
1836 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
1837 .enable_reg = (void __iomem *)&CM_ICLKEN4_CORE,
1839 .recalc = &omap2_followparent_recalc,
1842 static struct clk sha_ick = {
1845 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
1846 .enable_reg = (void __iomem *)&CM_ICLKEN4_CORE,
1848 .recalc = &omap2_followparent_recalc,
1851 static struct clk rng_ick = {
1854 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
1855 .enable_reg = (void __iomem *)&CM_ICLKEN4_CORE,
1857 .recalc = &omap2_followparent_recalc,
1860 static struct clk aes_ick = {
1863 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
1864 .enable_reg = (void __iomem *)&CM_ICLKEN4_CORE,
1866 .recalc = &omap2_followparent_recalc,
1869 static struct clk pka_ick = {
1872 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
1873 .enable_reg = (void __iomem *)&CM_ICLKEN4_CORE,
1875 .recalc = &omap2_followparent_recalc,
1878 static struct clk usb_fck = {
1880 .parent = &func_48m_ck,
1881 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
1882 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1884 .recalc = &omap2_followparent_recalc,
1887 static struct clk usbhs_ick = {
1888 .name = "usbhs_ick",
1889 .parent = &core_l3_ck,
1890 .flags = CLOCK_IN_OMAP243X,
1891 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
1893 .recalc = &omap2_followparent_recalc,
1896 static struct clk mmchs1_ick = {
1897 .name = "mmchs1_ick",
1899 .flags = CLOCK_IN_OMAP243X,
1900 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
1902 .recalc = &omap2_followparent_recalc,
1905 static struct clk mmchs1_fck = {
1906 .name = "mmchs1_fck",
1907 .parent = &func_96m_ck,
1908 .flags = CLOCK_IN_OMAP243X,
1909 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1911 .recalc = &omap2_followparent_recalc,
1914 static struct clk mmchs2_ick = {
1915 .name = "mmchs2_ick",
1917 .flags = CLOCK_IN_OMAP243X,
1918 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
1920 .recalc = &omap2_followparent_recalc,
1923 static struct clk mmchs2_fck = {
1924 .name = "mmchs2_fck",
1925 .parent = &func_96m_ck,
1926 .flags = CLOCK_IN_OMAP243X,
1927 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1929 .recalc = &omap2_followparent_recalc,
1932 static struct clk gpio5_ick = {
1933 .name = "gpio5_ick",
1935 .flags = CLOCK_IN_OMAP243X,
1936 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
1938 .recalc = &omap2_followparent_recalc,
1941 static struct clk gpio5_fck = {
1942 .name = "gpio5_fck",
1943 .parent = &func_32k_ck,
1944 .flags = CLOCK_IN_OMAP243X,
1945 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1947 .recalc = &omap2_followparent_recalc,
1950 static struct clk mdm_intc_ick = {
1951 .name = "mdm_intc_ick",
1953 .flags = CLOCK_IN_OMAP243X,
1954 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
1956 .recalc = &omap2_followparent_recalc,
1959 static struct clk mmchsdb1_fck = {
1960 .name = "mmchsdb1_fck",
1961 .parent = &func_32k_ck,
1962 .flags = CLOCK_IN_OMAP243X,
1963 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1965 .recalc = &omap2_followparent_recalc,
1968 static struct clk mmchsdb2_fck = {
1969 .name = "mmchsdb2_fck",
1970 .parent = &func_32k_ck,
1971 .flags = CLOCK_IN_OMAP243X,
1972 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1974 .recalc = &omap2_followparent_recalc,
1978 * This clock is a composite clock which does entire set changes then
1979 * forces a rebalance. It keys on the MPU speed, but it really could
1980 * be any key speed part of a set in the rate table.
1982 * to really change a set, you need memory table sets which get changed
1983 * in sram, pre-notifiers & post notifiers, changing the top set, without
1984 * having low level display recalc's won't work... this is why dpm notifiers
1985 * work, isr's off, walk a list of clocks already _off_ and not messing with
1988 * This clock should have no parent. It embodies the entire upper level
1989 * active set. A parent will mess up some of the init also.
1991 static struct clk virt_prcm_set = {
1992 .name = "virt_prcm_set",
1993 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1994 VIRTUAL_CLOCK | ALWAYS_ENABLED | DELAYED_APP,
1995 .parent = &mpu_ck, /* Indexed by mpu speed, no parent */
1996 .recalc = &omap2_mpu_recalc, /* sets are keyed on mpu rate */
1997 .set_rate = &omap2_select_table_rate,
1998 .round_rate = &omap2_round_to_table_rate,
2001 static struct clk *onchip_clks[] = {
2002 /* external root sources */
2007 /* internal analog sources */
2011 /* internal prcm root sources */
2022 /* mpu domain clocks */
2024 /* dsp domain clocks */
2025 &iva2_1_fck, /* 2430 */
2027 &dsp_ick, /* 2420 */
2031 /* GFX domain clocks */
2035 /* Modem domain clocks */
2038 /* DSS domain clocks */
2043 /* L3 domain clocks */
2047 /* L4 domain clocks */
2048 &l4_ck, /* used as both core_l4 and wu_l4 */
2050 /* virtual meta-group clock */
2052 /* general l4 interface ck, multi-parent functional clk */