blob: 4fa62f9496c0316ee84901ea2ee9d7cf94f77129 [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 Nayake0cb70c2010-12-21 21:08:14 -070040#include "scrm44xx.h"
Rajendra Nayak972c5422009-12-08 18:46:28 -070041
Paul Walmsley59fb6592010-12-21 15:30:55 -070042/* OMAP4 modulemode control */
43#define OMAP4430_MODULEMODE_HWCTRL 0
44#define OMAP4430_MODULEMODE_SWCTRL 1
45
Rajendra Nayak972c5422009-12-08 18:46:28 -070046/* Root clocks */
47
48static struct clk extalt_clkin_ck = {
49 .name = "extalt_clkin_ck",
50 .rate = 59000000,
51 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -070052};
53
54static struct clk pad_clks_ck = {
55 .name = "pad_clks_ck",
56 .rate = 12000000,
Benoit Coussond9b98f52010-12-21 21:08:13 -070057 .ops = &clkops_omap2_dflt,
58 .enable_reg = OMAP4430_CM_CLKSEL_ABE,
59 .enable_bit = OMAP4430_PAD_CLKS_GATE_SHIFT,
Rajendra Nayak972c5422009-12-08 18:46:28 -070060};
61
62static struct clk pad_slimbus_core_clks_ck = {
63 .name = "pad_slimbus_core_clks_ck",
64 .rate = 12000000,
65 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -070066};
67
68static struct clk secure_32k_clk_src_ck = {
69 .name = "secure_32k_clk_src_ck",
70 .rate = 32768,
71 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -070072};
73
74static struct clk slimbus_clk = {
75 .name = "slimbus_clk",
76 .rate = 12000000,
Benoit Coussond9b98f52010-12-21 21:08:13 -070077 .ops = &clkops_omap2_dflt,
78 .enable_reg = OMAP4430_CM_CLKSEL_ABE,
79 .enable_bit = OMAP4430_SLIMBUS_CLK_GATE_SHIFT,
Rajendra Nayak972c5422009-12-08 18:46:28 -070080};
81
82static struct clk sys_32k_ck = {
83 .name = "sys_32k_ck",
84 .rate = 32768,
85 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -070086};
87
88static struct clk virt_12000000_ck = {
89 .name = "virt_12000000_ck",
90 .ops = &clkops_null,
91 .rate = 12000000,
92};
93
94static struct clk virt_13000000_ck = {
95 .name = "virt_13000000_ck",
96 .ops = &clkops_null,
97 .rate = 13000000,
98};
99
100static struct clk virt_16800000_ck = {
101 .name = "virt_16800000_ck",
102 .ops = &clkops_null,
103 .rate = 16800000,
104};
105
106static struct clk virt_19200000_ck = {
107 .name = "virt_19200000_ck",
108 .ops = &clkops_null,
109 .rate = 19200000,
110};
111
112static struct clk virt_26000000_ck = {
113 .name = "virt_26000000_ck",
114 .ops = &clkops_null,
115 .rate = 26000000,
116};
117
118static struct clk virt_27000000_ck = {
119 .name = "virt_27000000_ck",
120 .ops = &clkops_null,
121 .rate = 27000000,
122};
123
124static struct clk virt_38400000_ck = {
125 .name = "virt_38400000_ck",
126 .ops = &clkops_null,
127 .rate = 38400000,
128};
129
130static const struct clksel_rate div_1_0_rates[] = {
131 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
132 { .div = 0 },
133};
134
135static const struct clksel_rate div_1_1_rates[] = {
136 { .div = 1, .val = 1, .flags = RATE_IN_4430 },
137 { .div = 0 },
138};
139
140static const struct clksel_rate div_1_2_rates[] = {
141 { .div = 1, .val = 2, .flags = RATE_IN_4430 },
142 { .div = 0 },
143};
144
145static const struct clksel_rate div_1_3_rates[] = {
146 { .div = 1, .val = 3, .flags = RATE_IN_4430 },
147 { .div = 0 },
148};
149
150static const struct clksel_rate div_1_4_rates[] = {
151 { .div = 1, .val = 4, .flags = RATE_IN_4430 },
152 { .div = 0 },
153};
154
155static const struct clksel_rate div_1_5_rates[] = {
156 { .div = 1, .val = 5, .flags = RATE_IN_4430 },
157 { .div = 0 },
158};
159
160static const struct clksel_rate div_1_6_rates[] = {
161 { .div = 1, .val = 6, .flags = RATE_IN_4430 },
162 { .div = 0 },
163};
164
165static const struct clksel_rate div_1_7_rates[] = {
166 { .div = 1, .val = 7, .flags = RATE_IN_4430 },
167 { .div = 0 },
168};
169
170static const struct clksel sys_clkin_sel[] = {
171 { .parent = &virt_12000000_ck, .rates = div_1_1_rates },
172 { .parent = &virt_13000000_ck, .rates = div_1_2_rates },
173 { .parent = &virt_16800000_ck, .rates = div_1_3_rates },
174 { .parent = &virt_19200000_ck, .rates = div_1_4_rates },
175 { .parent = &virt_26000000_ck, .rates = div_1_5_rates },
176 { .parent = &virt_27000000_ck, .rates = div_1_6_rates },
177 { .parent = &virt_38400000_ck, .rates = div_1_7_rates },
178 { .parent = NULL },
179};
180
181static struct clk sys_clkin_ck = {
182 .name = "sys_clkin_ck",
183 .rate = 38400000,
184 .clksel = sys_clkin_sel,
185 .init = &omap2_init_clksel_parent,
186 .clksel_reg = OMAP4430_CM_SYS_CLKSEL,
187 .clksel_mask = OMAP4430_SYS_CLKSEL_MASK,
188 .ops = &clkops_null,
189 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700190};
191
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600192static struct clk tie_low_clock_ck = {
193 .name = "tie_low_clock_ck",
194 .rate = 0,
195 .ops = &clkops_null,
196};
197
Rajendra Nayak972c5422009-12-08 18:46:28 -0700198static struct clk utmi_phy_clkout_ck = {
199 .name = "utmi_phy_clkout_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600200 .rate = 60000000,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700201 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700202};
203
204static struct clk xclk60mhsp1_ck = {
205 .name = "xclk60mhsp1_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600206 .rate = 60000000,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700207 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700208};
209
210static struct clk xclk60mhsp2_ck = {
211 .name = "xclk60mhsp2_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600212 .rate = 60000000,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700213 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700214};
215
216static struct clk xclk60motg_ck = {
217 .name = "xclk60motg_ck",
218 .rate = 60000000,
219 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700220};
221
222/* Module clocks and DPLL outputs */
223
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600224static const struct clksel abe_dpll_bypass_clk_mux_sel[] = {
225 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700226 { .parent = &sys_32k_ck, .rates = div_1_1_rates },
227 { .parent = NULL },
228};
229
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600230static struct clk abe_dpll_bypass_clk_mux_ck = {
231 .name = "abe_dpll_bypass_clk_mux_ck",
232 .parent = &sys_clkin_ck,
233 .ops = &clkops_null,
234 .recalc = &followparent_recalc,
235};
236
Rajendra Nayak972c5422009-12-08 18:46:28 -0700237static struct clk abe_dpll_refclk_mux_ck = {
238 .name = "abe_dpll_refclk_mux_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600239 .parent = &sys_clkin_ck,
240 .clksel = abe_dpll_bypass_clk_mux_sel,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700241 .init = &omap2_init_clksel_parent,
242 .clksel_reg = OMAP4430_CM_ABE_PLL_REF_CLKSEL,
243 .clksel_mask = OMAP4430_CLKSEL_0_0_MASK,
244 .ops = &clkops_null,
245 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700246};
247
248/* DPLL_ABE */
249static struct dpll_data dpll_abe_dd = {
250 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_ABE,
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600251 .clk_bypass = &abe_dpll_bypass_clk_mux_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700252 .clk_ref = &abe_dpll_refclk_mux_ck,
253 .control_reg = OMAP4430_CM_CLKMODE_DPLL_ABE,
254 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
255 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_ABE,
256 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_ABE,
257 .mult_mask = OMAP4430_DPLL_MULT_MASK,
258 .div1_mask = OMAP4430_DPLL_DIV_MASK,
259 .enable_mask = OMAP4430_DPLL_EN_MASK,
260 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
261 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
262 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
263 .max_divider = OMAP4430_MAX_DPLL_DIV,
264 .min_divider = 1,
265};
266
267
268static struct clk dpll_abe_ck = {
269 .name = "dpll_abe_ck",
270 .parent = &abe_dpll_refclk_mux_ck,
271 .dpll_data = &dpll_abe_dd,
Rajendra Nayak911bd732009-12-08 18:47:17 -0700272 .init = &omap2_init_dpll_parent,
Paul Walmsley657ebfa2010-02-22 22:09:20 -0700273 .ops = &clkops_omap3_noncore_dpll_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700274 .recalc = &omap3_dpll_recalc,
275 .round_rate = &omap2_dpll_round_rate,
276 .set_rate = &omap3_noncore_dpll_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700277};
278
Thara Gopinath032b5a72010-12-21 21:08:13 -0700279static struct clk dpll_abe_x2_ck = {
280 .name = "dpll_abe_x2_ck",
Rajendra Nayak972c5422009-12-08 18:46:28 -0700281 .parent = &dpll_abe_ck,
282 .ops = &clkops_null,
Thara Gopinath032b5a72010-12-21 21:08:13 -0700283 .recalc = &omap3_clkoutx2_recalc,
284};
285
286static const struct clksel_rate div31_1to31_rates[] = {
287 { .div = 1, .val = 1, .flags = RATE_IN_4430 },
288 { .div = 2, .val = 2, .flags = RATE_IN_4430 },
289 { .div = 3, .val = 3, .flags = RATE_IN_4430 },
290 { .div = 4, .val = 4, .flags = RATE_IN_4430 },
291 { .div = 5, .val = 5, .flags = RATE_IN_4430 },
292 { .div = 6, .val = 6, .flags = RATE_IN_4430 },
293 { .div = 7, .val = 7, .flags = RATE_IN_4430 },
294 { .div = 8, .val = 8, .flags = RATE_IN_4430 },
295 { .div = 9, .val = 9, .flags = RATE_IN_4430 },
296 { .div = 10, .val = 10, .flags = RATE_IN_4430 },
297 { .div = 11, .val = 11, .flags = RATE_IN_4430 },
298 { .div = 12, .val = 12, .flags = RATE_IN_4430 },
299 { .div = 13, .val = 13, .flags = RATE_IN_4430 },
300 { .div = 14, .val = 14, .flags = RATE_IN_4430 },
301 { .div = 15, .val = 15, .flags = RATE_IN_4430 },
302 { .div = 16, .val = 16, .flags = RATE_IN_4430 },
303 { .div = 17, .val = 17, .flags = RATE_IN_4430 },
304 { .div = 18, .val = 18, .flags = RATE_IN_4430 },
305 { .div = 19, .val = 19, .flags = RATE_IN_4430 },
306 { .div = 20, .val = 20, .flags = RATE_IN_4430 },
307 { .div = 21, .val = 21, .flags = RATE_IN_4430 },
308 { .div = 22, .val = 22, .flags = RATE_IN_4430 },
309 { .div = 23, .val = 23, .flags = RATE_IN_4430 },
310 { .div = 24, .val = 24, .flags = RATE_IN_4430 },
311 { .div = 25, .val = 25, .flags = RATE_IN_4430 },
312 { .div = 26, .val = 26, .flags = RATE_IN_4430 },
313 { .div = 27, .val = 27, .flags = RATE_IN_4430 },
314 { .div = 28, .val = 28, .flags = RATE_IN_4430 },
315 { .div = 29, .val = 29, .flags = RATE_IN_4430 },
316 { .div = 30, .val = 30, .flags = RATE_IN_4430 },
317 { .div = 31, .val = 31, .flags = RATE_IN_4430 },
318 { .div = 0 },
319};
320
321static const struct clksel dpll_abe_m2x2_div[] = {
322 { .parent = &dpll_abe_x2_ck, .rates = div31_1to31_rates },
323 { .parent = NULL },
324};
325
326static struct clk dpll_abe_m2x2_ck = {
327 .name = "dpll_abe_m2x2_ck",
328 .parent = &dpll_abe_x2_ck,
329 .clksel = dpll_abe_m2x2_div,
330 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE,
331 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
332 .ops = &clkops_null,
333 .recalc = &omap2_clksel_recalc,
334 .round_rate = &omap2_clksel_round_rate,
335 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700336};
337
338static struct clk abe_24m_fclk = {
339 .name = "abe_24m_fclk",
340 .parent = &dpll_abe_m2x2_ck,
341 .ops = &clkops_null,
342 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700343};
344
345static const struct clksel_rate div3_1to4_rates[] = {
346 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
347 { .div = 2, .val = 1, .flags = RATE_IN_4430 },
348 { .div = 4, .val = 2, .flags = RATE_IN_4430 },
349 { .div = 0 },
350};
351
352static const struct clksel abe_clk_div[] = {
353 { .parent = &dpll_abe_m2x2_ck, .rates = div3_1to4_rates },
354 { .parent = NULL },
355};
356
357static struct clk abe_clk = {
358 .name = "abe_clk",
359 .parent = &dpll_abe_m2x2_ck,
360 .clksel = abe_clk_div,
361 .clksel_reg = OMAP4430_CM_CLKSEL_ABE,
362 .clksel_mask = OMAP4430_CLKSEL_OPP_MASK,
363 .ops = &clkops_null,
364 .recalc = &omap2_clksel_recalc,
365 .round_rate = &omap2_clksel_round_rate,
366 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700367};
368
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600369static const struct clksel_rate div2_1to2_rates[] = {
370 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
371 { .div = 2, .val = 1, .flags = RATE_IN_4430 },
372 { .div = 0 },
373};
374
Rajendra Nayak972c5422009-12-08 18:46:28 -0700375static const struct clksel aess_fclk_div[] = {
376 { .parent = &abe_clk, .rates = div2_1to2_rates },
377 { .parent = NULL },
378};
379
380static struct clk aess_fclk = {
381 .name = "aess_fclk",
382 .parent = &abe_clk,
383 .clksel = aess_fclk_div,
384 .clksel_reg = OMAP4430_CM1_ABE_AESS_CLKCTRL,
385 .clksel_mask = OMAP4430_CLKSEL_AESS_FCLK_MASK,
386 .ops = &clkops_null,
387 .recalc = &omap2_clksel_recalc,
388 .round_rate = &omap2_clksel_round_rate,
389 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700390};
391
Thara Gopinath032b5a72010-12-21 21:08:13 -0700392static struct clk dpll_abe_m3x2_ck = {
393 .name = "dpll_abe_m3x2_ck",
394 .parent = &dpll_abe_x2_ck,
395 .clksel = dpll_abe_m2x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700396 .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_ABE,
397 .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK,
398 .ops = &clkops_null,
399 .recalc = &omap2_clksel_recalc,
400 .round_rate = &omap2_clksel_round_rate,
401 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700402};
403
404static const struct clksel core_hsd_byp_clk_mux_sel[] = {
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600405 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
Thara Gopinath032b5a72010-12-21 21:08:13 -0700406 { .parent = &dpll_abe_m3x2_ck, .rates = div_1_1_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700407 { .parent = NULL },
408};
409
410static struct clk core_hsd_byp_clk_mux_ck = {
411 .name = "core_hsd_byp_clk_mux_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600412 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700413 .clksel = core_hsd_byp_clk_mux_sel,
414 .init = &omap2_init_clksel_parent,
415 .clksel_reg = OMAP4430_CM_CLKSEL_DPLL_CORE,
416 .clksel_mask = OMAP4430_DPLL_BYP_CLKSEL_MASK,
417 .ops = &clkops_null,
418 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700419};
420
421/* DPLL_CORE */
422static struct dpll_data dpll_core_dd = {
423 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_CORE,
424 .clk_bypass = &core_hsd_byp_clk_mux_ck,
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600425 .clk_ref = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700426 .control_reg = OMAP4430_CM_CLKMODE_DPLL_CORE,
427 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
428 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_CORE,
429 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_CORE,
430 .mult_mask = OMAP4430_DPLL_MULT_MASK,
431 .div1_mask = OMAP4430_DPLL_DIV_MASK,
432 .enable_mask = OMAP4430_DPLL_EN_MASK,
433 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
434 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
435 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
436 .max_divider = OMAP4430_MAX_DPLL_DIV,
437 .min_divider = 1,
438};
439
440
441static struct clk dpll_core_ck = {
442 .name = "dpll_core_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600443 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700444 .dpll_data = &dpll_core_dd,
Rajendra Nayak911bd732009-12-08 18:47:17 -0700445 .init = &omap2_init_dpll_parent,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700446 .ops = &clkops_null,
447 .recalc = &omap3_dpll_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700448};
449
Thara Gopinath032b5a72010-12-21 21:08:13 -0700450static struct clk dpll_core_x2_ck = {
451 .name = "dpll_core_x2_ck",
452 .parent = &dpll_core_ck,
453 .ops = &clkops_null,
454 .recalc = &omap3_clkoutx2_recalc,
455};
456
457static const struct clksel dpll_core_m6x2_div[] = {
458 { .parent = &dpll_core_x2_ck, .rates = div31_1to31_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700459 { .parent = NULL },
460};
461
Thara Gopinath032b5a72010-12-21 21:08:13 -0700462static struct clk dpll_core_m6x2_ck = {
463 .name = "dpll_core_m6x2_ck",
464 .parent = &dpll_core_x2_ck,
465 .clksel = dpll_core_m6x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700466 .clksel_reg = OMAP4430_CM_DIV_M6_DPLL_CORE,
467 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK,
468 .ops = &clkops_null,
469 .recalc = &omap2_clksel_recalc,
470 .round_rate = &omap2_clksel_round_rate,
471 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700472};
473
474static const struct clksel dbgclk_mux_sel[] = {
475 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
Thara Gopinath032b5a72010-12-21 21:08:13 -0700476 { .parent = &dpll_core_m6x2_ck, .rates = div_1_1_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700477 { .parent = NULL },
478};
479
480static struct clk dbgclk_mux_ck = {
481 .name = "dbgclk_mux_ck",
482 .parent = &sys_clkin_ck,
483 .ops = &clkops_null,
484 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700485};
486
Thara Gopinath032b5a72010-12-21 21:08:13 -0700487static const struct clksel dpll_core_m2_div[] = {
488 { .parent = &dpll_core_ck, .rates = div31_1to31_rates },
489 { .parent = NULL },
490};
491
Rajendra Nayak972c5422009-12-08 18:46:28 -0700492static struct clk dpll_core_m2_ck = {
493 .name = "dpll_core_m2_ck",
494 .parent = &dpll_core_ck,
Thara Gopinath032b5a72010-12-21 21:08:13 -0700495 .clksel = dpll_core_m2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700496 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_CORE,
497 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
498 .ops = &clkops_null,
499 .recalc = &omap2_clksel_recalc,
500 .round_rate = &omap2_clksel_round_rate,
501 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700502};
503
504static struct clk ddrphy_ck = {
505 .name = "ddrphy_ck",
506 .parent = &dpll_core_m2_ck,
507 .ops = &clkops_null,
508 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700509};
510
Thara Gopinath032b5a72010-12-21 21:08:13 -0700511static struct clk dpll_core_m5x2_ck = {
512 .name = "dpll_core_m5x2_ck",
513 .parent = &dpll_core_x2_ck,
514 .clksel = dpll_core_m6x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700515 .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_CORE,
516 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK,
517 .ops = &clkops_null,
518 .recalc = &omap2_clksel_recalc,
519 .round_rate = &omap2_clksel_round_rate,
520 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700521};
522
523static const struct clksel div_core_div[] = {
Thara Gopinath032b5a72010-12-21 21:08:13 -0700524 { .parent = &dpll_core_m5x2_ck, .rates = div2_1to2_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700525 { .parent = NULL },
526};
527
528static struct clk div_core_ck = {
529 .name = "div_core_ck",
Thara Gopinath032b5a72010-12-21 21:08:13 -0700530 .parent = &dpll_core_m5x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700531 .clksel = div_core_div,
532 .clksel_reg = OMAP4430_CM_CLKSEL_CORE,
533 .clksel_mask = OMAP4430_CLKSEL_CORE_MASK,
534 .ops = &clkops_null,
535 .recalc = &omap2_clksel_recalc,
536 .round_rate = &omap2_clksel_round_rate,
537 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700538};
539
540static const struct clksel_rate div4_1to8_rates[] = {
541 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
542 { .div = 2, .val = 1, .flags = RATE_IN_4430 },
543 { .div = 4, .val = 2, .flags = RATE_IN_4430 },
544 { .div = 8, .val = 3, .flags = RATE_IN_4430 },
545 { .div = 0 },
546};
547
548static const struct clksel div_iva_hs_clk_div[] = {
Thara Gopinath032b5a72010-12-21 21:08:13 -0700549 { .parent = &dpll_core_m5x2_ck, .rates = div4_1to8_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700550 { .parent = NULL },
551};
552
553static struct clk div_iva_hs_clk = {
554 .name = "div_iva_hs_clk",
Thara Gopinath032b5a72010-12-21 21:08:13 -0700555 .parent = &dpll_core_m5x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700556 .clksel = div_iva_hs_clk_div,
557 .clksel_reg = OMAP4430_CM_BYPCLK_DPLL_IVA,
558 .clksel_mask = OMAP4430_CLKSEL_0_1_MASK,
559 .ops = &clkops_null,
560 .recalc = &omap2_clksel_recalc,
561 .round_rate = &omap2_clksel_round_rate,
562 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700563};
564
565static struct clk div_mpu_hs_clk = {
566 .name = "div_mpu_hs_clk",
Thara Gopinath032b5a72010-12-21 21:08:13 -0700567 .parent = &dpll_core_m5x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700568 .clksel = div_iva_hs_clk_div,
569 .clksel_reg = OMAP4430_CM_BYPCLK_DPLL_MPU,
570 .clksel_mask = OMAP4430_CLKSEL_0_1_MASK,
571 .ops = &clkops_null,
572 .recalc = &omap2_clksel_recalc,
573 .round_rate = &omap2_clksel_round_rate,
574 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700575};
576
Thara Gopinath032b5a72010-12-21 21:08:13 -0700577static struct clk dpll_core_m4x2_ck = {
578 .name = "dpll_core_m4x2_ck",
579 .parent = &dpll_core_x2_ck,
580 .clksel = dpll_core_m6x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700581 .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_CORE,
582 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK,
583 .ops = &clkops_null,
584 .recalc = &omap2_clksel_recalc,
585 .round_rate = &omap2_clksel_round_rate,
586 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700587};
588
589static struct clk dll_clk_div_ck = {
590 .name = "dll_clk_div_ck",
Thara Gopinath032b5a72010-12-21 21:08:13 -0700591 .parent = &dpll_core_m4x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700592 .ops = &clkops_null,
593 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700594};
595
Thara Gopinath032b5a72010-12-21 21:08:13 -0700596static const struct clksel dpll_abe_m2_div[] = {
597 { .parent = &dpll_abe_ck, .rates = div31_1to31_rates },
598 { .parent = NULL },
599};
600
Rajendra Nayak972c5422009-12-08 18:46:28 -0700601static struct clk dpll_abe_m2_ck = {
602 .name = "dpll_abe_m2_ck",
603 .parent = &dpll_abe_ck,
Thara Gopinath032b5a72010-12-21 21:08:13 -0700604 .clksel = dpll_abe_m2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700605 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE,
606 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
607 .ops = &clkops_null,
608 .recalc = &omap2_clksel_recalc,
609 .round_rate = &omap2_clksel_round_rate,
610 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700611};
612
Thara Gopinath032b5a72010-12-21 21:08:13 -0700613static struct clk dpll_core_m3x2_ck = {
614 .name = "dpll_core_m3x2_ck",
615 .parent = &dpll_core_x2_ck,
616 .clksel = dpll_core_m6x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700617 .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_CORE,
618 .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK,
Rajendra Nayakcb134592010-12-21 21:08:14 -0700619 .ops = &clkops_omap2_dflt,
620 .enable_reg = OMAP4430_CM_DIV_M3_DPLL_CORE,
621 .enable_bit = OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700622 .recalc = &omap2_clksel_recalc,
623 .round_rate = &omap2_clksel_round_rate,
624 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700625};
626
Thara Gopinath032b5a72010-12-21 21:08:13 -0700627static struct clk dpll_core_m7x2_ck = {
628 .name = "dpll_core_m7x2_ck",
629 .parent = &dpll_core_x2_ck,
630 .clksel = dpll_core_m6x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700631 .clksel_reg = OMAP4430_CM_DIV_M7_DPLL_CORE,
632 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK,
633 .ops = &clkops_null,
634 .recalc = &omap2_clksel_recalc,
635 .round_rate = &omap2_clksel_round_rate,
636 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700637};
638
639static const struct clksel iva_hsd_byp_clk_mux_sel[] = {
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600640 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700641 { .parent = &div_iva_hs_clk, .rates = div_1_1_rates },
642 { .parent = NULL },
643};
644
645static struct clk iva_hsd_byp_clk_mux_ck = {
646 .name = "iva_hsd_byp_clk_mux_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600647 .parent = &sys_clkin_ck,
Jonathan Bergsagel768ab942010-12-21 21:08:13 -0700648 .clksel = iva_hsd_byp_clk_mux_sel,
649 .init = &omap2_init_clksel_parent,
650 .clksel_reg = OMAP4430_CM_CLKSEL_DPLL_IVA,
651 .clksel_mask = OMAP4430_DPLL_BYP_CLKSEL_MASK,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700652 .ops = &clkops_null,
Jonathan Bergsagel768ab942010-12-21 21:08:13 -0700653 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700654};
655
656/* DPLL_IVA */
657static struct dpll_data dpll_iva_dd = {
658 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_IVA,
659 .clk_bypass = &iva_hsd_byp_clk_mux_ck,
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600660 .clk_ref = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700661 .control_reg = OMAP4430_CM_CLKMODE_DPLL_IVA,
662 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
663 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_IVA,
664 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_IVA,
665 .mult_mask = OMAP4430_DPLL_MULT_MASK,
666 .div1_mask = OMAP4430_DPLL_DIV_MASK,
667 .enable_mask = OMAP4430_DPLL_EN_MASK,
668 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
669 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
670 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
671 .max_divider = OMAP4430_MAX_DPLL_DIV,
672 .min_divider = 1,
673};
674
675
676static struct clk dpll_iva_ck = {
677 .name = "dpll_iva_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600678 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700679 .dpll_data = &dpll_iva_dd,
Rajendra Nayak911bd732009-12-08 18:47:17 -0700680 .init = &omap2_init_dpll_parent,
Paul Walmsley657ebfa2010-02-22 22:09:20 -0700681 .ops = &clkops_omap3_noncore_dpll_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700682 .recalc = &omap3_dpll_recalc,
683 .round_rate = &omap2_dpll_round_rate,
684 .set_rate = &omap3_noncore_dpll_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700685};
686
Thara Gopinath032b5a72010-12-21 21:08:13 -0700687static struct clk dpll_iva_x2_ck = {
688 .name = "dpll_iva_x2_ck",
689 .parent = &dpll_iva_ck,
690 .ops = &clkops_null,
691 .recalc = &omap3_clkoutx2_recalc,
692};
693
694static const struct clksel dpll_iva_m4x2_div[] = {
695 { .parent = &dpll_iva_x2_ck, .rates = div31_1to31_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700696 { .parent = NULL },
697};
698
Thara Gopinath032b5a72010-12-21 21:08:13 -0700699static struct clk dpll_iva_m4x2_ck = {
700 .name = "dpll_iva_m4x2_ck",
701 .parent = &dpll_iva_x2_ck,
702 .clksel = dpll_iva_m4x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700703 .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_IVA,
704 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK,
705 .ops = &clkops_null,
706 .recalc = &omap2_clksel_recalc,
707 .round_rate = &omap2_clksel_round_rate,
708 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700709};
710
Thara Gopinath032b5a72010-12-21 21:08:13 -0700711static struct clk dpll_iva_m5x2_ck = {
712 .name = "dpll_iva_m5x2_ck",
713 .parent = &dpll_iva_x2_ck,
714 .clksel = dpll_iva_m4x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700715 .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_IVA,
716 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK,
717 .ops = &clkops_null,
718 .recalc = &omap2_clksel_recalc,
719 .round_rate = &omap2_clksel_round_rate,
720 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700721};
722
723/* DPLL_MPU */
724static struct dpll_data dpll_mpu_dd = {
725 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_MPU,
726 .clk_bypass = &div_mpu_hs_clk,
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600727 .clk_ref = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700728 .control_reg = OMAP4430_CM_CLKMODE_DPLL_MPU,
729 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
730 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_MPU,
731 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_MPU,
732 .mult_mask = OMAP4430_DPLL_MULT_MASK,
733 .div1_mask = OMAP4430_DPLL_DIV_MASK,
734 .enable_mask = OMAP4430_DPLL_EN_MASK,
735 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
736 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
737 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
738 .max_divider = OMAP4430_MAX_DPLL_DIV,
739 .min_divider = 1,
740};
741
742
743static struct clk dpll_mpu_ck = {
744 .name = "dpll_mpu_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600745 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700746 .dpll_data = &dpll_mpu_dd,
Rajendra Nayak911bd732009-12-08 18:47:17 -0700747 .init = &omap2_init_dpll_parent,
Paul Walmsley657ebfa2010-02-22 22:09:20 -0700748 .ops = &clkops_omap3_noncore_dpll_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700749 .recalc = &omap3_dpll_recalc,
750 .round_rate = &omap2_dpll_round_rate,
751 .set_rate = &omap3_noncore_dpll_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700752};
753
754static const struct clksel dpll_mpu_m2_div[] = {
755 { .parent = &dpll_mpu_ck, .rates = div31_1to31_rates },
756 { .parent = NULL },
757};
758
759static struct clk dpll_mpu_m2_ck = {
760 .name = "dpll_mpu_m2_ck",
761 .parent = &dpll_mpu_ck,
762 .clksel = dpll_mpu_m2_div,
763 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_MPU,
764 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
765 .ops = &clkops_null,
766 .recalc = &omap2_clksel_recalc,
767 .round_rate = &omap2_clksel_round_rate,
768 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700769};
770
771static struct clk per_hs_clk_div_ck = {
772 .name = "per_hs_clk_div_ck",
Thara Gopinath032b5a72010-12-21 21:08:13 -0700773 .parent = &dpll_abe_m3x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700774 .ops = &clkops_null,
775 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700776};
777
778static const struct clksel per_hsd_byp_clk_mux_sel[] = {
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600779 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700780 { .parent = &per_hs_clk_div_ck, .rates = div_1_1_rates },
781 { .parent = NULL },
782};
783
784static struct clk per_hsd_byp_clk_mux_ck = {
785 .name = "per_hsd_byp_clk_mux_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600786 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700787 .clksel = per_hsd_byp_clk_mux_sel,
788 .init = &omap2_init_clksel_parent,
789 .clksel_reg = OMAP4430_CM_CLKSEL_DPLL_PER,
790 .clksel_mask = OMAP4430_DPLL_BYP_CLKSEL_MASK,
791 .ops = &clkops_null,
792 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700793};
794
795/* DPLL_PER */
796static struct dpll_data dpll_per_dd = {
797 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_PER,
798 .clk_bypass = &per_hsd_byp_clk_mux_ck,
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600799 .clk_ref = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700800 .control_reg = OMAP4430_CM_CLKMODE_DPLL_PER,
801 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
802 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_PER,
803 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_PER,
804 .mult_mask = OMAP4430_DPLL_MULT_MASK,
805 .div1_mask = OMAP4430_DPLL_DIV_MASK,
806 .enable_mask = OMAP4430_DPLL_EN_MASK,
807 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
808 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
809 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
810 .max_divider = OMAP4430_MAX_DPLL_DIV,
811 .min_divider = 1,
812};
813
814
815static struct clk dpll_per_ck = {
816 .name = "dpll_per_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600817 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700818 .dpll_data = &dpll_per_dd,
Rajendra Nayak911bd732009-12-08 18:47:17 -0700819 .init = &omap2_init_dpll_parent,
Paul Walmsley657ebfa2010-02-22 22:09:20 -0700820 .ops = &clkops_omap3_noncore_dpll_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700821 .recalc = &omap3_dpll_recalc,
822 .round_rate = &omap2_dpll_round_rate,
823 .set_rate = &omap3_noncore_dpll_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700824};
825
826static const struct clksel dpll_per_m2_div[] = {
827 { .parent = &dpll_per_ck, .rates = div31_1to31_rates },
828 { .parent = NULL },
829};
830
831static struct clk dpll_per_m2_ck = {
832 .name = "dpll_per_m2_ck",
833 .parent = &dpll_per_ck,
834 .clksel = dpll_per_m2_div,
835 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER,
836 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
837 .ops = &clkops_null,
838 .recalc = &omap2_clksel_recalc,
839 .round_rate = &omap2_clksel_round_rate,
840 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700841};
842
Thara Gopinath032b5a72010-12-21 21:08:13 -0700843static struct clk dpll_per_x2_ck = {
844 .name = "dpll_per_x2_ck",
Rajendra Nayak972c5422009-12-08 18:46:28 -0700845 .parent = &dpll_per_ck,
846 .ops = &clkops_null,
Thara Gopinath032b5a72010-12-21 21:08:13 -0700847 .recalc = &omap3_clkoutx2_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700848};
849
Thara Gopinath032b5a72010-12-21 21:08:13 -0700850static const struct clksel dpll_per_m2x2_div[] = {
851 { .parent = &dpll_per_x2_ck, .rates = div31_1to31_rates },
852 { .parent = NULL },
853};
854
855static struct clk dpll_per_m2x2_ck = {
856 .name = "dpll_per_m2x2_ck",
857 .parent = &dpll_per_x2_ck,
858 .clksel = dpll_per_m2x2_div,
859 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER,
860 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
861 .ops = &clkops_null,
862 .recalc = &omap2_clksel_recalc,
863 .round_rate = &omap2_clksel_round_rate,
864 .set_rate = &omap2_clksel_set_rate,
865};
866
867static struct clk dpll_per_m3x2_ck = {
868 .name = "dpll_per_m3x2_ck",
869 .parent = &dpll_per_x2_ck,
870 .clksel = dpll_per_m2x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700871 .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_PER,
872 .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK,
Rajendra Nayakcb134592010-12-21 21:08:14 -0700873 .ops = &clkops_omap2_dflt,
874 .enable_reg = OMAP4430_CM_DIV_M3_DPLL_PER,
875 .enable_bit = OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700876 .recalc = &omap2_clksel_recalc,
877 .round_rate = &omap2_clksel_round_rate,
878 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700879};
880
Thara Gopinath032b5a72010-12-21 21:08:13 -0700881static struct clk dpll_per_m4x2_ck = {
882 .name = "dpll_per_m4x2_ck",
883 .parent = &dpll_per_x2_ck,
884 .clksel = dpll_per_m2x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700885 .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_PER,
886 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK,
887 .ops = &clkops_null,
888 .recalc = &omap2_clksel_recalc,
889 .round_rate = &omap2_clksel_round_rate,
890 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700891};
892
Thara Gopinath032b5a72010-12-21 21:08:13 -0700893static struct clk dpll_per_m5x2_ck = {
894 .name = "dpll_per_m5x2_ck",
895 .parent = &dpll_per_x2_ck,
896 .clksel = dpll_per_m2x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700897 .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_PER,
898 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK,
899 .ops = &clkops_null,
900 .recalc = &omap2_clksel_recalc,
901 .round_rate = &omap2_clksel_round_rate,
902 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700903};
904
Thara Gopinath032b5a72010-12-21 21:08:13 -0700905static struct clk dpll_per_m6x2_ck = {
906 .name = "dpll_per_m6x2_ck",
907 .parent = &dpll_per_x2_ck,
908 .clksel = dpll_per_m2x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700909 .clksel_reg = OMAP4430_CM_DIV_M6_DPLL_PER,
910 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK,
911 .ops = &clkops_null,
912 .recalc = &omap2_clksel_recalc,
913 .round_rate = &omap2_clksel_round_rate,
914 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700915};
916
Thara Gopinath032b5a72010-12-21 21:08:13 -0700917static struct clk dpll_per_m7x2_ck = {
918 .name = "dpll_per_m7x2_ck",
919 .parent = &dpll_per_x2_ck,
920 .clksel = dpll_per_m2x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700921 .clksel_reg = OMAP4430_CM_DIV_M7_DPLL_PER,
922 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK,
923 .ops = &clkops_null,
924 .recalc = &omap2_clksel_recalc,
925 .round_rate = &omap2_clksel_round_rate,
926 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700927};
928
929/* DPLL_UNIPRO */
930static struct dpll_data dpll_unipro_dd = {
931 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_UNIPRO,
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600932 .clk_bypass = &sys_clkin_ck,
933 .clk_ref = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700934 .control_reg = OMAP4430_CM_CLKMODE_DPLL_UNIPRO,
935 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
936 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_UNIPRO,
937 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_UNIPRO,
938 .mult_mask = OMAP4430_DPLL_MULT_MASK,
939 .div1_mask = OMAP4430_DPLL_DIV_MASK,
940 .enable_mask = OMAP4430_DPLL_EN_MASK,
941 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
942 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
Jon Huntera36795c2010-12-21 21:31:43 -0700943 .sddiv_mask = OMAP4430_DPLL_SD_DIV_MASK,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700944 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
945 .max_divider = OMAP4430_MAX_DPLL_DIV,
946 .min_divider = 1,
947};
948
949
950static struct clk dpll_unipro_ck = {
951 .name = "dpll_unipro_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600952 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700953 .dpll_data = &dpll_unipro_dd,
Rajendra Nayak911bd732009-12-08 18:47:17 -0700954 .init = &omap2_init_dpll_parent,
Paul Walmsley657ebfa2010-02-22 22:09:20 -0700955 .ops = &clkops_omap3_noncore_dpll_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700956 .recalc = &omap3_dpll_recalc,
957 .round_rate = &omap2_dpll_round_rate,
958 .set_rate = &omap3_noncore_dpll_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700959};
960
Thara Gopinath032b5a72010-12-21 21:08:13 -0700961static struct clk dpll_unipro_x2_ck = {
962 .name = "dpll_unipro_x2_ck",
963 .parent = &dpll_unipro_ck,
964 .ops = &clkops_null,
965 .recalc = &omap3_clkoutx2_recalc,
966};
967
Rajendra Nayak972c5422009-12-08 18:46:28 -0700968static const struct clksel dpll_unipro_m2x2_div[] = {
Thara Gopinath032b5a72010-12-21 21:08:13 -0700969 { .parent = &dpll_unipro_x2_ck, .rates = div31_1to31_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700970 { .parent = NULL },
971};
972
973static struct clk dpll_unipro_m2x2_ck = {
974 .name = "dpll_unipro_m2x2_ck",
Thara Gopinath032b5a72010-12-21 21:08:13 -0700975 .parent = &dpll_unipro_x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700976 .clksel = dpll_unipro_m2x2_div,
977 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_UNIPRO,
978 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
979 .ops = &clkops_null,
980 .recalc = &omap2_clksel_recalc,
981 .round_rate = &omap2_clksel_round_rate,
982 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700983};
984
985static struct clk usb_hs_clk_div_ck = {
986 .name = "usb_hs_clk_div_ck",
Thara Gopinath032b5a72010-12-21 21:08:13 -0700987 .parent = &dpll_abe_m3x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700988 .ops = &clkops_null,
989 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700990};
991
992/* DPLL_USB */
993static struct dpll_data dpll_usb_dd = {
994 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_USB,
995 .clk_bypass = &usb_hs_clk_div_ck,
Jon Huntera36795c2010-12-21 21:31:43 -0700996 .flags = DPLL_J_TYPE,
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600997 .clk_ref = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700998 .control_reg = OMAP4430_CM_CLKMODE_DPLL_USB,
999 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
1000 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_USB,
1001 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_USB,
1002 .mult_mask = OMAP4430_DPLL_MULT_MASK,
1003 .div1_mask = OMAP4430_DPLL_DIV_MASK,
1004 .enable_mask = OMAP4430_DPLL_EN_MASK,
1005 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
1006 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
1007 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
1008 .max_divider = OMAP4430_MAX_DPLL_DIV,
1009 .min_divider = 1,
1010};
1011
1012
1013static struct clk dpll_usb_ck = {
1014 .name = "dpll_usb_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -06001015 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001016 .dpll_data = &dpll_usb_dd,
Rajendra Nayak911bd732009-12-08 18:47:17 -07001017 .init = &omap2_init_dpll_parent,
Paul Walmsley657ebfa2010-02-22 22:09:20 -07001018 .ops = &clkops_omap3_noncore_dpll_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001019 .recalc = &omap3_dpll_recalc,
1020 .round_rate = &omap2_dpll_round_rate,
1021 .set_rate = &omap3_noncore_dpll_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001022};
1023
1024static struct clk dpll_usb_clkdcoldo_ck = {
1025 .name = "dpll_usb_clkdcoldo_ck",
1026 .parent = &dpll_usb_ck,
1027 .ops = &clkops_null,
1028 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001029};
1030
1031static const struct clksel dpll_usb_m2_div[] = {
1032 { .parent = &dpll_usb_ck, .rates = div31_1to31_rates },
1033 { .parent = NULL },
1034};
1035
1036static struct clk dpll_usb_m2_ck = {
1037 .name = "dpll_usb_m2_ck",
1038 .parent = &dpll_usb_ck,
1039 .clksel = dpll_usb_m2_div,
1040 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_USB,
1041 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK,
1042 .ops = &clkops_null,
1043 .recalc = &omap2_clksel_recalc,
1044 .round_rate = &omap2_clksel_round_rate,
1045 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001046};
1047
1048static const struct clksel ducati_clk_mux_sel[] = {
1049 { .parent = &div_core_ck, .rates = div_1_0_rates },
Thara Gopinath032b5a72010-12-21 21:08:13 -07001050 { .parent = &dpll_per_m6x2_ck, .rates = div_1_1_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -07001051 { .parent = NULL },
1052};
1053
1054static struct clk ducati_clk_mux_ck = {
1055 .name = "ducati_clk_mux_ck",
1056 .parent = &div_core_ck,
1057 .clksel = ducati_clk_mux_sel,
1058 .init = &omap2_init_clksel_parent,
1059 .clksel_reg = OMAP4430_CM_CLKSEL_DUCATI_ISS_ROOT,
1060 .clksel_mask = OMAP4430_CLKSEL_0_0_MASK,
1061 .ops = &clkops_null,
1062 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001063};
1064
1065static struct clk func_12m_fclk = {
1066 .name = "func_12m_fclk",
1067 .parent = &dpll_per_m2x2_ck,
1068 .ops = &clkops_null,
1069 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001070};
1071
1072static struct clk func_24m_clk = {
1073 .name = "func_24m_clk",
1074 .parent = &dpll_per_m2_ck,
1075 .ops = &clkops_null,
1076 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001077};
1078
1079static struct clk func_24mc_fclk = {
1080 .name = "func_24mc_fclk",
1081 .parent = &dpll_per_m2x2_ck,
1082 .ops = &clkops_null,
1083 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001084};
1085
1086static const struct clksel_rate div2_4to8_rates[] = {
1087 { .div = 4, .val = 0, .flags = RATE_IN_4430 },
1088 { .div = 8, .val = 1, .flags = RATE_IN_4430 },
1089 { .div = 0 },
1090};
1091
1092static const struct clksel func_48m_fclk_div[] = {
1093 { .parent = &dpll_per_m2x2_ck, .rates = div2_4to8_rates },
1094 { .parent = NULL },
1095};
1096
1097static struct clk func_48m_fclk = {
1098 .name = "func_48m_fclk",
1099 .parent = &dpll_per_m2x2_ck,
1100 .clksel = func_48m_fclk_div,
1101 .clksel_reg = OMAP4430_CM_SCALE_FCLK,
1102 .clksel_mask = OMAP4430_SCALE_FCLK_MASK,
1103 .ops = &clkops_null,
1104 .recalc = &omap2_clksel_recalc,
1105 .round_rate = &omap2_clksel_round_rate,
1106 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001107};
1108
1109static struct clk func_48mc_fclk = {
1110 .name = "func_48mc_fclk",
1111 .parent = &dpll_per_m2x2_ck,
1112 .ops = &clkops_null,
1113 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001114};
1115
1116static const struct clksel_rate div2_2to4_rates[] = {
1117 { .div = 2, .val = 0, .flags = RATE_IN_4430 },
1118 { .div = 4, .val = 1, .flags = RATE_IN_4430 },
1119 { .div = 0 },
1120};
1121
1122static const struct clksel func_64m_fclk_div[] = {
Thara Gopinath032b5a72010-12-21 21:08:13 -07001123 { .parent = &dpll_per_m4x2_ck, .rates = div2_2to4_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -07001124 { .parent = NULL },
1125};
1126
1127static struct clk func_64m_fclk = {
1128 .name = "func_64m_fclk",
Thara Gopinath032b5a72010-12-21 21:08:13 -07001129 .parent = &dpll_per_m4x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001130 .clksel = func_64m_fclk_div,
1131 .clksel_reg = OMAP4430_CM_SCALE_FCLK,
1132 .clksel_mask = OMAP4430_SCALE_FCLK_MASK,
1133 .ops = &clkops_null,
1134 .recalc = &omap2_clksel_recalc,
1135 .round_rate = &omap2_clksel_round_rate,
1136 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001137};
1138
1139static const struct clksel func_96m_fclk_div[] = {
1140 { .parent = &dpll_per_m2x2_ck, .rates = div2_2to4_rates },
1141 { .parent = NULL },
1142};
1143
1144static struct clk func_96m_fclk = {
1145 .name = "func_96m_fclk",
1146 .parent = &dpll_per_m2x2_ck,
1147 .clksel = func_96m_fclk_div,
1148 .clksel_reg = OMAP4430_CM_SCALE_FCLK,
1149 .clksel_mask = OMAP4430_SCALE_FCLK_MASK,
1150 .ops = &clkops_null,
1151 .recalc = &omap2_clksel_recalc,
1152 .round_rate = &omap2_clksel_round_rate,
1153 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001154};
1155
1156static const struct clksel hsmmc6_fclk_sel[] = {
1157 { .parent = &func_64m_fclk, .rates = div_1_0_rates },
1158 { .parent = &func_96m_fclk, .rates = div_1_1_rates },
1159 { .parent = NULL },
1160};
1161
1162static struct clk hsmmc6_fclk = {
1163 .name = "hsmmc6_fclk",
1164 .parent = &func_64m_fclk,
1165 .ops = &clkops_null,
1166 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001167};
1168
1169static const struct clksel_rate div2_1to8_rates[] = {
1170 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
1171 { .div = 8, .val = 1, .flags = RATE_IN_4430 },
1172 { .div = 0 },
1173};
1174
1175static const struct clksel init_60m_fclk_div[] = {
1176 { .parent = &dpll_usb_m2_ck, .rates = div2_1to8_rates },
1177 { .parent = NULL },
1178};
1179
1180static struct clk init_60m_fclk = {
1181 .name = "init_60m_fclk",
1182 .parent = &dpll_usb_m2_ck,
1183 .clksel = init_60m_fclk_div,
1184 .clksel_reg = OMAP4430_CM_CLKSEL_USB_60MHZ,
1185 .clksel_mask = OMAP4430_CLKSEL_0_0_MASK,
1186 .ops = &clkops_null,
1187 .recalc = &omap2_clksel_recalc,
1188 .round_rate = &omap2_clksel_round_rate,
1189 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001190};
1191
1192static const struct clksel l3_div_div[] = {
1193 { .parent = &div_core_ck, .rates = div2_1to2_rates },
1194 { .parent = NULL },
1195};
1196
1197static struct clk l3_div_ck = {
1198 .name = "l3_div_ck",
1199 .parent = &div_core_ck,
1200 .clksel = l3_div_div,
1201 .clksel_reg = OMAP4430_CM_CLKSEL_CORE,
1202 .clksel_mask = OMAP4430_CLKSEL_L3_MASK,
1203 .ops = &clkops_null,
1204 .recalc = &omap2_clksel_recalc,
1205 .round_rate = &omap2_clksel_round_rate,
1206 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001207};
1208
1209static const struct clksel l4_div_div[] = {
1210 { .parent = &l3_div_ck, .rates = div2_1to2_rates },
1211 { .parent = NULL },
1212};
1213
1214static struct clk l4_div_ck = {
1215 .name = "l4_div_ck",
1216 .parent = &l3_div_ck,
1217 .clksel = l4_div_div,
1218 .clksel_reg = OMAP4430_CM_CLKSEL_CORE,
1219 .clksel_mask = OMAP4430_CLKSEL_L4_MASK,
1220 .ops = &clkops_null,
1221 .recalc = &omap2_clksel_recalc,
1222 .round_rate = &omap2_clksel_round_rate,
1223 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001224};
1225
1226static struct clk lp_clk_div_ck = {
1227 .name = "lp_clk_div_ck",
1228 .parent = &dpll_abe_m2x2_ck,
1229 .ops = &clkops_null,
1230 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001231};
1232
1233static const struct clksel l4_wkup_clk_mux_sel[] = {
1234 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
1235 { .parent = &lp_clk_div_ck, .rates = div_1_1_rates },
1236 { .parent = NULL },
1237};
1238
1239static struct clk l4_wkup_clk_mux_ck = {
1240 .name = "l4_wkup_clk_mux_ck",
1241 .parent = &sys_clkin_ck,
1242 .clksel = l4_wkup_clk_mux_sel,
1243 .init = &omap2_init_clksel_parent,
1244 .clksel_reg = OMAP4430_CM_L4_WKUP_CLKSEL,
1245 .clksel_mask = OMAP4430_CLKSEL_0_0_MASK,
1246 .ops = &clkops_null,
1247 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001248};
1249
1250static const struct clksel per_abe_nc_fclk_div[] = {
1251 { .parent = &dpll_abe_m2_ck, .rates = div2_1to2_rates },
1252 { .parent = NULL },
1253};
1254
1255static struct clk per_abe_nc_fclk = {
1256 .name = "per_abe_nc_fclk",
1257 .parent = &dpll_abe_m2_ck,
1258 .clksel = per_abe_nc_fclk_div,
1259 .clksel_reg = OMAP4430_CM_SCALE_FCLK,
1260 .clksel_mask = OMAP4430_SCALE_FCLK_MASK,
1261 .ops = &clkops_null,
1262 .recalc = &omap2_clksel_recalc,
1263 .round_rate = &omap2_clksel_round_rate,
1264 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001265};
1266
1267static const struct clksel mcasp2_fclk_sel[] = {
1268 { .parent = &func_96m_fclk, .rates = div_1_0_rates },
1269 { .parent = &per_abe_nc_fclk, .rates = div_1_1_rates },
1270 { .parent = NULL },
1271};
1272
1273static struct clk mcasp2_fclk = {
1274 .name = "mcasp2_fclk",
1275 .parent = &func_96m_fclk,
1276 .ops = &clkops_null,
1277 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001278};
1279
1280static struct clk mcasp3_fclk = {
1281 .name = "mcasp3_fclk",
1282 .parent = &func_96m_fclk,
1283 .ops = &clkops_null,
1284 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001285};
1286
1287static struct clk ocp_abe_iclk = {
1288 .name = "ocp_abe_iclk",
1289 .parent = &aess_fclk,
1290 .ops = &clkops_null,
1291 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001292};
1293
1294static struct clk per_abe_24m_fclk = {
1295 .name = "per_abe_24m_fclk",
1296 .parent = &dpll_abe_m2_ck,
1297 .ops = &clkops_null,
1298 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001299};
1300
1301static const struct clksel pmd_stm_clock_mux_sel[] = {
1302 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
Thara Gopinath032b5a72010-12-21 21:08:13 -07001303 { .parent = &dpll_core_m6x2_ck, .rates = div_1_1_rates },
Rajendra Nayak76cf5292010-09-27 14:02:54 -06001304 { .parent = &tie_low_clock_ck, .rates = div_1_2_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -07001305 { .parent = NULL },
1306};
1307
1308static struct clk pmd_stm_clock_mux_ck = {
1309 .name = "pmd_stm_clock_mux_ck",
1310 .parent = &sys_clkin_ck,
1311 .ops = &clkops_null,
1312 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001313};
1314
1315static struct clk pmd_trace_clk_mux_ck = {
1316 .name = "pmd_trace_clk_mux_ck",
1317 .parent = &sys_clkin_ck,
1318 .ops = &clkops_null,
1319 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001320};
1321
Rajendra Nayak76cf5292010-09-27 14:02:54 -06001322static const struct clksel syc_clk_div_div[] = {
1323 { .parent = &sys_clkin_ck, .rates = div2_1to2_rates },
1324 { .parent = NULL },
1325};
1326
Rajendra Nayak972c5422009-12-08 18:46:28 -07001327static struct clk syc_clk_div_ck = {
1328 .name = "syc_clk_div_ck",
1329 .parent = &sys_clkin_ck,
Rajendra Nayak76cf5292010-09-27 14:02:54 -06001330 .clksel = syc_clk_div_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001331 .clksel_reg = OMAP4430_CM_ABE_DSS_SYS_CLKSEL,
1332 .clksel_mask = OMAP4430_CLKSEL_0_0_MASK,
1333 .ops = &clkops_null,
1334 .recalc = &omap2_clksel_recalc,
1335 .round_rate = &omap2_clksel_round_rate,
1336 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001337};
1338
1339/* Leaf clocks controlled by modules */
1340
Rajendra Nayak54776052010-02-22 22:09:39 -07001341static struct clk aes1_fck = {
1342 .name = "aes1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001343 .ops = &clkops_omap2_dflt,
1344 .enable_reg = OMAP4430_CM_L4SEC_AES1_CLKCTRL,
1345 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1346 .clkdm_name = "l4_secure_clkdm",
1347 .parent = &l3_div_ck,
1348 .recalc = &followparent_recalc,
1349};
1350
Rajendra Nayak54776052010-02-22 22:09:39 -07001351static struct clk aes2_fck = {
1352 .name = "aes2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001353 .ops = &clkops_omap2_dflt,
1354 .enable_reg = OMAP4430_CM_L4SEC_AES2_CLKCTRL,
1355 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1356 .clkdm_name = "l4_secure_clkdm",
1357 .parent = &l3_div_ck,
1358 .recalc = &followparent_recalc,
1359};
1360
Rajendra Nayak54776052010-02-22 22:09:39 -07001361static struct clk aess_fck = {
1362 .name = "aess_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001363 .ops = &clkops_omap2_dflt,
1364 .enable_reg = OMAP4430_CM1_ABE_AESS_CLKCTRL,
1365 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1366 .clkdm_name = "abe_clkdm",
1367 .parent = &aess_fclk,
1368 .recalc = &followparent_recalc,
1369};
1370
Benoit Cousson1c03f422010-09-27 14:02:55 -06001371static struct clk bandgap_fclk = {
1372 .name = "bandgap_fclk",
1373 .ops = &clkops_omap2_dflt,
1374 .enable_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL,
1375 .enable_bit = OMAP4430_OPTFCLKEN_BGAP_32K_SHIFT,
1376 .clkdm_name = "l4_wkup_clkdm",
1377 .parent = &sys_32k_ck,
1378 .recalc = &followparent_recalc,
1379};
1380
Rajendra Nayak54776052010-02-22 22:09:39 -07001381static struct clk des3des_fck = {
1382 .name = "des3des_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001383 .ops = &clkops_omap2_dflt,
1384 .enable_reg = OMAP4430_CM_L4SEC_DES3DES_CLKCTRL,
1385 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1386 .clkdm_name = "l4_secure_clkdm",
1387 .parent = &l4_div_ck,
1388 .recalc = &followparent_recalc,
1389};
1390
1391static const struct clksel dmic_sync_mux_sel[] = {
1392 { .parent = &abe_24m_fclk, .rates = div_1_0_rates },
1393 { .parent = &syc_clk_div_ck, .rates = div_1_1_rates },
1394 { .parent = &func_24m_clk, .rates = div_1_2_rates },
1395 { .parent = NULL },
1396};
1397
1398static struct clk dmic_sync_mux_ck = {
1399 .name = "dmic_sync_mux_ck",
1400 .parent = &abe_24m_fclk,
1401 .clksel = dmic_sync_mux_sel,
1402 .init = &omap2_init_clksel_parent,
1403 .clksel_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL,
1404 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1405 .ops = &clkops_null,
1406 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001407};
1408
1409static const struct clksel func_dmic_abe_gfclk_sel[] = {
1410 { .parent = &dmic_sync_mux_ck, .rates = div_1_0_rates },
1411 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1412 { .parent = &slimbus_clk, .rates = div_1_2_rates },
1413 { .parent = NULL },
1414};
1415
Rajendra Nayak54776052010-02-22 22:09:39 -07001416/* Merged func_dmic_abe_gfclk into dmic */
1417static struct clk dmic_fck = {
1418 .name = "dmic_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001419 .parent = &dmic_sync_mux_ck,
1420 .clksel = func_dmic_abe_gfclk_sel,
1421 .init = &omap2_init_clksel_parent,
1422 .clksel_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL,
1423 .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK,
1424 .ops = &clkops_omap2_dflt,
1425 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001426 .enable_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL,
1427 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1428 .clkdm_name = "abe_clkdm",
1429};
1430
Benoit Cousson0e433272010-09-27 14:02:54 -06001431static struct clk dsp_fck = {
1432 .name = "dsp_fck",
1433 .ops = &clkops_omap2_dflt,
1434 .enable_reg = OMAP4430_CM_TESLA_TESLA_CLKCTRL,
1435 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1436 .clkdm_name = "tesla_clkdm",
Thara Gopinath032b5a72010-12-21 21:08:13 -07001437 .parent = &dpll_iva_m4x2_ck,
Benoit Cousson0e433272010-09-27 14:02:54 -06001438 .recalc = &followparent_recalc,
1439};
1440
Benoit Cousson1c03f422010-09-27 14:02:55 -06001441static struct clk dss_sys_clk = {
1442 .name = "dss_sys_clk",
1443 .ops = &clkops_omap2_dflt,
1444 .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1445 .enable_bit = OMAP4430_OPTFCLKEN_SYS_CLK_SHIFT,
1446 .clkdm_name = "l3_dss_clkdm",
1447 .parent = &syc_clk_div_ck,
1448 .recalc = &followparent_recalc,
1449};
1450
1451static struct clk dss_tv_clk = {
1452 .name = "dss_tv_clk",
1453 .ops = &clkops_omap2_dflt,
1454 .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1455 .enable_bit = OMAP4430_OPTFCLKEN_TV_CLK_SHIFT,
1456 .clkdm_name = "l3_dss_clkdm",
1457 .parent = &extalt_clkin_ck,
1458 .recalc = &followparent_recalc,
1459};
1460
1461static struct clk dss_dss_clk = {
1462 .name = "dss_dss_clk",
1463 .ops = &clkops_omap2_dflt,
1464 .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1465 .enable_bit = OMAP4430_OPTFCLKEN_DSSCLK_SHIFT,
1466 .clkdm_name = "l3_dss_clkdm",
Thara Gopinath032b5a72010-12-21 21:08:13 -07001467 .parent = &dpll_per_m5x2_ck,
Benoit Cousson1c03f422010-09-27 14:02:55 -06001468 .recalc = &followparent_recalc,
1469};
1470
1471static struct clk dss_48mhz_clk = {
1472 .name = "dss_48mhz_clk",
1473 .ops = &clkops_omap2_dflt,
1474 .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1475 .enable_bit = OMAP4430_OPTFCLKEN_48MHZ_CLK_SHIFT,
1476 .clkdm_name = "l3_dss_clkdm",
1477 .parent = &func_48mc_fclk,
1478 .recalc = &followparent_recalc,
1479};
1480
Rajendra Nayak54776052010-02-22 22:09:39 -07001481static struct clk dss_fck = {
1482 .name = "dss_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001483 .ops = &clkops_omap2_dflt,
1484 .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1485 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1486 .clkdm_name = "l3_dss_clkdm",
1487 .parent = &l3_div_ck,
1488 .recalc = &followparent_recalc,
1489};
1490
Benoit Cousson0e433272010-09-27 14:02:54 -06001491static struct clk efuse_ctrl_cust_fck = {
1492 .name = "efuse_ctrl_cust_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001493 .ops = &clkops_omap2_dflt,
Benoit Cousson0e433272010-09-27 14:02:54 -06001494 .enable_reg = OMAP4430_CM_CEFUSE_CEFUSE_CLKCTRL,
1495 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1496 .clkdm_name = "l4_cefuse_clkdm",
1497 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001498 .recalc = &followparent_recalc,
1499};
1500
Benoit Cousson0e433272010-09-27 14:02:54 -06001501static struct clk emif1_fck = {
1502 .name = "emif1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001503 .ops = &clkops_omap2_dflt,
1504 .enable_reg = OMAP4430_CM_MEMIF_EMIF_1_CLKCTRL,
1505 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
Santosh Shilimkar090830b2010-06-16 19:01:33 +03001506 .flags = ENABLE_ON_INIT,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001507 .clkdm_name = "l3_emif_clkdm",
1508 .parent = &ddrphy_ck,
1509 .recalc = &followparent_recalc,
1510};
1511
Benoit Cousson0e433272010-09-27 14:02:54 -06001512static struct clk emif2_fck = {
1513 .name = "emif2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001514 .ops = &clkops_omap2_dflt,
1515 .enable_reg = OMAP4430_CM_MEMIF_EMIF_2_CLKCTRL,
1516 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
Santosh Shilimkar090830b2010-06-16 19:01:33 +03001517 .flags = ENABLE_ON_INIT,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001518 .clkdm_name = "l3_emif_clkdm",
1519 .parent = &ddrphy_ck,
1520 .recalc = &followparent_recalc,
1521};
1522
1523static const struct clksel fdif_fclk_div[] = {
Thara Gopinath032b5a72010-12-21 21:08:13 -07001524 { .parent = &dpll_per_m4x2_ck, .rates = div3_1to4_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -07001525 { .parent = NULL },
1526};
1527
Rajendra Nayak54776052010-02-22 22:09:39 -07001528/* Merged fdif_fclk into fdif */
1529static struct clk fdif_fck = {
1530 .name = "fdif_fck",
Thara Gopinath032b5a72010-12-21 21:08:13 -07001531 .parent = &dpll_per_m4x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001532 .clksel = fdif_fclk_div,
1533 .clksel_reg = OMAP4430_CM_CAM_FDIF_CLKCTRL,
1534 .clksel_mask = OMAP4430_CLKSEL_FCLK_MASK,
1535 .ops = &clkops_omap2_dflt,
1536 .recalc = &omap2_clksel_recalc,
1537 .round_rate = &omap2_clksel_round_rate,
1538 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001539 .enable_reg = OMAP4430_CM_CAM_FDIF_CLKCTRL,
1540 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1541 .clkdm_name = "iss_clkdm",
1542};
1543
Benoit Cousson0e433272010-09-27 14:02:54 -06001544static struct clk fpka_fck = {
1545 .name = "fpka_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001546 .ops = &clkops_omap2_dflt,
Benoit Cousson0e433272010-09-27 14:02:54 -06001547 .enable_reg = OMAP4430_CM_L4SEC_PKAEIP29_CLKCTRL,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001548 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
Benoit Cousson0e433272010-09-27 14:02:54 -06001549 .clkdm_name = "l4_secure_clkdm",
1550 .parent = &l4_div_ck,
1551 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001552};
1553
Benoit Cousson1c03f422010-09-27 14:02:55 -06001554static struct clk gpio1_dbclk = {
1555 .name = "gpio1_dbclk",
1556 .ops = &clkops_omap2_dflt,
1557 .enable_reg = OMAP4430_CM_WKUP_GPIO1_CLKCTRL,
1558 .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT,
1559 .clkdm_name = "l4_wkup_clkdm",
1560 .parent = &sys_32k_ck,
1561 .recalc = &followparent_recalc,
1562};
1563
Rajendra Nayak54776052010-02-22 22:09:39 -07001564static struct clk gpio1_ick = {
1565 .name = "gpio1_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001566 .ops = &clkops_omap2_dflt,
1567 .enable_reg = OMAP4430_CM_WKUP_GPIO1_CLKCTRL,
1568 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1569 .clkdm_name = "l4_wkup_clkdm",
1570 .parent = &l4_wkup_clk_mux_ck,
1571 .recalc = &followparent_recalc,
1572};
1573
Benoit Cousson1c03f422010-09-27 14:02:55 -06001574static struct clk gpio2_dbclk = {
1575 .name = "gpio2_dbclk",
1576 .ops = &clkops_omap2_dflt,
1577 .enable_reg = OMAP4430_CM_L4PER_GPIO2_CLKCTRL,
1578 .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT,
1579 .clkdm_name = "l4_per_clkdm",
1580 .parent = &sys_32k_ck,
1581 .recalc = &followparent_recalc,
1582};
1583
Rajendra Nayak54776052010-02-22 22:09:39 -07001584static struct clk gpio2_ick = {
1585 .name = "gpio2_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001586 .ops = &clkops_omap2_dflt,
1587 .enable_reg = OMAP4430_CM_L4PER_GPIO2_CLKCTRL,
1588 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1589 .clkdm_name = "l4_per_clkdm",
1590 .parent = &l4_div_ck,
1591 .recalc = &followparent_recalc,
1592};
1593
Benoit Cousson1c03f422010-09-27 14:02:55 -06001594static struct clk gpio3_dbclk = {
1595 .name = "gpio3_dbclk",
1596 .ops = &clkops_omap2_dflt,
1597 .enable_reg = OMAP4430_CM_L4PER_GPIO3_CLKCTRL,
1598 .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT,
1599 .clkdm_name = "l4_per_clkdm",
1600 .parent = &sys_32k_ck,
1601 .recalc = &followparent_recalc,
1602};
1603
Rajendra Nayak54776052010-02-22 22:09:39 -07001604static struct clk gpio3_ick = {
1605 .name = "gpio3_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001606 .ops = &clkops_omap2_dflt,
1607 .enable_reg = OMAP4430_CM_L4PER_GPIO3_CLKCTRL,
1608 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1609 .clkdm_name = "l4_per_clkdm",
1610 .parent = &l4_div_ck,
1611 .recalc = &followparent_recalc,
1612};
1613
Benoit Cousson1c03f422010-09-27 14:02:55 -06001614static struct clk gpio4_dbclk = {
1615 .name = "gpio4_dbclk",
1616 .ops = &clkops_omap2_dflt,
1617 .enable_reg = OMAP4430_CM_L4PER_GPIO4_CLKCTRL,
1618 .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT,
1619 .clkdm_name = "l4_per_clkdm",
1620 .parent = &sys_32k_ck,
1621 .recalc = &followparent_recalc,
1622};
1623
Rajendra Nayak54776052010-02-22 22:09:39 -07001624static struct clk gpio4_ick = {
1625 .name = "gpio4_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001626 .ops = &clkops_omap2_dflt,
1627 .enable_reg = OMAP4430_CM_L4PER_GPIO4_CLKCTRL,
1628 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1629 .clkdm_name = "l4_per_clkdm",
1630 .parent = &l4_div_ck,
1631 .recalc = &followparent_recalc,
1632};
1633
Benoit Cousson1c03f422010-09-27 14:02:55 -06001634static struct clk gpio5_dbclk = {
1635 .name = "gpio5_dbclk",
1636 .ops = &clkops_omap2_dflt,
1637 .enable_reg = OMAP4430_CM_L4PER_GPIO5_CLKCTRL,
1638 .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT,
1639 .clkdm_name = "l4_per_clkdm",
1640 .parent = &sys_32k_ck,
1641 .recalc = &followparent_recalc,
1642};
1643
Rajendra Nayak54776052010-02-22 22:09:39 -07001644static struct clk gpio5_ick = {
1645 .name = "gpio5_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001646 .ops = &clkops_omap2_dflt,
1647 .enable_reg = OMAP4430_CM_L4PER_GPIO5_CLKCTRL,
1648 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1649 .clkdm_name = "l4_per_clkdm",
1650 .parent = &l4_div_ck,
1651 .recalc = &followparent_recalc,
1652};
1653
Benoit Cousson1c03f422010-09-27 14:02:55 -06001654static struct clk gpio6_dbclk = {
1655 .name = "gpio6_dbclk",
1656 .ops = &clkops_omap2_dflt,
1657 .enable_reg = OMAP4430_CM_L4PER_GPIO6_CLKCTRL,
1658 .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT,
1659 .clkdm_name = "l4_per_clkdm",
1660 .parent = &sys_32k_ck,
1661 .recalc = &followparent_recalc,
1662};
1663
Rajendra Nayak54776052010-02-22 22:09:39 -07001664static struct clk gpio6_ick = {
1665 .name = "gpio6_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001666 .ops = &clkops_omap2_dflt,
1667 .enable_reg = OMAP4430_CM_L4PER_GPIO6_CLKCTRL,
1668 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1669 .clkdm_name = "l4_per_clkdm",
1670 .parent = &l4_div_ck,
1671 .recalc = &followparent_recalc,
1672};
1673
Rajendra Nayak54776052010-02-22 22:09:39 -07001674static struct clk gpmc_ick = {
1675 .name = "gpmc_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001676 .ops = &clkops_omap2_dflt,
1677 .enable_reg = OMAP4430_CM_L3_2_GPMC_CLKCTRL,
1678 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1679 .clkdm_name = "l3_2_clkdm",
1680 .parent = &l3_div_ck,
1681 .recalc = &followparent_recalc,
1682};
1683
Benoit Cousson0e433272010-09-27 14:02:54 -06001684static const struct clksel sgx_clk_mux_sel[] = {
Thara Gopinath032b5a72010-12-21 21:08:13 -07001685 { .parent = &dpll_core_m7x2_ck, .rates = div_1_0_rates },
1686 { .parent = &dpll_per_m7x2_ck, .rates = div_1_1_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -07001687 { .parent = NULL },
1688};
1689
Benoit Cousson0e433272010-09-27 14:02:54 -06001690/* Merged sgx_clk_mux into gpu */
1691static struct clk gpu_fck = {
1692 .name = "gpu_fck",
Thara Gopinath032b5a72010-12-21 21:08:13 -07001693 .parent = &dpll_core_m7x2_ck,
Benoit Cousson0e433272010-09-27 14:02:54 -06001694 .clksel = sgx_clk_mux_sel,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001695 .init = &omap2_init_clksel_parent,
Benoit Cousson0e433272010-09-27 14:02:54 -06001696 .clksel_reg = OMAP4430_CM_GFX_GFX_CLKCTRL,
1697 .clksel_mask = OMAP4430_CLKSEL_SGX_FCLK_MASK,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001698 .ops = &clkops_omap2_dflt,
1699 .recalc = &omap2_clksel_recalc,
Benoit Cousson0e433272010-09-27 14:02:54 -06001700 .enable_reg = OMAP4430_CM_GFX_GFX_CLKCTRL,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001701 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
Benoit Cousson0e433272010-09-27 14:02:54 -06001702 .clkdm_name = "l3_gfx_clkdm",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001703};
1704
Rajendra Nayak54776052010-02-22 22:09:39 -07001705static struct clk hdq1w_fck = {
1706 .name = "hdq1w_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001707 .ops = &clkops_omap2_dflt,
1708 .enable_reg = OMAP4430_CM_L4PER_HDQ1W_CLKCTRL,
1709 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1710 .clkdm_name = "l4_per_clkdm",
1711 .parent = &func_12m_fclk,
1712 .recalc = &followparent_recalc,
1713};
1714
Rajendra Nayak76cf5292010-09-27 14:02:54 -06001715static const struct clksel hsi_fclk_div[] = {
1716 { .parent = &dpll_per_m2x2_ck, .rates = div3_1to4_rates },
1717 { .parent = NULL },
1718};
1719
Rajendra Nayak54776052010-02-22 22:09:39 -07001720/* Merged hsi_fclk into hsi */
Benoit Cousson0e433272010-09-27 14:02:54 -06001721static struct clk hsi_fck = {
1722 .name = "hsi_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001723 .parent = &dpll_per_m2x2_ck,
Rajendra Nayak76cf5292010-09-27 14:02:54 -06001724 .clksel = hsi_fclk_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001725 .clksel_reg = OMAP4430_CM_L3INIT_HSI_CLKCTRL,
1726 .clksel_mask = OMAP4430_CLKSEL_24_25_MASK,
1727 .ops = &clkops_omap2_dflt,
1728 .recalc = &omap2_clksel_recalc,
1729 .round_rate = &omap2_clksel_round_rate,
1730 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001731 .enable_reg = OMAP4430_CM_L3INIT_HSI_CLKCTRL,
1732 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1733 .clkdm_name = "l3_init_clkdm",
1734};
1735
Rajendra Nayak54776052010-02-22 22:09:39 -07001736static struct clk i2c1_fck = {
1737 .name = "i2c1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001738 .ops = &clkops_omap2_dflt,
1739 .enable_reg = OMAP4430_CM_L4PER_I2C1_CLKCTRL,
1740 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1741 .clkdm_name = "l4_per_clkdm",
1742 .parent = &func_96m_fclk,
1743 .recalc = &followparent_recalc,
1744};
1745
Rajendra Nayak54776052010-02-22 22:09:39 -07001746static struct clk i2c2_fck = {
1747 .name = "i2c2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001748 .ops = &clkops_omap2_dflt,
1749 .enable_reg = OMAP4430_CM_L4PER_I2C2_CLKCTRL,
1750 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1751 .clkdm_name = "l4_per_clkdm",
1752 .parent = &func_96m_fclk,
1753 .recalc = &followparent_recalc,
1754};
1755
Rajendra Nayak54776052010-02-22 22:09:39 -07001756static struct clk i2c3_fck = {
1757 .name = "i2c3_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001758 .ops = &clkops_omap2_dflt,
1759 .enable_reg = OMAP4430_CM_L4PER_I2C3_CLKCTRL,
1760 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1761 .clkdm_name = "l4_per_clkdm",
1762 .parent = &func_96m_fclk,
1763 .recalc = &followparent_recalc,
1764};
1765
Rajendra Nayak54776052010-02-22 22:09:39 -07001766static struct clk i2c4_fck = {
1767 .name = "i2c4_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001768 .ops = &clkops_omap2_dflt,
1769 .enable_reg = OMAP4430_CM_L4PER_I2C4_CLKCTRL,
1770 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1771 .clkdm_name = "l4_per_clkdm",
1772 .parent = &func_96m_fclk,
1773 .recalc = &followparent_recalc,
1774};
1775
Benoit Cousson0e433272010-09-27 14:02:54 -06001776static struct clk ipu_fck = {
1777 .name = "ipu_fck",
1778 .ops = &clkops_omap2_dflt,
1779 .enable_reg = OMAP4430_CM_DUCATI_DUCATI_CLKCTRL,
1780 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1781 .clkdm_name = "ducati_clkdm",
1782 .parent = &ducati_clk_mux_ck,
1783 .recalc = &followparent_recalc,
1784};
1785
Benoit Cousson1c03f422010-09-27 14:02:55 -06001786static struct clk iss_ctrlclk = {
1787 .name = "iss_ctrlclk",
1788 .ops = &clkops_omap2_dflt,
1789 .enable_reg = OMAP4430_CM_CAM_ISS_CLKCTRL,
1790 .enable_bit = OMAP4430_OPTFCLKEN_CTRLCLK_SHIFT,
1791 .clkdm_name = "iss_clkdm",
1792 .parent = &func_96m_fclk,
1793 .recalc = &followparent_recalc,
1794};
1795
Rajendra Nayak54776052010-02-22 22:09:39 -07001796static struct clk iss_fck = {
1797 .name = "iss_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001798 .ops = &clkops_omap2_dflt,
1799 .enable_reg = OMAP4430_CM_CAM_ISS_CLKCTRL,
1800 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1801 .clkdm_name = "iss_clkdm",
1802 .parent = &ducati_clk_mux_ck,
1803 .recalc = &followparent_recalc,
1804};
1805
Benoit Cousson0e433272010-09-27 14:02:54 -06001806static struct clk iva_fck = {
1807 .name = "iva_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001808 .ops = &clkops_omap2_dflt,
1809 .enable_reg = OMAP4430_CM_IVAHD_IVAHD_CLKCTRL,
1810 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1811 .clkdm_name = "ivahd_clkdm",
Thara Gopinath032b5a72010-12-21 21:08:13 -07001812 .parent = &dpll_iva_m5x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001813 .recalc = &followparent_recalc,
1814};
1815
Benoit Cousson0e433272010-09-27 14:02:54 -06001816static struct clk kbd_fck = {
1817 .name = "kbd_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001818 .ops = &clkops_omap2_dflt,
1819 .enable_reg = OMAP4430_CM_WKUP_KEYBOARD_CLKCTRL,
1820 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1821 .clkdm_name = "l4_wkup_clkdm",
1822 .parent = &sys_32k_ck,
1823 .recalc = &followparent_recalc,
1824};
1825
Benoit Cousson0e433272010-09-27 14:02:54 -06001826static struct clk l3_instr_ick = {
1827 .name = "l3_instr_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001828 .ops = &clkops_omap2_dflt,
1829 .enable_reg = OMAP4430_CM_L3INSTR_L3_INSTR_CLKCTRL,
1830 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1831 .clkdm_name = "l3_instr_clkdm",
1832 .parent = &l3_div_ck,
1833 .recalc = &followparent_recalc,
1834};
1835
Benoit Cousson0e433272010-09-27 14:02:54 -06001836static struct clk l3_main_3_ick = {
1837 .name = "l3_main_3_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001838 .ops = &clkops_omap2_dflt,
1839 .enable_reg = OMAP4430_CM_L3INSTR_L3_3_CLKCTRL,
1840 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1841 .clkdm_name = "l3_instr_clkdm",
1842 .parent = &l3_div_ck,
1843 .recalc = &followparent_recalc,
1844};
1845
1846static struct clk mcasp_sync_mux_ck = {
1847 .name = "mcasp_sync_mux_ck",
1848 .parent = &abe_24m_fclk,
1849 .clksel = dmic_sync_mux_sel,
1850 .init = &omap2_init_clksel_parent,
1851 .clksel_reg = OMAP4430_CM1_ABE_MCASP_CLKCTRL,
1852 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1853 .ops = &clkops_null,
1854 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001855};
1856
1857static const struct clksel func_mcasp_abe_gfclk_sel[] = {
1858 { .parent = &mcasp_sync_mux_ck, .rates = div_1_0_rates },
1859 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1860 { .parent = &slimbus_clk, .rates = div_1_2_rates },
1861 { .parent = NULL },
1862};
1863
Rajendra Nayak54776052010-02-22 22:09:39 -07001864/* Merged func_mcasp_abe_gfclk into mcasp */
1865static struct clk mcasp_fck = {
1866 .name = "mcasp_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001867 .parent = &mcasp_sync_mux_ck,
1868 .clksel = func_mcasp_abe_gfclk_sel,
1869 .init = &omap2_init_clksel_parent,
1870 .clksel_reg = OMAP4430_CM1_ABE_MCASP_CLKCTRL,
1871 .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK,
1872 .ops = &clkops_omap2_dflt,
1873 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001874 .enable_reg = OMAP4430_CM1_ABE_MCASP_CLKCTRL,
1875 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1876 .clkdm_name = "abe_clkdm",
1877};
1878
1879static struct clk mcbsp1_sync_mux_ck = {
1880 .name = "mcbsp1_sync_mux_ck",
1881 .parent = &abe_24m_fclk,
1882 .clksel = dmic_sync_mux_sel,
1883 .init = &omap2_init_clksel_parent,
1884 .clksel_reg = OMAP4430_CM1_ABE_MCBSP1_CLKCTRL,
1885 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1886 .ops = &clkops_null,
1887 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001888};
1889
1890static const struct clksel func_mcbsp1_gfclk_sel[] = {
1891 { .parent = &mcbsp1_sync_mux_ck, .rates = div_1_0_rates },
1892 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1893 { .parent = &slimbus_clk, .rates = div_1_2_rates },
1894 { .parent = NULL },
1895};
1896
Rajendra Nayak54776052010-02-22 22:09:39 -07001897/* Merged func_mcbsp1_gfclk into mcbsp1 */
1898static struct clk mcbsp1_fck = {
1899 .name = "mcbsp1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001900 .parent = &mcbsp1_sync_mux_ck,
1901 .clksel = func_mcbsp1_gfclk_sel,
1902 .init = &omap2_init_clksel_parent,
1903 .clksel_reg = OMAP4430_CM1_ABE_MCBSP1_CLKCTRL,
1904 .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK,
1905 .ops = &clkops_omap2_dflt,
1906 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001907 .enable_reg = OMAP4430_CM1_ABE_MCBSP1_CLKCTRL,
1908 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1909 .clkdm_name = "abe_clkdm",
1910};
1911
1912static struct clk mcbsp2_sync_mux_ck = {
1913 .name = "mcbsp2_sync_mux_ck",
1914 .parent = &abe_24m_fclk,
1915 .clksel = dmic_sync_mux_sel,
1916 .init = &omap2_init_clksel_parent,
1917 .clksel_reg = OMAP4430_CM1_ABE_MCBSP2_CLKCTRL,
1918 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1919 .ops = &clkops_null,
1920 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001921};
1922
1923static const struct clksel func_mcbsp2_gfclk_sel[] = {
1924 { .parent = &mcbsp2_sync_mux_ck, .rates = div_1_0_rates },
1925 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1926 { .parent = &slimbus_clk, .rates = div_1_2_rates },
1927 { .parent = NULL },
1928};
1929
Rajendra Nayak54776052010-02-22 22:09:39 -07001930/* Merged func_mcbsp2_gfclk into mcbsp2 */
1931static struct clk mcbsp2_fck = {
1932 .name = "mcbsp2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001933 .parent = &mcbsp2_sync_mux_ck,
1934 .clksel = func_mcbsp2_gfclk_sel,
1935 .init = &omap2_init_clksel_parent,
1936 .clksel_reg = OMAP4430_CM1_ABE_MCBSP2_CLKCTRL,
1937 .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK,
1938 .ops = &clkops_omap2_dflt,
1939 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001940 .enable_reg = OMAP4430_CM1_ABE_MCBSP2_CLKCTRL,
1941 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1942 .clkdm_name = "abe_clkdm",
1943};
1944
1945static struct clk mcbsp3_sync_mux_ck = {
1946 .name = "mcbsp3_sync_mux_ck",
1947 .parent = &abe_24m_fclk,
1948 .clksel = dmic_sync_mux_sel,
1949 .init = &omap2_init_clksel_parent,
1950 .clksel_reg = OMAP4430_CM1_ABE_MCBSP3_CLKCTRL,
1951 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1952 .ops = &clkops_null,
1953 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001954};
1955
1956static const struct clksel func_mcbsp3_gfclk_sel[] = {
1957 { .parent = &mcbsp3_sync_mux_ck, .rates = div_1_0_rates },
1958 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1959 { .parent = &slimbus_clk, .rates = div_1_2_rates },
1960 { .parent = NULL },
1961};
1962
Rajendra Nayak54776052010-02-22 22:09:39 -07001963/* Merged func_mcbsp3_gfclk into mcbsp3 */
1964static struct clk mcbsp3_fck = {
1965 .name = "mcbsp3_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001966 .parent = &mcbsp3_sync_mux_ck,
1967 .clksel = func_mcbsp3_gfclk_sel,
1968 .init = &omap2_init_clksel_parent,
1969 .clksel_reg = OMAP4430_CM1_ABE_MCBSP3_CLKCTRL,
1970 .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK,
1971 .ops = &clkops_omap2_dflt,
1972 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001973 .enable_reg = OMAP4430_CM1_ABE_MCBSP3_CLKCTRL,
1974 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1975 .clkdm_name = "abe_clkdm",
1976};
1977
1978static struct clk mcbsp4_sync_mux_ck = {
1979 .name = "mcbsp4_sync_mux_ck",
1980 .parent = &func_96m_fclk,
1981 .clksel = mcasp2_fclk_sel,
1982 .init = &omap2_init_clksel_parent,
1983 .clksel_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL,
1984 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1985 .ops = &clkops_null,
1986 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001987};
1988
1989static const struct clksel per_mcbsp4_gfclk_sel[] = {
1990 { .parent = &mcbsp4_sync_mux_ck, .rates = div_1_0_rates },
1991 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1992 { .parent = NULL },
1993};
1994
Rajendra Nayak54776052010-02-22 22:09:39 -07001995/* Merged per_mcbsp4_gfclk into mcbsp4 */
1996static struct clk mcbsp4_fck = {
1997 .name = "mcbsp4_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001998 .parent = &mcbsp4_sync_mux_ck,
1999 .clksel = per_mcbsp4_gfclk_sel,
2000 .init = &omap2_init_clksel_parent,
2001 .clksel_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL,
2002 .clksel_mask = OMAP4430_CLKSEL_SOURCE_24_24_MASK,
2003 .ops = &clkops_omap2_dflt,
2004 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07002005 .enable_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL,
2006 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2007 .clkdm_name = "l4_per_clkdm",
2008};
2009
Benoit Cousson0e433272010-09-27 14:02:54 -06002010static struct clk mcpdm_fck = {
2011 .name = "mcpdm_fck",
2012 .ops = &clkops_omap2_dflt,
2013 .enable_reg = OMAP4430_CM1_ABE_PDM_CLKCTRL,
2014 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2015 .clkdm_name = "abe_clkdm",
2016 .parent = &pad_clks_ck,
2017 .recalc = &followparent_recalc,
2018};
2019
Rajendra Nayak54776052010-02-22 22:09:39 -07002020static struct clk mcspi1_fck = {
2021 .name = "mcspi1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002022 .ops = &clkops_omap2_dflt,
2023 .enable_reg = OMAP4430_CM_L4PER_MCSPI1_CLKCTRL,
2024 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2025 .clkdm_name = "l4_per_clkdm",
2026 .parent = &func_48m_fclk,
2027 .recalc = &followparent_recalc,
2028};
2029
Rajendra Nayak54776052010-02-22 22:09:39 -07002030static struct clk mcspi2_fck = {
2031 .name = "mcspi2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002032 .ops = &clkops_omap2_dflt,
2033 .enable_reg = OMAP4430_CM_L4PER_MCSPI2_CLKCTRL,
2034 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2035 .clkdm_name = "l4_per_clkdm",
2036 .parent = &func_48m_fclk,
2037 .recalc = &followparent_recalc,
2038};
2039
Rajendra Nayak54776052010-02-22 22:09:39 -07002040static struct clk mcspi3_fck = {
2041 .name = "mcspi3_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002042 .ops = &clkops_omap2_dflt,
2043 .enable_reg = OMAP4430_CM_L4PER_MCSPI3_CLKCTRL,
2044 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2045 .clkdm_name = "l4_per_clkdm",
2046 .parent = &func_48m_fclk,
2047 .recalc = &followparent_recalc,
2048};
2049
Rajendra Nayak54776052010-02-22 22:09:39 -07002050static struct clk mcspi4_fck = {
2051 .name = "mcspi4_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002052 .ops = &clkops_omap2_dflt,
2053 .enable_reg = OMAP4430_CM_L4PER_MCSPI4_CLKCTRL,
2054 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2055 .clkdm_name = "l4_per_clkdm",
2056 .parent = &func_48m_fclk,
2057 .recalc = &followparent_recalc,
2058};
2059
Rajendra Nayak54776052010-02-22 22:09:39 -07002060/* Merged hsmmc1_fclk into mmc1 */
2061static struct clk mmc1_fck = {
2062 .name = "mmc1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002063 .parent = &func_64m_fclk,
2064 .clksel = hsmmc6_fclk_sel,
2065 .init = &omap2_init_clksel_parent,
2066 .clksel_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL,
2067 .clksel_mask = OMAP4430_CLKSEL_MASK,
2068 .ops = &clkops_omap2_dflt,
2069 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07002070 .enable_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL,
2071 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2072 .clkdm_name = "l3_init_clkdm",
2073};
2074
Rajendra Nayak54776052010-02-22 22:09:39 -07002075/* Merged hsmmc2_fclk into mmc2 */
2076static struct clk mmc2_fck = {
2077 .name = "mmc2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002078 .parent = &func_64m_fclk,
2079 .clksel = hsmmc6_fclk_sel,
2080 .init = &omap2_init_clksel_parent,
2081 .clksel_reg = OMAP4430_CM_L3INIT_MMC2_CLKCTRL,
2082 .clksel_mask = OMAP4430_CLKSEL_MASK,
2083 .ops = &clkops_omap2_dflt,
2084 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07002085 .enable_reg = OMAP4430_CM_L3INIT_MMC2_CLKCTRL,
2086 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2087 .clkdm_name = "l3_init_clkdm",
2088};
2089
Rajendra Nayak54776052010-02-22 22:09:39 -07002090static struct clk mmc3_fck = {
2091 .name = "mmc3_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002092 .ops = &clkops_omap2_dflt,
2093 .enable_reg = OMAP4430_CM_L4PER_MMCSD3_CLKCTRL,
2094 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2095 .clkdm_name = "l4_per_clkdm",
2096 .parent = &func_48m_fclk,
2097 .recalc = &followparent_recalc,
2098};
2099
Rajendra Nayak54776052010-02-22 22:09:39 -07002100static struct clk mmc4_fck = {
2101 .name = "mmc4_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002102 .ops = &clkops_omap2_dflt,
2103 .enable_reg = OMAP4430_CM_L4PER_MMCSD4_CLKCTRL,
2104 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2105 .clkdm_name = "l4_per_clkdm",
2106 .parent = &func_48m_fclk,
2107 .recalc = &followparent_recalc,
2108};
2109
Rajendra Nayak54776052010-02-22 22:09:39 -07002110static struct clk mmc5_fck = {
2111 .name = "mmc5_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002112 .ops = &clkops_omap2_dflt,
2113 .enable_reg = OMAP4430_CM_L4PER_MMCSD5_CLKCTRL,
2114 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2115 .clkdm_name = "l4_per_clkdm",
2116 .parent = &func_48m_fclk,
2117 .recalc = &followparent_recalc,
2118};
2119
Benoit Cousson1c03f422010-09-27 14:02:55 -06002120static struct clk ocp2scp_usb_phy_phy_48m = {
2121 .name = "ocp2scp_usb_phy_phy_48m",
2122 .ops = &clkops_omap2_dflt,
2123 .enable_reg = OMAP4430_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL,
2124 .enable_bit = OMAP4430_OPTFCLKEN_PHY_48M_SHIFT,
2125 .clkdm_name = "l3_init_clkdm",
2126 .parent = &func_48m_fclk,
2127 .recalc = &followparent_recalc,
2128};
2129
Benoit Cousson0edc9e82010-09-27 14:02:56 -06002130static struct clk ocp2scp_usb_phy_ick = {
2131 .name = "ocp2scp_usb_phy_ick",
2132 .ops = &clkops_omap2_dflt,
2133 .enable_reg = OMAP4430_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL,
2134 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2135 .clkdm_name = "l3_init_clkdm",
2136 .parent = &l4_div_ck,
2137 .recalc = &followparent_recalc,
2138};
2139
Benoit Cousson0e433272010-09-27 14:02:54 -06002140static struct clk ocp_wp_noc_ick = {
2141 .name = "ocp_wp_noc_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002142 .ops = &clkops_omap2_dflt,
2143 .enable_reg = OMAP4430_CM_L3INSTR_OCP_WP1_CLKCTRL,
2144 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2145 .clkdm_name = "l3_instr_clkdm",
2146 .parent = &l3_div_ck,
2147 .recalc = &followparent_recalc,
2148};
2149
Rajendra Nayak54776052010-02-22 22:09:39 -07002150static struct clk rng_ick = {
2151 .name = "rng_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002152 .ops = &clkops_omap2_dflt,
2153 .enable_reg = OMAP4430_CM_L4SEC_RNG_CLKCTRL,
2154 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2155 .clkdm_name = "l4_secure_clkdm",
2156 .parent = &l4_div_ck,
2157 .recalc = &followparent_recalc,
2158};
2159
Benoit Cousson0e433272010-09-27 14:02:54 -06002160static struct clk sha2md5_fck = {
2161 .name = "sha2md5_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002162 .ops = &clkops_omap2_dflt,
2163 .enable_reg = OMAP4430_CM_L4SEC_SHA2MD51_CLKCTRL,
2164 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2165 .clkdm_name = "l4_secure_clkdm",
2166 .parent = &l3_div_ck,
2167 .recalc = &followparent_recalc,
2168};
2169
Benoit Cousson0e433272010-09-27 14:02:54 -06002170static struct clk sl2if_ick = {
2171 .name = "sl2if_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002172 .ops = &clkops_omap2_dflt,
2173 .enable_reg = OMAP4430_CM_IVAHD_SL2_CLKCTRL,
2174 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2175 .clkdm_name = "ivahd_clkdm",
Thara Gopinath032b5a72010-12-21 21:08:13 -07002176 .parent = &dpll_iva_m5x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -07002177 .recalc = &followparent_recalc,
2178};
2179
Benoit Cousson1c03f422010-09-27 14:02:55 -06002180static struct clk slimbus1_fclk_1 = {
2181 .name = "slimbus1_fclk_1",
2182 .ops = &clkops_omap2_dflt,
2183 .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL,
2184 .enable_bit = OMAP4430_OPTFCLKEN_FCLK1_SHIFT,
2185 .clkdm_name = "abe_clkdm",
2186 .parent = &func_24m_clk,
2187 .recalc = &followparent_recalc,
2188};
2189
2190static struct clk slimbus1_fclk_0 = {
2191 .name = "slimbus1_fclk_0",
2192 .ops = &clkops_omap2_dflt,
2193 .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL,
2194 .enable_bit = OMAP4430_OPTFCLKEN_FCLK0_SHIFT,
2195 .clkdm_name = "abe_clkdm",
2196 .parent = &abe_24m_fclk,
2197 .recalc = &followparent_recalc,
2198};
2199
2200static struct clk slimbus1_fclk_2 = {
2201 .name = "slimbus1_fclk_2",
2202 .ops = &clkops_omap2_dflt,
2203 .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL,
2204 .enable_bit = OMAP4430_OPTFCLKEN_FCLK2_SHIFT,
2205 .clkdm_name = "abe_clkdm",
2206 .parent = &pad_clks_ck,
2207 .recalc = &followparent_recalc,
2208};
2209
2210static struct clk slimbus1_slimbus_clk = {
2211 .name = "slimbus1_slimbus_clk",
2212 .ops = &clkops_omap2_dflt,
2213 .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL,
2214 .enable_bit = OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_SHIFT,
2215 .clkdm_name = "abe_clkdm",
2216 .parent = &slimbus_clk,
2217 .recalc = &followparent_recalc,
2218};
2219
Rajendra Nayak54776052010-02-22 22:09:39 -07002220static struct clk slimbus1_fck = {
2221 .name = "slimbus1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002222 .ops = &clkops_omap2_dflt,
2223 .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL,
2224 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2225 .clkdm_name = "abe_clkdm",
2226 .parent = &ocp_abe_iclk,
2227 .recalc = &followparent_recalc,
2228};
2229
Benoit Cousson1c03f422010-09-27 14:02:55 -06002230static struct clk slimbus2_fclk_1 = {
2231 .name = "slimbus2_fclk_1",
2232 .ops = &clkops_omap2_dflt,
2233 .enable_reg = OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL,
2234 .enable_bit = OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_SHIFT,
2235 .clkdm_name = "l4_per_clkdm",
2236 .parent = &per_abe_24m_fclk,
2237 .recalc = &followparent_recalc,
2238};
2239
2240static struct clk slimbus2_fclk_0 = {
2241 .name = "slimbus2_fclk_0",
2242 .ops = &clkops_omap2_dflt,
2243 .enable_reg = OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL,
2244 .enable_bit = OMAP4430_OPTFCLKEN_PER24MC_GFCLK_SHIFT,
2245 .clkdm_name = "l4_per_clkdm",
2246 .parent = &func_24mc_fclk,
2247 .recalc = &followparent_recalc,
2248};
2249
2250static struct clk slimbus2_slimbus_clk = {
2251 .name = "slimbus2_slimbus_clk",
2252 .ops = &clkops_omap2_dflt,
2253 .enable_reg = OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL,
2254 .enable_bit = OMAP4430_OPTFCLKEN_SLIMBUS_CLK_SHIFT,
2255 .clkdm_name = "l4_per_clkdm",
2256 .parent = &pad_slimbus_core_clks_ck,
2257 .recalc = &followparent_recalc,
2258};
2259
Rajendra Nayak54776052010-02-22 22:09:39 -07002260static struct clk slimbus2_fck = {
2261 .name = "slimbus2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002262 .ops = &clkops_omap2_dflt,
2263 .enable_reg = OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL,
2264 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2265 .clkdm_name = "l4_per_clkdm",
2266 .parent = &l4_div_ck,
2267 .recalc = &followparent_recalc,
2268};
2269
Benoit Cousson0e433272010-09-27 14:02:54 -06002270static struct clk smartreflex_core_fck = {
2271 .name = "smartreflex_core_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002272 .ops = &clkops_omap2_dflt,
2273 .enable_reg = OMAP4430_CM_ALWON_SR_CORE_CLKCTRL,
2274 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2275 .clkdm_name = "l4_ao_clkdm",
2276 .parent = &l4_wkup_clk_mux_ck,
2277 .recalc = &followparent_recalc,
2278};
2279
Benoit Cousson0e433272010-09-27 14:02:54 -06002280static struct clk smartreflex_iva_fck = {
2281 .name = "smartreflex_iva_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002282 .ops = &clkops_omap2_dflt,
2283 .enable_reg = OMAP4430_CM_ALWON_SR_IVA_CLKCTRL,
2284 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2285 .clkdm_name = "l4_ao_clkdm",
2286 .parent = &l4_wkup_clk_mux_ck,
2287 .recalc = &followparent_recalc,
2288};
2289
Benoit Cousson0e433272010-09-27 14:02:54 -06002290static struct clk smartreflex_mpu_fck = {
2291 .name = "smartreflex_mpu_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002292 .ops = &clkops_omap2_dflt,
2293 .enable_reg = OMAP4430_CM_ALWON_SR_MPU_CLKCTRL,
2294 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2295 .clkdm_name = "l4_ao_clkdm",
2296 .parent = &l4_wkup_clk_mux_ck,
2297 .recalc = &followparent_recalc,
2298};
2299
Benoit Cousson0e433272010-09-27 14:02:54 -06002300/* Merged dmt1_clk_mux into timer1 */
2301static struct clk timer1_fck = {
2302 .name = "timer1_fck",
2303 .parent = &sys_clkin_ck,
2304 .clksel = abe_dpll_bypass_clk_mux_sel,
2305 .init = &omap2_init_clksel_parent,
2306 .clksel_reg = OMAP4430_CM_WKUP_TIMER1_CLKCTRL,
2307 .clksel_mask = OMAP4430_CLKSEL_MASK,
Rajendra Nayak972c5422009-12-08 18:46:28 -07002308 .ops = &clkops_omap2_dflt,
Benoit Cousson0e433272010-09-27 14:02:54 -06002309 .recalc = &omap2_clksel_recalc,
2310 .enable_reg = OMAP4430_CM_WKUP_TIMER1_CLKCTRL,
2311 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2312 .clkdm_name = "l4_wkup_clkdm",
2313};
2314
2315/* Merged cm2_dm10_mux into timer10 */
2316static struct clk timer10_fck = {
2317 .name = "timer10_fck",
2318 .parent = &sys_clkin_ck,
2319 .clksel = abe_dpll_bypass_clk_mux_sel,
2320 .init = &omap2_init_clksel_parent,
2321 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER10_CLKCTRL,
2322 .clksel_mask = OMAP4430_CLKSEL_MASK,
2323 .ops = &clkops_omap2_dflt,
2324 .recalc = &omap2_clksel_recalc,
2325 .enable_reg = OMAP4430_CM_L4PER_DMTIMER10_CLKCTRL,
2326 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2327 .clkdm_name = "l4_per_clkdm",
2328};
2329
2330/* Merged cm2_dm11_mux into timer11 */
2331static struct clk timer11_fck = {
2332 .name = "timer11_fck",
2333 .parent = &sys_clkin_ck,
2334 .clksel = abe_dpll_bypass_clk_mux_sel,
2335 .init = &omap2_init_clksel_parent,
2336 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER11_CLKCTRL,
2337 .clksel_mask = OMAP4430_CLKSEL_MASK,
2338 .ops = &clkops_omap2_dflt,
2339 .recalc = &omap2_clksel_recalc,
2340 .enable_reg = OMAP4430_CM_L4PER_DMTIMER11_CLKCTRL,
2341 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2342 .clkdm_name = "l4_per_clkdm",
2343};
2344
2345/* Merged cm2_dm2_mux into timer2 */
2346static struct clk timer2_fck = {
2347 .name = "timer2_fck",
2348 .parent = &sys_clkin_ck,
2349 .clksel = abe_dpll_bypass_clk_mux_sel,
2350 .init = &omap2_init_clksel_parent,
2351 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER2_CLKCTRL,
2352 .clksel_mask = OMAP4430_CLKSEL_MASK,
2353 .ops = &clkops_omap2_dflt,
2354 .recalc = &omap2_clksel_recalc,
2355 .enable_reg = OMAP4430_CM_L4PER_DMTIMER2_CLKCTRL,
2356 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2357 .clkdm_name = "l4_per_clkdm",
2358};
2359
2360/* Merged cm2_dm3_mux into timer3 */
2361static struct clk timer3_fck = {
2362 .name = "timer3_fck",
2363 .parent = &sys_clkin_ck,
2364 .clksel = abe_dpll_bypass_clk_mux_sel,
2365 .init = &omap2_init_clksel_parent,
2366 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER3_CLKCTRL,
2367 .clksel_mask = OMAP4430_CLKSEL_MASK,
2368 .ops = &clkops_omap2_dflt,
2369 .recalc = &omap2_clksel_recalc,
2370 .enable_reg = OMAP4430_CM_L4PER_DMTIMER3_CLKCTRL,
2371 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2372 .clkdm_name = "l4_per_clkdm",
2373};
2374
2375/* Merged cm2_dm4_mux into timer4 */
2376static struct clk timer4_fck = {
2377 .name = "timer4_fck",
2378 .parent = &sys_clkin_ck,
2379 .clksel = abe_dpll_bypass_clk_mux_sel,
2380 .init = &omap2_init_clksel_parent,
2381 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER4_CLKCTRL,
2382 .clksel_mask = OMAP4430_CLKSEL_MASK,
2383 .ops = &clkops_omap2_dflt,
2384 .recalc = &omap2_clksel_recalc,
2385 .enable_reg = OMAP4430_CM_L4PER_DMTIMER4_CLKCTRL,
2386 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2387 .clkdm_name = "l4_per_clkdm",
2388};
2389
2390static const struct clksel timer5_sync_mux_sel[] = {
2391 { .parent = &syc_clk_div_ck, .rates = div_1_0_rates },
2392 { .parent = &sys_32k_ck, .rates = div_1_1_rates },
2393 { .parent = NULL },
2394};
2395
2396/* Merged timer5_sync_mux into timer5 */
2397static struct clk timer5_fck = {
2398 .name = "timer5_fck",
2399 .parent = &syc_clk_div_ck,
2400 .clksel = timer5_sync_mux_sel,
2401 .init = &omap2_init_clksel_parent,
2402 .clksel_reg = OMAP4430_CM1_ABE_TIMER5_CLKCTRL,
2403 .clksel_mask = OMAP4430_CLKSEL_MASK,
2404 .ops = &clkops_omap2_dflt,
2405 .recalc = &omap2_clksel_recalc,
2406 .enable_reg = OMAP4430_CM1_ABE_TIMER5_CLKCTRL,
2407 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2408 .clkdm_name = "abe_clkdm",
2409};
2410
2411/* Merged timer6_sync_mux into timer6 */
2412static struct clk timer6_fck = {
2413 .name = "timer6_fck",
2414 .parent = &syc_clk_div_ck,
2415 .clksel = timer5_sync_mux_sel,
2416 .init = &omap2_init_clksel_parent,
2417 .clksel_reg = OMAP4430_CM1_ABE_TIMER6_CLKCTRL,
2418 .clksel_mask = OMAP4430_CLKSEL_MASK,
2419 .ops = &clkops_omap2_dflt,
2420 .recalc = &omap2_clksel_recalc,
2421 .enable_reg = OMAP4430_CM1_ABE_TIMER6_CLKCTRL,
2422 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2423 .clkdm_name = "abe_clkdm",
2424};
2425
2426/* Merged timer7_sync_mux into timer7 */
2427static struct clk timer7_fck = {
2428 .name = "timer7_fck",
2429 .parent = &syc_clk_div_ck,
2430 .clksel = timer5_sync_mux_sel,
2431 .init = &omap2_init_clksel_parent,
2432 .clksel_reg = OMAP4430_CM1_ABE_TIMER7_CLKCTRL,
2433 .clksel_mask = OMAP4430_CLKSEL_MASK,
2434 .ops = &clkops_omap2_dflt,
2435 .recalc = &omap2_clksel_recalc,
2436 .enable_reg = OMAP4430_CM1_ABE_TIMER7_CLKCTRL,
2437 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2438 .clkdm_name = "abe_clkdm",
2439};
2440
2441/* Merged timer8_sync_mux into timer8 */
2442static struct clk timer8_fck = {
2443 .name = "timer8_fck",
2444 .parent = &syc_clk_div_ck,
2445 .clksel = timer5_sync_mux_sel,
2446 .init = &omap2_init_clksel_parent,
2447 .clksel_reg = OMAP4430_CM1_ABE_TIMER8_CLKCTRL,
2448 .clksel_mask = OMAP4430_CLKSEL_MASK,
2449 .ops = &clkops_omap2_dflt,
2450 .recalc = &omap2_clksel_recalc,
2451 .enable_reg = OMAP4430_CM1_ABE_TIMER8_CLKCTRL,
2452 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2453 .clkdm_name = "abe_clkdm",
2454};
2455
2456/* Merged cm2_dm9_mux into timer9 */
2457static struct clk timer9_fck = {
2458 .name = "timer9_fck",
2459 .parent = &sys_clkin_ck,
2460 .clksel = abe_dpll_bypass_clk_mux_sel,
2461 .init = &omap2_init_clksel_parent,
2462 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER9_CLKCTRL,
2463 .clksel_mask = OMAP4430_CLKSEL_MASK,
2464 .ops = &clkops_omap2_dflt,
2465 .recalc = &omap2_clksel_recalc,
2466 .enable_reg = OMAP4430_CM_L4PER_DMTIMER9_CLKCTRL,
2467 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2468 .clkdm_name = "l4_per_clkdm",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002469};
2470
Rajendra Nayak54776052010-02-22 22:09:39 -07002471static struct clk uart1_fck = {
2472 .name = "uart1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002473 .ops = &clkops_omap2_dflt,
2474 .enable_reg = OMAP4430_CM_L4PER_UART1_CLKCTRL,
2475 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2476 .clkdm_name = "l4_per_clkdm",
2477 .parent = &func_48m_fclk,
2478 .recalc = &followparent_recalc,
2479};
2480
Rajendra Nayak54776052010-02-22 22:09:39 -07002481static struct clk uart2_fck = {
2482 .name = "uart2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002483 .ops = &clkops_omap2_dflt,
2484 .enable_reg = OMAP4430_CM_L4PER_UART2_CLKCTRL,
2485 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2486 .clkdm_name = "l4_per_clkdm",
2487 .parent = &func_48m_fclk,
2488 .recalc = &followparent_recalc,
2489};
2490
Rajendra Nayak54776052010-02-22 22:09:39 -07002491static struct clk uart3_fck = {
2492 .name = "uart3_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002493 .ops = &clkops_omap2_dflt,
2494 .enable_reg = OMAP4430_CM_L4PER_UART3_CLKCTRL,
2495 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2496 .clkdm_name = "l4_per_clkdm",
2497 .parent = &func_48m_fclk,
2498 .recalc = &followparent_recalc,
2499};
2500
Rajendra Nayak54776052010-02-22 22:09:39 -07002501static struct clk uart4_fck = {
2502 .name = "uart4_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002503 .ops = &clkops_omap2_dflt,
2504 .enable_reg = OMAP4430_CM_L4PER_UART4_CLKCTRL,
2505 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2506 .clkdm_name = "l4_per_clkdm",
2507 .parent = &func_48m_fclk,
2508 .recalc = &followparent_recalc,
2509};
2510
Rajendra Nayak54776052010-02-22 22:09:39 -07002511static struct clk usb_host_fs_fck = {
2512 .name = "usb_host_fs_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002513 .ops = &clkops_omap2_dflt,
2514 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_FS_CLKCTRL,
2515 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2516 .clkdm_name = "l3_init_clkdm",
2517 .parent = &func_48mc_fclk,
2518 .recalc = &followparent_recalc,
2519};
2520
Benoit Cousson1c03f422010-09-27 14:02:55 -06002521static const struct clksel utmi_p1_gfclk_sel[] = {
2522 { .parent = &init_60m_fclk, .rates = div_1_0_rates },
2523 { .parent = &xclk60mhsp1_ck, .rates = div_1_1_rates },
2524 { .parent = NULL },
2525};
2526
2527static struct clk utmi_p1_gfclk = {
2528 .name = "utmi_p1_gfclk",
2529 .parent = &init_60m_fclk,
2530 .clksel = utmi_p1_gfclk_sel,
2531 .init = &omap2_init_clksel_parent,
2532 .clksel_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2533 .clksel_mask = OMAP4430_CLKSEL_UTMI_P1_MASK,
2534 .ops = &clkops_null,
2535 .recalc = &omap2_clksel_recalc,
2536};
2537
2538static struct clk usb_host_hs_utmi_p1_clk = {
2539 .name = "usb_host_hs_utmi_p1_clk",
2540 .ops = &clkops_omap2_dflt,
2541 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2542 .enable_bit = OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT,
2543 .clkdm_name = "l3_init_clkdm",
2544 .parent = &utmi_p1_gfclk,
2545 .recalc = &followparent_recalc,
2546};
2547
2548static const struct clksel utmi_p2_gfclk_sel[] = {
2549 { .parent = &init_60m_fclk, .rates = div_1_0_rates },
2550 { .parent = &xclk60mhsp2_ck, .rates = div_1_1_rates },
2551 { .parent = NULL },
2552};
2553
2554static struct clk utmi_p2_gfclk = {
2555 .name = "utmi_p2_gfclk",
2556 .parent = &init_60m_fclk,
2557 .clksel = utmi_p2_gfclk_sel,
2558 .init = &omap2_init_clksel_parent,
2559 .clksel_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2560 .clksel_mask = OMAP4430_CLKSEL_UTMI_P2_MASK,
2561 .ops = &clkops_null,
2562 .recalc = &omap2_clksel_recalc,
2563};
2564
2565static struct clk usb_host_hs_utmi_p2_clk = {
2566 .name = "usb_host_hs_utmi_p2_clk",
2567 .ops = &clkops_omap2_dflt,
2568 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2569 .enable_bit = OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT,
2570 .clkdm_name = "l3_init_clkdm",
2571 .parent = &utmi_p2_gfclk,
2572 .recalc = &followparent_recalc,
2573};
2574
Thara Gopinath032b5a72010-12-21 21:08:13 -07002575static struct clk usb_host_hs_utmi_p3_clk = {
2576 .name = "usb_host_hs_utmi_p3_clk",
2577 .ops = &clkops_omap2_dflt,
2578 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2579 .enable_bit = OMAP4430_OPTFCLKEN_UTMI_P3_CLK_SHIFT,
2580 .clkdm_name = "l3_init_clkdm",
2581 .parent = &init_60m_fclk,
2582 .recalc = &followparent_recalc,
2583};
2584
Benoit Cousson1c03f422010-09-27 14:02:55 -06002585static struct clk usb_host_hs_hsic480m_p1_clk = {
2586 .name = "usb_host_hs_hsic480m_p1_clk",
2587 .ops = &clkops_omap2_dflt,
2588 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2589 .enable_bit = OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT,
2590 .clkdm_name = "l3_init_clkdm",
2591 .parent = &dpll_usb_m2_ck,
2592 .recalc = &followparent_recalc,
2593};
2594
Thara Gopinath032b5a72010-12-21 21:08:13 -07002595static struct clk usb_host_hs_hsic60m_p1_clk = {
2596 .name = "usb_host_hs_hsic60m_p1_clk",
2597 .ops = &clkops_omap2_dflt,
2598 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2599 .enable_bit = OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT,
2600 .clkdm_name = "l3_init_clkdm",
2601 .parent = &init_60m_fclk,
2602 .recalc = &followparent_recalc,
2603};
2604
2605static struct clk usb_host_hs_hsic60m_p2_clk = {
2606 .name = "usb_host_hs_hsic60m_p2_clk",
2607 .ops = &clkops_omap2_dflt,
2608 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2609 .enable_bit = OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT,
2610 .clkdm_name = "l3_init_clkdm",
2611 .parent = &init_60m_fclk,
2612 .recalc = &followparent_recalc,
2613};
2614
Benoit Cousson1c03f422010-09-27 14:02:55 -06002615static struct clk usb_host_hs_hsic480m_p2_clk = {
2616 .name = "usb_host_hs_hsic480m_p2_clk",
2617 .ops = &clkops_omap2_dflt,
2618 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2619 .enable_bit = OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT,
2620 .clkdm_name = "l3_init_clkdm",
2621 .parent = &dpll_usb_m2_ck,
2622 .recalc = &followparent_recalc,
2623};
2624
2625static struct clk usb_host_hs_func48mclk = {
2626 .name = "usb_host_hs_func48mclk",
2627 .ops = &clkops_omap2_dflt,
2628 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2629 .enable_bit = OMAP4430_OPTFCLKEN_FUNC48MCLK_SHIFT,
2630 .clkdm_name = "l3_init_clkdm",
2631 .parent = &func_48mc_fclk,
2632 .recalc = &followparent_recalc,
2633};
2634
Benoit Cousson0e433272010-09-27 14:02:54 -06002635static struct clk usb_host_hs_fck = {
2636 .name = "usb_host_hs_fck",
2637 .ops = &clkops_omap2_dflt,
2638 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2639 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2640 .clkdm_name = "l3_init_clkdm",
2641 .parent = &init_60m_fclk,
2642 .recalc = &followparent_recalc,
2643};
2644
Benoit Cousson1c03f422010-09-27 14:02:55 -06002645static const struct clksel otg_60m_gfclk_sel[] = {
2646 { .parent = &utmi_phy_clkout_ck, .rates = div_1_0_rates },
2647 { .parent = &xclk60motg_ck, .rates = div_1_1_rates },
2648 { .parent = NULL },
2649};
2650
2651static struct clk otg_60m_gfclk = {
2652 .name = "otg_60m_gfclk",
2653 .parent = &utmi_phy_clkout_ck,
2654 .clksel = otg_60m_gfclk_sel,
2655 .init = &omap2_init_clksel_parent,
2656 .clksel_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL,
2657 .clksel_mask = OMAP4430_CLKSEL_60M_MASK,
2658 .ops = &clkops_null,
2659 .recalc = &omap2_clksel_recalc,
2660};
2661
2662static struct clk usb_otg_hs_xclk = {
2663 .name = "usb_otg_hs_xclk",
2664 .ops = &clkops_omap2_dflt,
2665 .enable_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL,
2666 .enable_bit = OMAP4430_OPTFCLKEN_XCLK_SHIFT,
2667 .clkdm_name = "l3_init_clkdm",
2668 .parent = &otg_60m_gfclk,
2669 .recalc = &followparent_recalc,
2670};
2671
Benoit Cousson0e433272010-09-27 14:02:54 -06002672static struct clk usb_otg_hs_ick = {
2673 .name = "usb_otg_hs_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002674 .ops = &clkops_omap2_dflt,
2675 .enable_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL,
2676 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2677 .clkdm_name = "l3_init_clkdm",
2678 .parent = &l3_div_ck,
2679 .recalc = &followparent_recalc,
2680};
2681
Benoit Cousson0edc9e82010-09-27 14:02:56 -06002682static struct clk usb_phy_cm_clk32k = {
2683 .name = "usb_phy_cm_clk32k",
2684 .ops = &clkops_omap2_dflt,
2685 .enable_reg = OMAP4430_CM_ALWON_USBPHY_CLKCTRL,
2686 .enable_bit = OMAP4430_OPTFCLKEN_CLK32K_SHIFT,
2687 .clkdm_name = "l4_ao_clkdm",
2688 .parent = &sys_32k_ck,
2689 .recalc = &followparent_recalc,
2690};
2691
Benoit Cousson1c03f422010-09-27 14:02:55 -06002692static struct clk usb_tll_hs_usb_ch2_clk = {
2693 .name = "usb_tll_hs_usb_ch2_clk",
2694 .ops = &clkops_omap2_dflt,
2695 .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL,
2696 .enable_bit = OMAP4430_OPTFCLKEN_USB_CH2_CLK_SHIFT,
2697 .clkdm_name = "l3_init_clkdm",
2698 .parent = &init_60m_fclk,
2699 .recalc = &followparent_recalc,
2700};
2701
2702static struct clk usb_tll_hs_usb_ch0_clk = {
2703 .name = "usb_tll_hs_usb_ch0_clk",
2704 .ops = &clkops_omap2_dflt,
2705 .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL,
2706 .enable_bit = OMAP4430_OPTFCLKEN_USB_CH0_CLK_SHIFT,
2707 .clkdm_name = "l3_init_clkdm",
2708 .parent = &init_60m_fclk,
2709 .recalc = &followparent_recalc,
2710};
2711
2712static struct clk usb_tll_hs_usb_ch1_clk = {
2713 .name = "usb_tll_hs_usb_ch1_clk",
2714 .ops = &clkops_omap2_dflt,
2715 .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL,
2716 .enable_bit = OMAP4430_OPTFCLKEN_USB_CH1_CLK_SHIFT,
2717 .clkdm_name = "l3_init_clkdm",
2718 .parent = &init_60m_fclk,
2719 .recalc = &followparent_recalc,
2720};
2721
Benoit Cousson0e433272010-09-27 14:02:54 -06002722static struct clk usb_tll_hs_ick = {
2723 .name = "usb_tll_hs_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002724 .ops = &clkops_omap2_dflt,
2725 .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL,
2726 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2727 .clkdm_name = "l3_init_clkdm",
2728 .parent = &l4_div_ck,
2729 .recalc = &followparent_recalc,
2730};
2731
Benoit Cousson0edc9e82010-09-27 14:02:56 -06002732static const struct clksel_rate div2_14to18_rates[] = {
2733 { .div = 14, .val = 0, .flags = RATE_IN_4430 },
2734 { .div = 18, .val = 1, .flags = RATE_IN_4430 },
2735 { .div = 0 },
2736};
2737
2738static const struct clksel usim_fclk_div[] = {
Thara Gopinath032b5a72010-12-21 21:08:13 -07002739 { .parent = &dpll_per_m4x2_ck, .rates = div2_14to18_rates },
Benoit Cousson0edc9e82010-09-27 14:02:56 -06002740 { .parent = NULL },
2741};
2742
2743static struct clk usim_ck = {
2744 .name = "usim_ck",
Thara Gopinath032b5a72010-12-21 21:08:13 -07002745 .parent = &dpll_per_m4x2_ck,
Benoit Cousson0edc9e82010-09-27 14:02:56 -06002746 .clksel = usim_fclk_div,
2747 .clksel_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL,
2748 .clksel_mask = OMAP4430_CLKSEL_DIV_MASK,
2749 .ops = &clkops_null,
2750 .recalc = &omap2_clksel_recalc,
2751 .round_rate = &omap2_clksel_round_rate,
2752 .set_rate = &omap2_clksel_set_rate,
2753};
2754
2755static struct clk usim_fclk = {
2756 .name = "usim_fclk",
2757 .ops = &clkops_omap2_dflt,
2758 .enable_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL,
2759 .enable_bit = OMAP4430_OPTFCLKEN_FCLK_SHIFT,
2760 .clkdm_name = "l4_wkup_clkdm",
2761 .parent = &usim_ck,
2762 .recalc = &followparent_recalc,
2763};
2764
Benoit Cousson0e433272010-09-27 14:02:54 -06002765static struct clk usim_fck = {
2766 .name = "usim_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002767 .ops = &clkops_omap2_dflt,
2768 .enable_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL,
Rajendra Nayak76cf5292010-09-27 14:02:54 -06002769 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
Rajendra Nayak972c5422009-12-08 18:46:28 -07002770 .clkdm_name = "l4_wkup_clkdm",
2771 .parent = &sys_32k_ck,
2772 .recalc = &followparent_recalc,
2773};
2774
Benoit Cousson0e433272010-09-27 14:02:54 -06002775static struct clk wd_timer2_fck = {
2776 .name = "wd_timer2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002777 .ops = &clkops_omap2_dflt,
2778 .enable_reg = OMAP4430_CM_WKUP_WDT2_CLKCTRL,
2779 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2780 .clkdm_name = "l4_wkup_clkdm",
2781 .parent = &sys_32k_ck,
2782 .recalc = &followparent_recalc,
2783};
2784
Benoit Cousson0e433272010-09-27 14:02:54 -06002785static struct clk wd_timer3_fck = {
2786 .name = "wd_timer3_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002787 .ops = &clkops_omap2_dflt,
2788 .enable_reg = OMAP4430_CM1_ABE_WDT3_CLKCTRL,
2789 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2790 .clkdm_name = "abe_clkdm",
2791 .parent = &sys_32k_ck,
2792 .recalc = &followparent_recalc,
2793};
2794
2795/* Remaining optional clocks */
Rajendra Nayak972c5422009-12-08 18:46:28 -07002796static const struct clksel stm_clk_div_div[] = {
2797 { .parent = &pmd_stm_clock_mux_ck, .rates = div3_1to4_rates },
2798 { .parent = NULL },
2799};
2800
2801static struct clk stm_clk_div_ck = {
2802 .name = "stm_clk_div_ck",
2803 .parent = &pmd_stm_clock_mux_ck,
2804 .clksel = stm_clk_div_div,
2805 .clksel_reg = OMAP4430_CM_EMU_DEBUGSS_CLKCTRL,
2806 .clksel_mask = OMAP4430_CLKSEL_PMD_STM_CLK_MASK,
2807 .ops = &clkops_null,
2808 .recalc = &omap2_clksel_recalc,
2809 .round_rate = &omap2_clksel_round_rate,
2810 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07002811};
2812
2813static const struct clksel trace_clk_div_div[] = {
2814 { .parent = &pmd_trace_clk_mux_ck, .rates = div3_1to4_rates },
2815 { .parent = NULL },
2816};
2817
2818static struct clk trace_clk_div_ck = {
2819 .name = "trace_clk_div_ck",
2820 .parent = &pmd_trace_clk_mux_ck,
2821 .clksel = trace_clk_div_div,
2822 .clksel_reg = OMAP4430_CM_EMU_DEBUGSS_CLKCTRL,
2823 .clksel_mask = OMAP4430_CLKSEL_PMD_TRACE_CLK_MASK,
2824 .ops = &clkops_null,
2825 .recalc = &omap2_clksel_recalc,
2826 .round_rate = &omap2_clksel_round_rate,
2827 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07002828};
2829
Rajendra Nayake0cb70c2010-12-21 21:08:14 -07002830/* SCRM aux clk nodes */
2831
2832static const struct clksel auxclk_sel[] = {
2833 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
2834 { .parent = &dpll_core_m3x2_ck, .rates = div_1_1_rates },
2835 { .parent = &dpll_per_m3x2_ck, .rates = div_1_2_rates },
2836 { .parent = NULL },
2837};
2838
2839static struct clk auxclk0_ck = {
2840 .name = "auxclk0_ck",
2841 .parent = &sys_clkin_ck,
2842 .init = &omap2_init_clksel_parent,
2843 .ops = &clkops_omap2_dflt,
2844 .clksel = auxclk_sel,
2845 .clksel_reg = OMAP4_SCRM_AUXCLK0,
2846 .clksel_mask = OMAP4_SRCSELECT_MASK,
2847 .recalc = &omap2_clksel_recalc,
2848 .enable_reg = OMAP4_SCRM_AUXCLK0,
2849 .enable_bit = OMAP4_ENABLE_SHIFT,
2850};
2851
2852static struct clk auxclk1_ck = {
2853 .name = "auxclk1_ck",
2854 .parent = &sys_clkin_ck,
2855 .init = &omap2_init_clksel_parent,
2856 .ops = &clkops_omap2_dflt,
2857 .clksel = auxclk_sel,
2858 .clksel_reg = OMAP4_SCRM_AUXCLK1,
2859 .clksel_mask = OMAP4_SRCSELECT_MASK,
2860 .recalc = &omap2_clksel_recalc,
2861 .enable_reg = OMAP4_SCRM_AUXCLK1,
2862 .enable_bit = OMAP4_ENABLE_SHIFT,
2863};
2864
2865static struct clk auxclk2_ck = {
2866 .name = "auxclk2_ck",
2867 .parent = &sys_clkin_ck,
2868 .init = &omap2_init_clksel_parent,
2869 .ops = &clkops_omap2_dflt,
2870 .clksel = auxclk_sel,
2871 .clksel_reg = OMAP4_SCRM_AUXCLK2,
2872 .clksel_mask = OMAP4_SRCSELECT_MASK,
2873 .recalc = &omap2_clksel_recalc,
2874 .enable_reg = OMAP4_SCRM_AUXCLK2,
2875 .enable_bit = OMAP4_ENABLE_SHIFT,
2876};
2877static struct clk auxclk3_ck = {
2878 .name = "auxclk3_ck",
2879 .parent = &sys_clkin_ck,
2880 .init = &omap2_init_clksel_parent,
2881 .ops = &clkops_omap2_dflt,
2882 .clksel = auxclk_sel,
2883 .clksel_reg = OMAP4_SCRM_AUXCLK3,
2884 .clksel_mask = OMAP4_SRCSELECT_MASK,
2885 .recalc = &omap2_clksel_recalc,
2886 .enable_reg = OMAP4_SCRM_AUXCLK3,
2887 .enable_bit = OMAP4_ENABLE_SHIFT,
2888};
2889
2890static struct clk auxclk4_ck = {
2891 .name = "auxclk4_ck",
2892 .parent = &sys_clkin_ck,
2893 .init = &omap2_init_clksel_parent,
2894 .ops = &clkops_omap2_dflt,
2895 .clksel = auxclk_sel,
2896 .clksel_reg = OMAP4_SCRM_AUXCLK4,
2897 .clksel_mask = OMAP4_SRCSELECT_MASK,
2898 .recalc = &omap2_clksel_recalc,
2899 .enable_reg = OMAP4_SCRM_AUXCLK4,
2900 .enable_bit = OMAP4_ENABLE_SHIFT,
2901};
2902
2903static struct clk auxclk5_ck = {
2904 .name = "auxclk5_ck",
2905 .parent = &sys_clkin_ck,
2906 .init = &omap2_init_clksel_parent,
2907 .ops = &clkops_omap2_dflt,
2908 .clksel = auxclk_sel,
2909 .clksel_reg = OMAP4_SCRM_AUXCLK5,
2910 .clksel_mask = OMAP4_SRCSELECT_MASK,
2911 .recalc = &omap2_clksel_recalc,
2912 .enable_reg = OMAP4_SCRM_AUXCLK5,
2913 .enable_bit = OMAP4_ENABLE_SHIFT,
2914};
2915
2916static const struct clksel auxclkreq_sel[] = {
2917 { .parent = &auxclk0_ck, .rates = div_1_0_rates },
2918 { .parent = &auxclk1_ck, .rates = div_1_1_rates },
2919 { .parent = &auxclk2_ck, .rates = div_1_2_rates },
2920 { .parent = &auxclk3_ck, .rates = div_1_3_rates },
2921 { .parent = &auxclk4_ck, .rates = div_1_4_rates },
2922 { .parent = &auxclk5_ck, .rates = div_1_5_rates },
2923 { .parent = NULL },
2924};
2925
2926static struct clk auxclkreq0_ck = {
2927 .name = "auxclkreq0_ck",
2928 .parent = &auxclk0_ck,
2929 .init = &omap2_init_clksel_parent,
2930 .ops = &clkops_null,
2931 .clksel = auxclkreq_sel,
2932 .clksel_reg = OMAP4_SCRM_AUXCLKREQ0,
2933 .clksel_mask = OMAP4_MAPPING_MASK,
2934 .recalc = &omap2_clksel_recalc,
2935};
2936
2937static struct clk auxclkreq1_ck = {
2938 .name = "auxclkreq1_ck",
2939 .parent = &auxclk1_ck,
2940 .init = &omap2_init_clksel_parent,
2941 .ops = &clkops_null,
2942 .clksel = auxclkreq_sel,
2943 .clksel_reg = OMAP4_SCRM_AUXCLKREQ1,
2944 .clksel_mask = OMAP4_MAPPING_MASK,
2945 .recalc = &omap2_clksel_recalc,
2946};
2947
2948static struct clk auxclkreq2_ck = {
2949 .name = "auxclkreq2_ck",
2950 .parent = &auxclk2_ck,
2951 .init = &omap2_init_clksel_parent,
2952 .ops = &clkops_null,
2953 .clksel = auxclkreq_sel,
2954 .clksel_reg = OMAP4_SCRM_AUXCLKREQ2,
2955 .clksel_mask = OMAP4_MAPPING_MASK,
2956 .recalc = &omap2_clksel_recalc,
2957};
2958
2959static struct clk auxclkreq3_ck = {
2960 .name = "auxclkreq3_ck",
2961 .parent = &auxclk3_ck,
2962 .init = &omap2_init_clksel_parent,
2963 .ops = &clkops_null,
2964 .clksel = auxclkreq_sel,
2965 .clksel_reg = OMAP4_SCRM_AUXCLKREQ3,
2966 .clksel_mask = OMAP4_MAPPING_MASK,
2967 .recalc = &omap2_clksel_recalc,
2968};
2969
2970static struct clk auxclkreq4_ck = {
2971 .name = "auxclkreq4_ck",
2972 .parent = &auxclk4_ck,
2973 .init = &omap2_init_clksel_parent,
2974 .ops = &clkops_null,
2975 .clksel = auxclkreq_sel,
2976 .clksel_reg = OMAP4_SCRM_AUXCLKREQ4,
2977 .clksel_mask = OMAP4_MAPPING_MASK,
2978 .recalc = &omap2_clksel_recalc,
2979};
2980
2981static struct clk auxclkreq5_ck = {
2982 .name = "auxclkreq5_ck",
2983 .parent = &auxclk5_ck,
2984 .init = &omap2_init_clksel_parent,
2985 .ops = &clkops_null,
2986 .clksel = auxclkreq_sel,
2987 .clksel_reg = OMAP4_SCRM_AUXCLKREQ5,
2988 .clksel_mask = OMAP4_MAPPING_MASK,
2989 .recalc = &omap2_clksel_recalc,
2990};
2991
Rajendra Nayak972c5422009-12-08 18:46:28 -07002992/*
2993 * clkdev
2994 */
2995
2996static struct omap_clk omap44xx_clks[] = {
2997 CLK(NULL, "extalt_clkin_ck", &extalt_clkin_ck, CK_443X),
2998 CLK(NULL, "pad_clks_ck", &pad_clks_ck, CK_443X),
2999 CLK(NULL, "pad_slimbus_core_clks_ck", &pad_slimbus_core_clks_ck, CK_443X),
3000 CLK(NULL, "secure_32k_clk_src_ck", &secure_32k_clk_src_ck, CK_443X),
3001 CLK(NULL, "slimbus_clk", &slimbus_clk, CK_443X),
3002 CLK(NULL, "sys_32k_ck", &sys_32k_ck, CK_443X),
3003 CLK(NULL, "virt_12000000_ck", &virt_12000000_ck, CK_443X),
3004 CLK(NULL, "virt_13000000_ck", &virt_13000000_ck, CK_443X),
3005 CLK(NULL, "virt_16800000_ck", &virt_16800000_ck, CK_443X),
3006 CLK(NULL, "virt_19200000_ck", &virt_19200000_ck, CK_443X),
3007 CLK(NULL, "virt_26000000_ck", &virt_26000000_ck, CK_443X),
3008 CLK(NULL, "virt_27000000_ck", &virt_27000000_ck, CK_443X),
3009 CLK(NULL, "virt_38400000_ck", &virt_38400000_ck, CK_443X),
3010 CLK(NULL, "sys_clkin_ck", &sys_clkin_ck, CK_443X),
Rajendra Nayak76cf5292010-09-27 14:02:54 -06003011 CLK(NULL, "tie_low_clock_ck", &tie_low_clock_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003012 CLK(NULL, "utmi_phy_clkout_ck", &utmi_phy_clkout_ck, CK_443X),
3013 CLK(NULL, "xclk60mhsp1_ck", &xclk60mhsp1_ck, CK_443X),
3014 CLK(NULL, "xclk60mhsp2_ck", &xclk60mhsp2_ck, CK_443X),
3015 CLK(NULL, "xclk60motg_ck", &xclk60motg_ck, CK_443X),
Rajendra Nayak76cf5292010-09-27 14:02:54 -06003016 CLK(NULL, "abe_dpll_bypass_clk_mux_ck", &abe_dpll_bypass_clk_mux_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003017 CLK(NULL, "abe_dpll_refclk_mux_ck", &abe_dpll_refclk_mux_ck, CK_443X),
3018 CLK(NULL, "dpll_abe_ck", &dpll_abe_ck, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003019 CLK(NULL, "dpll_abe_x2_ck", &dpll_abe_x2_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003020 CLK(NULL, "dpll_abe_m2x2_ck", &dpll_abe_m2x2_ck, CK_443X),
3021 CLK(NULL, "abe_24m_fclk", &abe_24m_fclk, CK_443X),
3022 CLK(NULL, "abe_clk", &abe_clk, CK_443X),
3023 CLK(NULL, "aess_fclk", &aess_fclk, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003024 CLK(NULL, "dpll_abe_m3x2_ck", &dpll_abe_m3x2_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003025 CLK(NULL, "core_hsd_byp_clk_mux_ck", &core_hsd_byp_clk_mux_ck, CK_443X),
3026 CLK(NULL, "dpll_core_ck", &dpll_core_ck, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003027 CLK(NULL, "dpll_core_x2_ck", &dpll_core_x2_ck, CK_443X),
3028 CLK(NULL, "dpll_core_m6x2_ck", &dpll_core_m6x2_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003029 CLK(NULL, "dbgclk_mux_ck", &dbgclk_mux_ck, CK_443X),
3030 CLK(NULL, "dpll_core_m2_ck", &dpll_core_m2_ck, CK_443X),
3031 CLK(NULL, "ddrphy_ck", &ddrphy_ck, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003032 CLK(NULL, "dpll_core_m5x2_ck", &dpll_core_m5x2_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003033 CLK(NULL, "div_core_ck", &div_core_ck, CK_443X),
3034 CLK(NULL, "div_iva_hs_clk", &div_iva_hs_clk, CK_443X),
3035 CLK(NULL, "div_mpu_hs_clk", &div_mpu_hs_clk, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003036 CLK(NULL, "dpll_core_m4x2_ck", &dpll_core_m4x2_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003037 CLK(NULL, "dll_clk_div_ck", &dll_clk_div_ck, CK_443X),
3038 CLK(NULL, "dpll_abe_m2_ck", &dpll_abe_m2_ck, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003039 CLK(NULL, "dpll_core_m3x2_ck", &dpll_core_m3x2_ck, CK_443X),
3040 CLK(NULL, "dpll_core_m7x2_ck", &dpll_core_m7x2_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003041 CLK(NULL, "iva_hsd_byp_clk_mux_ck", &iva_hsd_byp_clk_mux_ck, CK_443X),
3042 CLK(NULL, "dpll_iva_ck", &dpll_iva_ck, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003043 CLK(NULL, "dpll_iva_x2_ck", &dpll_iva_x2_ck, CK_443X),
3044 CLK(NULL, "dpll_iva_m4x2_ck", &dpll_iva_m4x2_ck, CK_443X),
3045 CLK(NULL, "dpll_iva_m5x2_ck", &dpll_iva_m5x2_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003046 CLK(NULL, "dpll_mpu_ck", &dpll_mpu_ck, CK_443X),
3047 CLK(NULL, "dpll_mpu_m2_ck", &dpll_mpu_m2_ck, CK_443X),
3048 CLK(NULL, "per_hs_clk_div_ck", &per_hs_clk_div_ck, CK_443X),
3049 CLK(NULL, "per_hsd_byp_clk_mux_ck", &per_hsd_byp_clk_mux_ck, CK_443X),
3050 CLK(NULL, "dpll_per_ck", &dpll_per_ck, CK_443X),
3051 CLK(NULL, "dpll_per_m2_ck", &dpll_per_m2_ck, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003052 CLK(NULL, "dpll_per_x2_ck", &dpll_per_x2_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003053 CLK(NULL, "dpll_per_m2x2_ck", &dpll_per_m2x2_ck, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003054 CLK(NULL, "dpll_per_m3x2_ck", &dpll_per_m3x2_ck, CK_443X),
3055 CLK(NULL, "dpll_per_m4x2_ck", &dpll_per_m4x2_ck, CK_443X),
3056 CLK(NULL, "dpll_per_m5x2_ck", &dpll_per_m5x2_ck, CK_443X),
3057 CLK(NULL, "dpll_per_m6x2_ck", &dpll_per_m6x2_ck, CK_443X),
3058 CLK(NULL, "dpll_per_m7x2_ck", &dpll_per_m7x2_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003059 CLK(NULL, "dpll_unipro_ck", &dpll_unipro_ck, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003060 CLK(NULL, "dpll_unipro_x2_ck", &dpll_unipro_x2_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003061 CLK(NULL, "dpll_unipro_m2x2_ck", &dpll_unipro_m2x2_ck, CK_443X),
3062 CLK(NULL, "usb_hs_clk_div_ck", &usb_hs_clk_div_ck, CK_443X),
3063 CLK(NULL, "dpll_usb_ck", &dpll_usb_ck, CK_443X),
3064 CLK(NULL, "dpll_usb_clkdcoldo_ck", &dpll_usb_clkdcoldo_ck, CK_443X),
3065 CLK(NULL, "dpll_usb_m2_ck", &dpll_usb_m2_ck, CK_443X),
3066 CLK(NULL, "ducati_clk_mux_ck", &ducati_clk_mux_ck, CK_443X),
3067 CLK(NULL, "func_12m_fclk", &func_12m_fclk, CK_443X),
3068 CLK(NULL, "func_24m_clk", &func_24m_clk, CK_443X),
3069 CLK(NULL, "func_24mc_fclk", &func_24mc_fclk, CK_443X),
3070 CLK(NULL, "func_48m_fclk", &func_48m_fclk, CK_443X),
3071 CLK(NULL, "func_48mc_fclk", &func_48mc_fclk, CK_443X),
3072 CLK(NULL, "func_64m_fclk", &func_64m_fclk, CK_443X),
3073 CLK(NULL, "func_96m_fclk", &func_96m_fclk, CK_443X),
3074 CLK(NULL, "hsmmc6_fclk", &hsmmc6_fclk, CK_443X),
3075 CLK(NULL, "init_60m_fclk", &init_60m_fclk, CK_443X),
3076 CLK(NULL, "l3_div_ck", &l3_div_ck, CK_443X),
3077 CLK(NULL, "l4_div_ck", &l4_div_ck, CK_443X),
3078 CLK(NULL, "lp_clk_div_ck", &lp_clk_div_ck, CK_443X),
3079 CLK(NULL, "l4_wkup_clk_mux_ck", &l4_wkup_clk_mux_ck, CK_443X),
3080 CLK(NULL, "per_abe_nc_fclk", &per_abe_nc_fclk, CK_443X),
3081 CLK(NULL, "mcasp2_fclk", &mcasp2_fclk, CK_443X),
3082 CLK(NULL, "mcasp3_fclk", &mcasp3_fclk, CK_443X),
3083 CLK(NULL, "ocp_abe_iclk", &ocp_abe_iclk, CK_443X),
3084 CLK(NULL, "per_abe_24m_fclk", &per_abe_24m_fclk, CK_443X),
3085 CLK(NULL, "pmd_stm_clock_mux_ck", &pmd_stm_clock_mux_ck, CK_443X),
3086 CLK(NULL, "pmd_trace_clk_mux_ck", &pmd_trace_clk_mux_ck, CK_443X),
3087 CLK(NULL, "syc_clk_div_ck", &syc_clk_div_ck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003088 CLK(NULL, "aes1_fck", &aes1_fck, CK_443X),
3089 CLK(NULL, "aes2_fck", &aes2_fck, CK_443X),
3090 CLK(NULL, "aess_fck", &aess_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003091 CLK(NULL, "bandgap_fclk", &bandgap_fclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003092 CLK(NULL, "des3des_fck", &des3des_fck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003093 CLK(NULL, "dmic_sync_mux_ck", &dmic_sync_mux_ck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003094 CLK(NULL, "dmic_fck", &dmic_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003095 CLK(NULL, "dsp_fck", &dsp_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003096 CLK(NULL, "dss_sys_clk", &dss_sys_clk, CK_443X),
3097 CLK(NULL, "dss_tv_clk", &dss_tv_clk, CK_443X),
3098 CLK(NULL, "dss_dss_clk", &dss_dss_clk, CK_443X),
3099 CLK(NULL, "dss_48mhz_clk", &dss_48mhz_clk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003100 CLK(NULL, "dss_fck", &dss_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003101 CLK(NULL, "efuse_ctrl_cust_fck", &efuse_ctrl_cust_fck, CK_443X),
3102 CLK(NULL, "emif1_fck", &emif1_fck, CK_443X),
3103 CLK(NULL, "emif2_fck", &emif2_fck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003104 CLK(NULL, "fdif_fck", &fdif_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003105 CLK(NULL, "fpka_fck", &fpka_fck, CK_443X),
Benoit Coussonb399bca2010-12-21 21:08:34 -07003106 CLK(NULL, "gpio1_dbclk", &gpio1_dbclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003107 CLK(NULL, "gpio1_ick", &gpio1_ick, CK_443X),
Benoit Coussonb399bca2010-12-21 21:08:34 -07003108 CLK(NULL, "gpio2_dbclk", &gpio2_dbclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003109 CLK(NULL, "gpio2_ick", &gpio2_ick, CK_443X),
Benoit Coussonb399bca2010-12-21 21:08:34 -07003110 CLK(NULL, "gpio3_dbclk", &gpio3_dbclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003111 CLK(NULL, "gpio3_ick", &gpio3_ick, CK_443X),
Benoit Coussonb399bca2010-12-21 21:08:34 -07003112 CLK(NULL, "gpio4_dbclk", &gpio4_dbclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003113 CLK(NULL, "gpio4_ick", &gpio4_ick, CK_443X),
Benoit Coussonb399bca2010-12-21 21:08:34 -07003114 CLK(NULL, "gpio5_dbclk", &gpio5_dbclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003115 CLK(NULL, "gpio5_ick", &gpio5_ick, CK_443X),
Benoit Coussonb399bca2010-12-21 21:08:34 -07003116 CLK(NULL, "gpio6_dbclk", &gpio6_dbclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003117 CLK(NULL, "gpio6_ick", &gpio6_ick, CK_443X),
3118 CLK(NULL, "gpmc_ick", &gpmc_ick, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003119 CLK(NULL, "gpu_fck", &gpu_fck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003120 CLK("omap2_hdq.0", "fck", &hdq1w_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003121 CLK(NULL, "hsi_fck", &hsi_fck, CK_443X),
Benoit Coussonf7bb0d92010-12-09 14:24:16 +00003122 CLK("omap_i2c.1", "fck", &i2c1_fck, CK_443X),
3123 CLK("omap_i2c.2", "fck", &i2c2_fck, CK_443X),
3124 CLK("omap_i2c.3", "fck", &i2c3_fck, CK_443X),
3125 CLK("omap_i2c.4", "fck", &i2c4_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003126 CLK(NULL, "ipu_fck", &ipu_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003127 CLK(NULL, "iss_ctrlclk", &iss_ctrlclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003128 CLK(NULL, "iss_fck", &iss_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003129 CLK(NULL, "iva_fck", &iva_fck, CK_443X),
3130 CLK(NULL, "kbd_fck", &kbd_fck, CK_443X),
3131 CLK(NULL, "l3_instr_ick", &l3_instr_ick, CK_443X),
3132 CLK(NULL, "l3_main_3_ick", &l3_main_3_ick, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003133 CLK(NULL, "mcasp_sync_mux_ck", &mcasp_sync_mux_ck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003134 CLK(NULL, "mcasp_fck", &mcasp_fck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003135 CLK(NULL, "mcbsp1_sync_mux_ck", &mcbsp1_sync_mux_ck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003136 CLK("omap-mcbsp.1", "fck", &mcbsp1_fck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003137 CLK(NULL, "mcbsp2_sync_mux_ck", &mcbsp2_sync_mux_ck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003138 CLK("omap-mcbsp.2", "fck", &mcbsp2_fck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003139 CLK(NULL, "mcbsp3_sync_mux_ck", &mcbsp3_sync_mux_ck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003140 CLK("omap-mcbsp.3", "fck", &mcbsp3_fck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003141 CLK(NULL, "mcbsp4_sync_mux_ck", &mcbsp4_sync_mux_ck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003142 CLK("omap-mcbsp.4", "fck", &mcbsp4_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003143 CLK(NULL, "mcpdm_fck", &mcpdm_fck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003144 CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_443X),
3145 CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_443X),
3146 CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_443X),
3147 CLK("omap2_mcspi.4", "fck", &mcspi4_fck, CK_443X),
3148 CLK("mmci-omap-hs.0", "fck", &mmc1_fck, CK_443X),
3149 CLK("mmci-omap-hs.1", "fck", &mmc2_fck, CK_443X),
3150 CLK("mmci-omap-hs.2", "fck", &mmc3_fck, CK_443X),
3151 CLK("mmci-omap-hs.3", "fck", &mmc4_fck, CK_443X),
3152 CLK("mmci-omap-hs.4", "fck", &mmc5_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003153 CLK(NULL, "ocp2scp_usb_phy_phy_48m", &ocp2scp_usb_phy_phy_48m, CK_443X),
Benoit Cousson0edc9e82010-09-27 14:02:56 -06003154 CLK(NULL, "ocp2scp_usb_phy_ick", &ocp2scp_usb_phy_ick, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003155 CLK(NULL, "ocp_wp_noc_ick", &ocp_wp_noc_ick, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003156 CLK("omap_rng", "ick", &rng_ick, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003157 CLK(NULL, "sha2md5_fck", &sha2md5_fck, CK_443X),
3158 CLK(NULL, "sl2if_ick", &sl2if_ick, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003159 CLK(NULL, "slimbus1_fclk_1", &slimbus1_fclk_1, CK_443X),
3160 CLK(NULL, "slimbus1_fclk_0", &slimbus1_fclk_0, CK_443X),
3161 CLK(NULL, "slimbus1_fclk_2", &slimbus1_fclk_2, CK_443X),
3162 CLK(NULL, "slimbus1_slimbus_clk", &slimbus1_slimbus_clk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003163 CLK(NULL, "slimbus1_fck", &slimbus1_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003164 CLK(NULL, "slimbus2_fclk_1", &slimbus2_fclk_1, CK_443X),
3165 CLK(NULL, "slimbus2_fclk_0", &slimbus2_fclk_0, CK_443X),
3166 CLK(NULL, "slimbus2_slimbus_clk", &slimbus2_slimbus_clk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003167 CLK(NULL, "slimbus2_fck", &slimbus2_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003168 CLK(NULL, "smartreflex_core_fck", &smartreflex_core_fck, CK_443X),
3169 CLK(NULL, "smartreflex_iva_fck", &smartreflex_iva_fck, CK_443X),
3170 CLK(NULL, "smartreflex_mpu_fck", &smartreflex_mpu_fck, CK_443X),
3171 CLK(NULL, "gpt1_fck", &timer1_fck, CK_443X),
3172 CLK(NULL, "gpt10_fck", &timer10_fck, CK_443X),
3173 CLK(NULL, "gpt11_fck", &timer11_fck, CK_443X),
3174 CLK(NULL, "gpt2_fck", &timer2_fck, CK_443X),
3175 CLK(NULL, "gpt3_fck", &timer3_fck, CK_443X),
3176 CLK(NULL, "gpt4_fck", &timer4_fck, CK_443X),
3177 CLK(NULL, "gpt5_fck", &timer5_fck, CK_443X),
3178 CLK(NULL, "gpt6_fck", &timer6_fck, CK_443X),
3179 CLK(NULL, "gpt7_fck", &timer7_fck, CK_443X),
3180 CLK(NULL, "gpt8_fck", &timer8_fck, CK_443X),
3181 CLK(NULL, "gpt9_fck", &timer9_fck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003182 CLK(NULL, "uart1_fck", &uart1_fck, CK_443X),
3183 CLK(NULL, "uart2_fck", &uart2_fck, CK_443X),
3184 CLK(NULL, "uart3_fck", &uart3_fck, CK_443X),
3185 CLK(NULL, "uart4_fck", &uart4_fck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003186 CLK(NULL, "usb_host_fs_fck", &usb_host_fs_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003187 CLK(NULL, "utmi_p1_gfclk", &utmi_p1_gfclk, CK_443X),
3188 CLK(NULL, "usb_host_hs_utmi_p1_clk", &usb_host_hs_utmi_p1_clk, CK_443X),
3189 CLK(NULL, "utmi_p2_gfclk", &utmi_p2_gfclk, CK_443X),
3190 CLK(NULL, "usb_host_hs_utmi_p2_clk", &usb_host_hs_utmi_p2_clk, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003191 CLK(NULL, "usb_host_hs_utmi_p3_clk", &usb_host_hs_utmi_p3_clk, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003192 CLK(NULL, "usb_host_hs_hsic480m_p1_clk", &usb_host_hs_hsic480m_p1_clk, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003193 CLK(NULL, "usb_host_hs_hsic60m_p1_clk", &usb_host_hs_hsic60m_p1_clk, CK_443X),
3194 CLK(NULL, "usb_host_hs_hsic60m_p2_clk", &usb_host_hs_hsic60m_p2_clk, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003195 CLK(NULL, "usb_host_hs_hsic480m_p2_clk", &usb_host_hs_hsic480m_p2_clk, CK_443X),
3196 CLK(NULL, "usb_host_hs_func48mclk", &usb_host_hs_func48mclk, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003197 CLK(NULL, "usb_host_hs_fck", &usb_host_hs_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003198 CLK(NULL, "otg_60m_gfclk", &otg_60m_gfclk, CK_443X),
3199 CLK(NULL, "usb_otg_hs_xclk", &usb_otg_hs_xclk, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003200 CLK("musb_hdrc", "ick", &usb_otg_hs_ick, CK_443X),
Benoit Cousson0edc9e82010-09-27 14:02:56 -06003201 CLK(NULL, "usb_phy_cm_clk32k", &usb_phy_cm_clk32k, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003202 CLK(NULL, "usb_tll_hs_usb_ch2_clk", &usb_tll_hs_usb_ch2_clk, CK_443X),
3203 CLK(NULL, "usb_tll_hs_usb_ch0_clk", &usb_tll_hs_usb_ch0_clk, CK_443X),
3204 CLK(NULL, "usb_tll_hs_usb_ch1_clk", &usb_tll_hs_usb_ch1_clk, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003205 CLK(NULL, "usb_tll_hs_ick", &usb_tll_hs_ick, CK_443X),
Benoit Cousson0edc9e82010-09-27 14:02:56 -06003206 CLK(NULL, "usim_ck", &usim_ck, CK_443X),
3207 CLK(NULL, "usim_fclk", &usim_fclk, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003208 CLK(NULL, "usim_fck", &usim_fck, CK_443X),
3209 CLK("omap_wdt", "fck", &wd_timer2_fck, CK_443X),
3210 CLK(NULL, "wd_timer3_fck", &wd_timer3_fck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003211 CLK(NULL, "stm_clk_div_ck", &stm_clk_div_ck, CK_443X),
3212 CLK(NULL, "trace_clk_div_ck", &trace_clk_div_ck, CK_443X),
Santosh Shilimkar7c43d542010-02-22 22:09:40 -07003213 CLK(NULL, "gpmc_ck", &dummy_ck, CK_443X),
3214 CLK(NULL, "gpt1_ick", &dummy_ck, CK_443X),
3215 CLK(NULL, "gpt2_ick", &dummy_ck, CK_443X),
3216 CLK(NULL, "gpt3_ick", &dummy_ck, CK_443X),
3217 CLK(NULL, "gpt4_ick", &dummy_ck, CK_443X),
3218 CLK(NULL, "gpt5_ick", &dummy_ck, CK_443X),
3219 CLK(NULL, "gpt6_ick", &dummy_ck, CK_443X),
3220 CLK(NULL, "gpt7_ick", &dummy_ck, CK_443X),
3221 CLK(NULL, "gpt8_ick", &dummy_ck, CK_443X),
3222 CLK(NULL, "gpt9_ick", &dummy_ck, CK_443X),
3223 CLK(NULL, "gpt10_ick", &dummy_ck, CK_443X),
3224 CLK(NULL, "gpt11_ick", &dummy_ck, CK_443X),
Benoit Coussonf7bb0d92010-12-09 14:24:16 +00003225 CLK("omap_i2c.1", "ick", &dummy_ck, CK_443X),
3226 CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X),
3227 CLK("omap_i2c.3", "ick", &dummy_ck, CK_443X),
3228 CLK("omap_i2c.4", "ick", &dummy_ck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003229 CLK("mmci-omap-hs.0", "ick", &dummy_ck, CK_443X),
3230 CLK("mmci-omap-hs.1", "ick", &dummy_ck, CK_443X),
3231 CLK("mmci-omap-hs.2", "ick", &dummy_ck, CK_443X),
3232 CLK("mmci-omap-hs.3", "ick", &dummy_ck, CK_443X),
3233 CLK("mmci-omap-hs.4", "ick", &dummy_ck, CK_443X),
Santosh Shilimkar7c43d542010-02-22 22:09:40 -07003234 CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_443X),
3235 CLK("omap-mcbsp.2", "ick", &dummy_ck, CK_443X),
3236 CLK("omap-mcbsp.3", "ick", &dummy_ck, CK_443X),
3237 CLK("omap-mcbsp.4", "ick", &dummy_ck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003238 CLK("omap2_mcspi.1", "ick", &dummy_ck, CK_443X),
3239 CLK("omap2_mcspi.2", "ick", &dummy_ck, CK_443X),
3240 CLK("omap2_mcspi.3", "ick", &dummy_ck, CK_443X),
3241 CLK("omap2_mcspi.4", "ick", &dummy_ck, CK_443X),
Santosh Shilimkar7c43d542010-02-22 22:09:40 -07003242 CLK(NULL, "uart1_ick", &dummy_ck, CK_443X),
3243 CLK(NULL, "uart2_ick", &dummy_ck, CK_443X),
3244 CLK(NULL, "uart3_ick", &dummy_ck, CK_443X),
3245 CLK(NULL, "uart4_ick", &dummy_ck, CK_443X),
3246 CLK("omap_wdt", "ick", &dummy_ck, CK_443X),
Rajendra Nayake0cb70c2010-12-21 21:08:14 -07003247 CLK(NULL, "auxclk0_ck", &auxclk0_ck, CK_443X),
3248 CLK(NULL, "auxclk1_ck", &auxclk1_ck, CK_443X),
3249 CLK(NULL, "auxclk2_ck", &auxclk2_ck, CK_443X),
3250 CLK(NULL, "auxclk3_ck", &auxclk3_ck, CK_443X),
3251 CLK(NULL, "auxclk4_ck", &auxclk4_ck, CK_443X),
3252 CLK(NULL, "auxclk5_ck", &auxclk5_ck, CK_443X),
3253 CLK(NULL, "auxclkreq0_ck", &auxclkreq0_ck, CK_443X),
3254 CLK(NULL, "auxclkreq1_ck", &auxclkreq1_ck, CK_443X),
3255 CLK(NULL, "auxclkreq2_ck", &auxclkreq2_ck, CK_443X),
3256 CLK(NULL, "auxclkreq3_ck", &auxclkreq3_ck, CK_443X),
3257 CLK(NULL, "auxclkreq4_ck", &auxclkreq4_ck, CK_443X),
3258 CLK(NULL, "auxclkreq5_ck", &auxclkreq5_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003259};
3260
Paul Walmsleye80a9722010-01-26 20:13:12 -07003261int __init omap4xxx_clk_init(void)
Rajendra Nayak972c5422009-12-08 18:46:28 -07003262{
Rajendra Nayak972c5422009-12-08 18:46:28 -07003263 struct omap_clk *c;
Rajendra Nayak972c5422009-12-08 18:46:28 -07003264 u32 cpu_clkflg;
3265
3266 if (cpu_is_omap44xx()) {
3267 cpu_mask = RATE_IN_4430;
3268 cpu_clkflg = CK_443X;
3269 }
3270
3271 clk_init(&omap2_clk_functions);
3272
3273 for (c = omap44xx_clks; c < omap44xx_clks + ARRAY_SIZE(omap44xx_clks);
3274 c++)
3275 clk_preinit(c->lk.clk);
3276
3277 for (c = omap44xx_clks; c < omap44xx_clks + ARRAY_SIZE(omap44xx_clks);
3278 c++)
3279 if (c->cpu & cpu_clkflg) {
3280 clkdev_add(&c->lk);
3281 clk_register(c->lk.clk);
Rajendra Nayak972c5422009-12-08 18:46:28 -07003282 omap2_init_clk_clkdm(c->lk.clk);
Rajendra Nayak972c5422009-12-08 18:46:28 -07003283 }
3284
3285 recalculate_root_clocks();
3286
3287 /*
3288 * Only enable those clocks we will need, let the drivers
3289 * enable other clocks as necessary
3290 */
3291 clk_enable_init_clocks();
3292
3293 return 0;
3294}