blob: d4869377307a7ff3540ede73ce4b1d87a2cabad3 [file] [log] [blame]
Tony Lindgren046d6b22005-11-10 14:26:52 +00001/*
Tony Lindgrena16e9702008-03-18 11:56:39 +02002 * linux/arch/arm/mach-omap2/clock24xx.h
Tony Lindgren046d6b22005-11-10 14:26:52 +00003 *
Tony Lindgrena16e9702008-03-18 11:56:39 +02004 * Copyright (C) 2005-2008 Texas Instruments, Inc.
5 * Copyright (C) 2004-2008 Nokia Corporation
6 *
7 * Contacts:
Tony Lindgren046d6b22005-11-10 14:26:52 +00008 * Richard Woodruff <r-woodruff2@ti.com>
Tony Lindgrena16e9702008-03-18 11:56:39 +02009 * Paul Walmsley
Tony Lindgren046d6b22005-11-10 14:26:52 +000010 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 */
15
Paul Walmsley6b8858a2008-03-18 10:35:15 +020016#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK24XX_H
17#define __ARCH_ARM_MACH_OMAP2_CLOCK24XX_H
Tony Lindgren046d6b22005-11-10 14:26:52 +000018
Paul Walmsley6b8858a2008-03-18 10:35:15 +020019#include "clock.h"
20
21#include "prm.h"
22#include "cm.h"
23#include "prm-regbits-24xx.h"
24#include "cm-regbits-24xx.h"
25#include "sdrc.h"
26
Tony Lindgrena16e9702008-03-18 11:56:39 +020027static void omap2_table_mpu_recalc(struct clk *clk);
28static int omap2_select_table_rate(struct clk *clk, unsigned long rate);
29static long omap2_round_to_table_rate(struct clk *clk, unsigned long rate);
30static void omap2_sys_clk_recalc(struct clk *clk);
31static void omap2_osc_clk_recalc(struct clk *clk);
32static void omap2_sys_clk_recalc(struct clk *clk);
Paul Walmsley88b8ba92008-07-03 12:24:46 +030033static void omap2_dpllcore_recalc(struct clk *clk);
Paul Walmsley88b8ba92008-07-03 12:24:46 +030034static int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate);
Tony Lindgren046d6b22005-11-10 14:26:52 +000035
Tony Lindgren046d6b22005-11-10 14:26:52 +000036/* Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated.
37 * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU,CM_CLKSEL_DSP
38 * CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL CM_CLKSEL2_PLL, CM_CLKSEL_MDM
39 */
40struct prcm_config {
41 unsigned long xtal_speed; /* crystal rate */
42 unsigned long dpll_speed; /* dpll: out*xtal*M/(N-1)table_recalc */
43 unsigned long mpu_speed; /* speed of MPU */
44 unsigned long cm_clksel_mpu; /* mpu divider */
45 unsigned long cm_clksel_dsp; /* dsp+iva1 div(2420), iva2.1(2430) */
46 unsigned long cm_clksel_gfx; /* gfx dividers */
47 unsigned long cm_clksel1_core; /* major subsystem dividers */
48 unsigned long cm_clksel1_pll; /* m,n */
49 unsigned long cm_clksel2_pll; /* dpllx1 or x2 out */
50 unsigned long cm_clksel_mdm; /* modem dividers 2430 only */
51 unsigned long base_sdrc_rfr; /* base refresh timing for a set */
52 unsigned char flags;
53};
54
Tony Lindgren046d6b22005-11-10 14:26:52 +000055/*
56 * The OMAP2 processor can be run at several discrete 'PRCM configurations'.
57 * These configurations are characterized by voltage and speed for clocks.
58 * The device is only validated for certain combinations. One way to express
59 * these combinations is via the 'ratio's' which the clocks operate with
60 * respect to each other. These ratio sets are for a given voltage/DPLL
61 * setting. All configurations can be described by a DPLL setting and a ratio
62 * There are 3 ratio sets for the 2430 and X ratio sets for 2420.
63 *
64 * 2430 differs from 2420 in that there are no more phase synchronizers used.
65 * They both have a slightly different clock domain setup. 2420(iva1,dsp) vs
66 * 2430 (iva2.1, NOdsp, mdm)
67 */
68
69/* Core fields for cm_clksel, not ratio governed */
70#define RX_CLKSEL_DSS1 (0x10 << 8)
71#define RX_CLKSEL_DSS2 (0x0 << 13)
72#define RX_CLKSEL_SSI (0x5 << 20)
73
74/*-------------------------------------------------------------------------
75 * Voltage/DPLL ratios
76 *-------------------------------------------------------------------------*/
77
78/* 2430 Ratio's, 2430-Ratio Config 1 */
79#define R1_CLKSEL_L3 (4 << 0)
80#define R1_CLKSEL_L4 (2 << 5)
81#define R1_CLKSEL_USB (4 << 25)
82#define R1_CM_CLKSEL1_CORE_VAL R1_CLKSEL_USB | RX_CLKSEL_SSI | \
83 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
84 R1_CLKSEL_L4 | R1_CLKSEL_L3
85#define R1_CLKSEL_MPU (2 << 0)
86#define R1_CM_CLKSEL_MPU_VAL R1_CLKSEL_MPU
87#define R1_CLKSEL_DSP (2 << 0)
88#define R1_CLKSEL_DSP_IF (2 << 5)
89#define R1_CM_CLKSEL_DSP_VAL R1_CLKSEL_DSP | R1_CLKSEL_DSP_IF
90#define R1_CLKSEL_GFX (2 << 0)
91#define R1_CM_CLKSEL_GFX_VAL R1_CLKSEL_GFX
92#define R1_CLKSEL_MDM (4 << 0)
93#define R1_CM_CLKSEL_MDM_VAL R1_CLKSEL_MDM
94
95/* 2430-Ratio Config 2 */
96#define R2_CLKSEL_L3 (6 << 0)
97#define R2_CLKSEL_L4 (2 << 5)
98#define R2_CLKSEL_USB (2 << 25)
99#define R2_CM_CLKSEL1_CORE_VAL R2_CLKSEL_USB | RX_CLKSEL_SSI | \
100 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
101 R2_CLKSEL_L4 | R2_CLKSEL_L3
102#define R2_CLKSEL_MPU (2 << 0)
103#define R2_CM_CLKSEL_MPU_VAL R2_CLKSEL_MPU
104#define R2_CLKSEL_DSP (2 << 0)
105#define R2_CLKSEL_DSP_IF (3 << 5)
106#define R2_CM_CLKSEL_DSP_VAL R2_CLKSEL_DSP | R2_CLKSEL_DSP_IF
107#define R2_CLKSEL_GFX (2 << 0)
108#define R2_CM_CLKSEL_GFX_VAL R2_CLKSEL_GFX
109#define R2_CLKSEL_MDM (6 << 0)
110#define R2_CM_CLKSEL_MDM_VAL R2_CLKSEL_MDM
111
112/* 2430-Ratio Bootm (BYPASS) */
113#define RB_CLKSEL_L3 (1 << 0)
114#define RB_CLKSEL_L4 (1 << 5)
115#define RB_CLKSEL_USB (1 << 25)
116#define RB_CM_CLKSEL1_CORE_VAL RB_CLKSEL_USB | RX_CLKSEL_SSI | \
117 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
118 RB_CLKSEL_L4 | RB_CLKSEL_L3
119#define RB_CLKSEL_MPU (1 << 0)
120#define RB_CM_CLKSEL_MPU_VAL RB_CLKSEL_MPU
121#define RB_CLKSEL_DSP (1 << 0)
122#define RB_CLKSEL_DSP_IF (1 << 5)
123#define RB_CM_CLKSEL_DSP_VAL RB_CLKSEL_DSP | RB_CLKSEL_DSP_IF
124#define RB_CLKSEL_GFX (1 << 0)
125#define RB_CM_CLKSEL_GFX_VAL RB_CLKSEL_GFX
126#define RB_CLKSEL_MDM (1 << 0)
127#define RB_CM_CLKSEL_MDM_VAL RB_CLKSEL_MDM
128
129/* 2420 Ratio Equivalents */
130#define RXX_CLKSEL_VLYNQ (0x12 << 15)
131#define RXX_CLKSEL_SSI (0x8 << 20)
132
133/* 2420-PRCM III 532MHz core */
134#define RIII_CLKSEL_L3 (4 << 0) /* 133MHz */
135#define RIII_CLKSEL_L4 (2 << 5) /* 66.5MHz */
136#define RIII_CLKSEL_USB (4 << 25) /* 33.25MHz */
137#define RIII_CM_CLKSEL1_CORE_VAL RIII_CLKSEL_USB | RXX_CLKSEL_SSI | \
138 RXX_CLKSEL_VLYNQ | RX_CLKSEL_DSS2 | \
139 RX_CLKSEL_DSS1 | RIII_CLKSEL_L4 | \
140 RIII_CLKSEL_L3
141#define RIII_CLKSEL_MPU (2 << 0) /* 266MHz */
142#define RIII_CM_CLKSEL_MPU_VAL RIII_CLKSEL_MPU
143#define RIII_CLKSEL_DSP (3 << 0) /* c5x - 177.3MHz */
144#define RIII_CLKSEL_DSP_IF (2 << 5) /* c5x - 88.67MHz */
145#define RIII_SYNC_DSP (1 << 7) /* Enable sync */
146#define RIII_CLKSEL_IVA (6 << 8) /* iva1 - 88.67MHz */
147#define RIII_SYNC_IVA (1 << 13) /* Enable sync */
148#define RIII_CM_CLKSEL_DSP_VAL RIII_SYNC_IVA | RIII_CLKSEL_IVA | \
149 RIII_SYNC_DSP | RIII_CLKSEL_DSP_IF | \
150 RIII_CLKSEL_DSP
151#define RIII_CLKSEL_GFX (2 << 0) /* 66.5MHz */
152#define RIII_CM_CLKSEL_GFX_VAL RIII_CLKSEL_GFX
153
154/* 2420-PRCM II 600MHz core */
155#define RII_CLKSEL_L3 (6 << 0) /* 100MHz */
156#define RII_CLKSEL_L4 (2 << 5) /* 50MHz */
157#define RII_CLKSEL_USB (2 << 25) /* 50MHz */
158#define RII_CM_CLKSEL1_CORE_VAL RII_CLKSEL_USB | \
159 RXX_CLKSEL_SSI | RXX_CLKSEL_VLYNQ | \
160 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
161 RII_CLKSEL_L4 | RII_CLKSEL_L3
162#define RII_CLKSEL_MPU (2 << 0) /* 300MHz */
163#define RII_CM_CLKSEL_MPU_VAL RII_CLKSEL_MPU
164#define RII_CLKSEL_DSP (3 << 0) /* c5x - 200MHz */
165#define RII_CLKSEL_DSP_IF (2 << 5) /* c5x - 100MHz */
166#define RII_SYNC_DSP (0 << 7) /* Bypass sync */
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200167#define RII_CLKSEL_IVA (3 << 8) /* iva1 - 200MHz */
Tony Lindgren046d6b22005-11-10 14:26:52 +0000168#define RII_SYNC_IVA (0 << 13) /* Bypass sync */
169#define RII_CM_CLKSEL_DSP_VAL RII_SYNC_IVA | RII_CLKSEL_IVA | \
170 RII_SYNC_DSP | RII_CLKSEL_DSP_IF | \
171 RII_CLKSEL_DSP
172#define RII_CLKSEL_GFX (2 << 0) /* 50MHz */
173#define RII_CM_CLKSEL_GFX_VAL RII_CLKSEL_GFX
174
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200175/* 2420-PRCM I 660MHz core */
176#define RI_CLKSEL_L3 (4 << 0) /* 165MHz */
177#define RI_CLKSEL_L4 (2 << 5) /* 82.5MHz */
178#define RI_CLKSEL_USB (4 << 25) /* 41.25MHz */
179#define RI_CM_CLKSEL1_CORE_VAL RI_CLKSEL_USB | \
180 RXX_CLKSEL_SSI | RXX_CLKSEL_VLYNQ | \
181 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
182 RI_CLKSEL_L4 | RI_CLKSEL_L3
183#define RI_CLKSEL_MPU (2 << 0) /* 330MHz */
184#define RI_CM_CLKSEL_MPU_VAL RI_CLKSEL_MPU
185#define RI_CLKSEL_DSP (3 << 0) /* c5x - 220MHz */
186#define RI_CLKSEL_DSP_IF (2 << 5) /* c5x - 110MHz */
187#define RI_SYNC_DSP (1 << 7) /* Activate sync */
188#define RI_CLKSEL_IVA (4 << 8) /* iva1 - 165MHz */
189#define RI_SYNC_IVA (0 << 13) /* Bypass sync */
190#define RI_CM_CLKSEL_DSP_VAL RI_SYNC_IVA | RI_CLKSEL_IVA | \
191 RI_SYNC_DSP | RI_CLKSEL_DSP_IF | \
192 RI_CLKSEL_DSP
193#define RI_CLKSEL_GFX (1 << 0) /* 165MHz */
194#define RI_CM_CLKSEL_GFX_VAL RI_CLKSEL_GFX
195
Tony Lindgren046d6b22005-11-10 14:26:52 +0000196/* 2420-PRCM VII (boot) */
197#define RVII_CLKSEL_L3 (1 << 0)
198#define RVII_CLKSEL_L4 (1 << 5)
199#define RVII_CLKSEL_DSS1 (1 << 8)
200#define RVII_CLKSEL_DSS2 (0 << 13)
201#define RVII_CLKSEL_VLYNQ (1 << 15)
202#define RVII_CLKSEL_SSI (1 << 20)
203#define RVII_CLKSEL_USB (1 << 25)
204
205#define RVII_CM_CLKSEL1_CORE_VAL RVII_CLKSEL_USB | RVII_CLKSEL_SSI | \
206 RVII_CLKSEL_VLYNQ | RVII_CLKSEL_DSS2 | \
207 RVII_CLKSEL_DSS1 | RVII_CLKSEL_L4 | RVII_CLKSEL_L3
208
209#define RVII_CLKSEL_MPU (1 << 0) /* all divide by 1 */
210#define RVII_CM_CLKSEL_MPU_VAL RVII_CLKSEL_MPU
211
212#define RVII_CLKSEL_DSP (1 << 0)
213#define RVII_CLKSEL_DSP_IF (1 << 5)
214#define RVII_SYNC_DSP (0 << 7)
215#define RVII_CLKSEL_IVA (1 << 8)
216#define RVII_SYNC_IVA (0 << 13)
217#define RVII_CM_CLKSEL_DSP_VAL RVII_SYNC_IVA | RVII_CLKSEL_IVA | RVII_SYNC_DSP | \
218 RVII_CLKSEL_DSP_IF | RVII_CLKSEL_DSP
219
220#define RVII_CLKSEL_GFX (1 << 0)
221#define RVII_CM_CLKSEL_GFX_VAL RVII_CLKSEL_GFX
222
223/*-------------------------------------------------------------------------
224 * 2430 Target modes: Along with each configuration the CPU has several
225 * modes which goes along with them. Modes mainly are the addition of
226 * describe DPLL combinations to go along with a ratio.
227 *-------------------------------------------------------------------------*/
228
229/* Hardware governed */
230#define MX_48M_SRC (0 << 3)
231#define MX_54M_SRC (0 << 5)
232#define MX_APLLS_CLIKIN_12 (3 << 23)
233#define MX_APLLS_CLIKIN_13 (2 << 23)
234#define MX_APLLS_CLIKIN_19_2 (0 << 23)
235
236/*
237 * 2430 - standalone, 2*ref*M/(n+1), M/N is for exactness not relock speed
Tony Lindgren046d6b22005-11-10 14:26:52 +0000238 * #5a (ratio1) baseport-target, target DPLL = 266*2 = 532MHz
239 */
240#define M5A_DPLL_MULT_12 (133 << 12)
241#define M5A_DPLL_DIV_12 (5 << 8)
242#define M5A_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
243 M5A_DPLL_DIV_12 | M5A_DPLL_MULT_12 | \
244 MX_APLLS_CLIKIN_12
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200245#define M5A_DPLL_MULT_13 (61 << 12)
246#define M5A_DPLL_DIV_13 (2 << 8)
Tony Lindgren046d6b22005-11-10 14:26:52 +0000247#define M5A_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
248 M5A_DPLL_DIV_13 | M5A_DPLL_MULT_13 | \
249 MX_APLLS_CLIKIN_13
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200250#define M5A_DPLL_MULT_19 (55 << 12)
251#define M5A_DPLL_DIV_19 (3 << 8)
Tony Lindgren046d6b22005-11-10 14:26:52 +0000252#define M5A_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
253 M5A_DPLL_DIV_19 | M5A_DPLL_MULT_19 | \
254 MX_APLLS_CLIKIN_19_2
255/* #5b (ratio1) target DPLL = 200*2 = 400MHz */
256#define M5B_DPLL_MULT_12 (50 << 12)
257#define M5B_DPLL_DIV_12 (2 << 8)
258#define M5B_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
259 M5B_DPLL_DIV_12 | M5B_DPLL_MULT_12 | \
260 MX_APLLS_CLIKIN_12
261#define M5B_DPLL_MULT_13 (200 << 12)
262#define M5B_DPLL_DIV_13 (12 << 8)
263
264#define M5B_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
265 M5B_DPLL_DIV_13 | M5B_DPLL_MULT_13 | \
266 MX_APLLS_CLIKIN_13
267#define M5B_DPLL_MULT_19 (125 << 12)
268#define M5B_DPLL_DIV_19 (31 << 8)
269#define M5B_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
270 M5B_DPLL_DIV_19 | M5B_DPLL_MULT_19 | \
271 MX_APLLS_CLIKIN_19_2
272/*
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200273 * #4 (ratio2), DPLL = 399*2 = 798MHz, L3=133MHz
274 */
275#define M4_DPLL_MULT_12 (133 << 12)
276#define M4_DPLL_DIV_12 (3 << 8)
277#define M4_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
278 M4_DPLL_DIV_12 | M4_DPLL_MULT_12 | \
279 MX_APLLS_CLIKIN_12
280
281#define M4_DPLL_MULT_13 (399 << 12)
282#define M4_DPLL_DIV_13 (12 << 8)
283#define M4_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
284 M4_DPLL_DIV_13 | M4_DPLL_MULT_13 | \
285 MX_APLLS_CLIKIN_13
286
287#define M4_DPLL_MULT_19 (145 << 12)
288#define M4_DPLL_DIV_19 (6 << 8)
289#define M4_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
290 M4_DPLL_DIV_19 | M4_DPLL_MULT_19 | \
291 MX_APLLS_CLIKIN_19_2
292
293/*
Tony Lindgren046d6b22005-11-10 14:26:52 +0000294 * #3 (ratio2) baseport-target, target DPLL = 330*2 = 660MHz
295 */
296#define M3_DPLL_MULT_12 (55 << 12)
297#define M3_DPLL_DIV_12 (1 << 8)
298#define M3_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
299 M3_DPLL_DIV_12 | M3_DPLL_MULT_12 | \
300 MX_APLLS_CLIKIN_12
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200301#define M3_DPLL_MULT_13 (76 << 12)
302#define M3_DPLL_DIV_13 (2 << 8)
Tony Lindgren046d6b22005-11-10 14:26:52 +0000303#define M3_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
304 M3_DPLL_DIV_13 | M3_DPLL_MULT_13 | \
305 MX_APLLS_CLIKIN_13
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200306#define M3_DPLL_MULT_19 (17 << 12)
307#define M3_DPLL_DIV_19 (0 << 8)
Tony Lindgren046d6b22005-11-10 14:26:52 +0000308#define M3_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
309 M3_DPLL_DIV_19 | M3_DPLL_MULT_19 | \
310 MX_APLLS_CLIKIN_19_2
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200311
312/*
313 * #2 (ratio1) DPLL = 330*2 = 660MHz, L3=165MHz
314 */
315#define M2_DPLL_MULT_12 (55 << 12)
316#define M2_DPLL_DIV_12 (1 << 8)
317#define M2_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
318 M2_DPLL_DIV_12 | M2_DPLL_MULT_12 | \
319 MX_APLLS_CLIKIN_12
320
321/* Speed changes - Used 658.7MHz instead of 660MHz for LP-Refresh M=76 N=2,
322 * relock time issue */
323/* Core frequency changed from 330/165 to 329/164 MHz*/
324#define M2_DPLL_MULT_13 (76 << 12)
325#define M2_DPLL_DIV_13 (2 << 8)
326#define M2_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
327 M2_DPLL_DIV_13 | M2_DPLL_MULT_13 | \
328 MX_APLLS_CLIKIN_13
329
330#define M2_DPLL_MULT_19 (17 << 12)
331#define M2_DPLL_DIV_19 (0 << 8)
332#define M2_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
333 M2_DPLL_DIV_19 | M2_DPLL_MULT_19 | \
334 MX_APLLS_CLIKIN_19_2
335
Tony Lindgren046d6b22005-11-10 14:26:52 +0000336/* boot (boot) */
337#define MB_DPLL_MULT (1 << 12)
338#define MB_DPLL_DIV (0 << 8)
339#define MB_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | MB_DPLL_DIV |\
340 MB_DPLL_MULT | MX_APLLS_CLIKIN_12
341
342#define MB_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | MB_DPLL_DIV |\
343 MB_DPLL_MULT | MX_APLLS_CLIKIN_13
344
345#define MB_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | MB_DPLL_DIV |\
346 MB_DPLL_MULT | MX_APLLS_CLIKIN_19
347
348/*
349 * 2430 - chassis (sedna)
350 * 165 (ratio1) same as above #2
351 * 150 (ratio1)
352 * 133 (ratio2) same as above #4
353 * 110 (ratio2) same as above #3
354 * 104 (ratio2)
355 * boot (boot)
356 */
357
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200358/* PRCM I target DPLL = 2*330MHz = 660MHz */
359#define MI_DPLL_MULT_12 (55 << 12)
360#define MI_DPLL_DIV_12 (1 << 8)
361#define MI_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
362 MI_DPLL_DIV_12 | MI_DPLL_MULT_12 | \
363 MX_APLLS_CLIKIN_12
364
Tony Lindgren046d6b22005-11-10 14:26:52 +0000365/*
366 * 2420 Equivalent - mode registers
367 * PRCM II , target DPLL = 2*300MHz = 600MHz
368 */
369#define MII_DPLL_MULT_12 (50 << 12)
370#define MII_DPLL_DIV_12 (1 << 8)
371#define MII_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
372 MII_DPLL_DIV_12 | MII_DPLL_MULT_12 | \
373 MX_APLLS_CLIKIN_12
374#define MII_DPLL_MULT_13 (300 << 12)
375#define MII_DPLL_DIV_13 (12 << 8)
376#define MII_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
377 MII_DPLL_DIV_13 | MII_DPLL_MULT_13 | \
378 MX_APLLS_CLIKIN_13
379
380/* PRCM III target DPLL = 2*266 = 532MHz*/
381#define MIII_DPLL_MULT_12 (133 << 12)
382#define MIII_DPLL_DIV_12 (5 << 8)
383#define MIII_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
384 MIII_DPLL_DIV_12 | MIII_DPLL_MULT_12 | \
385 MX_APLLS_CLIKIN_12
386#define MIII_DPLL_MULT_13 (266 << 12)
387#define MIII_DPLL_DIV_13 (12 << 8)
388#define MIII_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
389 MIII_DPLL_DIV_13 | MIII_DPLL_MULT_13 | \
390 MX_APLLS_CLIKIN_13
391
392/* PRCM VII (boot bypass) */
393#define MVII_CM_CLKSEL1_PLL_12_VAL MB_CM_CLKSEL1_PLL_12_VAL
394#define MVII_CM_CLKSEL1_PLL_13_VAL MB_CM_CLKSEL1_PLL_13_VAL
395
396/* High and low operation value */
397#define MX_CLKSEL2_PLL_2x_VAL (2 << 0)
398#define MX_CLKSEL2_PLL_1x_VAL (1 << 0)
399
Tony Lindgren046d6b22005-11-10 14:26:52 +0000400/* MPU speed defines */
401#define S12M 12000000
402#define S13M 13000000
403#define S19M 19200000
404#define S26M 26000000
405#define S100M 100000000
406#define S133M 133000000
407#define S150M 150000000
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200408#define S164M 164000000
Tony Lindgren046d6b22005-11-10 14:26:52 +0000409#define S165M 165000000
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200410#define S199M 199000000
Tony Lindgren046d6b22005-11-10 14:26:52 +0000411#define S200M 200000000
412#define S266M 266000000
413#define S300M 300000000
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200414#define S329M 329000000
Tony Lindgren046d6b22005-11-10 14:26:52 +0000415#define S330M 330000000
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200416#define S399M 399000000
Tony Lindgren046d6b22005-11-10 14:26:52 +0000417#define S400M 400000000
418#define S532M 532000000
419#define S600M 600000000
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200420#define S658M 658000000
Tony Lindgren046d6b22005-11-10 14:26:52 +0000421#define S660M 660000000
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200422#define S798M 798000000
Tony Lindgren046d6b22005-11-10 14:26:52 +0000423
424/*-------------------------------------------------------------------------
425 * Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated.
426 * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU,
427 * CM_CLKSEL_DSP, CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL,
428 * CM_CLKSEL2_PLL, CM_CLKSEL_MDM
429 *
430 * Filling in table based on H4 boards and 2430-SDPs variants available.
431 * There are quite a few more rates combinations which could be defined.
432 *
Simon Arlott6cbdc8c2007-05-11 20:40:30 +0100433 * When multiple values are defined the start up will try and choose the
Tony Lindgren046d6b22005-11-10 14:26:52 +0000434 * fastest one. If a 'fast' value is defined, then automatically, the /2
435 * one should be included as it can be used. Generally having more that
436 * one fast set does not make sense, as static timings need to be changed
437 * to change the set. The exception is the bypass setting which is
438 * availble for low power bypass.
439 *
440 * Note: This table needs to be sorted, fastest to slowest.
441 *-------------------------------------------------------------------------*/
442static struct prcm_config rate_table[] = {
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200443 /* PRCM I - FAST */
444 {S12M, S660M, S330M, RI_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */
445 RI_CM_CLKSEL_DSP_VAL, RI_CM_CLKSEL_GFX_VAL,
446 RI_CM_CLKSEL1_CORE_VAL, MI_CM_CLKSEL1_PLL_12_VAL,
447 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_165MHz,
448 RATE_IN_242X},
449
Tony Lindgren046d6b22005-11-10 14:26:52 +0000450 /* PRCM II - FAST */
451 {S12M, S600M, S300M, RII_CM_CLKSEL_MPU_VAL, /* 300MHz ARM */
452 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
453 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_12_VAL,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200454 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000455 RATE_IN_242X},
456
457 {S13M, S600M, S300M, RII_CM_CLKSEL_MPU_VAL, /* 300MHz ARM */
458 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
459 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_13_VAL,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200460 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000461 RATE_IN_242X},
462
463 /* PRCM III - FAST */
464 {S12M, S532M, S266M, RIII_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
465 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
466 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_12_VAL,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200467 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000468 RATE_IN_242X},
469
470 {S13M, S532M, S266M, RIII_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
471 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
472 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_13_VAL,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200473 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000474 RATE_IN_242X},
475
476 /* PRCM II - SLOW */
477 {S12M, S300M, S150M, RII_CM_CLKSEL_MPU_VAL, /* 150MHz ARM */
478 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
479 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_12_VAL,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200480 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000481 RATE_IN_242X},
482
483 {S13M, S300M, S150M, RII_CM_CLKSEL_MPU_VAL, /* 150MHz ARM */
484 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
485 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_13_VAL,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200486 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000487 RATE_IN_242X},
488
489 /* PRCM III - SLOW */
490 {S12M, S266M, S133M, RIII_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
491 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
492 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_12_VAL,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200493 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000494 RATE_IN_242X},
495
496 {S13M, S266M, S133M, RIII_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
497 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
498 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_13_VAL,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200499 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000500 RATE_IN_242X},
501
502 /* PRCM-VII (boot-bypass) */
503 {S12M, S12M, S12M, RVII_CM_CLKSEL_MPU_VAL, /* 12MHz ARM*/
504 RVII_CM_CLKSEL_DSP_VAL, RVII_CM_CLKSEL_GFX_VAL,
505 RVII_CM_CLKSEL1_CORE_VAL, MVII_CM_CLKSEL1_PLL_12_VAL,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200506 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_BYPASS,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000507 RATE_IN_242X},
508
509 /* PRCM-VII (boot-bypass) */
510 {S13M, S13M, S13M, RVII_CM_CLKSEL_MPU_VAL, /* 13MHz ARM */
511 RVII_CM_CLKSEL_DSP_VAL, RVII_CM_CLKSEL_GFX_VAL,
512 RVII_CM_CLKSEL1_CORE_VAL, MVII_CM_CLKSEL1_PLL_13_VAL,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200513 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_BYPASS,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000514 RATE_IN_242X},
515
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200516 /* PRCM #4 - ratio2 (ES2.1) - FAST */
517 {S13M, S798M, S399M, R2_CM_CLKSEL_MPU_VAL, /* 399MHz ARM */
Tony Lindgren046d6b22005-11-10 14:26:52 +0000518 R2_CM_CLKSEL_DSP_VAL, R2_CM_CLKSEL_GFX_VAL,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200519 R2_CM_CLKSEL1_CORE_VAL, M4_CM_CLKSEL1_PLL_13_VAL,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000520 MX_CLKSEL2_PLL_2x_VAL, R2_CM_CLKSEL_MDM_VAL,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200521 SDRC_RFR_CTRL_133MHz,
522 RATE_IN_243X},
523
524 /* PRCM #2 - ratio1 (ES2) - FAST */
525 {S13M, S658M, S329M, R1_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */
526 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
527 R1_CM_CLKSEL1_CORE_VAL, M2_CM_CLKSEL1_PLL_13_VAL,
528 MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL,
529 SDRC_RFR_CTRL_165MHz,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000530 RATE_IN_243X},
531
532 /* PRCM #5a - ratio1 - FAST */
533 {S13M, S532M, S266M, R1_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
534 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
535 R1_CM_CLKSEL1_CORE_VAL, M5A_CM_CLKSEL1_PLL_13_VAL,
536 MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200537 SDRC_RFR_CTRL_133MHz,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000538 RATE_IN_243X},
539
540 /* PRCM #5b - ratio1 - FAST */
541 {S13M, S400M, S200M, R1_CM_CLKSEL_MPU_VAL, /* 200MHz ARM */
542 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
543 R1_CM_CLKSEL1_CORE_VAL, M5B_CM_CLKSEL1_PLL_13_VAL,
544 MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200545 SDRC_RFR_CTRL_100MHz,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000546 RATE_IN_243X},
547
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200548 /* PRCM #4 - ratio1 (ES2.1) - SLOW */
549 {S13M, S399M, S199M, R2_CM_CLKSEL_MPU_VAL, /* 200MHz ARM */
Tony Lindgren046d6b22005-11-10 14:26:52 +0000550 R2_CM_CLKSEL_DSP_VAL, R2_CM_CLKSEL_GFX_VAL,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200551 R2_CM_CLKSEL1_CORE_VAL, M4_CM_CLKSEL1_PLL_13_VAL,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000552 MX_CLKSEL2_PLL_1x_VAL, R2_CM_CLKSEL_MDM_VAL,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200553 SDRC_RFR_CTRL_133MHz,
554 RATE_IN_243X},
555
556 /* PRCM #2 - ratio1 (ES2) - SLOW */
557 {S13M, S329M, S164M, R1_CM_CLKSEL_MPU_VAL, /* 165MHz ARM */
558 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
559 R1_CM_CLKSEL1_CORE_VAL, M2_CM_CLKSEL1_PLL_13_VAL,
560 MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL,
561 SDRC_RFR_CTRL_165MHz,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000562 RATE_IN_243X},
563
564 /* PRCM #5a - ratio1 - SLOW */
565 {S13M, S266M, S133M, R1_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
566 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
567 R1_CM_CLKSEL1_CORE_VAL, M5A_CM_CLKSEL1_PLL_13_VAL,
568 MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200569 SDRC_RFR_CTRL_133MHz,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000570 RATE_IN_243X},
571
572 /* PRCM #5b - ratio1 - SLOW*/
573 {S13M, S200M, S100M, R1_CM_CLKSEL_MPU_VAL, /* 100MHz ARM */
574 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
575 R1_CM_CLKSEL1_CORE_VAL, M5B_CM_CLKSEL1_PLL_13_VAL,
576 MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200577 SDRC_RFR_CTRL_100MHz,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000578 RATE_IN_243X},
579
580 /* PRCM-boot/bypass */
581 {S13M, S13M, S13M, RB_CM_CLKSEL_MPU_VAL, /* 13Mhz */
582 RB_CM_CLKSEL_DSP_VAL, RB_CM_CLKSEL_GFX_VAL,
583 RB_CM_CLKSEL1_CORE_VAL, MB_CM_CLKSEL1_PLL_13_VAL,
584 MX_CLKSEL2_PLL_2x_VAL, RB_CM_CLKSEL_MDM_VAL,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200585 SDRC_RFR_CTRL_BYPASS,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000586 RATE_IN_243X},
587
588 /* PRCM-boot/bypass */
589 {S12M, S12M, S12M, RB_CM_CLKSEL_MPU_VAL, /* 12Mhz */
590 RB_CM_CLKSEL_DSP_VAL, RB_CM_CLKSEL_GFX_VAL,
591 RB_CM_CLKSEL1_CORE_VAL, MB_CM_CLKSEL1_PLL_12_VAL,
592 MX_CLKSEL2_PLL_2x_VAL, RB_CM_CLKSEL_MDM_VAL,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200593 SDRC_RFR_CTRL_BYPASS,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000594 RATE_IN_243X},
595
596 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
597};
598
599/*-------------------------------------------------------------------------
600 * 24xx clock tree.
601 *
602 * NOTE:In many cases here we are assigning a 'default' parent. In many
603 * cases the parent is selectable. The get/set parent calls will also
604 * switch sources.
605 *
606 * Many some clocks say always_enabled, but they can be auto idled for
607 * power savings. They will always be available upon clock request.
608 *
609 * Several sources are given initial rates which may be wrong, this will
610 * be fixed up in the init func.
611 *
612 * Things are broadly separated below by clock domains. It is
613 * noteworthy that most periferals have dependencies on multiple clock
614 * domains. Many get their interface clocks from the L4 domain, but get
615 * functional clocks from fixed sources or other core domain derived
616 * clocks.
617 *-------------------------------------------------------------------------*/
618
619/* Base external input clocks */
620static struct clk func_32k_ck = {
621 .name = "func_32k_ck",
Russell King897dcde2008-11-04 16:35:03 +0000622 .ops = &clkops_null,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000623 .rate = 32000,
624 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
Russell King897dcde2008-11-04 16:35:03 +0000625 RATE_FIXED | RATE_PROPAGATES,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +0300626 .clkdm_name = "wkup_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +0200627 .recalc = &propagate_rate,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000628};
Paul Walmsleye32744b2008-03-18 15:47:55 +0200629
Tony Lindgren046d6b22005-11-10 14:26:52 +0000630/* Typical 12/13MHz in standalone mode, will be 26Mhz in chassis mode */
631static struct clk osc_ck = { /* (*12, *13, 19.2, *26, 38.4)MHz */
632 .name = "osc_ck",
Russell King548d8492008-11-04 14:02:46 +0000633 .ops = &clkops_oscck,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000634 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
Paul Walmsleye32744b2008-03-18 15:47:55 +0200635 RATE_PROPAGATES,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +0300636 .clkdm_name = "wkup_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +0200637 .recalc = &omap2_osc_clk_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000638};
639
Paul Walmsleyd1b03f62008-08-19 11:08:44 +0300640/* Without modem likely 12MHz, with modem likely 13MHz */
Tony Lindgren046d6b22005-11-10 14:26:52 +0000641static struct clk sys_ck = { /* (*12, *13, 19.2, 26, 38.4)MHz */
642 .name = "sys_ck", /* ~ ref_clk also */
Russell King897dcde2008-11-04 16:35:03 +0000643 .ops = &clkops_null,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000644 .parent = &osc_ck,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000645 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
Russell King897dcde2008-11-04 16:35:03 +0000646 RATE_PROPAGATES,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +0300647 .clkdm_name = "wkup_clkdm",
Tony Lindgren046d6b22005-11-10 14:26:52 +0000648 .recalc = &omap2_sys_clk_recalc,
649};
Paul Walmsleye32744b2008-03-18 15:47:55 +0200650
Tony Lindgren046d6b22005-11-10 14:26:52 +0000651static struct clk alt_ck = { /* Typical 54M or 48M, may not exist */
652 .name = "alt_ck",
Russell King897dcde2008-11-04 16:35:03 +0000653 .ops = &clkops_null,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000654 .rate = 54000000,
655 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
Russell King897dcde2008-11-04 16:35:03 +0000656 RATE_FIXED | RATE_PROPAGATES,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +0300657 .clkdm_name = "wkup_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +0200658 .recalc = &propagate_rate,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000659};
Paul Walmsleye32744b2008-03-18 15:47:55 +0200660
Tony Lindgren046d6b22005-11-10 14:26:52 +0000661/*
662 * Analog domain root source clocks
663 */
664
665/* dpll_ck, is broken out in to special cases through clksel */
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200666/* REVISIT: Rate changes on dpll_ck trigger a full set change. ...
667 * deal with this
668 */
669
Paul Walmsley88b8ba92008-07-03 12:24:46 +0300670static struct dpll_data dpll_dd = {
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200671 .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
672 .mult_mask = OMAP24XX_DPLL_MULT_MASK,
673 .div1_mask = OMAP24XX_DPLL_DIV_MASK,
Paul Walmsley88b8ba92008-07-03 12:24:46 +0300674 .max_multiplier = 1024,
675 .max_divider = 16,
676 .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200677};
678
Paul Walmsley88b8ba92008-07-03 12:24:46 +0300679/*
680 * XXX Cannot add round_rate here yet, as this is still a composite clock,
681 * not just a DPLL
682 */
Tony Lindgren046d6b22005-11-10 14:26:52 +0000683static struct clk dpll_ck = {
684 .name = "dpll_ck",
Russell King897dcde2008-11-04 16:35:03 +0000685 .ops = &clkops_null,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000686 .parent = &sys_ck, /* Can be func_32k also */
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200687 .dpll_data = &dpll_dd,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000688 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
Russell King897dcde2008-11-04 16:35:03 +0000689 RATE_PROPAGATES,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +0300690 .clkdm_name = "wkup_clkdm",
Paul Walmsley88b8ba92008-07-03 12:24:46 +0300691 .recalc = &omap2_dpllcore_recalc,
692 .set_rate = &omap2_reprogram_dpllcore,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000693};
694
695static struct clk apll96_ck = {
696 .name = "apll96_ck",
Russell King548d8492008-11-04 14:02:46 +0000697 .ops = &clkops_fixed,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000698 .parent = &sys_ck,
699 .rate = 96000000,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200700 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
701 RATE_FIXED | RATE_PROPAGATES | ENABLE_ON_INIT,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +0300702 .clkdm_name = "wkup_clkdm",
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200703 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
704 .enable_bit = OMAP24XX_EN_96M_PLL_SHIFT,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200705 .recalc = &propagate_rate,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000706};
707
708static struct clk apll54_ck = {
709 .name = "apll54_ck",
Russell King548d8492008-11-04 14:02:46 +0000710 .ops = &clkops_fixed,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000711 .parent = &sys_ck,
712 .rate = 54000000,
713 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200714 RATE_FIXED | RATE_PROPAGATES | ENABLE_ON_INIT,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +0300715 .clkdm_name = "wkup_clkdm",
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200716 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
717 .enable_bit = OMAP24XX_EN_54M_PLL_SHIFT,
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200718 .recalc = &propagate_rate,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000719};
720
721/*
722 * PRCM digital base sources
723 */
Paul Walmsleye32744b2008-03-18 15:47:55 +0200724
725/* func_54m_ck */
726
727static const struct clksel_rate func_54m_apll54_rates[] = {
728 { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE },
729 { .div = 0 },
730};
731
732static const struct clksel_rate func_54m_alt_rates[] = {
733 { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE },
734 { .div = 0 },
735};
736
737static const struct clksel func_54m_clksel[] = {
738 { .parent = &apll54_ck, .rates = func_54m_apll54_rates, },
739 { .parent = &alt_ck, .rates = func_54m_alt_rates, },
740 { .parent = NULL },
741};
742
Tony Lindgren046d6b22005-11-10 14:26:52 +0000743static struct clk func_54m_ck = {
744 .name = "func_54m_ck",
745 .parent = &apll54_ck, /* can also be alt_clk */
Tony Lindgren046d6b22005-11-10 14:26:52 +0000746 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
Paul Walmsleye32744b2008-03-18 15:47:55 +0200747 RATE_PROPAGATES | PARENT_CONTROLS_CLOCK,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +0300748 .clkdm_name = "wkup_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +0200749 .init = &omap2_init_clksel_parent,
750 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
751 .clksel_mask = OMAP24XX_54M_SOURCE,
752 .clksel = func_54m_clksel,
753 .recalc = &omap2_clksel_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000754};
Paul Walmsleye32744b2008-03-18 15:47:55 +0200755
Tony Lindgren046d6b22005-11-10 14:26:52 +0000756static struct clk core_ck = {
757 .name = "core_ck",
Russell King897dcde2008-11-04 16:35:03 +0000758 .ops = &clkops_null,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000759 .parent = &dpll_ck, /* can also be 32k */
760 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
Russell King897dcde2008-11-04 16:35:03 +0000761 RATE_PROPAGATES,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +0300762 .clkdm_name = "wkup_clkdm",
Paul Walmsley6b8858a2008-03-18 10:35:15 +0200763 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000764};
Paul Walmsleye32744b2008-03-18 15:47:55 +0200765
766/* func_96m_ck */
767static const struct clksel_rate func_96m_apll96_rates[] = {
768 { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE },
769 { .div = 0 },
Tony Lindgren046d6b22005-11-10 14:26:52 +0000770};
771
Paul Walmsleye32744b2008-03-18 15:47:55 +0200772static const struct clksel_rate func_96m_alt_rates[] = {
773 { .div = 1, .val = 1, .flags = RATE_IN_243X | DEFAULT_RATE },
774 { .div = 0 },
775};
776
777static const struct clksel func_96m_clksel[] = {
778 { .parent = &apll96_ck, .rates = func_96m_apll96_rates },
779 { .parent = &alt_ck, .rates = func_96m_alt_rates },
780 { .parent = NULL }
781};
782
783/* The parent of this clock is not selectable on 2420. */
Tony Lindgren046d6b22005-11-10 14:26:52 +0000784static struct clk func_96m_ck = {
785 .name = "func_96m_ck",
786 .parent = &apll96_ck,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000787 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
Paul Walmsleye32744b2008-03-18 15:47:55 +0200788 RATE_PROPAGATES | PARENT_CONTROLS_CLOCK,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +0300789 .clkdm_name = "wkup_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +0200790 .init = &omap2_init_clksel_parent,
791 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
792 .clksel_mask = OMAP2430_96M_SOURCE,
793 .clksel = func_96m_clksel,
794 .recalc = &omap2_clksel_recalc,
795 .round_rate = &omap2_clksel_round_rate,
796 .set_rate = &omap2_clksel_set_rate
797};
798
799/* func_48m_ck */
800
801static const struct clksel_rate func_48m_apll96_rates[] = {
802 { .div = 2, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE },
803 { .div = 0 },
804};
805
806static const struct clksel_rate func_48m_alt_rates[] = {
807 { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE },
808 { .div = 0 },
809};
810
811static const struct clksel func_48m_clksel[] = {
812 { .parent = &apll96_ck, .rates = func_48m_apll96_rates },
813 { .parent = &alt_ck, .rates = func_48m_alt_rates },
814 { .parent = NULL }
Tony Lindgren046d6b22005-11-10 14:26:52 +0000815};
816
817static struct clk func_48m_ck = {
818 .name = "func_48m_ck",
819 .parent = &apll96_ck, /* 96M or Alt */
Tony Lindgren046d6b22005-11-10 14:26:52 +0000820 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
Paul Walmsleye32744b2008-03-18 15:47:55 +0200821 RATE_PROPAGATES | PARENT_CONTROLS_CLOCK,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +0300822 .clkdm_name = "wkup_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +0200823 .init = &omap2_init_clksel_parent,
824 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
825 .clksel_mask = OMAP24XX_48M_SOURCE,
826 .clksel = func_48m_clksel,
827 .recalc = &omap2_clksel_recalc,
828 .round_rate = &omap2_clksel_round_rate,
829 .set_rate = &omap2_clksel_set_rate
Tony Lindgren046d6b22005-11-10 14:26:52 +0000830};
831
832static struct clk func_12m_ck = {
833 .name = "func_12m_ck",
834 .parent = &func_48m_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +0200835 .fixed_div = 4,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000836 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
Paul Walmsleye32744b2008-03-18 15:47:55 +0200837 RATE_PROPAGATES | PARENT_CONTROLS_CLOCK,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +0300838 .clkdm_name = "wkup_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +0200839 .recalc = &omap2_fixed_divisor_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000840};
841
842/* Secure timer, only available in secure mode */
843static struct clk wdt1_osc_ck = {
844 .name = "ck_wdt1_osc",
Russell King897dcde2008-11-04 16:35:03 +0000845 .ops = &clkops_null, /* RMK: missing? */
Tony Lindgren046d6b22005-11-10 14:26:52 +0000846 .parent = &osc_ck,
847 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleye32744b2008-03-18 15:47:55 +0200848 .recalc = &followparent_recalc,
849};
850
851/*
852 * The common_clkout* clksel_rate structs are common to
853 * sys_clkout, sys_clkout_src, sys_clkout2, and sys_clkout2_src.
854 * sys_clkout2_* are 2420-only, so the
855 * clksel_rate flags fields are inaccurate for those clocks. This is
856 * harmless since access to those clocks are gated by the struct clk
857 * flags fields, which mark them as 2420-only.
858 */
859static const struct clksel_rate common_clkout_src_core_rates[] = {
860 { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE },
861 { .div = 0 }
862};
863
864static const struct clksel_rate common_clkout_src_sys_rates[] = {
865 { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE },
866 { .div = 0 }
867};
868
869static const struct clksel_rate common_clkout_src_96m_rates[] = {
870 { .div = 1, .val = 2, .flags = RATE_IN_24XX | DEFAULT_RATE },
871 { .div = 0 }
872};
873
874static const struct clksel_rate common_clkout_src_54m_rates[] = {
875 { .div = 1, .val = 3, .flags = RATE_IN_24XX | DEFAULT_RATE },
876 { .div = 0 }
877};
878
879static const struct clksel common_clkout_src_clksel[] = {
880 { .parent = &core_ck, .rates = common_clkout_src_core_rates },
881 { .parent = &sys_ck, .rates = common_clkout_src_sys_rates },
882 { .parent = &func_96m_ck, .rates = common_clkout_src_96m_rates },
883 { .parent = &func_54m_ck, .rates = common_clkout_src_54m_rates },
884 { .parent = NULL }
885};
886
887static struct clk sys_clkout_src = {
888 .name = "sys_clkout_src",
889 .parent = &func_54m_ck,
890 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
891 RATE_PROPAGATES,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +0300892 .clkdm_name = "wkup_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +0200893 .enable_reg = OMAP24XX_PRCM_CLKOUT_CTRL,
894 .enable_bit = OMAP24XX_CLKOUT_EN_SHIFT,
895 .init = &omap2_init_clksel_parent,
896 .clksel_reg = OMAP24XX_PRCM_CLKOUT_CTRL,
897 .clksel_mask = OMAP24XX_CLKOUT_SOURCE_MASK,
898 .clksel = common_clkout_src_clksel,
899 .recalc = &omap2_clksel_recalc,
900 .round_rate = &omap2_clksel_round_rate,
901 .set_rate = &omap2_clksel_set_rate
902};
903
904static const struct clksel_rate common_clkout_rates[] = {
905 { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE },
906 { .div = 2, .val = 1, .flags = RATE_IN_24XX },
907 { .div = 4, .val = 2, .flags = RATE_IN_24XX },
908 { .div = 8, .val = 3, .flags = RATE_IN_24XX },
909 { .div = 16, .val = 4, .flags = RATE_IN_24XX },
910 { .div = 0 },
911};
912
913static const struct clksel sys_clkout_clksel[] = {
914 { .parent = &sys_clkout_src, .rates = common_clkout_rates },
915 { .parent = NULL }
Tony Lindgren046d6b22005-11-10 14:26:52 +0000916};
917
918static struct clk sys_clkout = {
919 .name = "sys_clkout",
Paul Walmsleye32744b2008-03-18 15:47:55 +0200920 .parent = &sys_clkout_src,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000921 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
Paul Walmsleye32744b2008-03-18 15:47:55 +0200922 PARENT_CONTROLS_CLOCK,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +0300923 .clkdm_name = "wkup_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +0200924 .clksel_reg = OMAP24XX_PRCM_CLKOUT_CTRL,
925 .clksel_mask = OMAP24XX_CLKOUT_DIV_MASK,
926 .clksel = sys_clkout_clksel,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000927 .recalc = &omap2_clksel_recalc,
Paul Walmsleye32744b2008-03-18 15:47:55 +0200928 .round_rate = &omap2_clksel_round_rate,
929 .set_rate = &omap2_clksel_set_rate
930};
931
932/* In 2430, new in 2420 ES2 */
933static struct clk sys_clkout2_src = {
934 .name = "sys_clkout2_src",
935 .parent = &func_54m_ck,
936 .flags = CLOCK_IN_OMAP242X | RATE_PROPAGATES,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +0300937 .clkdm_name = "wkup_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +0200938 .enable_reg = OMAP24XX_PRCM_CLKOUT_CTRL,
939 .enable_bit = OMAP2420_CLKOUT2_EN_SHIFT,
940 .init = &omap2_init_clksel_parent,
941 .clksel_reg = OMAP24XX_PRCM_CLKOUT_CTRL,
942 .clksel_mask = OMAP2420_CLKOUT2_SOURCE_MASK,
943 .clksel = common_clkout_src_clksel,
944 .recalc = &omap2_clksel_recalc,
945 .round_rate = &omap2_clksel_round_rate,
946 .set_rate = &omap2_clksel_set_rate
947};
948
949static const struct clksel sys_clkout2_clksel[] = {
950 { .parent = &sys_clkout2_src, .rates = common_clkout_rates },
951 { .parent = NULL }
Tony Lindgren046d6b22005-11-10 14:26:52 +0000952};
953
954/* In 2430, new in 2420 ES2 */
955static struct clk sys_clkout2 = {
956 .name = "sys_clkout2",
Paul Walmsleye32744b2008-03-18 15:47:55 +0200957 .parent = &sys_clkout2_src,
958 .flags = CLOCK_IN_OMAP242X | PARENT_CONTROLS_CLOCK,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +0300959 .clkdm_name = "wkup_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +0200960 .clksel_reg = OMAP24XX_PRCM_CLKOUT_CTRL,
961 .clksel_mask = OMAP2420_CLKOUT2_DIV_MASK,
962 .clksel = sys_clkout2_clksel,
Tony Lindgren046d6b22005-11-10 14:26:52 +0000963 .recalc = &omap2_clksel_recalc,
Paul Walmsleye32744b2008-03-18 15:47:55 +0200964 .round_rate = &omap2_clksel_round_rate,
965 .set_rate = &omap2_clksel_set_rate
Tony Lindgren046d6b22005-11-10 14:26:52 +0000966};
967
Tony Lindgrenb824efa2006-04-02 17:46:20 +0100968static struct clk emul_ck = {
969 .name = "emul_ck",
970 .parent = &func_54m_ck,
971 .flags = CLOCK_IN_OMAP242X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +0300972 .clkdm_name = "wkup_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +0200973 .enable_reg = OMAP24XX_PRCM_CLKEMUL_CTRL,
974 .enable_bit = OMAP24XX_EMULATION_EN_SHIFT,
975 .recalc = &followparent_recalc,
Tony Lindgrenb824efa2006-04-02 17:46:20 +0100976
977};
Paul Walmsleye32744b2008-03-18 15:47:55 +0200978
Tony Lindgren046d6b22005-11-10 14:26:52 +0000979/*
980 * MPU clock domain
981 * Clocks:
982 * MPU_FCLK, MPU_ICLK
983 * INT_M_FCLK, INT_M_I_CLK
984 *
985 * - Individual clocks are hardware managed.
986 * - Base divider comes from: CM_CLKSEL_MPU
987 *
988 */
Paul Walmsleye32744b2008-03-18 15:47:55 +0200989static const struct clksel_rate mpu_core_rates[] = {
990 { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE },
991 { .div = 2, .val = 2, .flags = RATE_IN_24XX },
992 { .div = 4, .val = 4, .flags = RATE_IN_242X },
993 { .div = 6, .val = 6, .flags = RATE_IN_242X },
994 { .div = 8, .val = 8, .flags = RATE_IN_242X },
995 { .div = 0 },
996};
997
998static const struct clksel mpu_clksel[] = {
999 { .parent = &core_ck, .rates = mpu_core_rates },
1000 { .parent = NULL }
1001};
1002
Tony Lindgren046d6b22005-11-10 14:26:52 +00001003static struct clk mpu_ck = { /* Control cpu */
1004 .name = "mpu_ck",
Russell King897dcde2008-11-04 16:35:03 +00001005 .ops = &clkops_null,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001006 .parent = &core_ck,
Paul Walmsley6b8858a2008-03-18 10:35:15 +02001007 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
Russell King897dcde2008-11-04 16:35:03 +00001008 DELAYED_APP |
Tony Lindgren046d6b22005-11-10 14:26:52 +00001009 CONFIG_PARTICIPANT | RATE_PROPAGATES,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001010 .clkdm_name = "mpu_clkdm",
Paul Walmsley6b8858a2008-03-18 10:35:15 +02001011 .init = &omap2_init_clksel_parent,
1012 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, CM_CLKSEL),
1013 .clksel_mask = OMAP24XX_CLKSEL_MPU_MASK,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001014 .clksel = mpu_clksel,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001015 .recalc = &omap2_clksel_recalc,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001016 .round_rate = &omap2_clksel_round_rate,
Paul Walmsley6b8858a2008-03-18 10:35:15 +02001017 .set_rate = &omap2_clksel_set_rate
Tony Lindgren046d6b22005-11-10 14:26:52 +00001018};
Paul Walmsleye32744b2008-03-18 15:47:55 +02001019
Tony Lindgren046d6b22005-11-10 14:26:52 +00001020/*
1021 * DSP (2430-IVA2.1) (2420-UMA+IVA1) clock domain
1022 * Clocks:
Paul Walmsleye32744b2008-03-18 15:47:55 +02001023 * 2430: IVA2.1_FCLK (really just DSP_FCLK), IVA2.1_ICLK
Tony Lindgren046d6b22005-11-10 14:26:52 +00001024 * 2420: UMA_FCLK, UMA_ICLK, IVA_MPU, IVA_COP
Paul Walmsleye32744b2008-03-18 15:47:55 +02001025 *
Tony Lindgren046d6b22005-11-10 14:26:52 +00001026 * Won't be too specific here. The core clock comes into this block
1027 * it is divided then tee'ed. One branch goes directly to xyz enable
1028 * controls. The other branch gets further divided by 2 then possibly
1029 * routed into a synchronizer and out of clocks abc.
1030 */
Paul Walmsleye32744b2008-03-18 15:47:55 +02001031static const struct clksel_rate dsp_fck_core_rates[] = {
1032 { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE },
1033 { .div = 2, .val = 2, .flags = RATE_IN_24XX },
1034 { .div = 3, .val = 3, .flags = RATE_IN_24XX },
1035 { .div = 4, .val = 4, .flags = RATE_IN_24XX },
1036 { .div = 6, .val = 6, .flags = RATE_IN_242X },
1037 { .div = 8, .val = 8, .flags = RATE_IN_242X },
1038 { .div = 12, .val = 12, .flags = RATE_IN_242X },
1039 { .div = 0 },
1040};
1041
1042static const struct clksel dsp_fck_clksel[] = {
1043 { .parent = &core_ck, .rates = dsp_fck_core_rates },
1044 { .parent = NULL }
1045};
1046
Tony Lindgren046d6b22005-11-10 14:26:52 +00001047static struct clk dsp_fck = {
1048 .name = "dsp_fck",
1049 .parent = &core_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001050 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | DELAYED_APP |
1051 CONFIG_PARTICIPANT | RATE_PROPAGATES,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001052 .clkdm_name = "dsp_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001053 .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
1054 .enable_bit = OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT,
1055 .clksel_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL),
1056 .clksel_mask = OMAP24XX_CLKSEL_DSP_MASK,
1057 .clksel = dsp_fck_clksel,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001058 .recalc = &omap2_clksel_recalc,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001059 .round_rate = &omap2_clksel_round_rate,
1060 .set_rate = &omap2_clksel_set_rate
Tony Lindgren046d6b22005-11-10 14:26:52 +00001061};
1062
Paul Walmsleye32744b2008-03-18 15:47:55 +02001063/* DSP interface clock */
1064static const struct clksel_rate dsp_irate_ick_rates[] = {
1065 { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE },
1066 { .div = 2, .val = 2, .flags = RATE_IN_24XX },
1067 { .div = 3, .val = 3, .flags = RATE_IN_243X },
1068 { .div = 0 },
1069};
1070
1071static const struct clksel dsp_irate_ick_clksel[] = {
1072 { .parent = &dsp_fck, .rates = dsp_irate_ick_rates },
1073 { .parent = NULL }
1074};
1075
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001076/* This clock does not exist as such in the TRM. */
Paul Walmsleye32744b2008-03-18 15:47:55 +02001077static struct clk dsp_irate_ick = {
1078 .name = "dsp_irate_ick",
1079 .parent = &dsp_fck,
1080 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | DELAYED_APP |
1081 CONFIG_PARTICIPANT | PARENT_CONTROLS_CLOCK,
1082 .clksel_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL),
1083 .clksel_mask = OMAP24XX_CLKSEL_DSP_IF_MASK,
1084 .clksel = dsp_irate_ick_clksel,
1085 .recalc = &omap2_clksel_recalc,
1086 .round_rate = &omap2_clksel_round_rate,
1087 .set_rate = &omap2_clksel_set_rate
1088};
1089
1090/* 2420 only */
Tony Lindgren046d6b22005-11-10 14:26:52 +00001091static struct clk dsp_ick = {
1092 .name = "dsp_ick", /* apparently ipi and isp */
Paul Walmsleye32744b2008-03-18 15:47:55 +02001093 .parent = &dsp_irate_ick,
1094 .flags = CLOCK_IN_OMAP242X | DELAYED_APP | CONFIG_PARTICIPANT,
1095 .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_ICLKEN),
1096 .enable_bit = OMAP2420_EN_DSP_IPI_SHIFT, /* for ipi */
1097};
1098
1099/* 2430 only - EN_DSP controls both dsp fclk and iclk on 2430 */
1100static struct clk iva2_1_ick = {
1101 .name = "iva2_1_ick",
1102 .parent = &dsp_irate_ick,
1103 .flags = CLOCK_IN_OMAP243X | DELAYED_APP | CONFIG_PARTICIPANT,
1104 .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
1105 .enable_bit = OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001106};
1107
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001108/*
1109 * The IVA1 is an ARM7 core on the 2420 that has nothing to do with
1110 * the C54x, but which is contained in the DSP powerdomain. Does not
1111 * exist on later OMAPs.
1112 */
Tony Lindgren046d6b22005-11-10 14:26:52 +00001113static struct clk iva1_ifck = {
1114 .name = "iva1_ifck",
1115 .parent = &core_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001116 .flags = CLOCK_IN_OMAP242X | CONFIG_PARTICIPANT |
1117 RATE_PROPAGATES | DELAYED_APP,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001118 .clkdm_name = "iva1_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001119 .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
1120 .enable_bit = OMAP2420_EN_IVA_COP_SHIFT,
1121 .clksel_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL),
1122 .clksel_mask = OMAP2420_CLKSEL_IVA_MASK,
1123 .clksel = dsp_fck_clksel,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001124 .recalc = &omap2_clksel_recalc,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001125 .round_rate = &omap2_clksel_round_rate,
1126 .set_rate = &omap2_clksel_set_rate
Tony Lindgren046d6b22005-11-10 14:26:52 +00001127};
1128
1129/* IVA1 mpu/int/i/f clocks are /2 of parent */
1130static struct clk iva1_mpu_int_ifck = {
1131 .name = "iva1_mpu_int_ifck",
1132 .parent = &iva1_ifck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001133 .flags = CLOCK_IN_OMAP242X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001134 .clkdm_name = "iva1_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001135 .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
1136 .enable_bit = OMAP2420_EN_IVA_MPU_SHIFT,
1137 .fixed_div = 2,
1138 .recalc = &omap2_fixed_divisor_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001139};
1140
1141/*
1142 * L3 clock domain
1143 * L3 clocks are used for both interface and functional clocks to
1144 * multiple entities. Some of these clocks are completely managed
1145 * by hardware, and some others allow software control. Hardware
1146 * managed ones general are based on directly CLK_REQ signals and
1147 * various auto idle settings. The functional spec sets many of these
1148 * as 'tie-high' for their enables.
1149 *
1150 * I-CLOCKS:
1151 * L3-Interconnect, SMS, GPMC, SDRC, OCM_RAM, OCM_ROM, SDMA
1152 * CAM, HS-USB.
1153 * F-CLOCK
1154 * SSI.
1155 *
1156 * GPMC memories and SDRC have timing and clock sensitive registers which
1157 * may very well need notification when the clock changes. Currently for low
1158 * operating points, these are taken care of in sleep.S.
1159 */
Paul Walmsleye32744b2008-03-18 15:47:55 +02001160static const struct clksel_rate core_l3_core_rates[] = {
1161 { .div = 1, .val = 1, .flags = RATE_IN_24XX },
1162 { .div = 2, .val = 2, .flags = RATE_IN_242X },
1163 { .div = 4, .val = 4, .flags = RATE_IN_24XX | DEFAULT_RATE },
1164 { .div = 6, .val = 6, .flags = RATE_IN_24XX },
1165 { .div = 8, .val = 8, .flags = RATE_IN_242X },
1166 { .div = 12, .val = 12, .flags = RATE_IN_242X },
1167 { .div = 16, .val = 16, .flags = RATE_IN_242X },
1168 { .div = 0 }
1169};
1170
1171static const struct clksel core_l3_clksel[] = {
1172 { .parent = &core_ck, .rates = core_l3_core_rates },
1173 { .parent = NULL }
1174};
1175
Tony Lindgren046d6b22005-11-10 14:26:52 +00001176static struct clk core_l3_ck = { /* Used for ick and fck, interconnect */
1177 .name = "core_l3_ck",
Russell King897dcde2008-11-04 16:35:03 +00001178 .ops = &clkops_null,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001179 .parent = &core_ck,
1180 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
Russell King897dcde2008-11-04 16:35:03 +00001181 DELAYED_APP |
Paul Walmsleye32744b2008-03-18 15:47:55 +02001182 CONFIG_PARTICIPANT | RATE_PROPAGATES,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001183 .clkdm_name = "core_l3_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001184 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
1185 .clksel_mask = OMAP24XX_CLKSEL_L3_MASK,
1186 .clksel = core_l3_clksel,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001187 .recalc = &omap2_clksel_recalc,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001188 .round_rate = &omap2_clksel_round_rate,
1189 .set_rate = &omap2_clksel_set_rate
1190};
1191
1192/* usb_l4_ick */
1193static const struct clksel_rate usb_l4_ick_core_l3_rates[] = {
1194 { .div = 1, .val = 1, .flags = RATE_IN_24XX },
1195 { .div = 2, .val = 2, .flags = RATE_IN_24XX | DEFAULT_RATE },
1196 { .div = 4, .val = 4, .flags = RATE_IN_24XX },
1197 { .div = 0 }
1198};
1199
1200static const struct clksel usb_l4_ick_clksel[] = {
1201 { .parent = &core_l3_ck, .rates = usb_l4_ick_core_l3_rates },
1202 { .parent = NULL },
Tony Lindgren046d6b22005-11-10 14:26:52 +00001203};
1204
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001205/* It is unclear from TRM whether usb_l4_ick is really in L3 or L4 clkdm */
Tony Lindgren046d6b22005-11-10 14:26:52 +00001206static struct clk usb_l4_ick = { /* FS-USB interface clock */
1207 .name = "usb_l4_ick",
Tony Lindgrenfde0fd42006-01-17 15:31:18 -08001208 .parent = &core_l3_ck,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001209 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
Paul Walmsleye32744b2008-03-18 15:47:55 +02001210 DELAYED_APP | CONFIG_PARTICIPANT,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001211 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001212 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
1213 .enable_bit = OMAP24XX_EN_USB_SHIFT,
1214 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
1215 .clksel_mask = OMAP24XX_CLKSEL_USB_MASK,
1216 .clksel = usb_l4_ick_clksel,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001217 .recalc = &omap2_clksel_recalc,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001218 .round_rate = &omap2_clksel_round_rate,
1219 .set_rate = &omap2_clksel_set_rate
Tony Lindgren046d6b22005-11-10 14:26:52 +00001220};
1221
1222/*
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001223 * L4 clock management domain
1224 *
1225 * This domain contains lots of interface clocks from the L4 interface, some
1226 * functional clocks. Fixed APLL functional source clocks are managed in
1227 * this domain.
1228 */
1229static const struct clksel_rate l4_core_l3_rates[] = {
1230 { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE },
1231 { .div = 2, .val = 2, .flags = RATE_IN_24XX },
1232 { .div = 0 }
1233};
1234
1235static const struct clksel l4_clksel[] = {
1236 { .parent = &core_l3_ck, .rates = l4_core_l3_rates },
1237 { .parent = NULL }
1238};
1239
1240static struct clk l4_ck = { /* used both as an ick and fck */
1241 .name = "l4_ck",
Russell King897dcde2008-11-04 16:35:03 +00001242 .ops = &clkops_null,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001243 .parent = &core_l3_ck,
1244 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
Russell King897dcde2008-11-04 16:35:03 +00001245 DELAYED_APP | RATE_PROPAGATES,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001246 .clkdm_name = "core_l4_clkdm",
1247 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
1248 .clksel_mask = OMAP24XX_CLKSEL_L4_MASK,
1249 .clksel = l4_clksel,
1250 .recalc = &omap2_clksel_recalc,
1251 .round_rate = &omap2_clksel_round_rate,
1252 .set_rate = &omap2_clksel_set_rate
1253};
1254
1255/*
Tony Lindgren046d6b22005-11-10 14:26:52 +00001256 * SSI is in L3 management domain, its direct parent is core not l3,
1257 * many core power domain entities are grouped into the L3 clock
1258 * domain.
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001259 * SSI_SSR_FCLK, SSI_SST_FCLK, SSI_L4_ICLK
Tony Lindgren046d6b22005-11-10 14:26:52 +00001260 *
1261 * ssr = core/1/2/3/4/5, sst = 1/2 ssr.
1262 */
Paul Walmsleye32744b2008-03-18 15:47:55 +02001263static const struct clksel_rate ssi_ssr_sst_fck_core_rates[] = {
1264 { .div = 1, .val = 1, .flags = RATE_IN_24XX },
1265 { .div = 2, .val = 2, .flags = RATE_IN_24XX | DEFAULT_RATE },
1266 { .div = 3, .val = 3, .flags = RATE_IN_24XX },
1267 { .div = 4, .val = 4, .flags = RATE_IN_24XX },
1268 { .div = 5, .val = 5, .flags = RATE_IN_243X },
1269 { .div = 6, .val = 6, .flags = RATE_IN_242X },
1270 { .div = 8, .val = 8, .flags = RATE_IN_242X },
1271 { .div = 0 }
1272};
1273
1274static const struct clksel ssi_ssr_sst_fck_clksel[] = {
1275 { .parent = &core_ck, .rates = ssi_ssr_sst_fck_core_rates },
1276 { .parent = NULL }
1277};
1278
Tony Lindgren046d6b22005-11-10 14:26:52 +00001279static struct clk ssi_ssr_sst_fck = {
1280 .name = "ssi_fck",
1281 .parent = &core_ck,
1282 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
Paul Walmsleye32744b2008-03-18 15:47:55 +02001283 DELAYED_APP,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001284 .clkdm_name = "core_l3_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001285 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
1286 .enable_bit = OMAP24XX_EN_SSI_SHIFT,
1287 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
1288 .clksel_mask = OMAP24XX_CLKSEL_SSI_MASK,
1289 .clksel = ssi_ssr_sst_fck_clksel,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001290 .recalc = &omap2_clksel_recalc,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001291 .round_rate = &omap2_clksel_round_rate,
1292 .set_rate = &omap2_clksel_set_rate
Tony Lindgren046d6b22005-11-10 14:26:52 +00001293};
1294
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001295
Tony Lindgren046d6b22005-11-10 14:26:52 +00001296/*
1297 * GFX clock domain
1298 * Clocks:
1299 * GFX_FCLK, GFX_ICLK
1300 * GFX_CG1(2d), GFX_CG2(3d)
1301 *
1302 * GFX_FCLK runs from L3, and is divided by (1,2,3,4)
1303 * The 2d and 3d clocks run at a hardware determined
1304 * divided value of fclk.
1305 *
1306 */
Paul Walmsleye32744b2008-03-18 15:47:55 +02001307/* XXX REVISIT: GFX clock is part of CONFIG_PARTICIPANT, no? doublecheck. */
1308
1309/* This clksel struct is shared between gfx_3d_fck and gfx_2d_fck */
1310static const struct clksel gfx_fck_clksel[] = {
1311 { .parent = &core_l3_ck, .rates = gfx_l3_rates },
1312 { .parent = NULL },
1313};
1314
Tony Lindgren046d6b22005-11-10 14:26:52 +00001315static struct clk gfx_3d_fck = {
1316 .name = "gfx_3d_fck",
1317 .parent = &core_l3_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001318 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001319 .clkdm_name = "gfx_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001320 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
1321 .enable_bit = OMAP24XX_EN_3D_SHIFT,
1322 .clksel_reg = OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL),
1323 .clksel_mask = OMAP_CLKSEL_GFX_MASK,
1324 .clksel = gfx_fck_clksel,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001325 .recalc = &omap2_clksel_recalc,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001326 .round_rate = &omap2_clksel_round_rate,
1327 .set_rate = &omap2_clksel_set_rate
Tony Lindgren046d6b22005-11-10 14:26:52 +00001328};
1329
1330static struct clk gfx_2d_fck = {
1331 .name = "gfx_2d_fck",
1332 .parent = &core_l3_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001333 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001334 .clkdm_name = "gfx_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001335 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
1336 .enable_bit = OMAP24XX_EN_2D_SHIFT,
1337 .clksel_reg = OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL),
1338 .clksel_mask = OMAP_CLKSEL_GFX_MASK,
1339 .clksel = gfx_fck_clksel,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001340 .recalc = &omap2_clksel_recalc,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001341 .round_rate = &omap2_clksel_round_rate,
1342 .set_rate = &omap2_clksel_set_rate
Tony Lindgren046d6b22005-11-10 14:26:52 +00001343};
1344
1345static struct clk gfx_ick = {
1346 .name = "gfx_ick", /* From l3 */
1347 .parent = &core_l3_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001348 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001349 .clkdm_name = "gfx_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001350 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_ICLKEN),
1351 .enable_bit = OMAP_EN_GFX_SHIFT,
1352 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001353};
1354
1355/*
1356 * Modem clock domain (2430)
1357 * CLOCKS:
1358 * MDM_OSC_CLK
1359 * MDM_ICLK
Paul Walmsleye32744b2008-03-18 15:47:55 +02001360 * These clocks are usable in chassis mode only.
Tony Lindgren046d6b22005-11-10 14:26:52 +00001361 */
Paul Walmsleye32744b2008-03-18 15:47:55 +02001362static const struct clksel_rate mdm_ick_core_rates[] = {
1363 { .div = 1, .val = 1, .flags = RATE_IN_243X },
1364 { .div = 4, .val = 4, .flags = RATE_IN_243X | DEFAULT_RATE },
1365 { .div = 6, .val = 6, .flags = RATE_IN_243X },
1366 { .div = 9, .val = 9, .flags = RATE_IN_243X },
1367 { .div = 0 }
1368};
1369
1370static const struct clksel mdm_ick_clksel[] = {
1371 { .parent = &core_ck, .rates = mdm_ick_core_rates },
1372 { .parent = NULL }
1373};
1374
Tony Lindgren046d6b22005-11-10 14:26:52 +00001375static struct clk mdm_ick = { /* used both as a ick and fck */
1376 .name = "mdm_ick",
1377 .parent = &core_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001378 .flags = CLOCK_IN_OMAP243X | DELAYED_APP | CONFIG_PARTICIPANT,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001379 .clkdm_name = "mdm_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001380 .enable_reg = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_ICLKEN),
1381 .enable_bit = OMAP2430_CM_ICLKEN_MDM_EN_MDM_SHIFT,
1382 .clksel_reg = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_CLKSEL),
1383 .clksel_mask = OMAP2430_CLKSEL_MDM_MASK,
1384 .clksel = mdm_ick_clksel,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001385 .recalc = &omap2_clksel_recalc,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001386 .round_rate = &omap2_clksel_round_rate,
1387 .set_rate = &omap2_clksel_set_rate
Tony Lindgren046d6b22005-11-10 14:26:52 +00001388};
1389
1390static struct clk mdm_osc_ck = {
1391 .name = "mdm_osc_ck",
Tony Lindgren046d6b22005-11-10 14:26:52 +00001392 .parent = &osc_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001393 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001394 .clkdm_name = "mdm_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001395 .enable_reg = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_FCLKEN),
1396 .enable_bit = OMAP2430_EN_OSC_SHIFT,
1397 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001398};
1399
1400/*
Tony Lindgren046d6b22005-11-10 14:26:52 +00001401 * DSS clock domain
1402 * CLOCKs:
1403 * DSS_L4_ICLK, DSS_L3_ICLK,
1404 * DSS_CLK1, DSS_CLK2, DSS_54MHz_CLK
1405 *
1406 * DSS is both initiator and target.
1407 */
Paul Walmsleye32744b2008-03-18 15:47:55 +02001408/* XXX Add RATE_NOT_VALIDATED */
1409
1410static const struct clksel_rate dss1_fck_sys_rates[] = {
1411 { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE },
1412 { .div = 0 }
1413};
1414
1415static const struct clksel_rate dss1_fck_core_rates[] = {
1416 { .div = 1, .val = 1, .flags = RATE_IN_24XX },
1417 { .div = 2, .val = 2, .flags = RATE_IN_24XX },
1418 { .div = 3, .val = 3, .flags = RATE_IN_24XX },
1419 { .div = 4, .val = 4, .flags = RATE_IN_24XX },
1420 { .div = 5, .val = 5, .flags = RATE_IN_24XX },
1421 { .div = 6, .val = 6, .flags = RATE_IN_24XX },
1422 { .div = 8, .val = 8, .flags = RATE_IN_24XX },
1423 { .div = 9, .val = 9, .flags = RATE_IN_24XX },
1424 { .div = 12, .val = 12, .flags = RATE_IN_24XX },
1425 { .div = 16, .val = 16, .flags = RATE_IN_24XX | DEFAULT_RATE },
1426 { .div = 0 }
1427};
1428
1429static const struct clksel dss1_fck_clksel[] = {
1430 { .parent = &sys_ck, .rates = dss1_fck_sys_rates },
1431 { .parent = &core_ck, .rates = dss1_fck_core_rates },
1432 { .parent = NULL },
1433};
1434
Tony Lindgren046d6b22005-11-10 14:26:52 +00001435static struct clk dss_ick = { /* Enables both L3,L4 ICLK's */
1436 .name = "dss_ick",
1437 .parent = &l4_ck, /* really both l3 and l4 */
Paul Walmsleye32744b2008-03-18 15:47:55 +02001438 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001439 .clkdm_name = "dss_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001440 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1441 .enable_bit = OMAP24XX_EN_DSS1_SHIFT,
1442 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001443};
1444
1445static struct clk dss1_fck = {
1446 .name = "dss1_fck",
1447 .parent = &core_ck, /* Core or sys */
1448 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
Paul Walmsleye32744b2008-03-18 15:47:55 +02001449 DELAYED_APP,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001450 .clkdm_name = "dss_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001451 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1452 .enable_bit = OMAP24XX_EN_DSS1_SHIFT,
1453 .init = &omap2_init_clksel_parent,
1454 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
1455 .clksel_mask = OMAP24XX_CLKSEL_DSS1_MASK,
1456 .clksel = dss1_fck_clksel,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001457 .recalc = &omap2_clksel_recalc,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001458 .round_rate = &omap2_clksel_round_rate,
1459 .set_rate = &omap2_clksel_set_rate
1460};
1461
1462static const struct clksel_rate dss2_fck_sys_rates[] = {
1463 { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE },
1464 { .div = 0 }
1465};
1466
1467static const struct clksel_rate dss2_fck_48m_rates[] = {
1468 { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE },
1469 { .div = 0 }
1470};
1471
1472static const struct clksel dss2_fck_clksel[] = {
1473 { .parent = &sys_ck, .rates = dss2_fck_sys_rates },
1474 { .parent = &func_48m_ck, .rates = dss2_fck_48m_rates },
1475 { .parent = NULL }
Tony Lindgren046d6b22005-11-10 14:26:52 +00001476};
1477
1478static struct clk dss2_fck = { /* Alt clk used in power management */
1479 .name = "dss2_fck",
1480 .parent = &sys_ck, /* fixed at sys_ck or 48MHz */
1481 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
Richard Woodruff474844f2007-01-26 12:08:51 -08001482 DELAYED_APP,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001483 .clkdm_name = "dss_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001484 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1485 .enable_bit = OMAP24XX_EN_DSS2_SHIFT,
1486 .init = &omap2_init_clksel_parent,
1487 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
1488 .clksel_mask = OMAP24XX_CLKSEL_DSS2_MASK,
1489 .clksel = dss2_fck_clksel,
1490 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001491};
1492
1493static struct clk dss_54m_fck = { /* Alt clk used in power management */
1494 .name = "dss_54m_fck", /* 54m tv clk */
1495 .parent = &func_54m_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001496 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001497 .clkdm_name = "dss_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001498 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1499 .enable_bit = OMAP24XX_EN_TV_SHIFT,
1500 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001501};
1502
1503/*
1504 * CORE power domain ICLK & FCLK defines.
1505 * Many of the these can have more than one possible parent. Entries
1506 * here will likely have an L4 interface parent, and may have multiple
1507 * functional clock parents.
1508 */
Paul Walmsleye32744b2008-03-18 15:47:55 +02001509static const struct clksel_rate gpt_alt_rates[] = {
1510 { .div = 1, .val = 2, .flags = RATE_IN_24XX | DEFAULT_RATE },
1511 { .div = 0 }
1512};
1513
1514static const struct clksel omap24xx_gpt_clksel[] = {
1515 { .parent = &func_32k_ck, .rates = gpt_32k_rates },
1516 { .parent = &sys_ck, .rates = gpt_sys_rates },
1517 { .parent = &alt_ck, .rates = gpt_alt_rates },
1518 { .parent = NULL },
1519};
1520
Tony Lindgren046d6b22005-11-10 14:26:52 +00001521static struct clk gpt1_ick = {
1522 .name = "gpt1_ick",
1523 .parent = &l4_ck,
1524 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001525 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001526 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
1527 .enable_bit = OMAP24XX_EN_GPT1_SHIFT,
1528 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001529};
1530
1531static struct clk gpt1_fck = {
1532 .name = "gpt1_fck",
1533 .parent = &func_32k_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001534 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001535 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001536 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
1537 .enable_bit = OMAP24XX_EN_GPT1_SHIFT,
1538 .init = &omap2_init_clksel_parent,
1539 .clksel_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL1),
1540 .clksel_mask = OMAP24XX_CLKSEL_GPT1_MASK,
1541 .clksel = omap24xx_gpt_clksel,
1542 .recalc = &omap2_clksel_recalc,
1543 .round_rate = &omap2_clksel_round_rate,
1544 .set_rate = &omap2_clksel_set_rate
Tony Lindgren046d6b22005-11-10 14:26:52 +00001545};
1546
1547static struct clk gpt2_ick = {
1548 .name = "gpt2_ick",
1549 .parent = &l4_ck,
1550 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001551 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001552 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1553 .enable_bit = OMAP24XX_EN_GPT2_SHIFT,
1554 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001555};
1556
1557static struct clk gpt2_fck = {
1558 .name = "gpt2_fck",
1559 .parent = &func_32k_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001560 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001561 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001562 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1563 .enable_bit = OMAP24XX_EN_GPT2_SHIFT,
1564 .init = &omap2_init_clksel_parent,
1565 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1566 .clksel_mask = OMAP24XX_CLKSEL_GPT2_MASK,
1567 .clksel = omap24xx_gpt_clksel,
1568 .recalc = &omap2_clksel_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001569};
1570
1571static struct clk gpt3_ick = {
1572 .name = "gpt3_ick",
1573 .parent = &l4_ck,
1574 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001575 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001576 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1577 .enable_bit = OMAP24XX_EN_GPT3_SHIFT,
1578 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001579};
1580
1581static struct clk gpt3_fck = {
1582 .name = "gpt3_fck",
1583 .parent = &func_32k_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001584 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001585 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001586 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1587 .enable_bit = OMAP24XX_EN_GPT3_SHIFT,
1588 .init = &omap2_init_clksel_parent,
1589 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1590 .clksel_mask = OMAP24XX_CLKSEL_GPT3_MASK,
1591 .clksel = omap24xx_gpt_clksel,
1592 .recalc = &omap2_clksel_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001593};
1594
1595static struct clk gpt4_ick = {
1596 .name = "gpt4_ick",
1597 .parent = &l4_ck,
1598 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001599 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001600 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1601 .enable_bit = OMAP24XX_EN_GPT4_SHIFT,
1602 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001603};
1604
1605static struct clk gpt4_fck = {
1606 .name = "gpt4_fck",
1607 .parent = &func_32k_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001608 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001609 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001610 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1611 .enable_bit = OMAP24XX_EN_GPT4_SHIFT,
1612 .init = &omap2_init_clksel_parent,
1613 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1614 .clksel_mask = OMAP24XX_CLKSEL_GPT4_MASK,
1615 .clksel = omap24xx_gpt_clksel,
1616 .recalc = &omap2_clksel_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001617};
1618
1619static struct clk gpt5_ick = {
1620 .name = "gpt5_ick",
1621 .parent = &l4_ck,
1622 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001623 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001624 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1625 .enable_bit = OMAP24XX_EN_GPT5_SHIFT,
1626 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001627};
1628
1629static struct clk gpt5_fck = {
1630 .name = "gpt5_fck",
1631 .parent = &func_32k_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001632 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001633 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001634 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1635 .enable_bit = OMAP24XX_EN_GPT5_SHIFT,
1636 .init = &omap2_init_clksel_parent,
1637 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1638 .clksel_mask = OMAP24XX_CLKSEL_GPT5_MASK,
1639 .clksel = omap24xx_gpt_clksel,
1640 .recalc = &omap2_clksel_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001641};
1642
1643static struct clk gpt6_ick = {
1644 .name = "gpt6_ick",
1645 .parent = &l4_ck,
1646 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001647 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001648 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1649 .enable_bit = OMAP24XX_EN_GPT6_SHIFT,
1650 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001651};
1652
1653static struct clk gpt6_fck = {
1654 .name = "gpt6_fck",
1655 .parent = &func_32k_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001656 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001657 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001658 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1659 .enable_bit = OMAP24XX_EN_GPT6_SHIFT,
1660 .init = &omap2_init_clksel_parent,
1661 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1662 .clksel_mask = OMAP24XX_CLKSEL_GPT6_MASK,
1663 .clksel = omap24xx_gpt_clksel,
1664 .recalc = &omap2_clksel_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001665};
1666
1667static struct clk gpt7_ick = {
1668 .name = "gpt7_ick",
1669 .parent = &l4_ck,
1670 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001671 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1672 .enable_bit = OMAP24XX_EN_GPT7_SHIFT,
1673 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001674};
1675
1676static struct clk gpt7_fck = {
1677 .name = "gpt7_fck",
1678 .parent = &func_32k_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001679 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001680 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001681 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1682 .enable_bit = OMAP24XX_EN_GPT7_SHIFT,
1683 .init = &omap2_init_clksel_parent,
1684 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1685 .clksel_mask = OMAP24XX_CLKSEL_GPT7_MASK,
1686 .clksel = omap24xx_gpt_clksel,
1687 .recalc = &omap2_clksel_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001688};
1689
1690static struct clk gpt8_ick = {
1691 .name = "gpt8_ick",
1692 .parent = &l4_ck,
1693 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001694 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001695 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1696 .enable_bit = OMAP24XX_EN_GPT8_SHIFT,
1697 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001698};
1699
1700static struct clk gpt8_fck = {
1701 .name = "gpt8_fck",
1702 .parent = &func_32k_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001703 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001704 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001705 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1706 .enable_bit = OMAP24XX_EN_GPT8_SHIFT,
1707 .init = &omap2_init_clksel_parent,
1708 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1709 .clksel_mask = OMAP24XX_CLKSEL_GPT8_MASK,
1710 .clksel = omap24xx_gpt_clksel,
1711 .recalc = &omap2_clksel_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001712};
1713
1714static struct clk gpt9_ick = {
1715 .name = "gpt9_ick",
1716 .parent = &l4_ck,
1717 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001718 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001719 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1720 .enable_bit = OMAP24XX_EN_GPT9_SHIFT,
1721 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001722};
1723
1724static struct clk gpt9_fck = {
1725 .name = "gpt9_fck",
1726 .parent = &func_32k_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001727 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001728 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001729 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1730 .enable_bit = OMAP24XX_EN_GPT9_SHIFT,
1731 .init = &omap2_init_clksel_parent,
1732 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1733 .clksel_mask = OMAP24XX_CLKSEL_GPT9_MASK,
1734 .clksel = omap24xx_gpt_clksel,
1735 .recalc = &omap2_clksel_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001736};
1737
1738static struct clk gpt10_ick = {
1739 .name = "gpt10_ick",
1740 .parent = &l4_ck,
1741 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001742 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001743 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1744 .enable_bit = OMAP24XX_EN_GPT10_SHIFT,
1745 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001746};
1747
1748static struct clk gpt10_fck = {
1749 .name = "gpt10_fck",
1750 .parent = &func_32k_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001751 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001752 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001753 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1754 .enable_bit = OMAP24XX_EN_GPT10_SHIFT,
1755 .init = &omap2_init_clksel_parent,
1756 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1757 .clksel_mask = OMAP24XX_CLKSEL_GPT10_MASK,
1758 .clksel = omap24xx_gpt_clksel,
1759 .recalc = &omap2_clksel_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001760};
1761
1762static struct clk gpt11_ick = {
1763 .name = "gpt11_ick",
1764 .parent = &l4_ck,
1765 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001766 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001767 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1768 .enable_bit = OMAP24XX_EN_GPT11_SHIFT,
1769 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001770};
1771
1772static struct clk gpt11_fck = {
1773 .name = "gpt11_fck",
1774 .parent = &func_32k_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001775 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001776 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001777 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1778 .enable_bit = OMAP24XX_EN_GPT11_SHIFT,
1779 .init = &omap2_init_clksel_parent,
1780 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1781 .clksel_mask = OMAP24XX_CLKSEL_GPT11_MASK,
1782 .clksel = omap24xx_gpt_clksel,
1783 .recalc = &omap2_clksel_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001784};
1785
1786static struct clk gpt12_ick = {
1787 .name = "gpt12_ick",
1788 .parent = &l4_ck,
1789 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001790 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001791 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1792 .enable_bit = OMAP24XX_EN_GPT12_SHIFT,
1793 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001794};
1795
1796static struct clk gpt12_fck = {
1797 .name = "gpt12_fck",
1798 .parent = &func_32k_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001799 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001800 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001801 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1802 .enable_bit = OMAP24XX_EN_GPT12_SHIFT,
1803 .init = &omap2_init_clksel_parent,
1804 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1805 .clksel_mask = OMAP24XX_CLKSEL_GPT12_MASK,
1806 .clksel = omap24xx_gpt_clksel,
1807 .recalc = &omap2_clksel_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001808};
1809
1810static struct clk mcbsp1_ick = {
Eduardo Valentin44ec9a32008-07-03 12:24:40 +03001811 .name = "mcbsp_ick",
1812 .id = 1,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001813 .parent = &l4_ck,
1814 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001815 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001816 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1817 .enable_bit = OMAP24XX_EN_MCBSP1_SHIFT,
1818 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001819};
1820
1821static struct clk mcbsp1_fck = {
Eduardo Valentin44ec9a32008-07-03 12:24:40 +03001822 .name = "mcbsp_fck",
1823 .id = 1,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001824 .parent = &func_96m_ck,
1825 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001826 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001827 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1828 .enable_bit = OMAP24XX_EN_MCBSP1_SHIFT,
1829 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001830};
1831
1832static struct clk mcbsp2_ick = {
Eduardo Valentin44ec9a32008-07-03 12:24:40 +03001833 .name = "mcbsp_ick",
1834 .id = 2,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001835 .parent = &l4_ck,
1836 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001837 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001838 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1839 .enable_bit = OMAP24XX_EN_MCBSP2_SHIFT,
1840 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001841};
1842
1843static struct clk mcbsp2_fck = {
Eduardo Valentin44ec9a32008-07-03 12:24:40 +03001844 .name = "mcbsp_fck",
1845 .id = 2,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001846 .parent = &func_96m_ck,
1847 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001848 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001849 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1850 .enable_bit = OMAP24XX_EN_MCBSP2_SHIFT,
1851 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001852};
1853
1854static struct clk mcbsp3_ick = {
Eduardo Valentin44ec9a32008-07-03 12:24:40 +03001855 .name = "mcbsp_ick",
1856 .id = 3,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001857 .parent = &l4_ck,
1858 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001859 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001860 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
1861 .enable_bit = OMAP2430_EN_MCBSP3_SHIFT,
1862 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001863};
1864
1865static struct clk mcbsp3_fck = {
Eduardo Valentin44ec9a32008-07-03 12:24:40 +03001866 .name = "mcbsp_fck",
1867 .id = 3,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001868 .parent = &func_96m_ck,
1869 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001870 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001871 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
1872 .enable_bit = OMAP2430_EN_MCBSP3_SHIFT,
1873 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001874};
1875
1876static struct clk mcbsp4_ick = {
Eduardo Valentin44ec9a32008-07-03 12:24:40 +03001877 .name = "mcbsp_ick",
1878 .id = 4,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001879 .parent = &l4_ck,
1880 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001881 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001882 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
1883 .enable_bit = OMAP2430_EN_MCBSP4_SHIFT,
1884 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001885};
1886
1887static struct clk mcbsp4_fck = {
Eduardo Valentin44ec9a32008-07-03 12:24:40 +03001888 .name = "mcbsp_fck",
1889 .id = 4,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001890 .parent = &func_96m_ck,
1891 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001892 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001893 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
1894 .enable_bit = OMAP2430_EN_MCBSP4_SHIFT,
1895 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001896};
1897
1898static struct clk mcbsp5_ick = {
Eduardo Valentin44ec9a32008-07-03 12:24:40 +03001899 .name = "mcbsp_ick",
1900 .id = 5,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001901 .parent = &l4_ck,
1902 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001903 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001904 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
1905 .enable_bit = OMAP2430_EN_MCBSP5_SHIFT,
1906 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001907};
1908
1909static struct clk mcbsp5_fck = {
Eduardo Valentin44ec9a32008-07-03 12:24:40 +03001910 .name = "mcbsp_fck",
1911 .id = 5,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001912 .parent = &func_96m_ck,
1913 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001914 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001915 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
1916 .enable_bit = OMAP2430_EN_MCBSP5_SHIFT,
1917 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001918};
1919
1920static struct clk mcspi1_ick = {
Tony Lindgren90afd5c2006-09-25 13:27:20 +03001921 .name = "mcspi_ick",
1922 .id = 1,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001923 .parent = &l4_ck,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001924 .clkdm_name = "core_l4_clkdm",
Tony Lindgren046d6b22005-11-10 14:26:52 +00001925 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleye32744b2008-03-18 15:47:55 +02001926 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1927 .enable_bit = OMAP24XX_EN_MCSPI1_SHIFT,
1928 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001929};
1930
1931static struct clk mcspi1_fck = {
Tony Lindgren90afd5c2006-09-25 13:27:20 +03001932 .name = "mcspi_fck",
1933 .id = 1,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001934 .parent = &func_48m_ck,
1935 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001936 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001937 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1938 .enable_bit = OMAP24XX_EN_MCSPI1_SHIFT,
1939 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001940};
1941
1942static struct clk mcspi2_ick = {
Tony Lindgren90afd5c2006-09-25 13:27:20 +03001943 .name = "mcspi_ick",
1944 .id = 2,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001945 .parent = &l4_ck,
1946 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001947 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001948 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1949 .enable_bit = OMAP24XX_EN_MCSPI2_SHIFT,
1950 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001951};
1952
1953static struct clk mcspi2_fck = {
Tony Lindgren90afd5c2006-09-25 13:27:20 +03001954 .name = "mcspi_fck",
1955 .id = 2,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001956 .parent = &func_48m_ck,
1957 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001958 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001959 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1960 .enable_bit = OMAP24XX_EN_MCSPI2_SHIFT,
1961 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001962};
1963
1964static struct clk mcspi3_ick = {
Tony Lindgren90afd5c2006-09-25 13:27:20 +03001965 .name = "mcspi_ick",
1966 .id = 3,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001967 .parent = &l4_ck,
1968 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001969 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001970 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
1971 .enable_bit = OMAP2430_EN_MCSPI3_SHIFT,
1972 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001973};
1974
1975static struct clk mcspi3_fck = {
Tony Lindgren90afd5c2006-09-25 13:27:20 +03001976 .name = "mcspi_fck",
1977 .id = 3,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001978 .parent = &func_48m_ck,
1979 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001980 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001981 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
1982 .enable_bit = OMAP2430_EN_MCSPI3_SHIFT,
1983 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001984};
1985
1986static struct clk uart1_ick = {
1987 .name = "uart1_ick",
1988 .parent = &l4_ck,
1989 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03001990 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02001991 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1992 .enable_bit = OMAP24XX_EN_UART1_SHIFT,
1993 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00001994};
1995
1996static struct clk uart1_fck = {
1997 .name = "uart1_fck",
1998 .parent = &func_48m_ck,
1999 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002000 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002001 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2002 .enable_bit = OMAP24XX_EN_UART1_SHIFT,
2003 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002004};
2005
2006static struct clk uart2_ick = {
2007 .name = "uart2_ick",
2008 .parent = &l4_ck,
2009 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002010 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002011 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2012 .enable_bit = OMAP24XX_EN_UART2_SHIFT,
2013 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002014};
2015
2016static struct clk uart2_fck = {
2017 .name = "uart2_fck",
2018 .parent = &func_48m_ck,
2019 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002020 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002021 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2022 .enable_bit = OMAP24XX_EN_UART2_SHIFT,
2023 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002024};
2025
2026static struct clk uart3_ick = {
2027 .name = "uart3_ick",
2028 .parent = &l4_ck,
2029 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002030 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002031 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2032 .enable_bit = OMAP24XX_EN_UART3_SHIFT,
2033 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002034};
2035
2036static struct clk uart3_fck = {
2037 .name = "uart3_fck",
2038 .parent = &func_48m_ck,
2039 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002040 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002041 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
2042 .enable_bit = OMAP24XX_EN_UART3_SHIFT,
2043 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002044};
2045
2046static struct clk gpios_ick = {
2047 .name = "gpios_ick",
2048 .parent = &l4_ck,
2049 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002050 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002051 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2052 .enable_bit = OMAP24XX_EN_GPIOS_SHIFT,
2053 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002054};
2055
2056static struct clk gpios_fck = {
2057 .name = "gpios_fck",
2058 .parent = &func_32k_ck,
2059 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002060 .clkdm_name = "wkup_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002061 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2062 .enable_bit = OMAP24XX_EN_GPIOS_SHIFT,
2063 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002064};
2065
2066static struct clk mpu_wdt_ick = {
2067 .name = "mpu_wdt_ick",
2068 .parent = &l4_ck,
2069 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002070 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002071 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2072 .enable_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
2073 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002074};
2075
2076static struct clk mpu_wdt_fck = {
2077 .name = "mpu_wdt_fck",
2078 .parent = &func_32k_ck,
2079 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002080 .clkdm_name = "wkup_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002081 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2082 .enable_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
2083 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002084};
2085
2086static struct clk sync_32k_ick = {
2087 .name = "sync_32k_ick",
2088 .parent = &l4_ck,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002089 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
2090 ENABLE_ON_INIT,
2091 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002092 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2093 .enable_bit = OMAP24XX_EN_32KSYNC_SHIFT,
2094 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002095};
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002096
Tony Lindgren046d6b22005-11-10 14:26:52 +00002097static struct clk wdt1_ick = {
2098 .name = "wdt1_ick",
2099 .parent = &l4_ck,
2100 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002101 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002102 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2103 .enable_bit = OMAP24XX_EN_WDT1_SHIFT,
2104 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002105};
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002106
Tony Lindgren046d6b22005-11-10 14:26:52 +00002107static struct clk omapctrl_ick = {
2108 .name = "omapctrl_ick",
2109 .parent = &l4_ck,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002110 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
2111 ENABLE_ON_INIT,
2112 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002113 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2114 .enable_bit = OMAP24XX_EN_OMAPCTRL_SHIFT,
2115 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002116};
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002117
Tony Lindgren046d6b22005-11-10 14:26:52 +00002118static struct clk icr_ick = {
2119 .name = "icr_ick",
2120 .parent = &l4_ck,
2121 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002122 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002123 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2124 .enable_bit = OMAP2430_EN_ICR_SHIFT,
2125 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002126};
2127
2128static struct clk cam_ick = {
2129 .name = "cam_ick",
2130 .parent = &l4_ck,
2131 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002132 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002133 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2134 .enable_bit = OMAP24XX_EN_CAM_SHIFT,
2135 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002136};
2137
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002138/*
2139 * cam_fck controls both CAM_MCLK and CAM_FCLK. It should probably be
2140 * split into two separate clocks, since the parent clocks are different
2141 * and the clockdomains are also different.
2142 */
Tony Lindgren046d6b22005-11-10 14:26:52 +00002143static struct clk cam_fck = {
2144 .name = "cam_fck",
2145 .parent = &func_96m_ck,
2146 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002147 .clkdm_name = "core_l3_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002148 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2149 .enable_bit = OMAP24XX_EN_CAM_SHIFT,
2150 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002151};
2152
2153static struct clk mailboxes_ick = {
2154 .name = "mailboxes_ick",
2155 .parent = &l4_ck,
2156 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002157 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002158 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2159 .enable_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
2160 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002161};
2162
2163static struct clk wdt4_ick = {
2164 .name = "wdt4_ick",
2165 .parent = &l4_ck,
2166 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002167 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002168 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2169 .enable_bit = OMAP24XX_EN_WDT4_SHIFT,
2170 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002171};
2172
2173static struct clk wdt4_fck = {
2174 .name = "wdt4_fck",
2175 .parent = &func_32k_ck,
2176 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002177 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002178 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2179 .enable_bit = OMAP24XX_EN_WDT4_SHIFT,
2180 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002181};
2182
2183static struct clk wdt3_ick = {
2184 .name = "wdt3_ick",
2185 .parent = &l4_ck,
2186 .flags = CLOCK_IN_OMAP242X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002187 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002188 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2189 .enable_bit = OMAP2420_EN_WDT3_SHIFT,
2190 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002191};
2192
2193static struct clk wdt3_fck = {
2194 .name = "wdt3_fck",
2195 .parent = &func_32k_ck,
2196 .flags = CLOCK_IN_OMAP242X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002197 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002198 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2199 .enable_bit = OMAP2420_EN_WDT3_SHIFT,
2200 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002201};
2202
2203static struct clk mspro_ick = {
2204 .name = "mspro_ick",
2205 .parent = &l4_ck,
2206 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002207 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002208 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2209 .enable_bit = OMAP24XX_EN_MSPRO_SHIFT,
2210 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002211};
2212
2213static struct clk mspro_fck = {
2214 .name = "mspro_fck",
2215 .parent = &func_96m_ck,
2216 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002217 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002218 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2219 .enable_bit = OMAP24XX_EN_MSPRO_SHIFT,
2220 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002221};
2222
2223static struct clk mmc_ick = {
2224 .name = "mmc_ick",
2225 .parent = &l4_ck,
2226 .flags = CLOCK_IN_OMAP242X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002227 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002228 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2229 .enable_bit = OMAP2420_EN_MMC_SHIFT,
2230 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002231};
2232
2233static struct clk mmc_fck = {
2234 .name = "mmc_fck",
2235 .parent = &func_96m_ck,
2236 .flags = CLOCK_IN_OMAP242X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002237 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002238 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2239 .enable_bit = OMAP2420_EN_MMC_SHIFT,
2240 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002241};
2242
2243static struct clk fac_ick = {
2244 .name = "fac_ick",
2245 .parent = &l4_ck,
2246 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002247 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002248 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2249 .enable_bit = OMAP24XX_EN_FAC_SHIFT,
2250 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002251};
2252
2253static struct clk fac_fck = {
2254 .name = "fac_fck",
2255 .parent = &func_12m_ck,
2256 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002257 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002258 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2259 .enable_bit = OMAP24XX_EN_FAC_SHIFT,
2260 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002261};
2262
2263static struct clk eac_ick = {
2264 .name = "eac_ick",
2265 .parent = &l4_ck,
2266 .flags = CLOCK_IN_OMAP242X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002267 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002268 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2269 .enable_bit = OMAP2420_EN_EAC_SHIFT,
2270 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002271};
2272
2273static struct clk eac_fck = {
2274 .name = "eac_fck",
2275 .parent = &func_96m_ck,
2276 .flags = CLOCK_IN_OMAP242X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002277 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002278 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2279 .enable_bit = OMAP2420_EN_EAC_SHIFT,
2280 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002281};
2282
2283static struct clk hdq_ick = {
2284 .name = "hdq_ick",
2285 .parent = &l4_ck,
2286 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002287 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002288 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2289 .enable_bit = OMAP24XX_EN_HDQ_SHIFT,
2290 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002291};
2292
2293static struct clk hdq_fck = {
2294 .name = "hdq_fck",
2295 .parent = &func_12m_ck,
2296 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002297 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002298 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2299 .enable_bit = OMAP24XX_EN_HDQ_SHIFT,
2300 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002301};
2302
2303static struct clk i2c2_ick = {
Tony Lindgrenb824efa2006-04-02 17:46:20 +01002304 .name = "i2c_ick",
2305 .id = 2,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002306 .parent = &l4_ck,
2307 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002308 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002309 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2310 .enable_bit = OMAP2420_EN_I2C2_SHIFT,
2311 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002312};
2313
2314static struct clk i2c2_fck = {
Tony Lindgrenb824efa2006-04-02 17:46:20 +01002315 .name = "i2c_fck",
2316 .id = 2,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002317 .parent = &func_12m_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02002318 .flags = CLOCK_IN_OMAP242X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002319 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002320 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2321 .enable_bit = OMAP2420_EN_I2C2_SHIFT,
2322 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002323};
2324
2325static struct clk i2chs2_fck = {
Syed Mohammed Khasim4574eb62008-11-21 13:39:45 -08002326 .name = "i2c_fck",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002327 .id = 2,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002328 .parent = &func_96m_ck,
2329 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002330 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002331 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
2332 .enable_bit = OMAP2430_EN_I2CHS2_SHIFT,
2333 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002334};
2335
2336static struct clk i2c1_ick = {
Tony Lindgrenb824efa2006-04-02 17:46:20 +01002337 .name = "i2c_ick",
2338 .id = 1,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002339 .parent = &l4_ck,
2340 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002341 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002342 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2343 .enable_bit = OMAP2420_EN_I2C1_SHIFT,
2344 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002345};
2346
2347static struct clk i2c1_fck = {
Tony Lindgrenb824efa2006-04-02 17:46:20 +01002348 .name = "i2c_fck",
2349 .id = 1,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002350 .parent = &func_12m_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02002351 .flags = CLOCK_IN_OMAP242X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002352 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002353 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2354 .enable_bit = OMAP2420_EN_I2C1_SHIFT,
2355 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002356};
2357
2358static struct clk i2chs1_fck = {
Syed Mohammed Khasim4574eb62008-11-21 13:39:45 -08002359 .name = "i2c_fck",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002360 .id = 1,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002361 .parent = &func_96m_ck,
2362 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002363 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002364 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
2365 .enable_bit = OMAP2430_EN_I2CHS1_SHIFT,
2366 .recalc = &followparent_recalc,
2367};
2368
2369static struct clk gpmc_fck = {
2370 .name = "gpmc_fck",
Russell King897dcde2008-11-04 16:35:03 +00002371 .ops = &clkops_null, /* RMK: missing? */
Paul Walmsleye32744b2008-03-18 15:47:55 +02002372 .parent = &core_l3_ck,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002373 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
2374 ENABLE_ON_INIT,
2375 .clkdm_name = "core_l3_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002376 .recalc = &followparent_recalc,
2377};
2378
2379static struct clk sdma_fck = {
2380 .name = "sdma_fck",
Russell King897dcde2008-11-04 16:35:03 +00002381 .ops = &clkops_null, /* RMK: missing? */
Paul Walmsleye32744b2008-03-18 15:47:55 +02002382 .parent = &core_l3_ck,
2383 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002384 .clkdm_name = "core_l3_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002385 .recalc = &followparent_recalc,
2386};
2387
2388static struct clk sdma_ick = {
2389 .name = "sdma_ick",
Russell King897dcde2008-11-04 16:35:03 +00002390 .ops = &clkops_null, /* RMK: missing? */
Paul Walmsleye32744b2008-03-18 15:47:55 +02002391 .parent = &l4_ck,
2392 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002393 .clkdm_name = "core_l3_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002394 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002395};
2396
2397static struct clk vlynq_ick = {
2398 .name = "vlynq_ick",
2399 .parent = &core_l3_ck,
2400 .flags = CLOCK_IN_OMAP242X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002401 .clkdm_name = "core_l3_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002402 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2403 .enable_bit = OMAP2420_EN_VLYNQ_SHIFT,
2404 .recalc = &followparent_recalc,
2405};
2406
2407static const struct clksel_rate vlynq_fck_96m_rates[] = {
2408 { .div = 1, .val = 0, .flags = RATE_IN_242X | DEFAULT_RATE },
2409 { .div = 0 }
2410};
2411
2412static const struct clksel_rate vlynq_fck_core_rates[] = {
2413 { .div = 1, .val = 1, .flags = RATE_IN_242X },
2414 { .div = 2, .val = 2, .flags = RATE_IN_242X },
2415 { .div = 3, .val = 3, .flags = RATE_IN_242X },
2416 { .div = 4, .val = 4, .flags = RATE_IN_242X },
2417 { .div = 6, .val = 6, .flags = RATE_IN_242X },
2418 { .div = 8, .val = 8, .flags = RATE_IN_242X },
2419 { .div = 9, .val = 9, .flags = RATE_IN_242X },
2420 { .div = 12, .val = 12, .flags = RATE_IN_242X },
2421 { .div = 16, .val = 16, .flags = RATE_IN_242X | DEFAULT_RATE },
2422 { .div = 18, .val = 18, .flags = RATE_IN_242X },
2423 { .div = 0 }
2424};
2425
2426static const struct clksel vlynq_fck_clksel[] = {
2427 { .parent = &func_96m_ck, .rates = vlynq_fck_96m_rates },
2428 { .parent = &core_ck, .rates = vlynq_fck_core_rates },
2429 { .parent = NULL }
Tony Lindgren046d6b22005-11-10 14:26:52 +00002430};
2431
2432static struct clk vlynq_fck = {
2433 .name = "vlynq_fck",
2434 .parent = &func_96m_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02002435 .flags = CLOCK_IN_OMAP242X | DELAYED_APP,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002436 .clkdm_name = "core_l3_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002437 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2438 .enable_bit = OMAP2420_EN_VLYNQ_SHIFT,
2439 .init = &omap2_init_clksel_parent,
2440 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
2441 .clksel_mask = OMAP2420_CLKSEL_VLYNQ_MASK,
2442 .clksel = vlynq_fck_clksel,
2443 .recalc = &omap2_clksel_recalc,
2444 .round_rate = &omap2_clksel_round_rate,
2445 .set_rate = &omap2_clksel_set_rate
Tony Lindgren046d6b22005-11-10 14:26:52 +00002446};
2447
2448static struct clk sdrc_ick = {
2449 .name = "sdrc_ick",
2450 .parent = &l4_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02002451 .flags = CLOCK_IN_OMAP243X | ENABLE_ON_INIT,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002452 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002453 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
2454 .enable_bit = OMAP2430_EN_SDRC_SHIFT,
2455 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002456};
2457
2458static struct clk des_ick = {
2459 .name = "des_ick",
2460 .parent = &l4_ck,
2461 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002462 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002463 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
2464 .enable_bit = OMAP24XX_EN_DES_SHIFT,
2465 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002466};
2467
2468static struct clk sha_ick = {
2469 .name = "sha_ick",
2470 .parent = &l4_ck,
2471 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002472 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002473 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
2474 .enable_bit = OMAP24XX_EN_SHA_SHIFT,
2475 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002476};
2477
2478static struct clk rng_ick = {
2479 .name = "rng_ick",
2480 .parent = &l4_ck,
2481 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002482 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002483 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
2484 .enable_bit = OMAP24XX_EN_RNG_SHIFT,
2485 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002486};
2487
2488static struct clk aes_ick = {
2489 .name = "aes_ick",
2490 .parent = &l4_ck,
2491 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002492 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002493 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
2494 .enable_bit = OMAP24XX_EN_AES_SHIFT,
2495 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002496};
2497
2498static struct clk pka_ick = {
2499 .name = "pka_ick",
2500 .parent = &l4_ck,
2501 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002502 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002503 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
2504 .enable_bit = OMAP24XX_EN_PKA_SHIFT,
2505 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002506};
2507
2508static struct clk usb_fck = {
2509 .name = "usb_fck",
2510 .parent = &func_48m_ck,
2511 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002512 .clkdm_name = "core_l3_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002513 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
2514 .enable_bit = OMAP24XX_EN_USB_SHIFT,
2515 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002516};
2517
2518static struct clk usbhs_ick = {
2519 .name = "usbhs_ick",
Tony Lindgrenfde0fd42006-01-17 15:31:18 -08002520 .parent = &core_l3_ck,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002521 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002522 .clkdm_name = "core_l3_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002523 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2524 .enable_bit = OMAP2430_EN_USBHS_SHIFT,
2525 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002526};
2527
2528static struct clk mmchs1_ick = {
Paul Walmsleye32744b2008-03-18 15:47:55 +02002529 .name = "mmchs_ick",
Tony Lindgren046d6b22005-11-10 14:26:52 +00002530 .parent = &l4_ck,
2531 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002532 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002533 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2534 .enable_bit = OMAP2430_EN_MMCHS1_SHIFT,
2535 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002536};
2537
2538static struct clk mmchs1_fck = {
Paul Walmsleye32744b2008-03-18 15:47:55 +02002539 .name = "mmchs_fck",
Tony Lindgren046d6b22005-11-10 14:26:52 +00002540 .parent = &func_96m_ck,
2541 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002542 .clkdm_name = "core_l3_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002543 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
2544 .enable_bit = OMAP2430_EN_MMCHS1_SHIFT,
2545 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002546};
2547
2548static struct clk mmchs2_ick = {
Paul Walmsleye32744b2008-03-18 15:47:55 +02002549 .name = "mmchs_ick",
Tony Lindgrend8874662008-12-10 17:37:16 -08002550 .id = 1,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002551 .parent = &l4_ck,
2552 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002553 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002554 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2555 .enable_bit = OMAP2430_EN_MMCHS2_SHIFT,
2556 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002557};
2558
2559static struct clk mmchs2_fck = {
Paul Walmsleye32744b2008-03-18 15:47:55 +02002560 .name = "mmchs_fck",
Tony Lindgrend8874662008-12-10 17:37:16 -08002561 .id = 1,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002562 .parent = &func_96m_ck,
2563 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleye32744b2008-03-18 15:47:55 +02002564 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
2565 .enable_bit = OMAP2430_EN_MMCHS2_SHIFT,
2566 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002567};
2568
2569static struct clk gpio5_ick = {
2570 .name = "gpio5_ick",
2571 .parent = &l4_ck,
2572 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002573 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002574 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2575 .enable_bit = OMAP2430_EN_GPIO5_SHIFT,
2576 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002577};
2578
2579static struct clk gpio5_fck = {
2580 .name = "gpio5_fck",
2581 .parent = &func_32k_ck,
2582 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002583 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002584 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
2585 .enable_bit = OMAP2430_EN_GPIO5_SHIFT,
2586 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002587};
2588
2589static struct clk mdm_intc_ick = {
2590 .name = "mdm_intc_ick",
2591 .parent = &l4_ck,
2592 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002593 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002594 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2595 .enable_bit = OMAP2430_EN_MDM_INTC_SHIFT,
2596 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002597};
2598
2599static struct clk mmchsdb1_fck = {
Paul Walmsleye32744b2008-03-18 15:47:55 +02002600 .name = "mmchsdb_fck",
Tony Lindgren046d6b22005-11-10 14:26:52 +00002601 .parent = &func_32k_ck,
2602 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002603 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002604 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
2605 .enable_bit = OMAP2430_EN_MMCHSDB1_SHIFT,
2606 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002607};
2608
2609static struct clk mmchsdb2_fck = {
Paul Walmsleye32744b2008-03-18 15:47:55 +02002610 .name = "mmchsdb_fck",
Tony Lindgrend8874662008-12-10 17:37:16 -08002611 .id = 1,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002612 .parent = &func_32k_ck,
2613 .flags = CLOCK_IN_OMAP243X,
Paul Walmsleyd1b03f62008-08-19 11:08:44 +03002614 .clkdm_name = "core_l4_clkdm",
Paul Walmsleye32744b2008-03-18 15:47:55 +02002615 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
2616 .enable_bit = OMAP2430_EN_MMCHSDB2_SHIFT,
2617 .recalc = &followparent_recalc,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002618};
Paul Walmsleye32744b2008-03-18 15:47:55 +02002619
Tony Lindgren046d6b22005-11-10 14:26:52 +00002620/*
2621 * This clock is a composite clock which does entire set changes then
2622 * forces a rebalance. It keys on the MPU speed, but it really could
2623 * be any key speed part of a set in the rate table.
2624 *
2625 * to really change a set, you need memory table sets which get changed
2626 * in sram, pre-notifiers & post notifiers, changing the top set, without
2627 * having low level display recalc's won't work... this is why dpm notifiers
2628 * work, isr's off, walk a list of clocks already _off_ and not messing with
2629 * the bus.
2630 *
2631 * This clock should have no parent. It embodies the entire upper level
2632 * active set. A parent will mess up some of the init also.
2633 */
2634static struct clk virt_prcm_set = {
2635 .name = "virt_prcm_set",
Russell King897dcde2008-11-04 16:35:03 +00002636 .ops = &clkops_null,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002637 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
Russell King897dcde2008-11-04 16:35:03 +00002638 DELAYED_APP,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002639 .parent = &mpu_ck, /* Indexed by mpu speed, no parent */
Paul Walmsleye32744b2008-03-18 15:47:55 +02002640 .recalc = &omap2_table_mpu_recalc, /* sets are keyed on mpu rate */
Tony Lindgren046d6b22005-11-10 14:26:52 +00002641 .set_rate = &omap2_select_table_rate,
2642 .round_rate = &omap2_round_to_table_rate,
2643};
Paul Walmsleye32744b2008-03-18 15:47:55 +02002644
2645static struct clk *onchip_24xx_clks[] __initdata = {
Tony Lindgren046d6b22005-11-10 14:26:52 +00002646 /* external root sources */
2647 &func_32k_ck,
2648 &osc_ck,
2649 &sys_ck,
2650 &alt_ck,
2651 /* internal analog sources */
2652 &dpll_ck,
2653 &apll96_ck,
2654 &apll54_ck,
2655 /* internal prcm root sources */
2656 &func_54m_ck,
2657 &core_ck,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002658 &func_96m_ck,
2659 &func_48m_ck,
2660 &func_12m_ck,
2661 &wdt1_osc_ck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02002662 &sys_clkout_src,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002663 &sys_clkout,
Paul Walmsleye32744b2008-03-18 15:47:55 +02002664 &sys_clkout2_src,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002665 &sys_clkout2,
Tony Lindgrenb824efa2006-04-02 17:46:20 +01002666 &emul_ck,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002667 /* mpu domain clocks */
2668 &mpu_ck,
2669 /* dsp domain clocks */
Tony Lindgren046d6b22005-11-10 14:26:52 +00002670 &dsp_fck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02002671 &dsp_irate_ick,
2672 &dsp_ick, /* 242x */
2673 &iva2_1_ick, /* 243x */
2674 &iva1_ifck, /* 242x */
2675 &iva1_mpu_int_ifck, /* 242x */
Tony Lindgren046d6b22005-11-10 14:26:52 +00002676 /* GFX domain clocks */
2677 &gfx_3d_fck,
2678 &gfx_2d_fck,
2679 &gfx_ick,
2680 /* Modem domain clocks */
2681 &mdm_ick,
2682 &mdm_osc_ck,
2683 /* DSS domain clocks */
2684 &dss_ick,
2685 &dss1_fck,
2686 &dss2_fck,
2687 &dss_54m_fck,
2688 /* L3 domain clocks */
2689 &core_l3_ck,
2690 &ssi_ssr_sst_fck,
2691 &usb_l4_ick,
2692 /* L4 domain clocks */
2693 &l4_ck, /* used as both core_l4 and wu_l4 */
Tony Lindgren046d6b22005-11-10 14:26:52 +00002694 /* virtual meta-group clock */
2695 &virt_prcm_set,
2696 /* general l4 interface ck, multi-parent functional clk */
2697 &gpt1_ick,
2698 &gpt1_fck,
2699 &gpt2_ick,
2700 &gpt2_fck,
2701 &gpt3_ick,
2702 &gpt3_fck,
2703 &gpt4_ick,
2704 &gpt4_fck,
2705 &gpt5_ick,
2706 &gpt5_fck,
2707 &gpt6_ick,
2708 &gpt6_fck,
2709 &gpt7_ick,
2710 &gpt7_fck,
2711 &gpt8_ick,
2712 &gpt8_fck,
2713 &gpt9_ick,
2714 &gpt9_fck,
2715 &gpt10_ick,
2716 &gpt10_fck,
2717 &gpt11_ick,
2718 &gpt11_fck,
2719 &gpt12_ick,
2720 &gpt12_fck,
2721 &mcbsp1_ick,
2722 &mcbsp1_fck,
2723 &mcbsp2_ick,
2724 &mcbsp2_fck,
2725 &mcbsp3_ick,
2726 &mcbsp3_fck,
2727 &mcbsp4_ick,
2728 &mcbsp4_fck,
2729 &mcbsp5_ick,
2730 &mcbsp5_fck,
2731 &mcspi1_ick,
2732 &mcspi1_fck,
2733 &mcspi2_ick,
2734 &mcspi2_fck,
2735 &mcspi3_ick,
2736 &mcspi3_fck,
2737 &uart1_ick,
2738 &uart1_fck,
2739 &uart2_ick,
2740 &uart2_fck,
2741 &uart3_ick,
2742 &uart3_fck,
2743 &gpios_ick,
2744 &gpios_fck,
2745 &mpu_wdt_ick,
2746 &mpu_wdt_fck,
2747 &sync_32k_ick,
2748 &wdt1_ick,
2749 &omapctrl_ick,
2750 &icr_ick,
2751 &cam_fck,
2752 &cam_ick,
2753 &mailboxes_ick,
2754 &wdt4_ick,
2755 &wdt4_fck,
2756 &wdt3_ick,
2757 &wdt3_fck,
2758 &mspro_ick,
2759 &mspro_fck,
2760 &mmc_ick,
2761 &mmc_fck,
2762 &fac_ick,
2763 &fac_fck,
2764 &eac_ick,
2765 &eac_fck,
2766 &hdq_ick,
2767 &hdq_fck,
2768 &i2c1_ick,
2769 &i2c1_fck,
2770 &i2chs1_fck,
2771 &i2c2_ick,
2772 &i2c2_fck,
2773 &i2chs2_fck,
Paul Walmsleye32744b2008-03-18 15:47:55 +02002774 &gpmc_fck,
2775 &sdma_fck,
2776 &sdma_ick,
Tony Lindgren046d6b22005-11-10 14:26:52 +00002777 &vlynq_ick,
2778 &vlynq_fck,
2779 &sdrc_ick,
2780 &des_ick,
2781 &sha_ick,
2782 &rng_ick,
2783 &aes_ick,
2784 &pka_ick,
2785 &usb_fck,
2786 &usbhs_ick,
2787 &mmchs1_ick,
2788 &mmchs1_fck,
2789 &mmchs2_ick,
2790 &mmchs2_fck,
2791 &gpio5_ick,
2792 &gpio5_fck,
2793 &mdm_intc_ick,
2794 &mmchsdb1_fck,
2795 &mmchsdb2_fck,
2796};
2797
2798#endif
Paul Walmsley6b8858a2008-03-18 10:35:15 +02002799