blob: 91ab6f223b80a7c6a339cefa95c77afac97ba7ce [file] [log] [blame]
Rajendra Nayak972c5422009-12-08 18:46:28 -07001/*
2 * OMAP4 Clock data
3 *
Rajendra Nayak54776052010-02-22 22:09:39 -07004 * Copyright (C) 2009-2010 Texas Instruments, Inc.
5 * Copyright (C) 2009-2010 Nokia Corporation
Rajendra Nayak972c5422009-12-08 18:46:28 -07006 *
7 * Paul Walmsley (paul@pwsan.com)
8 * Rajendra Nayak (rnayak@ti.com)
9 * Benoit Cousson (b-cousson@ti.com)
10 *
11 * This file is automatically generated from the OMAP hardware databases.
12 * We respectfully ask that any modifications to this file be coordinated
13 * with the public linux-omap@vger.kernel.org mailing list and the
14 * authors above to ensure that the autogeneration scripts are kept
15 * up-to-date with the file contents.
16 *
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License version 2 as
19 * published by the Free Software Foundation.
Rajendra Nayak76cf5292010-09-27 14:02:54 -060020 *
21 * XXX Some of the ES1 clocks have been removed/changed; once support
22 * is added for discriminating clocks by ES level, these should be added back
23 * in.
Rajendra Nayak972c5422009-12-08 18:46:28 -070024 */
25
26#include <linux/kernel.h>
Paul Walmsley93340a22010-02-22 22:09:12 -070027#include <linux/list.h>
Rajendra Nayak972c5422009-12-08 18:46:28 -070028#include <linux/clk.h>
Rajendra Nayak972c5422009-12-08 18:46:28 -070029#include <plat/clkdev_omap.h>
30
31#include "clock.h"
32#include "clock44xx.h"
Paul Walmsleyd198b512010-12-21 15:30:54 -070033#include "cm1_44xx.h"
34#include "cm2_44xx.h"
Rajendra Nayak972c5422009-12-08 18:46:28 -070035#include "cm-regbits-44xx.h"
Paul Walmsley59fb6592010-12-21 15:30:55 -070036#include "prm44xx.h"
Paul Walmsleyd198b512010-12-21 15:30:54 -070037#include "prm44xx.h"
Rajendra Nayak972c5422009-12-08 18:46:28 -070038#include "prm-regbits-44xx.h"
Paul Walmsley4814ced2010-10-08 11:40:20 -060039#include "control.h"
Rajendra Nayak972c5422009-12-08 18:46:28 -070040
Paul Walmsley59fb6592010-12-21 15:30:55 -070041/* OMAP4 modulemode control */
42#define OMAP4430_MODULEMODE_HWCTRL 0
43#define OMAP4430_MODULEMODE_SWCTRL 1
44
Rajendra Nayak972c5422009-12-08 18:46:28 -070045/* Root clocks */
46
47static struct clk extalt_clkin_ck = {
48 .name = "extalt_clkin_ck",
49 .rate = 59000000,
50 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -070051};
52
53static struct clk pad_clks_ck = {
54 .name = "pad_clks_ck",
55 .rate = 12000000,
56 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -070057};
58
59static struct clk pad_slimbus_core_clks_ck = {
60 .name = "pad_slimbus_core_clks_ck",
61 .rate = 12000000,
62 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -070063};
64
65static struct clk secure_32k_clk_src_ck = {
66 .name = "secure_32k_clk_src_ck",
67 .rate = 32768,
68 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -070069};
70
71static struct clk slimbus_clk = {
72 .name = "slimbus_clk",
73 .rate = 12000000,
74 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -070075};
76
77static struct clk sys_32k_ck = {
78 .name = "sys_32k_ck",
79 .rate = 32768,
80 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -070081};
82
83static struct clk virt_12000000_ck = {
84 .name = "virt_12000000_ck",
85 .ops = &clkops_null,
86 .rate = 12000000,
87};
88
89static struct clk virt_13000000_ck = {
90 .name = "virt_13000000_ck",
91 .ops = &clkops_null,
92 .rate = 13000000,
93};
94
95static struct clk virt_16800000_ck = {
96 .name = "virt_16800000_ck",
97 .ops = &clkops_null,
98 .rate = 16800000,
99};
100
101static struct clk virt_19200000_ck = {
102 .name = "virt_19200000_ck",
103 .ops = &clkops_null,
104 .rate = 19200000,
105};
106
107static struct clk virt_26000000_ck = {
108 .name = "virt_26000000_ck",
109 .ops = &clkops_null,
110 .rate = 26000000,
111};
112
113static struct clk virt_27000000_ck = {
114 .name = "virt_27000000_ck",
115 .ops = &clkops_null,
116 .rate = 27000000,
117};
118
119static struct clk virt_38400000_ck = {
120 .name = "virt_38400000_ck",
121 .ops = &clkops_null,
122 .rate = 38400000,
123};
124
125static const struct clksel_rate div_1_0_rates[] = {
126 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
127 { .div = 0 },
128};
129
130static const struct clksel_rate div_1_1_rates[] = {
131 { .div = 1, .val = 1, .flags = RATE_IN_4430 },
132 { .div = 0 },
133};
134
135static const struct clksel_rate div_1_2_rates[] = {
136 { .div = 1, .val = 2, .flags = RATE_IN_4430 },
137 { .div = 0 },
138};
139
140static const struct clksel_rate div_1_3_rates[] = {
141 { .div = 1, .val = 3, .flags = RATE_IN_4430 },
142 { .div = 0 },
143};
144
145static const struct clksel_rate div_1_4_rates[] = {
146 { .div = 1, .val = 4, .flags = RATE_IN_4430 },
147 { .div = 0 },
148};
149
150static const struct clksel_rate div_1_5_rates[] = {
151 { .div = 1, .val = 5, .flags = RATE_IN_4430 },
152 { .div = 0 },
153};
154
155static const struct clksel_rate div_1_6_rates[] = {
156 { .div = 1, .val = 6, .flags = RATE_IN_4430 },
157 { .div = 0 },
158};
159
160static const struct clksel_rate div_1_7_rates[] = {
161 { .div = 1, .val = 7, .flags = RATE_IN_4430 },
162 { .div = 0 },
163};
164
165static const struct clksel sys_clkin_sel[] = {
166 { .parent = &virt_12000000_ck, .rates = div_1_1_rates },
167 { .parent = &virt_13000000_ck, .rates = div_1_2_rates },
168 { .parent = &virt_16800000_ck, .rates = div_1_3_rates },
169 { .parent = &virt_19200000_ck, .rates = div_1_4_rates },
170 { .parent = &virt_26000000_ck, .rates = div_1_5_rates },
171 { .parent = &virt_27000000_ck, .rates = div_1_6_rates },
172 { .parent = &virt_38400000_ck, .rates = div_1_7_rates },
173 { .parent = NULL },
174};
175
176static struct clk sys_clkin_ck = {
177 .name = "sys_clkin_ck",
178 .rate = 38400000,
179 .clksel = sys_clkin_sel,
180 .init = &omap2_init_clksel_parent,
181 .clksel_reg = OMAP4430_CM_SYS_CLKSEL,
182 .clksel_mask = OMAP4430_SYS_CLKSEL_MASK,
183 .ops = &clkops_null,
184 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700185};
186
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600187static struct clk tie_low_clock_ck = {
188 .name = "tie_low_clock_ck",
189 .rate = 0,
190 .ops = &clkops_null,
191};
192
Rajendra Nayak972c5422009-12-08 18:46:28 -0700193static struct clk utmi_phy_clkout_ck = {
194 .name = "utmi_phy_clkout_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600195 .rate = 60000000,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700196 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700197};
198
199static struct clk xclk60mhsp1_ck = {
200 .name = "xclk60mhsp1_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600201 .rate = 60000000,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700202 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700203};
204
205static struct clk xclk60mhsp2_ck = {
206 .name = "xclk60mhsp2_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600207 .rate = 60000000,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700208 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700209};
210
211static struct clk xclk60motg_ck = {
212 .name = "xclk60motg_ck",
213 .rate = 60000000,
214 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700215};
216
217/* Module clocks and DPLL outputs */
218
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600219static const struct clksel abe_dpll_bypass_clk_mux_sel[] = {
220 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700221 { .parent = &sys_32k_ck, .rates = div_1_1_rates },
222 { .parent = NULL },
223};
224
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600225static struct clk abe_dpll_bypass_clk_mux_ck = {
226 .name = "abe_dpll_bypass_clk_mux_ck",
227 .parent = &sys_clkin_ck,
228 .ops = &clkops_null,
229 .recalc = &followparent_recalc,
230};
231
Rajendra Nayak972c5422009-12-08 18:46:28 -0700232static struct clk abe_dpll_refclk_mux_ck = {
233 .name = "abe_dpll_refclk_mux_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600234 .parent = &sys_clkin_ck,
235 .clksel = abe_dpll_bypass_clk_mux_sel,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700236 .init = &omap2_init_clksel_parent,
237 .clksel_reg = OMAP4430_CM_ABE_PLL_REF_CLKSEL,
238 .clksel_mask = OMAP4430_CLKSEL_0_0_MASK,
239 .ops = &clkops_null,
240 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700241};
242
243/* DPLL_ABE */
244static struct dpll_data dpll_abe_dd = {
245 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_ABE,
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600246 .clk_bypass = &abe_dpll_bypass_clk_mux_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700247 .clk_ref = &abe_dpll_refclk_mux_ck,
248 .control_reg = OMAP4430_CM_CLKMODE_DPLL_ABE,
249 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
250 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_ABE,
251 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_ABE,
252 .mult_mask = OMAP4430_DPLL_MULT_MASK,
253 .div1_mask = OMAP4430_DPLL_DIV_MASK,
254 .enable_mask = OMAP4430_DPLL_EN_MASK,
255 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
256 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
257 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
258 .max_divider = OMAP4430_MAX_DPLL_DIV,
259 .min_divider = 1,
260};
261
262
263static struct clk dpll_abe_ck = {
264 .name = "dpll_abe_ck",
265 .parent = &abe_dpll_refclk_mux_ck,
266 .dpll_data = &dpll_abe_dd,
Rajendra Nayak911bd732009-12-08 18:47:17 -0700267 .init = &omap2_init_dpll_parent,
Paul Walmsley657ebfa2010-02-22 22:09:20 -0700268 .ops = &clkops_omap3_noncore_dpll_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700269 .recalc = &omap3_dpll_recalc,
270 .round_rate = &omap2_dpll_round_rate,
271 .set_rate = &omap3_noncore_dpll_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700272};
273
274static struct clk dpll_abe_m2x2_ck = {
275 .name = "dpll_abe_m2x2_ck",
276 .parent = &dpll_abe_ck,
277 .ops = &clkops_null,
278 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700279};
280
281static struct clk abe_24m_fclk = {
282 .name = "abe_24m_fclk",
283 .parent = &dpll_abe_m2x2_ck,
284 .ops = &clkops_null,
285 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700286};
287
288static const struct clksel_rate div3_1to4_rates[] = {
289 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
290 { .div = 2, .val = 1, .flags = RATE_IN_4430 },
291 { .div = 4, .val = 2, .flags = RATE_IN_4430 },
292 { .div = 0 },
293};
294
295static const struct clksel abe_clk_div[] = {
296 { .parent = &dpll_abe_m2x2_ck, .rates = div3_1to4_rates },
297 { .parent = NULL },
298};
299
300static struct clk abe_clk = {
301 .name = "abe_clk",
302 .parent = &dpll_abe_m2x2_ck,
303 .clksel = abe_clk_div,
304 .clksel_reg = OMAP4430_CM_CLKSEL_ABE,
305 .clksel_mask = OMAP4430_CLKSEL_OPP_MASK,
306 .ops = &clkops_null,
307 .recalc = &omap2_clksel_recalc,
308 .round_rate = &omap2_clksel_round_rate,
309 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700310};
311
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600312static const struct clksel_rate div2_1to2_rates[] = {
313 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
314 { .div = 2, .val = 1, .flags = RATE_IN_4430 },
315 { .div = 0 },
316};
317
Rajendra Nayak972c5422009-12-08 18:46:28 -0700318static const struct clksel aess_fclk_div[] = {
319 { .parent = &abe_clk, .rates = div2_1to2_rates },
320 { .parent = NULL },
321};
322
323static struct clk aess_fclk = {
324 .name = "aess_fclk",
325 .parent = &abe_clk,
326 .clksel = aess_fclk_div,
327 .clksel_reg = OMAP4430_CM1_ABE_AESS_CLKCTRL,
328 .clksel_mask = OMAP4430_CLKSEL_AESS_FCLK_MASK,
329 .ops = &clkops_null,
330 .recalc = &omap2_clksel_recalc,
331 .round_rate = &omap2_clksel_round_rate,
332 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700333};
334
335static const struct clksel_rate div31_1to31_rates[] = {
Rajendra Nayakecbb0652010-01-19 17:30:55 -0700336 { .div = 1, .val = 1, .flags = RATE_IN_4430 },
337 { .div = 2, .val = 2, .flags = RATE_IN_4430 },
338 { .div = 3, .val = 3, .flags = RATE_IN_4430 },
339 { .div = 4, .val = 4, .flags = RATE_IN_4430 },
340 { .div = 5, .val = 5, .flags = RATE_IN_4430 },
341 { .div = 6, .val = 6, .flags = RATE_IN_4430 },
342 { .div = 7, .val = 7, .flags = RATE_IN_4430 },
343 { .div = 8, .val = 8, .flags = RATE_IN_4430 },
344 { .div = 9, .val = 9, .flags = RATE_IN_4430 },
345 { .div = 10, .val = 10, .flags = RATE_IN_4430 },
346 { .div = 11, .val = 11, .flags = RATE_IN_4430 },
347 { .div = 12, .val = 12, .flags = RATE_IN_4430 },
348 { .div = 13, .val = 13, .flags = RATE_IN_4430 },
349 { .div = 14, .val = 14, .flags = RATE_IN_4430 },
350 { .div = 15, .val = 15, .flags = RATE_IN_4430 },
351 { .div = 16, .val = 16, .flags = RATE_IN_4430 },
352 { .div = 17, .val = 17, .flags = RATE_IN_4430 },
353 { .div = 18, .val = 18, .flags = RATE_IN_4430 },
354 { .div = 19, .val = 19, .flags = RATE_IN_4430 },
355 { .div = 20, .val = 20, .flags = RATE_IN_4430 },
356 { .div = 21, .val = 21, .flags = RATE_IN_4430 },
357 { .div = 22, .val = 22, .flags = RATE_IN_4430 },
358 { .div = 23, .val = 23, .flags = RATE_IN_4430 },
359 { .div = 24, .val = 24, .flags = RATE_IN_4430 },
360 { .div = 25, .val = 25, .flags = RATE_IN_4430 },
361 { .div = 26, .val = 26, .flags = RATE_IN_4430 },
362 { .div = 27, .val = 27, .flags = RATE_IN_4430 },
363 { .div = 28, .val = 28, .flags = RATE_IN_4430 },
364 { .div = 29, .val = 29, .flags = RATE_IN_4430 },
365 { .div = 30, .val = 30, .flags = RATE_IN_4430 },
366 { .div = 31, .val = 31, .flags = RATE_IN_4430 },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700367 { .div = 0 },
368};
369
370static const struct clksel dpll_abe_m3_div[] = {
371 { .parent = &dpll_abe_ck, .rates = div31_1to31_rates },
372 { .parent = NULL },
373};
374
375static struct clk dpll_abe_m3_ck = {
376 .name = "dpll_abe_m3_ck",
377 .parent = &dpll_abe_ck,
378 .clksel = dpll_abe_m3_div,
379 .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_ABE,
380 .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK,
381 .ops = &clkops_null,
382 .recalc = &omap2_clksel_recalc,
383 .round_rate = &omap2_clksel_round_rate,
384 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700385};
386
387static const struct clksel core_hsd_byp_clk_mux_sel[] = {
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600388 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700389 { .parent = &dpll_abe_m3_ck, .rates = div_1_1_rates },
390 { .parent = NULL },
391};
392
393static struct clk core_hsd_byp_clk_mux_ck = {
394 .name = "core_hsd_byp_clk_mux_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600395 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700396 .clksel = core_hsd_byp_clk_mux_sel,
397 .init = &omap2_init_clksel_parent,
398 .clksel_reg = OMAP4430_CM_CLKSEL_DPLL_CORE,
399 .clksel_mask = OMAP4430_DPLL_BYP_CLKSEL_MASK,
400 .ops = &clkops_null,
401 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700402};
403
404/* DPLL_CORE */
405static struct dpll_data dpll_core_dd = {
406 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_CORE,
407 .clk_bypass = &core_hsd_byp_clk_mux_ck,
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600408 .clk_ref = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700409 .control_reg = OMAP4430_CM_CLKMODE_DPLL_CORE,
410 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
411 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_CORE,
412 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_CORE,
413 .mult_mask = OMAP4430_DPLL_MULT_MASK,
414 .div1_mask = OMAP4430_DPLL_DIV_MASK,
415 .enable_mask = OMAP4430_DPLL_EN_MASK,
416 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
417 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
418 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
419 .max_divider = OMAP4430_MAX_DPLL_DIV,
420 .min_divider = 1,
421};
422
423
424static struct clk dpll_core_ck = {
425 .name = "dpll_core_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600426 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700427 .dpll_data = &dpll_core_dd,
Rajendra Nayak911bd732009-12-08 18:47:17 -0700428 .init = &omap2_init_dpll_parent,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700429 .ops = &clkops_null,
430 .recalc = &omap3_dpll_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700431};
432
433static const struct clksel dpll_core_m6_div[] = {
434 { .parent = &dpll_core_ck, .rates = div31_1to31_rates },
435 { .parent = NULL },
436};
437
438static struct clk dpll_core_m6_ck = {
439 .name = "dpll_core_m6_ck",
440 .parent = &dpll_core_ck,
441 .clksel = dpll_core_m6_div,
442 .clksel_reg = OMAP4430_CM_DIV_M6_DPLL_CORE,
443 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK,
444 .ops = &clkops_null,
445 .recalc = &omap2_clksel_recalc,
446 .round_rate = &omap2_clksel_round_rate,
447 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700448};
449
450static const struct clksel dbgclk_mux_sel[] = {
451 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
452 { .parent = &dpll_core_m6_ck, .rates = div_1_1_rates },
453 { .parent = NULL },
454};
455
456static struct clk dbgclk_mux_ck = {
457 .name = "dbgclk_mux_ck",
458 .parent = &sys_clkin_ck,
459 .ops = &clkops_null,
460 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700461};
462
463static struct clk dpll_core_m2_ck = {
464 .name = "dpll_core_m2_ck",
465 .parent = &dpll_core_ck,
466 .clksel = dpll_core_m6_div,
467 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_CORE,
468 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
469 .ops = &clkops_null,
470 .recalc = &omap2_clksel_recalc,
471 .round_rate = &omap2_clksel_round_rate,
472 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700473};
474
475static struct clk ddrphy_ck = {
476 .name = "ddrphy_ck",
477 .parent = &dpll_core_m2_ck,
478 .ops = &clkops_null,
479 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700480};
481
482static struct clk dpll_core_m5_ck = {
483 .name = "dpll_core_m5_ck",
484 .parent = &dpll_core_ck,
485 .clksel = dpll_core_m6_div,
486 .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_CORE,
487 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK,
488 .ops = &clkops_null,
489 .recalc = &omap2_clksel_recalc,
490 .round_rate = &omap2_clksel_round_rate,
491 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700492};
493
494static const struct clksel div_core_div[] = {
495 { .parent = &dpll_core_m5_ck, .rates = div2_1to2_rates },
496 { .parent = NULL },
497};
498
499static struct clk div_core_ck = {
500 .name = "div_core_ck",
501 .parent = &dpll_core_m5_ck,
502 .clksel = div_core_div,
503 .clksel_reg = OMAP4430_CM_CLKSEL_CORE,
504 .clksel_mask = OMAP4430_CLKSEL_CORE_MASK,
505 .ops = &clkops_null,
506 .recalc = &omap2_clksel_recalc,
507 .round_rate = &omap2_clksel_round_rate,
508 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700509};
510
511static const struct clksel_rate div4_1to8_rates[] = {
512 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
513 { .div = 2, .val = 1, .flags = RATE_IN_4430 },
514 { .div = 4, .val = 2, .flags = RATE_IN_4430 },
515 { .div = 8, .val = 3, .flags = RATE_IN_4430 },
516 { .div = 0 },
517};
518
519static const struct clksel div_iva_hs_clk_div[] = {
520 { .parent = &dpll_core_m5_ck, .rates = div4_1to8_rates },
521 { .parent = NULL },
522};
523
524static struct clk div_iva_hs_clk = {
525 .name = "div_iva_hs_clk",
526 .parent = &dpll_core_m5_ck,
527 .clksel = div_iva_hs_clk_div,
528 .clksel_reg = OMAP4430_CM_BYPCLK_DPLL_IVA,
529 .clksel_mask = OMAP4430_CLKSEL_0_1_MASK,
530 .ops = &clkops_null,
531 .recalc = &omap2_clksel_recalc,
532 .round_rate = &omap2_clksel_round_rate,
533 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700534};
535
536static struct clk div_mpu_hs_clk = {
537 .name = "div_mpu_hs_clk",
538 .parent = &dpll_core_m5_ck,
539 .clksel = div_iva_hs_clk_div,
540 .clksel_reg = OMAP4430_CM_BYPCLK_DPLL_MPU,
541 .clksel_mask = OMAP4430_CLKSEL_0_1_MASK,
542 .ops = &clkops_null,
543 .recalc = &omap2_clksel_recalc,
544 .round_rate = &omap2_clksel_round_rate,
545 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700546};
547
548static struct clk dpll_core_m4_ck = {
549 .name = "dpll_core_m4_ck",
550 .parent = &dpll_core_ck,
551 .clksel = dpll_core_m6_div,
552 .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_CORE,
553 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK,
554 .ops = &clkops_null,
555 .recalc = &omap2_clksel_recalc,
556 .round_rate = &omap2_clksel_round_rate,
557 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700558};
559
560static struct clk dll_clk_div_ck = {
561 .name = "dll_clk_div_ck",
562 .parent = &dpll_core_m4_ck,
563 .ops = &clkops_null,
564 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700565};
566
567static struct clk dpll_abe_m2_ck = {
568 .name = "dpll_abe_m2_ck",
569 .parent = &dpll_abe_ck,
570 .clksel = dpll_abe_m3_div,
571 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE,
572 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
573 .ops = &clkops_null,
574 .recalc = &omap2_clksel_recalc,
575 .round_rate = &omap2_clksel_round_rate,
576 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700577};
578
579static struct clk dpll_core_m3_ck = {
580 .name = "dpll_core_m3_ck",
581 .parent = &dpll_core_ck,
582 .clksel = dpll_core_m6_div,
583 .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_CORE,
584 .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK,
585 .ops = &clkops_null,
586 .recalc = &omap2_clksel_recalc,
587 .round_rate = &omap2_clksel_round_rate,
588 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700589};
590
591static struct clk dpll_core_m7_ck = {
592 .name = "dpll_core_m7_ck",
593 .parent = &dpll_core_ck,
594 .clksel = dpll_core_m6_div,
595 .clksel_reg = OMAP4430_CM_DIV_M7_DPLL_CORE,
596 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK,
597 .ops = &clkops_null,
598 .recalc = &omap2_clksel_recalc,
599 .round_rate = &omap2_clksel_round_rate,
600 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700601};
602
603static const struct clksel iva_hsd_byp_clk_mux_sel[] = {
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600604 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700605 { .parent = &div_iva_hs_clk, .rates = div_1_1_rates },
606 { .parent = NULL },
607};
608
609static struct clk iva_hsd_byp_clk_mux_ck = {
610 .name = "iva_hsd_byp_clk_mux_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600611 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700612 .ops = &clkops_null,
613 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700614};
615
616/* DPLL_IVA */
617static struct dpll_data dpll_iva_dd = {
618 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_IVA,
619 .clk_bypass = &iva_hsd_byp_clk_mux_ck,
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600620 .clk_ref = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700621 .control_reg = OMAP4430_CM_CLKMODE_DPLL_IVA,
622 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
623 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_IVA,
624 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_IVA,
625 .mult_mask = OMAP4430_DPLL_MULT_MASK,
626 .div1_mask = OMAP4430_DPLL_DIV_MASK,
627 .enable_mask = OMAP4430_DPLL_EN_MASK,
628 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
629 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
630 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
631 .max_divider = OMAP4430_MAX_DPLL_DIV,
632 .min_divider = 1,
633};
634
635
636static struct clk dpll_iva_ck = {
637 .name = "dpll_iva_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600638 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700639 .dpll_data = &dpll_iva_dd,
Rajendra Nayak911bd732009-12-08 18:47:17 -0700640 .init = &omap2_init_dpll_parent,
Paul Walmsley657ebfa2010-02-22 22:09:20 -0700641 .ops = &clkops_omap3_noncore_dpll_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700642 .recalc = &omap3_dpll_recalc,
643 .round_rate = &omap2_dpll_round_rate,
644 .set_rate = &omap3_noncore_dpll_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700645};
646
647static const struct clksel dpll_iva_m4_div[] = {
648 { .parent = &dpll_iva_ck, .rates = div31_1to31_rates },
649 { .parent = NULL },
650};
651
652static struct clk dpll_iva_m4_ck = {
653 .name = "dpll_iva_m4_ck",
654 .parent = &dpll_iva_ck,
655 .clksel = dpll_iva_m4_div,
656 .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_IVA,
657 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK,
658 .ops = &clkops_null,
659 .recalc = &omap2_clksel_recalc,
660 .round_rate = &omap2_clksel_round_rate,
661 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700662};
663
664static struct clk dpll_iva_m5_ck = {
665 .name = "dpll_iva_m5_ck",
666 .parent = &dpll_iva_ck,
667 .clksel = dpll_iva_m4_div,
668 .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_IVA,
669 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK,
670 .ops = &clkops_null,
671 .recalc = &omap2_clksel_recalc,
672 .round_rate = &omap2_clksel_round_rate,
673 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700674};
675
676/* DPLL_MPU */
677static struct dpll_data dpll_mpu_dd = {
678 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_MPU,
679 .clk_bypass = &div_mpu_hs_clk,
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600680 .clk_ref = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700681 .control_reg = OMAP4430_CM_CLKMODE_DPLL_MPU,
682 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
683 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_MPU,
684 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_MPU,
685 .mult_mask = OMAP4430_DPLL_MULT_MASK,
686 .div1_mask = OMAP4430_DPLL_DIV_MASK,
687 .enable_mask = OMAP4430_DPLL_EN_MASK,
688 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
689 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
690 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
691 .max_divider = OMAP4430_MAX_DPLL_DIV,
692 .min_divider = 1,
693};
694
695
696static struct clk dpll_mpu_ck = {
697 .name = "dpll_mpu_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600698 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700699 .dpll_data = &dpll_mpu_dd,
Rajendra Nayak911bd732009-12-08 18:47:17 -0700700 .init = &omap2_init_dpll_parent,
Paul Walmsley657ebfa2010-02-22 22:09:20 -0700701 .ops = &clkops_omap3_noncore_dpll_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700702 .recalc = &omap3_dpll_recalc,
703 .round_rate = &omap2_dpll_round_rate,
704 .set_rate = &omap3_noncore_dpll_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700705};
706
707static const struct clksel dpll_mpu_m2_div[] = {
708 { .parent = &dpll_mpu_ck, .rates = div31_1to31_rates },
709 { .parent = NULL },
710};
711
712static struct clk dpll_mpu_m2_ck = {
713 .name = "dpll_mpu_m2_ck",
714 .parent = &dpll_mpu_ck,
715 .clksel = dpll_mpu_m2_div,
716 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_MPU,
717 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
718 .ops = &clkops_null,
719 .recalc = &omap2_clksel_recalc,
720 .round_rate = &omap2_clksel_round_rate,
721 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700722};
723
724static struct clk per_hs_clk_div_ck = {
725 .name = "per_hs_clk_div_ck",
726 .parent = &dpll_abe_m3_ck,
727 .ops = &clkops_null,
728 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700729};
730
731static const struct clksel per_hsd_byp_clk_mux_sel[] = {
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600732 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700733 { .parent = &per_hs_clk_div_ck, .rates = div_1_1_rates },
734 { .parent = NULL },
735};
736
737static struct clk per_hsd_byp_clk_mux_ck = {
738 .name = "per_hsd_byp_clk_mux_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600739 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700740 .clksel = per_hsd_byp_clk_mux_sel,
741 .init = &omap2_init_clksel_parent,
742 .clksel_reg = OMAP4430_CM_CLKSEL_DPLL_PER,
743 .clksel_mask = OMAP4430_DPLL_BYP_CLKSEL_MASK,
744 .ops = &clkops_null,
745 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700746};
747
748/* DPLL_PER */
749static struct dpll_data dpll_per_dd = {
750 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_PER,
751 .clk_bypass = &per_hsd_byp_clk_mux_ck,
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600752 .clk_ref = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700753 .control_reg = OMAP4430_CM_CLKMODE_DPLL_PER,
754 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
755 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_PER,
756 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_PER,
757 .mult_mask = OMAP4430_DPLL_MULT_MASK,
758 .div1_mask = OMAP4430_DPLL_DIV_MASK,
759 .enable_mask = OMAP4430_DPLL_EN_MASK,
760 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
761 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
762 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
763 .max_divider = OMAP4430_MAX_DPLL_DIV,
764 .min_divider = 1,
765};
766
767
768static struct clk dpll_per_ck = {
769 .name = "dpll_per_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600770 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700771 .dpll_data = &dpll_per_dd,
Rajendra Nayak911bd732009-12-08 18:47:17 -0700772 .init = &omap2_init_dpll_parent,
Paul Walmsley657ebfa2010-02-22 22:09:20 -0700773 .ops = &clkops_omap3_noncore_dpll_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700774 .recalc = &omap3_dpll_recalc,
775 .round_rate = &omap2_dpll_round_rate,
776 .set_rate = &omap3_noncore_dpll_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700777};
778
779static const struct clksel dpll_per_m2_div[] = {
780 { .parent = &dpll_per_ck, .rates = div31_1to31_rates },
781 { .parent = NULL },
782};
783
784static struct clk dpll_per_m2_ck = {
785 .name = "dpll_per_m2_ck",
786 .parent = &dpll_per_ck,
787 .clksel = dpll_per_m2_div,
788 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER,
789 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
790 .ops = &clkops_null,
791 .recalc = &omap2_clksel_recalc,
792 .round_rate = &omap2_clksel_round_rate,
793 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700794};
795
796static struct clk dpll_per_m2x2_ck = {
797 .name = "dpll_per_m2x2_ck",
798 .parent = &dpll_per_ck,
799 .ops = &clkops_null,
800 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700801};
802
803static struct clk dpll_per_m3_ck = {
804 .name = "dpll_per_m3_ck",
805 .parent = &dpll_per_ck,
806 .clksel = dpll_per_m2_div,
807 .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_PER,
808 .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK,
809 .ops = &clkops_null,
810 .recalc = &omap2_clksel_recalc,
811 .round_rate = &omap2_clksel_round_rate,
812 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700813};
814
815static struct clk dpll_per_m4_ck = {
816 .name = "dpll_per_m4_ck",
817 .parent = &dpll_per_ck,
818 .clksel = dpll_per_m2_div,
819 .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_PER,
820 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK,
821 .ops = &clkops_null,
822 .recalc = &omap2_clksel_recalc,
823 .round_rate = &omap2_clksel_round_rate,
824 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700825};
826
827static struct clk dpll_per_m5_ck = {
828 .name = "dpll_per_m5_ck",
829 .parent = &dpll_per_ck,
830 .clksel = dpll_per_m2_div,
831 .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_PER,
832 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK,
833 .ops = &clkops_null,
834 .recalc = &omap2_clksel_recalc,
835 .round_rate = &omap2_clksel_round_rate,
836 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700837};
838
839static struct clk dpll_per_m6_ck = {
840 .name = "dpll_per_m6_ck",
841 .parent = &dpll_per_ck,
842 .clksel = dpll_per_m2_div,
843 .clksel_reg = OMAP4430_CM_DIV_M6_DPLL_PER,
844 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK,
845 .ops = &clkops_null,
846 .recalc = &omap2_clksel_recalc,
847 .round_rate = &omap2_clksel_round_rate,
848 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700849};
850
851static struct clk dpll_per_m7_ck = {
852 .name = "dpll_per_m7_ck",
853 .parent = &dpll_per_ck,
854 .clksel = dpll_per_m2_div,
855 .clksel_reg = OMAP4430_CM_DIV_M7_DPLL_PER,
856 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK,
857 .ops = &clkops_null,
858 .recalc = &omap2_clksel_recalc,
859 .round_rate = &omap2_clksel_round_rate,
860 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700861};
862
863/* DPLL_UNIPRO */
864static struct dpll_data dpll_unipro_dd = {
865 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_UNIPRO,
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600866 .clk_bypass = &sys_clkin_ck,
867 .clk_ref = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700868 .control_reg = OMAP4430_CM_CLKMODE_DPLL_UNIPRO,
869 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
870 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_UNIPRO,
871 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_UNIPRO,
872 .mult_mask = OMAP4430_DPLL_MULT_MASK,
873 .div1_mask = OMAP4430_DPLL_DIV_MASK,
874 .enable_mask = OMAP4430_DPLL_EN_MASK,
875 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
876 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
877 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
878 .max_divider = OMAP4430_MAX_DPLL_DIV,
879 .min_divider = 1,
880};
881
882
883static struct clk dpll_unipro_ck = {
884 .name = "dpll_unipro_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600885 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700886 .dpll_data = &dpll_unipro_dd,
Rajendra Nayak911bd732009-12-08 18:47:17 -0700887 .init = &omap2_init_dpll_parent,
Paul Walmsley657ebfa2010-02-22 22:09:20 -0700888 .ops = &clkops_omap3_noncore_dpll_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700889 .recalc = &omap3_dpll_recalc,
890 .round_rate = &omap2_dpll_round_rate,
891 .set_rate = &omap3_noncore_dpll_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700892};
893
894static const struct clksel dpll_unipro_m2x2_div[] = {
895 { .parent = &dpll_unipro_ck, .rates = div31_1to31_rates },
896 { .parent = NULL },
897};
898
899static struct clk dpll_unipro_m2x2_ck = {
900 .name = "dpll_unipro_m2x2_ck",
901 .parent = &dpll_unipro_ck,
902 .clksel = dpll_unipro_m2x2_div,
903 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_UNIPRO,
904 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
905 .ops = &clkops_null,
906 .recalc = &omap2_clksel_recalc,
907 .round_rate = &omap2_clksel_round_rate,
908 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700909};
910
911static struct clk usb_hs_clk_div_ck = {
912 .name = "usb_hs_clk_div_ck",
913 .parent = &dpll_abe_m3_ck,
914 .ops = &clkops_null,
915 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700916};
917
918/* DPLL_USB */
919static struct dpll_data dpll_usb_dd = {
920 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_USB,
921 .clk_bypass = &usb_hs_clk_div_ck,
Benoit Cousson0e433272010-09-27 14:02:54 -0600922 .flags = DPLL_J_TYPE | DPLL_NO_DCO_SEL,
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600923 .clk_ref = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700924 .control_reg = OMAP4430_CM_CLKMODE_DPLL_USB,
925 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
926 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_USB,
927 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_USB,
928 .mult_mask = OMAP4430_DPLL_MULT_MASK,
929 .div1_mask = OMAP4430_DPLL_DIV_MASK,
930 .enable_mask = OMAP4430_DPLL_EN_MASK,
931 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
932 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
933 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
934 .max_divider = OMAP4430_MAX_DPLL_DIV,
935 .min_divider = 1,
936};
937
938
939static struct clk dpll_usb_ck = {
940 .name = "dpll_usb_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600941 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700942 .dpll_data = &dpll_usb_dd,
Rajendra Nayak911bd732009-12-08 18:47:17 -0700943 .init = &omap2_init_dpll_parent,
Paul Walmsley657ebfa2010-02-22 22:09:20 -0700944 .ops = &clkops_omap3_noncore_dpll_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700945 .recalc = &omap3_dpll_recalc,
946 .round_rate = &omap2_dpll_round_rate,
947 .set_rate = &omap3_noncore_dpll_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700948};
949
950static struct clk dpll_usb_clkdcoldo_ck = {
951 .name = "dpll_usb_clkdcoldo_ck",
952 .parent = &dpll_usb_ck,
953 .ops = &clkops_null,
954 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700955};
956
957static const struct clksel dpll_usb_m2_div[] = {
958 { .parent = &dpll_usb_ck, .rates = div31_1to31_rates },
959 { .parent = NULL },
960};
961
962static struct clk dpll_usb_m2_ck = {
963 .name = "dpll_usb_m2_ck",
964 .parent = &dpll_usb_ck,
965 .clksel = dpll_usb_m2_div,
966 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_USB,
967 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK,
968 .ops = &clkops_null,
969 .recalc = &omap2_clksel_recalc,
970 .round_rate = &omap2_clksel_round_rate,
971 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700972};
973
974static const struct clksel ducati_clk_mux_sel[] = {
975 { .parent = &div_core_ck, .rates = div_1_0_rates },
976 { .parent = &dpll_per_m6_ck, .rates = div_1_1_rates },
977 { .parent = NULL },
978};
979
980static struct clk ducati_clk_mux_ck = {
981 .name = "ducati_clk_mux_ck",
982 .parent = &div_core_ck,
983 .clksel = ducati_clk_mux_sel,
984 .init = &omap2_init_clksel_parent,
985 .clksel_reg = OMAP4430_CM_CLKSEL_DUCATI_ISS_ROOT,
986 .clksel_mask = OMAP4430_CLKSEL_0_0_MASK,
987 .ops = &clkops_null,
988 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700989};
990
991static struct clk func_12m_fclk = {
992 .name = "func_12m_fclk",
993 .parent = &dpll_per_m2x2_ck,
994 .ops = &clkops_null,
995 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700996};
997
998static struct clk func_24m_clk = {
999 .name = "func_24m_clk",
1000 .parent = &dpll_per_m2_ck,
1001 .ops = &clkops_null,
1002 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001003};
1004
1005static struct clk func_24mc_fclk = {
1006 .name = "func_24mc_fclk",
1007 .parent = &dpll_per_m2x2_ck,
1008 .ops = &clkops_null,
1009 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001010};
1011
1012static const struct clksel_rate div2_4to8_rates[] = {
1013 { .div = 4, .val = 0, .flags = RATE_IN_4430 },
1014 { .div = 8, .val = 1, .flags = RATE_IN_4430 },
1015 { .div = 0 },
1016};
1017
1018static const struct clksel func_48m_fclk_div[] = {
1019 { .parent = &dpll_per_m2x2_ck, .rates = div2_4to8_rates },
1020 { .parent = NULL },
1021};
1022
1023static struct clk func_48m_fclk = {
1024 .name = "func_48m_fclk",
1025 .parent = &dpll_per_m2x2_ck,
1026 .clksel = func_48m_fclk_div,
1027 .clksel_reg = OMAP4430_CM_SCALE_FCLK,
1028 .clksel_mask = OMAP4430_SCALE_FCLK_MASK,
1029 .ops = &clkops_null,
1030 .recalc = &omap2_clksel_recalc,
1031 .round_rate = &omap2_clksel_round_rate,
1032 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001033};
1034
1035static struct clk func_48mc_fclk = {
1036 .name = "func_48mc_fclk",
1037 .parent = &dpll_per_m2x2_ck,
1038 .ops = &clkops_null,
1039 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001040};
1041
1042static const struct clksel_rate div2_2to4_rates[] = {
1043 { .div = 2, .val = 0, .flags = RATE_IN_4430 },
1044 { .div = 4, .val = 1, .flags = RATE_IN_4430 },
1045 { .div = 0 },
1046};
1047
1048static const struct clksel func_64m_fclk_div[] = {
1049 { .parent = &dpll_per_m4_ck, .rates = div2_2to4_rates },
1050 { .parent = NULL },
1051};
1052
1053static struct clk func_64m_fclk = {
1054 .name = "func_64m_fclk",
1055 .parent = &dpll_per_m4_ck,
1056 .clksel = func_64m_fclk_div,
1057 .clksel_reg = OMAP4430_CM_SCALE_FCLK,
1058 .clksel_mask = OMAP4430_SCALE_FCLK_MASK,
1059 .ops = &clkops_null,
1060 .recalc = &omap2_clksel_recalc,
1061 .round_rate = &omap2_clksel_round_rate,
1062 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001063};
1064
1065static const struct clksel func_96m_fclk_div[] = {
1066 { .parent = &dpll_per_m2x2_ck, .rates = div2_2to4_rates },
1067 { .parent = NULL },
1068};
1069
1070static struct clk func_96m_fclk = {
1071 .name = "func_96m_fclk",
1072 .parent = &dpll_per_m2x2_ck,
1073 .clksel = func_96m_fclk_div,
1074 .clksel_reg = OMAP4430_CM_SCALE_FCLK,
1075 .clksel_mask = OMAP4430_SCALE_FCLK_MASK,
1076 .ops = &clkops_null,
1077 .recalc = &omap2_clksel_recalc,
1078 .round_rate = &omap2_clksel_round_rate,
1079 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001080};
1081
1082static const struct clksel hsmmc6_fclk_sel[] = {
1083 { .parent = &func_64m_fclk, .rates = div_1_0_rates },
1084 { .parent = &func_96m_fclk, .rates = div_1_1_rates },
1085 { .parent = NULL },
1086};
1087
1088static struct clk hsmmc6_fclk = {
1089 .name = "hsmmc6_fclk",
1090 .parent = &func_64m_fclk,
1091 .ops = &clkops_null,
1092 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001093};
1094
1095static const struct clksel_rate div2_1to8_rates[] = {
1096 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
1097 { .div = 8, .val = 1, .flags = RATE_IN_4430 },
1098 { .div = 0 },
1099};
1100
1101static const struct clksel init_60m_fclk_div[] = {
1102 { .parent = &dpll_usb_m2_ck, .rates = div2_1to8_rates },
1103 { .parent = NULL },
1104};
1105
1106static struct clk init_60m_fclk = {
1107 .name = "init_60m_fclk",
1108 .parent = &dpll_usb_m2_ck,
1109 .clksel = init_60m_fclk_div,
1110 .clksel_reg = OMAP4430_CM_CLKSEL_USB_60MHZ,
1111 .clksel_mask = OMAP4430_CLKSEL_0_0_MASK,
1112 .ops = &clkops_null,
1113 .recalc = &omap2_clksel_recalc,
1114 .round_rate = &omap2_clksel_round_rate,
1115 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001116};
1117
1118static const struct clksel l3_div_div[] = {
1119 { .parent = &div_core_ck, .rates = div2_1to2_rates },
1120 { .parent = NULL },
1121};
1122
1123static struct clk l3_div_ck = {
1124 .name = "l3_div_ck",
1125 .parent = &div_core_ck,
1126 .clksel = l3_div_div,
1127 .clksel_reg = OMAP4430_CM_CLKSEL_CORE,
1128 .clksel_mask = OMAP4430_CLKSEL_L3_MASK,
1129 .ops = &clkops_null,
1130 .recalc = &omap2_clksel_recalc,
1131 .round_rate = &omap2_clksel_round_rate,
1132 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001133};
1134
1135static const struct clksel l4_div_div[] = {
1136 { .parent = &l3_div_ck, .rates = div2_1to2_rates },
1137 { .parent = NULL },
1138};
1139
1140static struct clk l4_div_ck = {
1141 .name = "l4_div_ck",
1142 .parent = &l3_div_ck,
1143 .clksel = l4_div_div,
1144 .clksel_reg = OMAP4430_CM_CLKSEL_CORE,
1145 .clksel_mask = OMAP4430_CLKSEL_L4_MASK,
1146 .ops = &clkops_null,
1147 .recalc = &omap2_clksel_recalc,
1148 .round_rate = &omap2_clksel_round_rate,
1149 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001150};
1151
1152static struct clk lp_clk_div_ck = {
1153 .name = "lp_clk_div_ck",
1154 .parent = &dpll_abe_m2x2_ck,
1155 .ops = &clkops_null,
1156 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001157};
1158
1159static const struct clksel l4_wkup_clk_mux_sel[] = {
1160 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
1161 { .parent = &lp_clk_div_ck, .rates = div_1_1_rates },
1162 { .parent = NULL },
1163};
1164
1165static struct clk l4_wkup_clk_mux_ck = {
1166 .name = "l4_wkup_clk_mux_ck",
1167 .parent = &sys_clkin_ck,
1168 .clksel = l4_wkup_clk_mux_sel,
1169 .init = &omap2_init_clksel_parent,
1170 .clksel_reg = OMAP4430_CM_L4_WKUP_CLKSEL,
1171 .clksel_mask = OMAP4430_CLKSEL_0_0_MASK,
1172 .ops = &clkops_null,
1173 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001174};
1175
1176static const struct clksel per_abe_nc_fclk_div[] = {
1177 { .parent = &dpll_abe_m2_ck, .rates = div2_1to2_rates },
1178 { .parent = NULL },
1179};
1180
1181static struct clk per_abe_nc_fclk = {
1182 .name = "per_abe_nc_fclk",
1183 .parent = &dpll_abe_m2_ck,
1184 .clksel = per_abe_nc_fclk_div,
1185 .clksel_reg = OMAP4430_CM_SCALE_FCLK,
1186 .clksel_mask = OMAP4430_SCALE_FCLK_MASK,
1187 .ops = &clkops_null,
1188 .recalc = &omap2_clksel_recalc,
1189 .round_rate = &omap2_clksel_round_rate,
1190 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001191};
1192
1193static const struct clksel mcasp2_fclk_sel[] = {
1194 { .parent = &func_96m_fclk, .rates = div_1_0_rates },
1195 { .parent = &per_abe_nc_fclk, .rates = div_1_1_rates },
1196 { .parent = NULL },
1197};
1198
1199static struct clk mcasp2_fclk = {
1200 .name = "mcasp2_fclk",
1201 .parent = &func_96m_fclk,
1202 .ops = &clkops_null,
1203 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001204};
1205
1206static struct clk mcasp3_fclk = {
1207 .name = "mcasp3_fclk",
1208 .parent = &func_96m_fclk,
1209 .ops = &clkops_null,
1210 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001211};
1212
1213static struct clk ocp_abe_iclk = {
1214 .name = "ocp_abe_iclk",
1215 .parent = &aess_fclk,
1216 .ops = &clkops_null,
1217 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001218};
1219
1220static struct clk per_abe_24m_fclk = {
1221 .name = "per_abe_24m_fclk",
1222 .parent = &dpll_abe_m2_ck,
1223 .ops = &clkops_null,
1224 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001225};
1226
1227static const struct clksel pmd_stm_clock_mux_sel[] = {
1228 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
1229 { .parent = &dpll_core_m6_ck, .rates = div_1_1_rates },
Rajendra Nayak76cf5292010-09-27 14:02:54 -06001230 { .parent = &tie_low_clock_ck, .rates = div_1_2_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -07001231 { .parent = NULL },
1232};
1233
1234static struct clk pmd_stm_clock_mux_ck = {
1235 .name = "pmd_stm_clock_mux_ck",
1236 .parent = &sys_clkin_ck,
1237 .ops = &clkops_null,
1238 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001239};
1240
1241static struct clk pmd_trace_clk_mux_ck = {
1242 .name = "pmd_trace_clk_mux_ck",
1243 .parent = &sys_clkin_ck,
1244 .ops = &clkops_null,
1245 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001246};
1247
Rajendra Nayak76cf5292010-09-27 14:02:54 -06001248static const struct clksel syc_clk_div_div[] = {
1249 { .parent = &sys_clkin_ck, .rates = div2_1to2_rates },
1250 { .parent = NULL },
1251};
1252
Rajendra Nayak972c5422009-12-08 18:46:28 -07001253static struct clk syc_clk_div_ck = {
1254 .name = "syc_clk_div_ck",
1255 .parent = &sys_clkin_ck,
Rajendra Nayak76cf5292010-09-27 14:02:54 -06001256 .clksel = syc_clk_div_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001257 .clksel_reg = OMAP4430_CM_ABE_DSS_SYS_CLKSEL,
1258 .clksel_mask = OMAP4430_CLKSEL_0_0_MASK,
1259 .ops = &clkops_null,
1260 .recalc = &omap2_clksel_recalc,
1261 .round_rate = &omap2_clksel_round_rate,
1262 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001263};
1264
1265/* Leaf clocks controlled by modules */
1266
Rajendra Nayak54776052010-02-22 22:09:39 -07001267static struct clk aes1_fck = {
1268 .name = "aes1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001269 .ops = &clkops_omap2_dflt,
1270 .enable_reg = OMAP4430_CM_L4SEC_AES1_CLKCTRL,
1271 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1272 .clkdm_name = "l4_secure_clkdm",
1273 .parent = &l3_div_ck,
1274 .recalc = &followparent_recalc,
1275};
1276
Rajendra Nayak54776052010-02-22 22:09:39 -07001277static struct clk aes2_fck = {
1278 .name = "aes2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001279 .ops = &clkops_omap2_dflt,
1280 .enable_reg = OMAP4430_CM_L4SEC_AES2_CLKCTRL,
1281 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1282 .clkdm_name = "l4_secure_clkdm",
1283 .parent = &l3_div_ck,
1284 .recalc = &followparent_recalc,
1285};
1286
Rajendra Nayak54776052010-02-22 22:09:39 -07001287static struct clk aess_fck = {
1288 .name = "aess_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001289 .ops = &clkops_omap2_dflt,
1290 .enable_reg = OMAP4430_CM1_ABE_AESS_CLKCTRL,
1291 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1292 .clkdm_name = "abe_clkdm",
1293 .parent = &aess_fclk,
1294 .recalc = &followparent_recalc,
1295};
1296
Benoit Cousson1c03f422010-09-27 14:02:55 -06001297static struct clk bandgap_fclk = {
1298 .name = "bandgap_fclk",
1299 .ops = &clkops_omap2_dflt,
1300 .enable_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL,
1301 .enable_bit = OMAP4430_OPTFCLKEN_BGAP_32K_SHIFT,
1302 .clkdm_name = "l4_wkup_clkdm",
1303 .parent = &sys_32k_ck,
1304 .recalc = &followparent_recalc,
1305};
1306
Rajendra Nayak54776052010-02-22 22:09:39 -07001307static struct clk des3des_fck = {
1308 .name = "des3des_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001309 .ops = &clkops_omap2_dflt,
1310 .enable_reg = OMAP4430_CM_L4SEC_DES3DES_CLKCTRL,
1311 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1312 .clkdm_name = "l4_secure_clkdm",
1313 .parent = &l4_div_ck,
1314 .recalc = &followparent_recalc,
1315};
1316
1317static const struct clksel dmic_sync_mux_sel[] = {
1318 { .parent = &abe_24m_fclk, .rates = div_1_0_rates },
1319 { .parent = &syc_clk_div_ck, .rates = div_1_1_rates },
1320 { .parent = &func_24m_clk, .rates = div_1_2_rates },
1321 { .parent = NULL },
1322};
1323
1324static struct clk dmic_sync_mux_ck = {
1325 .name = "dmic_sync_mux_ck",
1326 .parent = &abe_24m_fclk,
1327 .clksel = dmic_sync_mux_sel,
1328 .init = &omap2_init_clksel_parent,
1329 .clksel_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL,
1330 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1331 .ops = &clkops_null,
1332 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001333};
1334
1335static const struct clksel func_dmic_abe_gfclk_sel[] = {
1336 { .parent = &dmic_sync_mux_ck, .rates = div_1_0_rates },
1337 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1338 { .parent = &slimbus_clk, .rates = div_1_2_rates },
1339 { .parent = NULL },
1340};
1341
Rajendra Nayak54776052010-02-22 22:09:39 -07001342/* Merged func_dmic_abe_gfclk into dmic */
1343static struct clk dmic_fck = {
1344 .name = "dmic_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001345 .parent = &dmic_sync_mux_ck,
1346 .clksel = func_dmic_abe_gfclk_sel,
1347 .init = &omap2_init_clksel_parent,
1348 .clksel_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL,
1349 .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK,
1350 .ops = &clkops_omap2_dflt,
1351 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001352 .enable_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL,
1353 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1354 .clkdm_name = "abe_clkdm",
1355};
1356
Benoit Cousson0e433272010-09-27 14:02:54 -06001357static struct clk dsp_fck = {
1358 .name = "dsp_fck",
1359 .ops = &clkops_omap2_dflt,
1360 .enable_reg = OMAP4430_CM_TESLA_TESLA_CLKCTRL,
1361 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1362 .clkdm_name = "tesla_clkdm",
1363 .parent = &dpll_iva_m4_ck,
1364 .recalc = &followparent_recalc,
1365};
1366
Benoit Cousson1c03f422010-09-27 14:02:55 -06001367static struct clk dss_sys_clk = {
1368 .name = "dss_sys_clk",
1369 .ops = &clkops_omap2_dflt,
1370 .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1371 .enable_bit = OMAP4430_OPTFCLKEN_SYS_CLK_SHIFT,
1372 .clkdm_name = "l3_dss_clkdm",
1373 .parent = &syc_clk_div_ck,
1374 .recalc = &followparent_recalc,
1375};
1376
1377static struct clk dss_tv_clk = {
1378 .name = "dss_tv_clk",
1379 .ops = &clkops_omap2_dflt,
1380 .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1381 .enable_bit = OMAP4430_OPTFCLKEN_TV_CLK_SHIFT,
1382 .clkdm_name = "l3_dss_clkdm",
1383 .parent = &extalt_clkin_ck,
1384 .recalc = &followparent_recalc,
1385};
1386
1387static struct clk dss_dss_clk = {
1388 .name = "dss_dss_clk",
1389 .ops = &clkops_omap2_dflt,
1390 .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1391 .enable_bit = OMAP4430_OPTFCLKEN_DSSCLK_SHIFT,
1392 .clkdm_name = "l3_dss_clkdm",
1393 .parent = &dpll_per_m5_ck,
1394 .recalc = &followparent_recalc,
1395};
1396
1397static struct clk dss_48mhz_clk = {
1398 .name = "dss_48mhz_clk",
1399 .ops = &clkops_omap2_dflt,
1400 .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1401 .enable_bit = OMAP4430_OPTFCLKEN_48MHZ_CLK_SHIFT,
1402 .clkdm_name = "l3_dss_clkdm",
1403 .parent = &func_48mc_fclk,
1404 .recalc = &followparent_recalc,
1405};
1406
Rajendra Nayak54776052010-02-22 22:09:39 -07001407static struct clk dss_fck = {
1408 .name = "dss_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001409 .ops = &clkops_omap2_dflt,
1410 .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1411 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1412 .clkdm_name = "l3_dss_clkdm",
1413 .parent = &l3_div_ck,
1414 .recalc = &followparent_recalc,
1415};
1416
Benoit Cousson0e433272010-09-27 14:02:54 -06001417static struct clk efuse_ctrl_cust_fck = {
1418 .name = "efuse_ctrl_cust_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001419 .ops = &clkops_omap2_dflt,
Benoit Cousson0e433272010-09-27 14:02:54 -06001420 .enable_reg = OMAP4430_CM_CEFUSE_CEFUSE_CLKCTRL,
1421 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1422 .clkdm_name = "l4_cefuse_clkdm",
1423 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001424 .recalc = &followparent_recalc,
1425};
1426
Benoit Cousson0e433272010-09-27 14:02:54 -06001427static struct clk emif1_fck = {
1428 .name = "emif1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001429 .ops = &clkops_omap2_dflt,
1430 .enable_reg = OMAP4430_CM_MEMIF_EMIF_1_CLKCTRL,
1431 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
Santosh Shilimkar090830b2010-06-16 19:01:33 +03001432 .flags = ENABLE_ON_INIT,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001433 .clkdm_name = "l3_emif_clkdm",
1434 .parent = &ddrphy_ck,
1435 .recalc = &followparent_recalc,
1436};
1437
Benoit Cousson0e433272010-09-27 14:02:54 -06001438static struct clk emif2_fck = {
1439 .name = "emif2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001440 .ops = &clkops_omap2_dflt,
1441 .enable_reg = OMAP4430_CM_MEMIF_EMIF_2_CLKCTRL,
1442 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
Santosh Shilimkar090830b2010-06-16 19:01:33 +03001443 .flags = ENABLE_ON_INIT,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001444 .clkdm_name = "l3_emif_clkdm",
1445 .parent = &ddrphy_ck,
1446 .recalc = &followparent_recalc,
1447};
1448
1449static const struct clksel fdif_fclk_div[] = {
1450 { .parent = &dpll_per_m4_ck, .rates = div3_1to4_rates },
1451 { .parent = NULL },
1452};
1453
Rajendra Nayak54776052010-02-22 22:09:39 -07001454/* Merged fdif_fclk into fdif */
1455static struct clk fdif_fck = {
1456 .name = "fdif_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001457 .parent = &dpll_per_m4_ck,
1458 .clksel = fdif_fclk_div,
1459 .clksel_reg = OMAP4430_CM_CAM_FDIF_CLKCTRL,
1460 .clksel_mask = OMAP4430_CLKSEL_FCLK_MASK,
1461 .ops = &clkops_omap2_dflt,
1462 .recalc = &omap2_clksel_recalc,
1463 .round_rate = &omap2_clksel_round_rate,
1464 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001465 .enable_reg = OMAP4430_CM_CAM_FDIF_CLKCTRL,
1466 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1467 .clkdm_name = "iss_clkdm",
1468};
1469
Benoit Cousson0e433272010-09-27 14:02:54 -06001470static struct clk fpka_fck = {
1471 .name = "fpka_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001472 .ops = &clkops_omap2_dflt,
Benoit Cousson0e433272010-09-27 14:02:54 -06001473 .enable_reg = OMAP4430_CM_L4SEC_PKAEIP29_CLKCTRL,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001474 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
Benoit Cousson0e433272010-09-27 14:02:54 -06001475 .clkdm_name = "l4_secure_clkdm",
1476 .parent = &l4_div_ck,
1477 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001478};
1479
Benoit Cousson1c03f422010-09-27 14:02:55 -06001480static struct clk gpio1_dbclk = {
1481 .name = "gpio1_dbclk",
1482 .ops = &clkops_omap2_dflt,
1483 .enable_reg = OMAP4430_CM_WKUP_GPIO1_CLKCTRL,
1484 .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT,
1485 .clkdm_name = "l4_wkup_clkdm",
1486 .parent = &sys_32k_ck,
1487 .recalc = &followparent_recalc,
1488};
1489
Rajendra Nayak54776052010-02-22 22:09:39 -07001490static struct clk gpio1_ick = {
1491 .name = "gpio1_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001492 .ops = &clkops_omap2_dflt,
1493 .enable_reg = OMAP4430_CM_WKUP_GPIO1_CLKCTRL,
1494 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1495 .clkdm_name = "l4_wkup_clkdm",
1496 .parent = &l4_wkup_clk_mux_ck,
1497 .recalc = &followparent_recalc,
1498};
1499
Benoit Cousson1c03f422010-09-27 14:02:55 -06001500static struct clk gpio2_dbclk = {
1501 .name = "gpio2_dbclk",
1502 .ops = &clkops_omap2_dflt,
1503 .enable_reg = OMAP4430_CM_L4PER_GPIO2_CLKCTRL,
1504 .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT,
1505 .clkdm_name = "l4_per_clkdm",
1506 .parent = &sys_32k_ck,
1507 .recalc = &followparent_recalc,
1508};
1509
Rajendra Nayak54776052010-02-22 22:09:39 -07001510static struct clk gpio2_ick = {
1511 .name = "gpio2_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001512 .ops = &clkops_omap2_dflt,
1513 .enable_reg = OMAP4430_CM_L4PER_GPIO2_CLKCTRL,
1514 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1515 .clkdm_name = "l4_per_clkdm",
1516 .parent = &l4_div_ck,
1517 .recalc = &followparent_recalc,
1518};
1519
Benoit Cousson1c03f422010-09-27 14:02:55 -06001520static struct clk gpio3_dbclk = {
1521 .name = "gpio3_dbclk",
1522 .ops = &clkops_omap2_dflt,
1523 .enable_reg = OMAP4430_CM_L4PER_GPIO3_CLKCTRL,
1524 .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT,
1525 .clkdm_name = "l4_per_clkdm",
1526 .parent = &sys_32k_ck,
1527 .recalc = &followparent_recalc,
1528};
1529
Rajendra Nayak54776052010-02-22 22:09:39 -07001530static struct clk gpio3_ick = {
1531 .name = "gpio3_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001532 .ops = &clkops_omap2_dflt,
1533 .enable_reg = OMAP4430_CM_L4PER_GPIO3_CLKCTRL,
1534 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1535 .clkdm_name = "l4_per_clkdm",
1536 .parent = &l4_div_ck,
1537 .recalc = &followparent_recalc,
1538};
1539
Benoit Cousson1c03f422010-09-27 14:02:55 -06001540static struct clk gpio4_dbclk = {
1541 .name = "gpio4_dbclk",
1542 .ops = &clkops_omap2_dflt,
1543 .enable_reg = OMAP4430_CM_L4PER_GPIO4_CLKCTRL,
1544 .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT,
1545 .clkdm_name = "l4_per_clkdm",
1546 .parent = &sys_32k_ck,
1547 .recalc = &followparent_recalc,
1548};
1549
Rajendra Nayak54776052010-02-22 22:09:39 -07001550static struct clk gpio4_ick = {
1551 .name = "gpio4_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001552 .ops = &clkops_omap2_dflt,
1553 .enable_reg = OMAP4430_CM_L4PER_GPIO4_CLKCTRL,
1554 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1555 .clkdm_name = "l4_per_clkdm",
1556 .parent = &l4_div_ck,
1557 .recalc = &followparent_recalc,
1558};
1559
Benoit Cousson1c03f422010-09-27 14:02:55 -06001560static struct clk gpio5_dbclk = {
1561 .name = "gpio5_dbclk",
1562 .ops = &clkops_omap2_dflt,
1563 .enable_reg = OMAP4430_CM_L4PER_GPIO5_CLKCTRL,
1564 .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT,
1565 .clkdm_name = "l4_per_clkdm",
1566 .parent = &sys_32k_ck,
1567 .recalc = &followparent_recalc,
1568};
1569
Rajendra Nayak54776052010-02-22 22:09:39 -07001570static struct clk gpio5_ick = {
1571 .name = "gpio5_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001572 .ops = &clkops_omap2_dflt,
1573 .enable_reg = OMAP4430_CM_L4PER_GPIO5_CLKCTRL,
1574 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1575 .clkdm_name = "l4_per_clkdm",
1576 .parent = &l4_div_ck,
1577 .recalc = &followparent_recalc,
1578};
1579
Benoit Cousson1c03f422010-09-27 14:02:55 -06001580static struct clk gpio6_dbclk = {
1581 .name = "gpio6_dbclk",
1582 .ops = &clkops_omap2_dflt,
1583 .enable_reg = OMAP4430_CM_L4PER_GPIO6_CLKCTRL,
1584 .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT,
1585 .clkdm_name = "l4_per_clkdm",
1586 .parent = &sys_32k_ck,
1587 .recalc = &followparent_recalc,
1588};
1589
Rajendra Nayak54776052010-02-22 22:09:39 -07001590static struct clk gpio6_ick = {
1591 .name = "gpio6_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001592 .ops = &clkops_omap2_dflt,
1593 .enable_reg = OMAP4430_CM_L4PER_GPIO6_CLKCTRL,
1594 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1595 .clkdm_name = "l4_per_clkdm",
1596 .parent = &l4_div_ck,
1597 .recalc = &followparent_recalc,
1598};
1599
Rajendra Nayak54776052010-02-22 22:09:39 -07001600static struct clk gpmc_ick = {
1601 .name = "gpmc_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001602 .ops = &clkops_omap2_dflt,
1603 .enable_reg = OMAP4430_CM_L3_2_GPMC_CLKCTRL,
1604 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1605 .clkdm_name = "l3_2_clkdm",
1606 .parent = &l3_div_ck,
1607 .recalc = &followparent_recalc,
1608};
1609
Benoit Cousson0e433272010-09-27 14:02:54 -06001610static const struct clksel sgx_clk_mux_sel[] = {
1611 { .parent = &dpll_core_m7_ck, .rates = div_1_0_rates },
1612 { .parent = &dpll_per_m7_ck, .rates = div_1_1_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -07001613 { .parent = NULL },
1614};
1615
Benoit Cousson0e433272010-09-27 14:02:54 -06001616/* Merged sgx_clk_mux into gpu */
1617static struct clk gpu_fck = {
1618 .name = "gpu_fck",
1619 .parent = &dpll_core_m7_ck,
1620 .clksel = sgx_clk_mux_sel,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001621 .init = &omap2_init_clksel_parent,
Benoit Cousson0e433272010-09-27 14:02:54 -06001622 .clksel_reg = OMAP4430_CM_GFX_GFX_CLKCTRL,
1623 .clksel_mask = OMAP4430_CLKSEL_SGX_FCLK_MASK,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001624 .ops = &clkops_omap2_dflt,
1625 .recalc = &omap2_clksel_recalc,
Benoit Cousson0e433272010-09-27 14:02:54 -06001626 .enable_reg = OMAP4430_CM_GFX_GFX_CLKCTRL,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001627 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
Benoit Cousson0e433272010-09-27 14:02:54 -06001628 .clkdm_name = "l3_gfx_clkdm",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001629};
1630
Rajendra Nayak54776052010-02-22 22:09:39 -07001631static struct clk hdq1w_fck = {
1632 .name = "hdq1w_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001633 .ops = &clkops_omap2_dflt,
1634 .enable_reg = OMAP4430_CM_L4PER_HDQ1W_CLKCTRL,
1635 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1636 .clkdm_name = "l4_per_clkdm",
1637 .parent = &func_12m_fclk,
1638 .recalc = &followparent_recalc,
1639};
1640
Rajendra Nayak76cf5292010-09-27 14:02:54 -06001641static const struct clksel hsi_fclk_div[] = {
1642 { .parent = &dpll_per_m2x2_ck, .rates = div3_1to4_rates },
1643 { .parent = NULL },
1644};
1645
Rajendra Nayak54776052010-02-22 22:09:39 -07001646/* Merged hsi_fclk into hsi */
Benoit Cousson0e433272010-09-27 14:02:54 -06001647static struct clk hsi_fck = {
1648 .name = "hsi_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001649 .parent = &dpll_per_m2x2_ck,
Rajendra Nayak76cf5292010-09-27 14:02:54 -06001650 .clksel = hsi_fclk_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001651 .clksel_reg = OMAP4430_CM_L3INIT_HSI_CLKCTRL,
1652 .clksel_mask = OMAP4430_CLKSEL_24_25_MASK,
1653 .ops = &clkops_omap2_dflt,
1654 .recalc = &omap2_clksel_recalc,
1655 .round_rate = &omap2_clksel_round_rate,
1656 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001657 .enable_reg = OMAP4430_CM_L3INIT_HSI_CLKCTRL,
1658 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1659 .clkdm_name = "l3_init_clkdm",
1660};
1661
Rajendra Nayak54776052010-02-22 22:09:39 -07001662static struct clk i2c1_fck = {
1663 .name = "i2c1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001664 .ops = &clkops_omap2_dflt,
1665 .enable_reg = OMAP4430_CM_L4PER_I2C1_CLKCTRL,
1666 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1667 .clkdm_name = "l4_per_clkdm",
1668 .parent = &func_96m_fclk,
1669 .recalc = &followparent_recalc,
1670};
1671
Rajendra Nayak54776052010-02-22 22:09:39 -07001672static struct clk i2c2_fck = {
1673 .name = "i2c2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001674 .ops = &clkops_omap2_dflt,
1675 .enable_reg = OMAP4430_CM_L4PER_I2C2_CLKCTRL,
1676 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1677 .clkdm_name = "l4_per_clkdm",
1678 .parent = &func_96m_fclk,
1679 .recalc = &followparent_recalc,
1680};
1681
Rajendra Nayak54776052010-02-22 22:09:39 -07001682static struct clk i2c3_fck = {
1683 .name = "i2c3_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001684 .ops = &clkops_omap2_dflt,
1685 .enable_reg = OMAP4430_CM_L4PER_I2C3_CLKCTRL,
1686 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1687 .clkdm_name = "l4_per_clkdm",
1688 .parent = &func_96m_fclk,
1689 .recalc = &followparent_recalc,
1690};
1691
Rajendra Nayak54776052010-02-22 22:09:39 -07001692static struct clk i2c4_fck = {
1693 .name = "i2c4_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001694 .ops = &clkops_omap2_dflt,
1695 .enable_reg = OMAP4430_CM_L4PER_I2C4_CLKCTRL,
1696 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1697 .clkdm_name = "l4_per_clkdm",
1698 .parent = &func_96m_fclk,
1699 .recalc = &followparent_recalc,
1700};
1701
Benoit Cousson0e433272010-09-27 14:02:54 -06001702static struct clk ipu_fck = {
1703 .name = "ipu_fck",
1704 .ops = &clkops_omap2_dflt,
1705 .enable_reg = OMAP4430_CM_DUCATI_DUCATI_CLKCTRL,
1706 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1707 .clkdm_name = "ducati_clkdm",
1708 .parent = &ducati_clk_mux_ck,
1709 .recalc = &followparent_recalc,
1710};
1711
Benoit Cousson1c03f422010-09-27 14:02:55 -06001712static struct clk iss_ctrlclk = {
1713 .name = "iss_ctrlclk",
1714 .ops = &clkops_omap2_dflt,
1715 .enable_reg = OMAP4430_CM_CAM_ISS_CLKCTRL,
1716 .enable_bit = OMAP4430_OPTFCLKEN_CTRLCLK_SHIFT,
1717 .clkdm_name = "iss_clkdm",
1718 .parent = &func_96m_fclk,
1719 .recalc = &followparent_recalc,
1720};
1721
Rajendra Nayak54776052010-02-22 22:09:39 -07001722static struct clk iss_fck = {
1723 .name = "iss_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001724 .ops = &clkops_omap2_dflt,
1725 .enable_reg = OMAP4430_CM_CAM_ISS_CLKCTRL,
1726 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1727 .clkdm_name = "iss_clkdm",
1728 .parent = &ducati_clk_mux_ck,
1729 .recalc = &followparent_recalc,
1730};
1731
Benoit Cousson0e433272010-09-27 14:02:54 -06001732static struct clk iva_fck = {
1733 .name = "iva_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001734 .ops = &clkops_omap2_dflt,
1735 .enable_reg = OMAP4430_CM_IVAHD_IVAHD_CLKCTRL,
1736 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1737 .clkdm_name = "ivahd_clkdm",
1738 .parent = &dpll_iva_m5_ck,
1739 .recalc = &followparent_recalc,
1740};
1741
Benoit Cousson0e433272010-09-27 14:02:54 -06001742static struct clk kbd_fck = {
1743 .name = "kbd_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001744 .ops = &clkops_omap2_dflt,
1745 .enable_reg = OMAP4430_CM_WKUP_KEYBOARD_CLKCTRL,
1746 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1747 .clkdm_name = "l4_wkup_clkdm",
1748 .parent = &sys_32k_ck,
1749 .recalc = &followparent_recalc,
1750};
1751
Benoit Cousson0e433272010-09-27 14:02:54 -06001752static struct clk l3_instr_ick = {
1753 .name = "l3_instr_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001754 .ops = &clkops_omap2_dflt,
1755 .enable_reg = OMAP4430_CM_L3INSTR_L3_INSTR_CLKCTRL,
1756 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1757 .clkdm_name = "l3_instr_clkdm",
1758 .parent = &l3_div_ck,
1759 .recalc = &followparent_recalc,
1760};
1761
Benoit Cousson0e433272010-09-27 14:02:54 -06001762static struct clk l3_main_3_ick = {
1763 .name = "l3_main_3_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001764 .ops = &clkops_omap2_dflt,
1765 .enable_reg = OMAP4430_CM_L3INSTR_L3_3_CLKCTRL,
1766 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1767 .clkdm_name = "l3_instr_clkdm",
1768 .parent = &l3_div_ck,
1769 .recalc = &followparent_recalc,
1770};
1771
1772static struct clk mcasp_sync_mux_ck = {
1773 .name = "mcasp_sync_mux_ck",
1774 .parent = &abe_24m_fclk,
1775 .clksel = dmic_sync_mux_sel,
1776 .init = &omap2_init_clksel_parent,
1777 .clksel_reg = OMAP4430_CM1_ABE_MCASP_CLKCTRL,
1778 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1779 .ops = &clkops_null,
1780 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001781};
1782
1783static const struct clksel func_mcasp_abe_gfclk_sel[] = {
1784 { .parent = &mcasp_sync_mux_ck, .rates = div_1_0_rates },
1785 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1786 { .parent = &slimbus_clk, .rates = div_1_2_rates },
1787 { .parent = NULL },
1788};
1789
Rajendra Nayak54776052010-02-22 22:09:39 -07001790/* Merged func_mcasp_abe_gfclk into mcasp */
1791static struct clk mcasp_fck = {
1792 .name = "mcasp_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001793 .parent = &mcasp_sync_mux_ck,
1794 .clksel = func_mcasp_abe_gfclk_sel,
1795 .init = &omap2_init_clksel_parent,
1796 .clksel_reg = OMAP4430_CM1_ABE_MCASP_CLKCTRL,
1797 .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK,
1798 .ops = &clkops_omap2_dflt,
1799 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001800 .enable_reg = OMAP4430_CM1_ABE_MCASP_CLKCTRL,
1801 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1802 .clkdm_name = "abe_clkdm",
1803};
1804
1805static struct clk mcbsp1_sync_mux_ck = {
1806 .name = "mcbsp1_sync_mux_ck",
1807 .parent = &abe_24m_fclk,
1808 .clksel = dmic_sync_mux_sel,
1809 .init = &omap2_init_clksel_parent,
1810 .clksel_reg = OMAP4430_CM1_ABE_MCBSP1_CLKCTRL,
1811 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1812 .ops = &clkops_null,
1813 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001814};
1815
1816static const struct clksel func_mcbsp1_gfclk_sel[] = {
1817 { .parent = &mcbsp1_sync_mux_ck, .rates = div_1_0_rates },
1818 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1819 { .parent = &slimbus_clk, .rates = div_1_2_rates },
1820 { .parent = NULL },
1821};
1822
Rajendra Nayak54776052010-02-22 22:09:39 -07001823/* Merged func_mcbsp1_gfclk into mcbsp1 */
1824static struct clk mcbsp1_fck = {
1825 .name = "mcbsp1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001826 .parent = &mcbsp1_sync_mux_ck,
1827 .clksel = func_mcbsp1_gfclk_sel,
1828 .init = &omap2_init_clksel_parent,
1829 .clksel_reg = OMAP4430_CM1_ABE_MCBSP1_CLKCTRL,
1830 .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK,
1831 .ops = &clkops_omap2_dflt,
1832 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001833 .enable_reg = OMAP4430_CM1_ABE_MCBSP1_CLKCTRL,
1834 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1835 .clkdm_name = "abe_clkdm",
1836};
1837
1838static struct clk mcbsp2_sync_mux_ck = {
1839 .name = "mcbsp2_sync_mux_ck",
1840 .parent = &abe_24m_fclk,
1841 .clksel = dmic_sync_mux_sel,
1842 .init = &omap2_init_clksel_parent,
1843 .clksel_reg = OMAP4430_CM1_ABE_MCBSP2_CLKCTRL,
1844 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1845 .ops = &clkops_null,
1846 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001847};
1848
1849static const struct clksel func_mcbsp2_gfclk_sel[] = {
1850 { .parent = &mcbsp2_sync_mux_ck, .rates = div_1_0_rates },
1851 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1852 { .parent = &slimbus_clk, .rates = div_1_2_rates },
1853 { .parent = NULL },
1854};
1855
Rajendra Nayak54776052010-02-22 22:09:39 -07001856/* Merged func_mcbsp2_gfclk into mcbsp2 */
1857static struct clk mcbsp2_fck = {
1858 .name = "mcbsp2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001859 .parent = &mcbsp2_sync_mux_ck,
1860 .clksel = func_mcbsp2_gfclk_sel,
1861 .init = &omap2_init_clksel_parent,
1862 .clksel_reg = OMAP4430_CM1_ABE_MCBSP2_CLKCTRL,
1863 .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK,
1864 .ops = &clkops_omap2_dflt,
1865 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001866 .enable_reg = OMAP4430_CM1_ABE_MCBSP2_CLKCTRL,
1867 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1868 .clkdm_name = "abe_clkdm",
1869};
1870
1871static struct clk mcbsp3_sync_mux_ck = {
1872 .name = "mcbsp3_sync_mux_ck",
1873 .parent = &abe_24m_fclk,
1874 .clksel = dmic_sync_mux_sel,
1875 .init = &omap2_init_clksel_parent,
1876 .clksel_reg = OMAP4430_CM1_ABE_MCBSP3_CLKCTRL,
1877 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1878 .ops = &clkops_null,
1879 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001880};
1881
1882static const struct clksel func_mcbsp3_gfclk_sel[] = {
1883 { .parent = &mcbsp3_sync_mux_ck, .rates = div_1_0_rates },
1884 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1885 { .parent = &slimbus_clk, .rates = div_1_2_rates },
1886 { .parent = NULL },
1887};
1888
Rajendra Nayak54776052010-02-22 22:09:39 -07001889/* Merged func_mcbsp3_gfclk into mcbsp3 */
1890static struct clk mcbsp3_fck = {
1891 .name = "mcbsp3_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001892 .parent = &mcbsp3_sync_mux_ck,
1893 .clksel = func_mcbsp3_gfclk_sel,
1894 .init = &omap2_init_clksel_parent,
1895 .clksel_reg = OMAP4430_CM1_ABE_MCBSP3_CLKCTRL,
1896 .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK,
1897 .ops = &clkops_omap2_dflt,
1898 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001899 .enable_reg = OMAP4430_CM1_ABE_MCBSP3_CLKCTRL,
1900 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1901 .clkdm_name = "abe_clkdm",
1902};
1903
1904static struct clk mcbsp4_sync_mux_ck = {
1905 .name = "mcbsp4_sync_mux_ck",
1906 .parent = &func_96m_fclk,
1907 .clksel = mcasp2_fclk_sel,
1908 .init = &omap2_init_clksel_parent,
1909 .clksel_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL,
1910 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1911 .ops = &clkops_null,
1912 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001913};
1914
1915static const struct clksel per_mcbsp4_gfclk_sel[] = {
1916 { .parent = &mcbsp4_sync_mux_ck, .rates = div_1_0_rates },
1917 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1918 { .parent = NULL },
1919};
1920
Rajendra Nayak54776052010-02-22 22:09:39 -07001921/* Merged per_mcbsp4_gfclk into mcbsp4 */
1922static struct clk mcbsp4_fck = {
1923 .name = "mcbsp4_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001924 .parent = &mcbsp4_sync_mux_ck,
1925 .clksel = per_mcbsp4_gfclk_sel,
1926 .init = &omap2_init_clksel_parent,
1927 .clksel_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL,
1928 .clksel_mask = OMAP4430_CLKSEL_SOURCE_24_24_MASK,
1929 .ops = &clkops_omap2_dflt,
1930 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001931 .enable_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL,
1932 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1933 .clkdm_name = "l4_per_clkdm",
1934};
1935
Benoit Cousson0e433272010-09-27 14:02:54 -06001936static struct clk mcpdm_fck = {
1937 .name = "mcpdm_fck",
1938 .ops = &clkops_omap2_dflt,
1939 .enable_reg = OMAP4430_CM1_ABE_PDM_CLKCTRL,
1940 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1941 .clkdm_name = "abe_clkdm",
1942 .parent = &pad_clks_ck,
1943 .recalc = &followparent_recalc,
1944};
1945
Rajendra Nayak54776052010-02-22 22:09:39 -07001946static struct clk mcspi1_fck = {
1947 .name = "mcspi1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001948 .ops = &clkops_omap2_dflt,
1949 .enable_reg = OMAP4430_CM_L4PER_MCSPI1_CLKCTRL,
1950 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1951 .clkdm_name = "l4_per_clkdm",
1952 .parent = &func_48m_fclk,
1953 .recalc = &followparent_recalc,
1954};
1955
Rajendra Nayak54776052010-02-22 22:09:39 -07001956static struct clk mcspi2_fck = {
1957 .name = "mcspi2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001958 .ops = &clkops_omap2_dflt,
1959 .enable_reg = OMAP4430_CM_L4PER_MCSPI2_CLKCTRL,
1960 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1961 .clkdm_name = "l4_per_clkdm",
1962 .parent = &func_48m_fclk,
1963 .recalc = &followparent_recalc,
1964};
1965
Rajendra Nayak54776052010-02-22 22:09:39 -07001966static struct clk mcspi3_fck = {
1967 .name = "mcspi3_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001968 .ops = &clkops_omap2_dflt,
1969 .enable_reg = OMAP4430_CM_L4PER_MCSPI3_CLKCTRL,
1970 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1971 .clkdm_name = "l4_per_clkdm",
1972 .parent = &func_48m_fclk,
1973 .recalc = &followparent_recalc,
1974};
1975
Rajendra Nayak54776052010-02-22 22:09:39 -07001976static struct clk mcspi4_fck = {
1977 .name = "mcspi4_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001978 .ops = &clkops_omap2_dflt,
1979 .enable_reg = OMAP4430_CM_L4PER_MCSPI4_CLKCTRL,
1980 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1981 .clkdm_name = "l4_per_clkdm",
1982 .parent = &func_48m_fclk,
1983 .recalc = &followparent_recalc,
1984};
1985
Rajendra Nayak54776052010-02-22 22:09:39 -07001986/* Merged hsmmc1_fclk into mmc1 */
1987static struct clk mmc1_fck = {
1988 .name = "mmc1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001989 .parent = &func_64m_fclk,
1990 .clksel = hsmmc6_fclk_sel,
1991 .init = &omap2_init_clksel_parent,
1992 .clksel_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL,
1993 .clksel_mask = OMAP4430_CLKSEL_MASK,
1994 .ops = &clkops_omap2_dflt,
1995 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001996 .enable_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL,
1997 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1998 .clkdm_name = "l3_init_clkdm",
1999};
2000
Rajendra Nayak54776052010-02-22 22:09:39 -07002001/* Merged hsmmc2_fclk into mmc2 */
2002static struct clk mmc2_fck = {
2003 .name = "mmc2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002004 .parent = &func_64m_fclk,
2005 .clksel = hsmmc6_fclk_sel,
2006 .init = &omap2_init_clksel_parent,
2007 .clksel_reg = OMAP4430_CM_L3INIT_MMC2_CLKCTRL,
2008 .clksel_mask = OMAP4430_CLKSEL_MASK,
2009 .ops = &clkops_omap2_dflt,
2010 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07002011 .enable_reg = OMAP4430_CM_L3INIT_MMC2_CLKCTRL,
2012 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2013 .clkdm_name = "l3_init_clkdm",
2014};
2015
Rajendra Nayak54776052010-02-22 22:09:39 -07002016static struct clk mmc3_fck = {
2017 .name = "mmc3_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002018 .ops = &clkops_omap2_dflt,
2019 .enable_reg = OMAP4430_CM_L4PER_MMCSD3_CLKCTRL,
2020 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2021 .clkdm_name = "l4_per_clkdm",
2022 .parent = &func_48m_fclk,
2023 .recalc = &followparent_recalc,
2024};
2025
Rajendra Nayak54776052010-02-22 22:09:39 -07002026static struct clk mmc4_fck = {
2027 .name = "mmc4_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002028 .ops = &clkops_omap2_dflt,
2029 .enable_reg = OMAP4430_CM_L4PER_MMCSD4_CLKCTRL,
2030 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2031 .clkdm_name = "l4_per_clkdm",
2032 .parent = &func_48m_fclk,
2033 .recalc = &followparent_recalc,
2034};
2035
Rajendra Nayak54776052010-02-22 22:09:39 -07002036static struct clk mmc5_fck = {
2037 .name = "mmc5_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002038 .ops = &clkops_omap2_dflt,
2039 .enable_reg = OMAP4430_CM_L4PER_MMCSD5_CLKCTRL,
2040 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2041 .clkdm_name = "l4_per_clkdm",
2042 .parent = &func_48m_fclk,
2043 .recalc = &followparent_recalc,
2044};
2045
Benoit Cousson1c03f422010-09-27 14:02:55 -06002046static struct clk ocp2scp_usb_phy_phy_48m = {
2047 .name = "ocp2scp_usb_phy_phy_48m",
2048 .ops = &clkops_omap2_dflt,
2049 .enable_reg = OMAP4430_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL,
2050 .enable_bit = OMAP4430_OPTFCLKEN_PHY_48M_SHIFT,
2051 .clkdm_name = "l3_init_clkdm",
2052 .parent = &func_48m_fclk,
2053 .recalc = &followparent_recalc,
2054};
2055
Benoit Cousson0edc9e82010-09-27 14:02:56 -06002056static struct clk ocp2scp_usb_phy_ick = {
2057 .name = "ocp2scp_usb_phy_ick",
2058 .ops = &clkops_omap2_dflt,
2059 .enable_reg = OMAP4430_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL,
2060 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2061 .clkdm_name = "l3_init_clkdm",
2062 .parent = &l4_div_ck,
2063 .recalc = &followparent_recalc,
2064};
2065
Benoit Cousson0e433272010-09-27 14:02:54 -06002066static struct clk ocp_wp_noc_ick = {
2067 .name = "ocp_wp_noc_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002068 .ops = &clkops_omap2_dflt,
2069 .enable_reg = OMAP4430_CM_L3INSTR_OCP_WP1_CLKCTRL,
2070 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2071 .clkdm_name = "l3_instr_clkdm",
2072 .parent = &l3_div_ck,
2073 .recalc = &followparent_recalc,
2074};
2075
Rajendra Nayak54776052010-02-22 22:09:39 -07002076static struct clk rng_ick = {
2077 .name = "rng_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002078 .ops = &clkops_omap2_dflt,
2079 .enable_reg = OMAP4430_CM_L4SEC_RNG_CLKCTRL,
2080 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2081 .clkdm_name = "l4_secure_clkdm",
2082 .parent = &l4_div_ck,
2083 .recalc = &followparent_recalc,
2084};
2085
Benoit Cousson0e433272010-09-27 14:02:54 -06002086static struct clk sha2md5_fck = {
2087 .name = "sha2md5_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002088 .ops = &clkops_omap2_dflt,
2089 .enable_reg = OMAP4430_CM_L4SEC_SHA2MD51_CLKCTRL,
2090 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2091 .clkdm_name = "l4_secure_clkdm",
2092 .parent = &l3_div_ck,
2093 .recalc = &followparent_recalc,
2094};
2095
Benoit Cousson0e433272010-09-27 14:02:54 -06002096static struct clk sl2if_ick = {
2097 .name = "sl2if_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002098 .ops = &clkops_omap2_dflt,
2099 .enable_reg = OMAP4430_CM_IVAHD_SL2_CLKCTRL,
2100 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2101 .clkdm_name = "ivahd_clkdm",
2102 .parent = &dpll_iva_m5_ck,
2103 .recalc = &followparent_recalc,
2104};
2105
Benoit Cousson1c03f422010-09-27 14:02:55 -06002106static struct clk slimbus1_fclk_1 = {
2107 .name = "slimbus1_fclk_1",
2108 .ops = &clkops_omap2_dflt,
2109 .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL,
2110 .enable_bit = OMAP4430_OPTFCLKEN_FCLK1_SHIFT,
2111 .clkdm_name = "abe_clkdm",
2112 .parent = &func_24m_clk,
2113 .recalc = &followparent_recalc,
2114};
2115
2116static struct clk slimbus1_fclk_0 = {
2117 .name = "slimbus1_fclk_0",
2118 .ops = &clkops_omap2_dflt,
2119 .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL,
2120 .enable_bit = OMAP4430_OPTFCLKEN_FCLK0_SHIFT,
2121 .clkdm_name = "abe_clkdm",
2122 .parent = &abe_24m_fclk,
2123 .recalc = &followparent_recalc,
2124};
2125
2126static struct clk slimbus1_fclk_2 = {
2127 .name = "slimbus1_fclk_2",
2128 .ops = &clkops_omap2_dflt,
2129 .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL,
2130 .enable_bit = OMAP4430_OPTFCLKEN_FCLK2_SHIFT,
2131 .clkdm_name = "abe_clkdm",
2132 .parent = &pad_clks_ck,
2133 .recalc = &followparent_recalc,
2134};
2135
2136static struct clk slimbus1_slimbus_clk = {
2137 .name = "slimbus1_slimbus_clk",
2138 .ops = &clkops_omap2_dflt,
2139 .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL,
2140 .enable_bit = OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_SHIFT,
2141 .clkdm_name = "abe_clkdm",
2142 .parent = &slimbus_clk,
2143 .recalc = &followparent_recalc,
2144};
2145
Rajendra Nayak54776052010-02-22 22:09:39 -07002146static struct clk slimbus1_fck = {
2147 .name = "slimbus1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002148 .ops = &clkops_omap2_dflt,
2149 .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL,
2150 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2151 .clkdm_name = "abe_clkdm",
2152 .parent = &ocp_abe_iclk,
2153 .recalc = &followparent_recalc,
2154};
2155
Benoit Cousson1c03f422010-09-27 14:02:55 -06002156static struct clk slimbus2_fclk_1 = {
2157 .name = "slimbus2_fclk_1",
2158 .ops = &clkops_omap2_dflt,
2159 .enable_reg = OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL,
2160 .enable_bit = OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_SHIFT,
2161 .clkdm_name = "l4_per_clkdm",
2162 .parent = &per_abe_24m_fclk,
2163 .recalc = &followparent_recalc,
2164};
2165
2166static struct clk slimbus2_fclk_0 = {
2167 .name = "slimbus2_fclk_0",
2168 .ops = &clkops_omap2_dflt,
2169 .enable_reg = OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL,
2170 .enable_bit = OMAP4430_OPTFCLKEN_PER24MC_GFCLK_SHIFT,
2171 .clkdm_name = "l4_per_clkdm",
2172 .parent = &func_24mc_fclk,
2173 .recalc = &followparent_recalc,
2174};
2175
2176static struct clk slimbus2_slimbus_clk = {
2177 .name = "slimbus2_slimbus_clk",
2178 .ops = &clkops_omap2_dflt,
2179 .enable_reg = OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL,
2180 .enable_bit = OMAP4430_OPTFCLKEN_SLIMBUS_CLK_SHIFT,
2181 .clkdm_name = "l4_per_clkdm",
2182 .parent = &pad_slimbus_core_clks_ck,
2183 .recalc = &followparent_recalc,
2184};
2185
Rajendra Nayak54776052010-02-22 22:09:39 -07002186static struct clk slimbus2_fck = {
2187 .name = "slimbus2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002188 .ops = &clkops_omap2_dflt,
2189 .enable_reg = OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL,
2190 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2191 .clkdm_name = "l4_per_clkdm",
2192 .parent = &l4_div_ck,
2193 .recalc = &followparent_recalc,
2194};
2195
Benoit Cousson0e433272010-09-27 14:02:54 -06002196static struct clk smartreflex_core_fck = {
2197 .name = "smartreflex_core_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002198 .ops = &clkops_omap2_dflt,
2199 .enable_reg = OMAP4430_CM_ALWON_SR_CORE_CLKCTRL,
2200 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2201 .clkdm_name = "l4_ao_clkdm",
2202 .parent = &l4_wkup_clk_mux_ck,
2203 .recalc = &followparent_recalc,
2204};
2205
Benoit Cousson0e433272010-09-27 14:02:54 -06002206static struct clk smartreflex_iva_fck = {
2207 .name = "smartreflex_iva_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002208 .ops = &clkops_omap2_dflt,
2209 .enable_reg = OMAP4430_CM_ALWON_SR_IVA_CLKCTRL,
2210 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2211 .clkdm_name = "l4_ao_clkdm",
2212 .parent = &l4_wkup_clk_mux_ck,
2213 .recalc = &followparent_recalc,
2214};
2215
Benoit Cousson0e433272010-09-27 14:02:54 -06002216static struct clk smartreflex_mpu_fck = {
2217 .name = "smartreflex_mpu_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002218 .ops = &clkops_omap2_dflt,
2219 .enable_reg = OMAP4430_CM_ALWON_SR_MPU_CLKCTRL,
2220 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2221 .clkdm_name = "l4_ao_clkdm",
2222 .parent = &l4_wkup_clk_mux_ck,
2223 .recalc = &followparent_recalc,
2224};
2225
Benoit Cousson0e433272010-09-27 14:02:54 -06002226/* Merged dmt1_clk_mux into timer1 */
2227static struct clk timer1_fck = {
2228 .name = "timer1_fck",
2229 .parent = &sys_clkin_ck,
2230 .clksel = abe_dpll_bypass_clk_mux_sel,
2231 .init = &omap2_init_clksel_parent,
2232 .clksel_reg = OMAP4430_CM_WKUP_TIMER1_CLKCTRL,
2233 .clksel_mask = OMAP4430_CLKSEL_MASK,
Rajendra Nayak972c5422009-12-08 18:46:28 -07002234 .ops = &clkops_omap2_dflt,
Benoit Cousson0e433272010-09-27 14:02:54 -06002235 .recalc = &omap2_clksel_recalc,
2236 .enable_reg = OMAP4430_CM_WKUP_TIMER1_CLKCTRL,
2237 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2238 .clkdm_name = "l4_wkup_clkdm",
2239};
2240
2241/* Merged cm2_dm10_mux into timer10 */
2242static struct clk timer10_fck = {
2243 .name = "timer10_fck",
2244 .parent = &sys_clkin_ck,
2245 .clksel = abe_dpll_bypass_clk_mux_sel,
2246 .init = &omap2_init_clksel_parent,
2247 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER10_CLKCTRL,
2248 .clksel_mask = OMAP4430_CLKSEL_MASK,
2249 .ops = &clkops_omap2_dflt,
2250 .recalc = &omap2_clksel_recalc,
2251 .enable_reg = OMAP4430_CM_L4PER_DMTIMER10_CLKCTRL,
2252 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2253 .clkdm_name = "l4_per_clkdm",
2254};
2255
2256/* Merged cm2_dm11_mux into timer11 */
2257static struct clk timer11_fck = {
2258 .name = "timer11_fck",
2259 .parent = &sys_clkin_ck,
2260 .clksel = abe_dpll_bypass_clk_mux_sel,
2261 .init = &omap2_init_clksel_parent,
2262 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER11_CLKCTRL,
2263 .clksel_mask = OMAP4430_CLKSEL_MASK,
2264 .ops = &clkops_omap2_dflt,
2265 .recalc = &omap2_clksel_recalc,
2266 .enable_reg = OMAP4430_CM_L4PER_DMTIMER11_CLKCTRL,
2267 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2268 .clkdm_name = "l4_per_clkdm",
2269};
2270
2271/* Merged cm2_dm2_mux into timer2 */
2272static struct clk timer2_fck = {
2273 .name = "timer2_fck",
2274 .parent = &sys_clkin_ck,
2275 .clksel = abe_dpll_bypass_clk_mux_sel,
2276 .init = &omap2_init_clksel_parent,
2277 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER2_CLKCTRL,
2278 .clksel_mask = OMAP4430_CLKSEL_MASK,
2279 .ops = &clkops_omap2_dflt,
2280 .recalc = &omap2_clksel_recalc,
2281 .enable_reg = OMAP4430_CM_L4PER_DMTIMER2_CLKCTRL,
2282 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2283 .clkdm_name = "l4_per_clkdm",
2284};
2285
2286/* Merged cm2_dm3_mux into timer3 */
2287static struct clk timer3_fck = {
2288 .name = "timer3_fck",
2289 .parent = &sys_clkin_ck,
2290 .clksel = abe_dpll_bypass_clk_mux_sel,
2291 .init = &omap2_init_clksel_parent,
2292 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER3_CLKCTRL,
2293 .clksel_mask = OMAP4430_CLKSEL_MASK,
2294 .ops = &clkops_omap2_dflt,
2295 .recalc = &omap2_clksel_recalc,
2296 .enable_reg = OMAP4430_CM_L4PER_DMTIMER3_CLKCTRL,
2297 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2298 .clkdm_name = "l4_per_clkdm",
2299};
2300
2301/* Merged cm2_dm4_mux into timer4 */
2302static struct clk timer4_fck = {
2303 .name = "timer4_fck",
2304 .parent = &sys_clkin_ck,
2305 .clksel = abe_dpll_bypass_clk_mux_sel,
2306 .init = &omap2_init_clksel_parent,
2307 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER4_CLKCTRL,
2308 .clksel_mask = OMAP4430_CLKSEL_MASK,
2309 .ops = &clkops_omap2_dflt,
2310 .recalc = &omap2_clksel_recalc,
2311 .enable_reg = OMAP4430_CM_L4PER_DMTIMER4_CLKCTRL,
2312 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2313 .clkdm_name = "l4_per_clkdm",
2314};
2315
2316static const struct clksel timer5_sync_mux_sel[] = {
2317 { .parent = &syc_clk_div_ck, .rates = div_1_0_rates },
2318 { .parent = &sys_32k_ck, .rates = div_1_1_rates },
2319 { .parent = NULL },
2320};
2321
2322/* Merged timer5_sync_mux into timer5 */
2323static struct clk timer5_fck = {
2324 .name = "timer5_fck",
2325 .parent = &syc_clk_div_ck,
2326 .clksel = timer5_sync_mux_sel,
2327 .init = &omap2_init_clksel_parent,
2328 .clksel_reg = OMAP4430_CM1_ABE_TIMER5_CLKCTRL,
2329 .clksel_mask = OMAP4430_CLKSEL_MASK,
2330 .ops = &clkops_omap2_dflt,
2331 .recalc = &omap2_clksel_recalc,
2332 .enable_reg = OMAP4430_CM1_ABE_TIMER5_CLKCTRL,
2333 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2334 .clkdm_name = "abe_clkdm",
2335};
2336
2337/* Merged timer6_sync_mux into timer6 */
2338static struct clk timer6_fck = {
2339 .name = "timer6_fck",
2340 .parent = &syc_clk_div_ck,
2341 .clksel = timer5_sync_mux_sel,
2342 .init = &omap2_init_clksel_parent,
2343 .clksel_reg = OMAP4430_CM1_ABE_TIMER6_CLKCTRL,
2344 .clksel_mask = OMAP4430_CLKSEL_MASK,
2345 .ops = &clkops_omap2_dflt,
2346 .recalc = &omap2_clksel_recalc,
2347 .enable_reg = OMAP4430_CM1_ABE_TIMER6_CLKCTRL,
2348 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2349 .clkdm_name = "abe_clkdm",
2350};
2351
2352/* Merged timer7_sync_mux into timer7 */
2353static struct clk timer7_fck = {
2354 .name = "timer7_fck",
2355 .parent = &syc_clk_div_ck,
2356 .clksel = timer5_sync_mux_sel,
2357 .init = &omap2_init_clksel_parent,
2358 .clksel_reg = OMAP4430_CM1_ABE_TIMER7_CLKCTRL,
2359 .clksel_mask = OMAP4430_CLKSEL_MASK,
2360 .ops = &clkops_omap2_dflt,
2361 .recalc = &omap2_clksel_recalc,
2362 .enable_reg = OMAP4430_CM1_ABE_TIMER7_CLKCTRL,
2363 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2364 .clkdm_name = "abe_clkdm",
2365};
2366
2367/* Merged timer8_sync_mux into timer8 */
2368static struct clk timer8_fck = {
2369 .name = "timer8_fck",
2370 .parent = &syc_clk_div_ck,
2371 .clksel = timer5_sync_mux_sel,
2372 .init = &omap2_init_clksel_parent,
2373 .clksel_reg = OMAP4430_CM1_ABE_TIMER8_CLKCTRL,
2374 .clksel_mask = OMAP4430_CLKSEL_MASK,
2375 .ops = &clkops_omap2_dflt,
2376 .recalc = &omap2_clksel_recalc,
2377 .enable_reg = OMAP4430_CM1_ABE_TIMER8_CLKCTRL,
2378 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2379 .clkdm_name = "abe_clkdm",
2380};
2381
2382/* Merged cm2_dm9_mux into timer9 */
2383static struct clk timer9_fck = {
2384 .name = "timer9_fck",
2385 .parent = &sys_clkin_ck,
2386 .clksel = abe_dpll_bypass_clk_mux_sel,
2387 .init = &omap2_init_clksel_parent,
2388 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER9_CLKCTRL,
2389 .clksel_mask = OMAP4430_CLKSEL_MASK,
2390 .ops = &clkops_omap2_dflt,
2391 .recalc = &omap2_clksel_recalc,
2392 .enable_reg = OMAP4430_CM_L4PER_DMTIMER9_CLKCTRL,
2393 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2394 .clkdm_name = "l4_per_clkdm",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002395};
2396
Rajendra Nayak54776052010-02-22 22:09:39 -07002397static struct clk uart1_fck = {
2398 .name = "uart1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002399 .ops = &clkops_omap2_dflt,
2400 .enable_reg = OMAP4430_CM_L4PER_UART1_CLKCTRL,
2401 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2402 .clkdm_name = "l4_per_clkdm",
2403 .parent = &func_48m_fclk,
2404 .recalc = &followparent_recalc,
2405};
2406
Rajendra Nayak54776052010-02-22 22:09:39 -07002407static struct clk uart2_fck = {
2408 .name = "uart2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002409 .ops = &clkops_omap2_dflt,
2410 .enable_reg = OMAP4430_CM_L4PER_UART2_CLKCTRL,
2411 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2412 .clkdm_name = "l4_per_clkdm",
2413 .parent = &func_48m_fclk,
2414 .recalc = &followparent_recalc,
2415};
2416
Rajendra Nayak54776052010-02-22 22:09:39 -07002417static struct clk uart3_fck = {
2418 .name = "uart3_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002419 .ops = &clkops_omap2_dflt,
2420 .enable_reg = OMAP4430_CM_L4PER_UART3_CLKCTRL,
2421 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2422 .clkdm_name = "l4_per_clkdm",
2423 .parent = &func_48m_fclk,
2424 .recalc = &followparent_recalc,
2425};
2426
Rajendra Nayak54776052010-02-22 22:09:39 -07002427static struct clk uart4_fck = {
2428 .name = "uart4_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002429 .ops = &clkops_omap2_dflt,
2430 .enable_reg = OMAP4430_CM_L4PER_UART4_CLKCTRL,
2431 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2432 .clkdm_name = "l4_per_clkdm",
2433 .parent = &func_48m_fclk,
2434 .recalc = &followparent_recalc,
2435};
2436
Rajendra Nayak54776052010-02-22 22:09:39 -07002437static struct clk usb_host_fs_fck = {
2438 .name = "usb_host_fs_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002439 .ops = &clkops_omap2_dflt,
2440 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_FS_CLKCTRL,
2441 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2442 .clkdm_name = "l3_init_clkdm",
2443 .parent = &func_48mc_fclk,
2444 .recalc = &followparent_recalc,
2445};
2446
Benoit Cousson1c03f422010-09-27 14:02:55 -06002447static struct clk usb_host_hs_utmi_p3_clk = {
2448 .name = "usb_host_hs_utmi_p3_clk",
2449 .ops = &clkops_omap2_dflt,
2450 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2451 .enable_bit = OMAP4430_OPTFCLKEN_UTMI_P3_CLK_SHIFT,
2452 .clkdm_name = "l3_init_clkdm",
2453 .parent = &init_60m_fclk,
2454 .recalc = &followparent_recalc,
2455};
2456
2457static struct clk usb_host_hs_hsic60m_p1_clk = {
2458 .name = "usb_host_hs_hsic60m_p1_clk",
2459 .ops = &clkops_omap2_dflt,
2460 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2461 .enable_bit = OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT,
2462 .clkdm_name = "l3_init_clkdm",
2463 .parent = &init_60m_fclk,
2464 .recalc = &followparent_recalc,
2465};
2466
2467static struct clk usb_host_hs_hsic60m_p2_clk = {
2468 .name = "usb_host_hs_hsic60m_p2_clk",
2469 .ops = &clkops_omap2_dflt,
2470 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2471 .enable_bit = OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT,
2472 .clkdm_name = "l3_init_clkdm",
2473 .parent = &init_60m_fclk,
2474 .recalc = &followparent_recalc,
2475};
2476
2477static const struct clksel utmi_p1_gfclk_sel[] = {
2478 { .parent = &init_60m_fclk, .rates = div_1_0_rates },
2479 { .parent = &xclk60mhsp1_ck, .rates = div_1_1_rates },
2480 { .parent = NULL },
2481};
2482
2483static struct clk utmi_p1_gfclk = {
2484 .name = "utmi_p1_gfclk",
2485 .parent = &init_60m_fclk,
2486 .clksel = utmi_p1_gfclk_sel,
2487 .init = &omap2_init_clksel_parent,
2488 .clksel_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2489 .clksel_mask = OMAP4430_CLKSEL_UTMI_P1_MASK,
2490 .ops = &clkops_null,
2491 .recalc = &omap2_clksel_recalc,
2492};
2493
2494static struct clk usb_host_hs_utmi_p1_clk = {
2495 .name = "usb_host_hs_utmi_p1_clk",
2496 .ops = &clkops_omap2_dflt,
2497 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2498 .enable_bit = OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT,
2499 .clkdm_name = "l3_init_clkdm",
2500 .parent = &utmi_p1_gfclk,
2501 .recalc = &followparent_recalc,
2502};
2503
2504static const struct clksel utmi_p2_gfclk_sel[] = {
2505 { .parent = &init_60m_fclk, .rates = div_1_0_rates },
2506 { .parent = &xclk60mhsp2_ck, .rates = div_1_1_rates },
2507 { .parent = NULL },
2508};
2509
2510static struct clk utmi_p2_gfclk = {
2511 .name = "utmi_p2_gfclk",
2512 .parent = &init_60m_fclk,
2513 .clksel = utmi_p2_gfclk_sel,
2514 .init = &omap2_init_clksel_parent,
2515 .clksel_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2516 .clksel_mask = OMAP4430_CLKSEL_UTMI_P2_MASK,
2517 .ops = &clkops_null,
2518 .recalc = &omap2_clksel_recalc,
2519};
2520
2521static struct clk usb_host_hs_utmi_p2_clk = {
2522 .name = "usb_host_hs_utmi_p2_clk",
2523 .ops = &clkops_omap2_dflt,
2524 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2525 .enable_bit = OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT,
2526 .clkdm_name = "l3_init_clkdm",
2527 .parent = &utmi_p2_gfclk,
2528 .recalc = &followparent_recalc,
2529};
2530
2531static struct clk usb_host_hs_hsic480m_p1_clk = {
2532 .name = "usb_host_hs_hsic480m_p1_clk",
2533 .ops = &clkops_omap2_dflt,
2534 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2535 .enable_bit = OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT,
2536 .clkdm_name = "l3_init_clkdm",
2537 .parent = &dpll_usb_m2_ck,
2538 .recalc = &followparent_recalc,
2539};
2540
2541static struct clk usb_host_hs_hsic480m_p2_clk = {
2542 .name = "usb_host_hs_hsic480m_p2_clk",
2543 .ops = &clkops_omap2_dflt,
2544 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2545 .enable_bit = OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT,
2546 .clkdm_name = "l3_init_clkdm",
2547 .parent = &dpll_usb_m2_ck,
2548 .recalc = &followparent_recalc,
2549};
2550
2551static struct clk usb_host_hs_func48mclk = {
2552 .name = "usb_host_hs_func48mclk",
2553 .ops = &clkops_omap2_dflt,
2554 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2555 .enable_bit = OMAP4430_OPTFCLKEN_FUNC48MCLK_SHIFT,
2556 .clkdm_name = "l3_init_clkdm",
2557 .parent = &func_48mc_fclk,
2558 .recalc = &followparent_recalc,
2559};
2560
Benoit Cousson0e433272010-09-27 14:02:54 -06002561static struct clk usb_host_hs_fck = {
2562 .name = "usb_host_hs_fck",
2563 .ops = &clkops_omap2_dflt,
2564 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2565 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2566 .clkdm_name = "l3_init_clkdm",
2567 .parent = &init_60m_fclk,
2568 .recalc = &followparent_recalc,
2569};
2570
Benoit Cousson1c03f422010-09-27 14:02:55 -06002571static const struct clksel otg_60m_gfclk_sel[] = {
2572 { .parent = &utmi_phy_clkout_ck, .rates = div_1_0_rates },
2573 { .parent = &xclk60motg_ck, .rates = div_1_1_rates },
2574 { .parent = NULL },
2575};
2576
2577static struct clk otg_60m_gfclk = {
2578 .name = "otg_60m_gfclk",
2579 .parent = &utmi_phy_clkout_ck,
2580 .clksel = otg_60m_gfclk_sel,
2581 .init = &omap2_init_clksel_parent,
2582 .clksel_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL,
2583 .clksel_mask = OMAP4430_CLKSEL_60M_MASK,
2584 .ops = &clkops_null,
2585 .recalc = &omap2_clksel_recalc,
2586};
2587
2588static struct clk usb_otg_hs_xclk = {
2589 .name = "usb_otg_hs_xclk",
2590 .ops = &clkops_omap2_dflt,
2591 .enable_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL,
2592 .enable_bit = OMAP4430_OPTFCLKEN_XCLK_SHIFT,
2593 .clkdm_name = "l3_init_clkdm",
2594 .parent = &otg_60m_gfclk,
2595 .recalc = &followparent_recalc,
2596};
2597
Benoit Cousson0e433272010-09-27 14:02:54 -06002598static struct clk usb_otg_hs_ick = {
2599 .name = "usb_otg_hs_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002600 .ops = &clkops_omap2_dflt,
2601 .enable_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL,
2602 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2603 .clkdm_name = "l3_init_clkdm",
2604 .parent = &l3_div_ck,
2605 .recalc = &followparent_recalc,
2606};
2607
Benoit Cousson0edc9e82010-09-27 14:02:56 -06002608static struct clk usb_phy_cm_clk32k = {
2609 .name = "usb_phy_cm_clk32k",
2610 .ops = &clkops_omap2_dflt,
2611 .enable_reg = OMAP4430_CM_ALWON_USBPHY_CLKCTRL,
2612 .enable_bit = OMAP4430_OPTFCLKEN_CLK32K_SHIFT,
2613 .clkdm_name = "l4_ao_clkdm",
2614 .parent = &sys_32k_ck,
2615 .recalc = &followparent_recalc,
2616};
2617
Benoit Cousson1c03f422010-09-27 14:02:55 -06002618static struct clk usb_tll_hs_usb_ch2_clk = {
2619 .name = "usb_tll_hs_usb_ch2_clk",
2620 .ops = &clkops_omap2_dflt,
2621 .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL,
2622 .enable_bit = OMAP4430_OPTFCLKEN_USB_CH2_CLK_SHIFT,
2623 .clkdm_name = "l3_init_clkdm",
2624 .parent = &init_60m_fclk,
2625 .recalc = &followparent_recalc,
2626};
2627
2628static struct clk usb_tll_hs_usb_ch0_clk = {
2629 .name = "usb_tll_hs_usb_ch0_clk",
2630 .ops = &clkops_omap2_dflt,
2631 .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL,
2632 .enable_bit = OMAP4430_OPTFCLKEN_USB_CH0_CLK_SHIFT,
2633 .clkdm_name = "l3_init_clkdm",
2634 .parent = &init_60m_fclk,
2635 .recalc = &followparent_recalc,
2636};
2637
2638static struct clk usb_tll_hs_usb_ch1_clk = {
2639 .name = "usb_tll_hs_usb_ch1_clk",
2640 .ops = &clkops_omap2_dflt,
2641 .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL,
2642 .enable_bit = OMAP4430_OPTFCLKEN_USB_CH1_CLK_SHIFT,
2643 .clkdm_name = "l3_init_clkdm",
2644 .parent = &init_60m_fclk,
2645 .recalc = &followparent_recalc,
2646};
2647
Benoit Cousson0e433272010-09-27 14:02:54 -06002648static struct clk usb_tll_hs_ick = {
2649 .name = "usb_tll_hs_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002650 .ops = &clkops_omap2_dflt,
2651 .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL,
2652 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2653 .clkdm_name = "l3_init_clkdm",
2654 .parent = &l4_div_ck,
2655 .recalc = &followparent_recalc,
2656};
2657
Benoit Cousson0edc9e82010-09-27 14:02:56 -06002658static const struct clksel_rate div2_14to18_rates[] = {
2659 { .div = 14, .val = 0, .flags = RATE_IN_4430 },
2660 { .div = 18, .val = 1, .flags = RATE_IN_4430 },
2661 { .div = 0 },
2662};
2663
2664static const struct clksel usim_fclk_div[] = {
2665 { .parent = &dpll_per_m4_ck, .rates = div2_14to18_rates },
2666 { .parent = NULL },
2667};
2668
2669static struct clk usim_ck = {
2670 .name = "usim_ck",
2671 .parent = &dpll_per_m4_ck,
2672 .clksel = usim_fclk_div,
2673 .clksel_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL,
2674 .clksel_mask = OMAP4430_CLKSEL_DIV_MASK,
2675 .ops = &clkops_null,
2676 .recalc = &omap2_clksel_recalc,
2677 .round_rate = &omap2_clksel_round_rate,
2678 .set_rate = &omap2_clksel_set_rate,
2679};
2680
2681static struct clk usim_fclk = {
2682 .name = "usim_fclk",
2683 .ops = &clkops_omap2_dflt,
2684 .enable_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL,
2685 .enable_bit = OMAP4430_OPTFCLKEN_FCLK_SHIFT,
2686 .clkdm_name = "l4_wkup_clkdm",
2687 .parent = &usim_ck,
2688 .recalc = &followparent_recalc,
2689};
2690
Benoit Cousson0e433272010-09-27 14:02:54 -06002691static struct clk usim_fck = {
2692 .name = "usim_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002693 .ops = &clkops_omap2_dflt,
2694 .enable_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL,
Rajendra Nayak76cf5292010-09-27 14:02:54 -06002695 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
Rajendra Nayak972c5422009-12-08 18:46:28 -07002696 .clkdm_name = "l4_wkup_clkdm",
2697 .parent = &sys_32k_ck,
2698 .recalc = &followparent_recalc,
2699};
2700
Benoit Cousson0e433272010-09-27 14:02:54 -06002701static struct clk wd_timer2_fck = {
2702 .name = "wd_timer2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002703 .ops = &clkops_omap2_dflt,
2704 .enable_reg = OMAP4430_CM_WKUP_WDT2_CLKCTRL,
2705 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2706 .clkdm_name = "l4_wkup_clkdm",
2707 .parent = &sys_32k_ck,
2708 .recalc = &followparent_recalc,
2709};
2710
Benoit Cousson0e433272010-09-27 14:02:54 -06002711static struct clk wd_timer3_fck = {
2712 .name = "wd_timer3_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002713 .ops = &clkops_omap2_dflt,
2714 .enable_reg = OMAP4430_CM1_ABE_WDT3_CLKCTRL,
2715 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2716 .clkdm_name = "abe_clkdm",
2717 .parent = &sys_32k_ck,
2718 .recalc = &followparent_recalc,
2719};
2720
2721/* Remaining optional clocks */
Rajendra Nayak972c5422009-12-08 18:46:28 -07002722static const struct clksel stm_clk_div_div[] = {
2723 { .parent = &pmd_stm_clock_mux_ck, .rates = div3_1to4_rates },
2724 { .parent = NULL },
2725};
2726
2727static struct clk stm_clk_div_ck = {
2728 .name = "stm_clk_div_ck",
2729 .parent = &pmd_stm_clock_mux_ck,
2730 .clksel = stm_clk_div_div,
2731 .clksel_reg = OMAP4430_CM_EMU_DEBUGSS_CLKCTRL,
2732 .clksel_mask = OMAP4430_CLKSEL_PMD_STM_CLK_MASK,
2733 .ops = &clkops_null,
2734 .recalc = &omap2_clksel_recalc,
2735 .round_rate = &omap2_clksel_round_rate,
2736 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07002737};
2738
2739static const struct clksel trace_clk_div_div[] = {
2740 { .parent = &pmd_trace_clk_mux_ck, .rates = div3_1to4_rates },
2741 { .parent = NULL },
2742};
2743
2744static struct clk trace_clk_div_ck = {
2745 .name = "trace_clk_div_ck",
2746 .parent = &pmd_trace_clk_mux_ck,
2747 .clksel = trace_clk_div_div,
2748 .clksel_reg = OMAP4430_CM_EMU_DEBUGSS_CLKCTRL,
2749 .clksel_mask = OMAP4430_CLKSEL_PMD_TRACE_CLK_MASK,
2750 .ops = &clkops_null,
2751 .recalc = &omap2_clksel_recalc,
2752 .round_rate = &omap2_clksel_round_rate,
2753 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07002754};
2755
Rajendra Nayak972c5422009-12-08 18:46:28 -07002756/*
2757 * clkdev
2758 */
2759
2760static struct omap_clk omap44xx_clks[] = {
2761 CLK(NULL, "extalt_clkin_ck", &extalt_clkin_ck, CK_443X),
2762 CLK(NULL, "pad_clks_ck", &pad_clks_ck, CK_443X),
2763 CLK(NULL, "pad_slimbus_core_clks_ck", &pad_slimbus_core_clks_ck, CK_443X),
2764 CLK(NULL, "secure_32k_clk_src_ck", &secure_32k_clk_src_ck, CK_443X),
2765 CLK(NULL, "slimbus_clk", &slimbus_clk, CK_443X),
2766 CLK(NULL, "sys_32k_ck", &sys_32k_ck, CK_443X),
2767 CLK(NULL, "virt_12000000_ck", &virt_12000000_ck, CK_443X),
2768 CLK(NULL, "virt_13000000_ck", &virt_13000000_ck, CK_443X),
2769 CLK(NULL, "virt_16800000_ck", &virt_16800000_ck, CK_443X),
2770 CLK(NULL, "virt_19200000_ck", &virt_19200000_ck, CK_443X),
2771 CLK(NULL, "virt_26000000_ck", &virt_26000000_ck, CK_443X),
2772 CLK(NULL, "virt_27000000_ck", &virt_27000000_ck, CK_443X),
2773 CLK(NULL, "virt_38400000_ck", &virt_38400000_ck, CK_443X),
2774 CLK(NULL, "sys_clkin_ck", &sys_clkin_ck, CK_443X),
Rajendra Nayak76cf5292010-09-27 14:02:54 -06002775 CLK(NULL, "tie_low_clock_ck", &tie_low_clock_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07002776 CLK(NULL, "utmi_phy_clkout_ck", &utmi_phy_clkout_ck, CK_443X),
2777 CLK(NULL, "xclk60mhsp1_ck", &xclk60mhsp1_ck, CK_443X),
2778 CLK(NULL, "xclk60mhsp2_ck", &xclk60mhsp2_ck, CK_443X),
2779 CLK(NULL, "xclk60motg_ck", &xclk60motg_ck, CK_443X),
Rajendra Nayak76cf5292010-09-27 14:02:54 -06002780 CLK(NULL, "abe_dpll_bypass_clk_mux_ck", &abe_dpll_bypass_clk_mux_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07002781 CLK(NULL, "abe_dpll_refclk_mux_ck", &abe_dpll_refclk_mux_ck, CK_443X),
2782 CLK(NULL, "dpll_abe_ck", &dpll_abe_ck, CK_443X),
2783 CLK(NULL, "dpll_abe_m2x2_ck", &dpll_abe_m2x2_ck, CK_443X),
2784 CLK(NULL, "abe_24m_fclk", &abe_24m_fclk, CK_443X),
2785 CLK(NULL, "abe_clk", &abe_clk, CK_443X),
2786 CLK(NULL, "aess_fclk", &aess_fclk, CK_443X),
2787 CLK(NULL, "dpll_abe_m3_ck", &dpll_abe_m3_ck, CK_443X),
2788 CLK(NULL, "core_hsd_byp_clk_mux_ck", &core_hsd_byp_clk_mux_ck, CK_443X),
2789 CLK(NULL, "dpll_core_ck", &dpll_core_ck, CK_443X),
2790 CLK(NULL, "dpll_core_m6_ck", &dpll_core_m6_ck, CK_443X),
2791 CLK(NULL, "dbgclk_mux_ck", &dbgclk_mux_ck, CK_443X),
2792 CLK(NULL, "dpll_core_m2_ck", &dpll_core_m2_ck, CK_443X),
2793 CLK(NULL, "ddrphy_ck", &ddrphy_ck, CK_443X),
2794 CLK(NULL, "dpll_core_m5_ck", &dpll_core_m5_ck, CK_443X),
2795 CLK(NULL, "div_core_ck", &div_core_ck, CK_443X),
2796 CLK(NULL, "div_iva_hs_clk", &div_iva_hs_clk, CK_443X),
2797 CLK(NULL, "div_mpu_hs_clk", &div_mpu_hs_clk, CK_443X),
2798 CLK(NULL, "dpll_core_m4_ck", &dpll_core_m4_ck, CK_443X),
2799 CLK(NULL, "dll_clk_div_ck", &dll_clk_div_ck, CK_443X),
2800 CLK(NULL, "dpll_abe_m2_ck", &dpll_abe_m2_ck, CK_443X),
2801 CLK(NULL, "dpll_core_m3_ck", &dpll_core_m3_ck, CK_443X),
2802 CLK(NULL, "dpll_core_m7_ck", &dpll_core_m7_ck, CK_443X),
2803 CLK(NULL, "iva_hsd_byp_clk_mux_ck", &iva_hsd_byp_clk_mux_ck, CK_443X),
2804 CLK(NULL, "dpll_iva_ck", &dpll_iva_ck, CK_443X),
2805 CLK(NULL, "dpll_iva_m4_ck", &dpll_iva_m4_ck, CK_443X),
2806 CLK(NULL, "dpll_iva_m5_ck", &dpll_iva_m5_ck, CK_443X),
2807 CLK(NULL, "dpll_mpu_ck", &dpll_mpu_ck, CK_443X),
2808 CLK(NULL, "dpll_mpu_m2_ck", &dpll_mpu_m2_ck, CK_443X),
2809 CLK(NULL, "per_hs_clk_div_ck", &per_hs_clk_div_ck, CK_443X),
2810 CLK(NULL, "per_hsd_byp_clk_mux_ck", &per_hsd_byp_clk_mux_ck, CK_443X),
2811 CLK(NULL, "dpll_per_ck", &dpll_per_ck, CK_443X),
2812 CLK(NULL, "dpll_per_m2_ck", &dpll_per_m2_ck, CK_443X),
2813 CLK(NULL, "dpll_per_m2x2_ck", &dpll_per_m2x2_ck, CK_443X),
2814 CLK(NULL, "dpll_per_m3_ck", &dpll_per_m3_ck, CK_443X),
2815 CLK(NULL, "dpll_per_m4_ck", &dpll_per_m4_ck, CK_443X),
2816 CLK(NULL, "dpll_per_m5_ck", &dpll_per_m5_ck, CK_443X),
2817 CLK(NULL, "dpll_per_m6_ck", &dpll_per_m6_ck, CK_443X),
2818 CLK(NULL, "dpll_per_m7_ck", &dpll_per_m7_ck, CK_443X),
2819 CLK(NULL, "dpll_unipro_ck", &dpll_unipro_ck, CK_443X),
2820 CLK(NULL, "dpll_unipro_m2x2_ck", &dpll_unipro_m2x2_ck, CK_443X),
2821 CLK(NULL, "usb_hs_clk_div_ck", &usb_hs_clk_div_ck, CK_443X),
2822 CLK(NULL, "dpll_usb_ck", &dpll_usb_ck, CK_443X),
2823 CLK(NULL, "dpll_usb_clkdcoldo_ck", &dpll_usb_clkdcoldo_ck, CK_443X),
2824 CLK(NULL, "dpll_usb_m2_ck", &dpll_usb_m2_ck, CK_443X),
2825 CLK(NULL, "ducati_clk_mux_ck", &ducati_clk_mux_ck, CK_443X),
2826 CLK(NULL, "func_12m_fclk", &func_12m_fclk, CK_443X),
2827 CLK(NULL, "func_24m_clk", &func_24m_clk, CK_443X),
2828 CLK(NULL, "func_24mc_fclk", &func_24mc_fclk, CK_443X),
2829 CLK(NULL, "func_48m_fclk", &func_48m_fclk, CK_443X),
2830 CLK(NULL, "func_48mc_fclk", &func_48mc_fclk, CK_443X),
2831 CLK(NULL, "func_64m_fclk", &func_64m_fclk, CK_443X),
2832 CLK(NULL, "func_96m_fclk", &func_96m_fclk, CK_443X),
2833 CLK(NULL, "hsmmc6_fclk", &hsmmc6_fclk, CK_443X),
2834 CLK(NULL, "init_60m_fclk", &init_60m_fclk, CK_443X),
2835 CLK(NULL, "l3_div_ck", &l3_div_ck, CK_443X),
2836 CLK(NULL, "l4_div_ck", &l4_div_ck, CK_443X),
2837 CLK(NULL, "lp_clk_div_ck", &lp_clk_div_ck, CK_443X),
2838 CLK(NULL, "l4_wkup_clk_mux_ck", &l4_wkup_clk_mux_ck, CK_443X),
2839 CLK(NULL, "per_abe_nc_fclk", &per_abe_nc_fclk, CK_443X),
2840 CLK(NULL, "mcasp2_fclk", &mcasp2_fclk, CK_443X),
2841 CLK(NULL, "mcasp3_fclk", &mcasp3_fclk, CK_443X),
2842 CLK(NULL, "ocp_abe_iclk", &ocp_abe_iclk, CK_443X),
2843 CLK(NULL, "per_abe_24m_fclk", &per_abe_24m_fclk, CK_443X),
2844 CLK(NULL, "pmd_stm_clock_mux_ck", &pmd_stm_clock_mux_ck, CK_443X),
2845 CLK(NULL, "pmd_trace_clk_mux_ck", &pmd_trace_clk_mux_ck, CK_443X),
2846 CLK(NULL, "syc_clk_div_ck", &syc_clk_div_ck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002847 CLK(NULL, "aes1_fck", &aes1_fck, CK_443X),
2848 CLK(NULL, "aes2_fck", &aes2_fck, CK_443X),
2849 CLK(NULL, "aess_fck", &aess_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06002850 CLK(NULL, "bandgap_fclk", &bandgap_fclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002851 CLK(NULL, "des3des_fck", &des3des_fck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07002852 CLK(NULL, "dmic_sync_mux_ck", &dmic_sync_mux_ck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002853 CLK(NULL, "dmic_fck", &dmic_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06002854 CLK(NULL, "dsp_fck", &dsp_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06002855 CLK(NULL, "dss_sys_clk", &dss_sys_clk, CK_443X),
2856 CLK(NULL, "dss_tv_clk", &dss_tv_clk, CK_443X),
2857 CLK(NULL, "dss_dss_clk", &dss_dss_clk, CK_443X),
2858 CLK(NULL, "dss_48mhz_clk", &dss_48mhz_clk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002859 CLK(NULL, "dss_fck", &dss_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06002860 CLK(NULL, "efuse_ctrl_cust_fck", &efuse_ctrl_cust_fck, CK_443X),
2861 CLK(NULL, "emif1_fck", &emif1_fck, CK_443X),
2862 CLK(NULL, "emif2_fck", &emif2_fck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002863 CLK(NULL, "fdif_fck", &fdif_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06002864 CLK(NULL, "fpka_fck", &fpka_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06002865 CLK(NULL, "gpio1_dbck", &gpio1_dbclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002866 CLK(NULL, "gpio1_ick", &gpio1_ick, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06002867 CLK(NULL, "gpio2_dbck", &gpio2_dbclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002868 CLK(NULL, "gpio2_ick", &gpio2_ick, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06002869 CLK(NULL, "gpio3_dbck", &gpio3_dbclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002870 CLK(NULL, "gpio3_ick", &gpio3_ick, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06002871 CLK(NULL, "gpio4_dbck", &gpio4_dbclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002872 CLK(NULL, "gpio4_ick", &gpio4_ick, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06002873 CLK(NULL, "gpio5_dbck", &gpio5_dbclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002874 CLK(NULL, "gpio5_ick", &gpio5_ick, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06002875 CLK(NULL, "gpio6_dbck", &gpio6_dbclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002876 CLK(NULL, "gpio6_ick", &gpio6_ick, CK_443X),
2877 CLK(NULL, "gpmc_ick", &gpmc_ick, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06002878 CLK(NULL, "gpu_fck", &gpu_fck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002879 CLK("omap2_hdq.0", "fck", &hdq1w_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06002880 CLK(NULL, "hsi_fck", &hsi_fck, CK_443X),
Benoit Coussonf7bb0d92010-12-09 14:24:16 +00002881 CLK("omap_i2c.1", "fck", &i2c1_fck, CK_443X),
2882 CLK("omap_i2c.2", "fck", &i2c2_fck, CK_443X),
2883 CLK("omap_i2c.3", "fck", &i2c3_fck, CK_443X),
2884 CLK("omap_i2c.4", "fck", &i2c4_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06002885 CLK(NULL, "ipu_fck", &ipu_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06002886 CLK(NULL, "iss_ctrlclk", &iss_ctrlclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002887 CLK(NULL, "iss_fck", &iss_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06002888 CLK(NULL, "iva_fck", &iva_fck, CK_443X),
2889 CLK(NULL, "kbd_fck", &kbd_fck, CK_443X),
2890 CLK(NULL, "l3_instr_ick", &l3_instr_ick, CK_443X),
2891 CLK(NULL, "l3_main_3_ick", &l3_main_3_ick, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07002892 CLK(NULL, "mcasp_sync_mux_ck", &mcasp_sync_mux_ck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002893 CLK(NULL, "mcasp_fck", &mcasp_fck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07002894 CLK(NULL, "mcbsp1_sync_mux_ck", &mcbsp1_sync_mux_ck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002895 CLK("omap-mcbsp.1", "fck", &mcbsp1_fck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07002896 CLK(NULL, "mcbsp2_sync_mux_ck", &mcbsp2_sync_mux_ck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002897 CLK("omap-mcbsp.2", "fck", &mcbsp2_fck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07002898 CLK(NULL, "mcbsp3_sync_mux_ck", &mcbsp3_sync_mux_ck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002899 CLK("omap-mcbsp.3", "fck", &mcbsp3_fck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07002900 CLK(NULL, "mcbsp4_sync_mux_ck", &mcbsp4_sync_mux_ck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002901 CLK("omap-mcbsp.4", "fck", &mcbsp4_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06002902 CLK(NULL, "mcpdm_fck", &mcpdm_fck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002903 CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_443X),
2904 CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_443X),
2905 CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_443X),
2906 CLK("omap2_mcspi.4", "fck", &mcspi4_fck, CK_443X),
2907 CLK("mmci-omap-hs.0", "fck", &mmc1_fck, CK_443X),
2908 CLK("mmci-omap-hs.1", "fck", &mmc2_fck, CK_443X),
2909 CLK("mmci-omap-hs.2", "fck", &mmc3_fck, CK_443X),
2910 CLK("mmci-omap-hs.3", "fck", &mmc4_fck, CK_443X),
2911 CLK("mmci-omap-hs.4", "fck", &mmc5_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06002912 CLK(NULL, "ocp2scp_usb_phy_phy_48m", &ocp2scp_usb_phy_phy_48m, CK_443X),
Benoit Cousson0edc9e82010-09-27 14:02:56 -06002913 CLK(NULL, "ocp2scp_usb_phy_ick", &ocp2scp_usb_phy_ick, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06002914 CLK(NULL, "ocp_wp_noc_ick", &ocp_wp_noc_ick, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002915 CLK("omap_rng", "ick", &rng_ick, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06002916 CLK(NULL, "sha2md5_fck", &sha2md5_fck, CK_443X),
2917 CLK(NULL, "sl2if_ick", &sl2if_ick, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06002918 CLK(NULL, "slimbus1_fclk_1", &slimbus1_fclk_1, CK_443X),
2919 CLK(NULL, "slimbus1_fclk_0", &slimbus1_fclk_0, CK_443X),
2920 CLK(NULL, "slimbus1_fclk_2", &slimbus1_fclk_2, CK_443X),
2921 CLK(NULL, "slimbus1_slimbus_clk", &slimbus1_slimbus_clk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002922 CLK(NULL, "slimbus1_fck", &slimbus1_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06002923 CLK(NULL, "slimbus2_fclk_1", &slimbus2_fclk_1, CK_443X),
2924 CLK(NULL, "slimbus2_fclk_0", &slimbus2_fclk_0, CK_443X),
2925 CLK(NULL, "slimbus2_slimbus_clk", &slimbus2_slimbus_clk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002926 CLK(NULL, "slimbus2_fck", &slimbus2_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06002927 CLK(NULL, "smartreflex_core_fck", &smartreflex_core_fck, CK_443X),
2928 CLK(NULL, "smartreflex_iva_fck", &smartreflex_iva_fck, CK_443X),
2929 CLK(NULL, "smartreflex_mpu_fck", &smartreflex_mpu_fck, CK_443X),
2930 CLK(NULL, "gpt1_fck", &timer1_fck, CK_443X),
2931 CLK(NULL, "gpt10_fck", &timer10_fck, CK_443X),
2932 CLK(NULL, "gpt11_fck", &timer11_fck, CK_443X),
2933 CLK(NULL, "gpt2_fck", &timer2_fck, CK_443X),
2934 CLK(NULL, "gpt3_fck", &timer3_fck, CK_443X),
2935 CLK(NULL, "gpt4_fck", &timer4_fck, CK_443X),
2936 CLK(NULL, "gpt5_fck", &timer5_fck, CK_443X),
2937 CLK(NULL, "gpt6_fck", &timer6_fck, CK_443X),
2938 CLK(NULL, "gpt7_fck", &timer7_fck, CK_443X),
2939 CLK(NULL, "gpt8_fck", &timer8_fck, CK_443X),
2940 CLK(NULL, "gpt9_fck", &timer9_fck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002941 CLK(NULL, "uart1_fck", &uart1_fck, CK_443X),
2942 CLK(NULL, "uart2_fck", &uart2_fck, CK_443X),
2943 CLK(NULL, "uart3_fck", &uart3_fck, CK_443X),
2944 CLK(NULL, "uart4_fck", &uart4_fck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07002945 CLK(NULL, "usb_host_fs_fck", &usb_host_fs_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06002946 CLK(NULL, "usb_host_hs_utmi_p3_clk", &usb_host_hs_utmi_p3_clk, CK_443X),
2947 CLK(NULL, "usb_host_hs_hsic60m_p1_clk", &usb_host_hs_hsic60m_p1_clk, CK_443X),
2948 CLK(NULL, "usb_host_hs_hsic60m_p2_clk", &usb_host_hs_hsic60m_p2_clk, CK_443X),
2949 CLK(NULL, "utmi_p1_gfclk", &utmi_p1_gfclk, CK_443X),
2950 CLK(NULL, "usb_host_hs_utmi_p1_clk", &usb_host_hs_utmi_p1_clk, CK_443X),
2951 CLK(NULL, "utmi_p2_gfclk", &utmi_p2_gfclk, CK_443X),
2952 CLK(NULL, "usb_host_hs_utmi_p2_clk", &usb_host_hs_utmi_p2_clk, CK_443X),
2953 CLK(NULL, "usb_host_hs_hsic480m_p1_clk", &usb_host_hs_hsic480m_p1_clk, CK_443X),
2954 CLK(NULL, "usb_host_hs_hsic480m_p2_clk", &usb_host_hs_hsic480m_p2_clk, CK_443X),
2955 CLK(NULL, "usb_host_hs_func48mclk", &usb_host_hs_func48mclk, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06002956 CLK(NULL, "usb_host_hs_fck", &usb_host_hs_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06002957 CLK(NULL, "otg_60m_gfclk", &otg_60m_gfclk, CK_443X),
2958 CLK(NULL, "usb_otg_hs_xclk", &usb_otg_hs_xclk, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06002959 CLK("musb_hdrc", "ick", &usb_otg_hs_ick, CK_443X),
Benoit Cousson0edc9e82010-09-27 14:02:56 -06002960 CLK(NULL, "usb_phy_cm_clk32k", &usb_phy_cm_clk32k, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06002961 CLK(NULL, "usb_tll_hs_usb_ch2_clk", &usb_tll_hs_usb_ch2_clk, CK_443X),
2962 CLK(NULL, "usb_tll_hs_usb_ch0_clk", &usb_tll_hs_usb_ch0_clk, CK_443X),
2963 CLK(NULL, "usb_tll_hs_usb_ch1_clk", &usb_tll_hs_usb_ch1_clk, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06002964 CLK(NULL, "usb_tll_hs_ick", &usb_tll_hs_ick, CK_443X),
Benoit Cousson0edc9e82010-09-27 14:02:56 -06002965 CLK(NULL, "usim_ck", &usim_ck, CK_443X),
2966 CLK(NULL, "usim_fclk", &usim_fclk, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06002967 CLK(NULL, "usim_fck", &usim_fck, CK_443X),
2968 CLK("omap_wdt", "fck", &wd_timer2_fck, CK_443X),
2969 CLK(NULL, "wd_timer3_fck", &wd_timer3_fck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07002970 CLK(NULL, "stm_clk_div_ck", &stm_clk_div_ck, CK_443X),
2971 CLK(NULL, "trace_clk_div_ck", &trace_clk_div_ck, CK_443X),
Santosh Shilimkar7c43d542010-02-22 22:09:40 -07002972 CLK(NULL, "gpmc_ck", &dummy_ck, CK_443X),
2973 CLK(NULL, "gpt1_ick", &dummy_ck, CK_443X),
2974 CLK(NULL, "gpt2_ick", &dummy_ck, CK_443X),
2975 CLK(NULL, "gpt3_ick", &dummy_ck, CK_443X),
2976 CLK(NULL, "gpt4_ick", &dummy_ck, CK_443X),
2977 CLK(NULL, "gpt5_ick", &dummy_ck, CK_443X),
2978 CLK(NULL, "gpt6_ick", &dummy_ck, CK_443X),
2979 CLK(NULL, "gpt7_ick", &dummy_ck, CK_443X),
2980 CLK(NULL, "gpt8_ick", &dummy_ck, CK_443X),
2981 CLK(NULL, "gpt9_ick", &dummy_ck, CK_443X),
2982 CLK(NULL, "gpt10_ick", &dummy_ck, CK_443X),
2983 CLK(NULL, "gpt11_ick", &dummy_ck, CK_443X),
Benoit Coussonf7bb0d92010-12-09 14:24:16 +00002984 CLK("omap_i2c.1", "ick", &dummy_ck, CK_443X),
2985 CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X),
2986 CLK("omap_i2c.3", "ick", &dummy_ck, CK_443X),
2987 CLK("omap_i2c.4", "ick", &dummy_ck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06002988 CLK("mmci-omap-hs.0", "ick", &dummy_ck, CK_443X),
2989 CLK("mmci-omap-hs.1", "ick", &dummy_ck, CK_443X),
2990 CLK("mmci-omap-hs.2", "ick", &dummy_ck, CK_443X),
2991 CLK("mmci-omap-hs.3", "ick", &dummy_ck, CK_443X),
2992 CLK("mmci-omap-hs.4", "ick", &dummy_ck, CK_443X),
Santosh Shilimkar7c43d542010-02-22 22:09:40 -07002993 CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_443X),
2994 CLK("omap-mcbsp.2", "ick", &dummy_ck, CK_443X),
2995 CLK("omap-mcbsp.3", "ick", &dummy_ck, CK_443X),
2996 CLK("omap-mcbsp.4", "ick", &dummy_ck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06002997 CLK("omap2_mcspi.1", "ick", &dummy_ck, CK_443X),
2998 CLK("omap2_mcspi.2", "ick", &dummy_ck, CK_443X),
2999 CLK("omap2_mcspi.3", "ick", &dummy_ck, CK_443X),
3000 CLK("omap2_mcspi.4", "ick", &dummy_ck, CK_443X),
Santosh Shilimkar7c43d542010-02-22 22:09:40 -07003001 CLK(NULL, "uart1_ick", &dummy_ck, CK_443X),
3002 CLK(NULL, "uart2_ick", &dummy_ck, CK_443X),
3003 CLK(NULL, "uart3_ick", &dummy_ck, CK_443X),
3004 CLK(NULL, "uart4_ick", &dummy_ck, CK_443X),
3005 CLK("omap_wdt", "ick", &dummy_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003006};
3007
Paul Walmsleye80a9722010-01-26 20:13:12 -07003008int __init omap4xxx_clk_init(void)
Rajendra Nayak972c5422009-12-08 18:46:28 -07003009{
Rajendra Nayak972c5422009-12-08 18:46:28 -07003010 struct omap_clk *c;
Rajendra Nayak972c5422009-12-08 18:46:28 -07003011 u32 cpu_clkflg;
3012
3013 if (cpu_is_omap44xx()) {
3014 cpu_mask = RATE_IN_4430;
3015 cpu_clkflg = CK_443X;
3016 }
3017
3018 clk_init(&omap2_clk_functions);
3019
3020 for (c = omap44xx_clks; c < omap44xx_clks + ARRAY_SIZE(omap44xx_clks);
3021 c++)
3022 clk_preinit(c->lk.clk);
3023
3024 for (c = omap44xx_clks; c < omap44xx_clks + ARRAY_SIZE(omap44xx_clks);
3025 c++)
3026 if (c->cpu & cpu_clkflg) {
3027 clkdev_add(&c->lk);
3028 clk_register(c->lk.clk);
Rajendra Nayak972c5422009-12-08 18:46:28 -07003029 omap2_init_clk_clkdm(c->lk.clk);
Rajendra Nayak972c5422009-12-08 18:46:28 -07003030 }
3031
3032 recalculate_root_clocks();
3033
3034 /*
3035 * Only enable those clocks we will need, let the drivers
3036 * enable other clocks as necessary
3037 */
3038 clk_enable_init_clocks();
3039
3040 return 0;
3041}