blob: 08e86d793a1f3e86671546a63f080b8c84573ce4 [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"
Rajendra Nayak972c5422009-12-08 18:46:28 -070037#include "prm-regbits-44xx.h"
Paul Walmsley4814ced2010-10-08 11:40:20 -060038#include "control.h"
Rajendra Nayake0cb70c2010-12-21 21:08:14 -070039#include "scrm44xx.h"
Rajendra Nayak972c5422009-12-08 18:46:28 -070040
Paul Walmsley59fb6592010-12-21 15:30:55 -070041/* OMAP4 modulemode control */
42#define OMAP4430_MODULEMODE_HWCTRL 0
43#define OMAP4430_MODULEMODE_SWCTRL 1
44
Rajendra Nayak972c5422009-12-08 18:46:28 -070045/* Root clocks */
46
47static struct clk extalt_clkin_ck = {
48 .name = "extalt_clkin_ck",
49 .rate = 59000000,
50 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -070051};
52
53static struct clk pad_clks_ck = {
54 .name = "pad_clks_ck",
55 .rate = 12000000,
Benoit Cousson7ecd4222011-07-09 19:14:45 -060056 .ops = &clkops_omap2_dflt,
57 .enable_reg = OMAP4430_CM_CLKSEL_ABE,
58 .enable_bit = OMAP4430_PAD_CLKS_GATE_SHIFT,
Rajendra Nayak972c5422009-12-08 18:46:28 -070059};
60
61static struct clk pad_slimbus_core_clks_ck = {
62 .name = "pad_slimbus_core_clks_ck",
63 .rate = 12000000,
64 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -070065};
66
67static struct clk secure_32k_clk_src_ck = {
68 .name = "secure_32k_clk_src_ck",
69 .rate = 32768,
70 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -070071};
72
73static struct clk slimbus_clk = {
74 .name = "slimbus_clk",
75 .rate = 12000000,
Benoit Cousson7ecd4222011-07-09 19:14:45 -060076 .ops = &clkops_omap2_dflt,
77 .enable_reg = OMAP4430_CM_CLKSEL_ABE,
78 .enable_bit = OMAP4430_SLIMBUS_CLK_GATE_SHIFT,
Rajendra Nayak972c5422009-12-08 18:46:28 -070079};
80
81static struct clk sys_32k_ck = {
82 .name = "sys_32k_ck",
83 .rate = 32768,
84 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -070085};
86
87static struct clk virt_12000000_ck = {
88 .name = "virt_12000000_ck",
89 .ops = &clkops_null,
90 .rate = 12000000,
91};
92
93static struct clk virt_13000000_ck = {
94 .name = "virt_13000000_ck",
95 .ops = &clkops_null,
96 .rate = 13000000,
97};
98
99static struct clk virt_16800000_ck = {
100 .name = "virt_16800000_ck",
101 .ops = &clkops_null,
102 .rate = 16800000,
103};
104
105static struct clk virt_19200000_ck = {
106 .name = "virt_19200000_ck",
107 .ops = &clkops_null,
108 .rate = 19200000,
109};
110
111static struct clk virt_26000000_ck = {
112 .name = "virt_26000000_ck",
113 .ops = &clkops_null,
114 .rate = 26000000,
115};
116
117static struct clk virt_27000000_ck = {
118 .name = "virt_27000000_ck",
119 .ops = &clkops_null,
120 .rate = 27000000,
121};
122
123static struct clk virt_38400000_ck = {
124 .name = "virt_38400000_ck",
125 .ops = &clkops_null,
126 .rate = 38400000,
127};
128
129static const struct clksel_rate div_1_0_rates[] = {
130 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
131 { .div = 0 },
132};
133
134static const struct clksel_rate div_1_1_rates[] = {
135 { .div = 1, .val = 1, .flags = RATE_IN_4430 },
136 { .div = 0 },
137};
138
139static const struct clksel_rate div_1_2_rates[] = {
140 { .div = 1, .val = 2, .flags = RATE_IN_4430 },
141 { .div = 0 },
142};
143
144static const struct clksel_rate div_1_3_rates[] = {
145 { .div = 1, .val = 3, .flags = RATE_IN_4430 },
146 { .div = 0 },
147};
148
149static const struct clksel_rate div_1_4_rates[] = {
150 { .div = 1, .val = 4, .flags = RATE_IN_4430 },
151 { .div = 0 },
152};
153
154static const struct clksel_rate div_1_5_rates[] = {
155 { .div = 1, .val = 5, .flags = RATE_IN_4430 },
156 { .div = 0 },
157};
158
159static const struct clksel_rate div_1_6_rates[] = {
160 { .div = 1, .val = 6, .flags = RATE_IN_4430 },
161 { .div = 0 },
162};
163
164static const struct clksel_rate div_1_7_rates[] = {
165 { .div = 1, .val = 7, .flags = RATE_IN_4430 },
166 { .div = 0 },
167};
168
169static const struct clksel sys_clkin_sel[] = {
170 { .parent = &virt_12000000_ck, .rates = div_1_1_rates },
171 { .parent = &virt_13000000_ck, .rates = div_1_2_rates },
172 { .parent = &virt_16800000_ck, .rates = div_1_3_rates },
173 { .parent = &virt_19200000_ck, .rates = div_1_4_rates },
174 { .parent = &virt_26000000_ck, .rates = div_1_5_rates },
175 { .parent = &virt_27000000_ck, .rates = div_1_6_rates },
176 { .parent = &virt_38400000_ck, .rates = div_1_7_rates },
177 { .parent = NULL },
178};
179
180static struct clk sys_clkin_ck = {
181 .name = "sys_clkin_ck",
182 .rate = 38400000,
183 .clksel = sys_clkin_sel,
184 .init = &omap2_init_clksel_parent,
185 .clksel_reg = OMAP4430_CM_SYS_CLKSEL,
186 .clksel_mask = OMAP4430_SYS_CLKSEL_MASK,
187 .ops = &clkops_null,
188 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700189};
190
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600191static struct clk tie_low_clock_ck = {
192 .name = "tie_low_clock_ck",
193 .rate = 0,
194 .ops = &clkops_null,
195};
196
Rajendra Nayak972c5422009-12-08 18:46:28 -0700197static struct clk utmi_phy_clkout_ck = {
198 .name = "utmi_phy_clkout_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600199 .rate = 60000000,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700200 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700201};
202
203static struct clk xclk60mhsp1_ck = {
204 .name = "xclk60mhsp1_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600205 .rate = 60000000,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700206 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700207};
208
209static struct clk xclk60mhsp2_ck = {
210 .name = "xclk60mhsp2_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600211 .rate = 60000000,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700212 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700213};
214
215static struct clk xclk60motg_ck = {
216 .name = "xclk60motg_ck",
217 .rate = 60000000,
218 .ops = &clkops_null,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700219};
220
221/* Module clocks and DPLL outputs */
222
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600223static const struct clksel abe_dpll_bypass_clk_mux_sel[] = {
224 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700225 { .parent = &sys_32k_ck, .rates = div_1_1_rates },
226 { .parent = NULL },
227};
228
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600229static struct clk abe_dpll_bypass_clk_mux_ck = {
230 .name = "abe_dpll_bypass_clk_mux_ck",
231 .parent = &sys_clkin_ck,
232 .ops = &clkops_null,
233 .recalc = &followparent_recalc,
234};
235
Rajendra Nayak972c5422009-12-08 18:46:28 -0700236static struct clk abe_dpll_refclk_mux_ck = {
237 .name = "abe_dpll_refclk_mux_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600238 .parent = &sys_clkin_ck,
239 .clksel = abe_dpll_bypass_clk_mux_sel,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700240 .init = &omap2_init_clksel_parent,
241 .clksel_reg = OMAP4430_CM_ABE_PLL_REF_CLKSEL,
242 .clksel_mask = OMAP4430_CLKSEL_0_0_MASK,
243 .ops = &clkops_null,
244 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700245};
246
247/* DPLL_ABE */
248static struct dpll_data dpll_abe_dd = {
249 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_ABE,
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600250 .clk_bypass = &abe_dpll_bypass_clk_mux_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700251 .clk_ref = &abe_dpll_refclk_mux_ck,
252 .control_reg = OMAP4430_CM_CLKMODE_DPLL_ABE,
253 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
254 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_ABE,
255 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_ABE,
256 .mult_mask = OMAP4430_DPLL_MULT_MASK,
257 .div1_mask = OMAP4430_DPLL_DIV_MASK,
258 .enable_mask = OMAP4430_DPLL_EN_MASK,
259 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
260 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
Benoit Cousson628479a2011-07-09 19:14:46 -0600261 .max_multiplier = 2047,
262 .max_divider = 128,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700263 .min_divider = 1,
264};
265
266
267static struct clk dpll_abe_ck = {
268 .name = "dpll_abe_ck",
269 .parent = &abe_dpll_refclk_mux_ck,
270 .dpll_data = &dpll_abe_dd,
Rajendra Nayak911bd732009-12-08 18:47:17 -0700271 .init = &omap2_init_dpll_parent,
Paul Walmsley657ebfa2010-02-22 22:09:20 -0700272 .ops = &clkops_omap3_noncore_dpll_ops,
Mike Turquettea1900f22011-10-07 00:52:58 -0600273 .recalc = &omap4_dpll_regm4xen_recalc,
274 .round_rate = &omap4_dpll_regm4xen_round_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700275 .set_rate = &omap3_noncore_dpll_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700276};
277
Thara Gopinath032b5a72010-12-21 21:08:13 -0700278static struct clk dpll_abe_x2_ck = {
279 .name = "dpll_abe_x2_ck",
Rajendra Nayak972c5422009-12-08 18:46:28 -0700280 .parent = &dpll_abe_ck,
Benoit Cousson7ecd4222011-07-09 19:14:45 -0600281 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700282 .flags = CLOCK_CLKOUTX2,
283 .ops = &clkops_omap4_dpllmx_ops,
Thara Gopinath032b5a72010-12-21 21:08:13 -0700284 .recalc = &omap3_clkoutx2_recalc,
285};
286
287static const struct clksel_rate div31_1to31_rates[] = {
288 { .div = 1, .val = 1, .flags = RATE_IN_4430 },
289 { .div = 2, .val = 2, .flags = RATE_IN_4430 },
290 { .div = 3, .val = 3, .flags = RATE_IN_4430 },
291 { .div = 4, .val = 4, .flags = RATE_IN_4430 },
292 { .div = 5, .val = 5, .flags = RATE_IN_4430 },
293 { .div = 6, .val = 6, .flags = RATE_IN_4430 },
294 { .div = 7, .val = 7, .flags = RATE_IN_4430 },
295 { .div = 8, .val = 8, .flags = RATE_IN_4430 },
296 { .div = 9, .val = 9, .flags = RATE_IN_4430 },
297 { .div = 10, .val = 10, .flags = RATE_IN_4430 },
298 { .div = 11, .val = 11, .flags = RATE_IN_4430 },
299 { .div = 12, .val = 12, .flags = RATE_IN_4430 },
300 { .div = 13, .val = 13, .flags = RATE_IN_4430 },
301 { .div = 14, .val = 14, .flags = RATE_IN_4430 },
302 { .div = 15, .val = 15, .flags = RATE_IN_4430 },
303 { .div = 16, .val = 16, .flags = RATE_IN_4430 },
304 { .div = 17, .val = 17, .flags = RATE_IN_4430 },
305 { .div = 18, .val = 18, .flags = RATE_IN_4430 },
306 { .div = 19, .val = 19, .flags = RATE_IN_4430 },
307 { .div = 20, .val = 20, .flags = RATE_IN_4430 },
308 { .div = 21, .val = 21, .flags = RATE_IN_4430 },
309 { .div = 22, .val = 22, .flags = RATE_IN_4430 },
310 { .div = 23, .val = 23, .flags = RATE_IN_4430 },
311 { .div = 24, .val = 24, .flags = RATE_IN_4430 },
312 { .div = 25, .val = 25, .flags = RATE_IN_4430 },
313 { .div = 26, .val = 26, .flags = RATE_IN_4430 },
314 { .div = 27, .val = 27, .flags = RATE_IN_4430 },
315 { .div = 28, .val = 28, .flags = RATE_IN_4430 },
316 { .div = 29, .val = 29, .flags = RATE_IN_4430 },
317 { .div = 30, .val = 30, .flags = RATE_IN_4430 },
318 { .div = 31, .val = 31, .flags = RATE_IN_4430 },
319 { .div = 0 },
320};
321
322static const struct clksel dpll_abe_m2x2_div[] = {
323 { .parent = &dpll_abe_x2_ck, .rates = div31_1to31_rates },
324 { .parent = NULL },
325};
326
327static struct clk dpll_abe_m2x2_ck = {
328 .name = "dpll_abe_m2x2_ck",
329 .parent = &dpll_abe_x2_ck,
330 .clksel = dpll_abe_m2x2_div,
331 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE,
332 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700333 .ops = &clkops_omap4_dpllmx_ops,
Thara Gopinath032b5a72010-12-21 21:08:13 -0700334 .recalc = &omap2_clksel_recalc,
335 .round_rate = &omap2_clksel_round_rate,
336 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700337};
338
339static struct clk abe_24m_fclk = {
340 .name = "abe_24m_fclk",
341 .parent = &dpll_abe_m2x2_ck,
342 .ops = &clkops_null,
Jon Hunterf17f9722010-12-09 23:13:40 +0100343 .fixed_div = 8,
344 .recalc = &omap_fixed_divisor_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700345};
346
347static const struct clksel_rate div3_1to4_rates[] = {
348 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
349 { .div = 2, .val = 1, .flags = RATE_IN_4430 },
350 { .div = 4, .val = 2, .flags = RATE_IN_4430 },
351 { .div = 0 },
352};
353
354static const struct clksel abe_clk_div[] = {
355 { .parent = &dpll_abe_m2x2_ck, .rates = div3_1to4_rates },
356 { .parent = NULL },
357};
358
359static struct clk abe_clk = {
360 .name = "abe_clk",
361 .parent = &dpll_abe_m2x2_ck,
362 .clksel = abe_clk_div,
363 .clksel_reg = OMAP4430_CM_CLKSEL_ABE,
364 .clksel_mask = OMAP4430_CLKSEL_OPP_MASK,
365 .ops = &clkops_null,
366 .recalc = &omap2_clksel_recalc,
367 .round_rate = &omap2_clksel_round_rate,
368 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700369};
370
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600371static const struct clksel_rate div2_1to2_rates[] = {
372 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
373 { .div = 2, .val = 1, .flags = RATE_IN_4430 },
374 { .div = 0 },
375};
376
Rajendra Nayak972c5422009-12-08 18:46:28 -0700377static const struct clksel aess_fclk_div[] = {
378 { .parent = &abe_clk, .rates = div2_1to2_rates },
379 { .parent = NULL },
380};
381
382static struct clk aess_fclk = {
383 .name = "aess_fclk",
384 .parent = &abe_clk,
385 .clksel = aess_fclk_div,
386 .clksel_reg = OMAP4430_CM1_ABE_AESS_CLKCTRL,
387 .clksel_mask = OMAP4430_CLKSEL_AESS_FCLK_MASK,
388 .ops = &clkops_null,
389 .recalc = &omap2_clksel_recalc,
390 .round_rate = &omap2_clksel_round_rate,
391 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700392};
393
Thara Gopinath032b5a72010-12-21 21:08:13 -0700394static struct clk dpll_abe_m3x2_ck = {
395 .name = "dpll_abe_m3x2_ck",
396 .parent = &dpll_abe_x2_ck,
397 .clksel = dpll_abe_m2x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700398 .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_ABE,
399 .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700400 .ops = &clkops_omap4_dpllmx_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700401 .recalc = &omap2_clksel_recalc,
402 .round_rate = &omap2_clksel_round_rate,
403 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700404};
405
406static const struct clksel core_hsd_byp_clk_mux_sel[] = {
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600407 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
Thara Gopinath032b5a72010-12-21 21:08:13 -0700408 { .parent = &dpll_abe_m3x2_ck, .rates = div_1_1_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700409 { .parent = NULL },
410};
411
412static struct clk core_hsd_byp_clk_mux_ck = {
413 .name = "core_hsd_byp_clk_mux_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600414 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700415 .clksel = core_hsd_byp_clk_mux_sel,
416 .init = &omap2_init_clksel_parent,
417 .clksel_reg = OMAP4430_CM_CLKSEL_DPLL_CORE,
418 .clksel_mask = OMAP4430_DPLL_BYP_CLKSEL_MASK,
419 .ops = &clkops_null,
420 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700421};
422
423/* DPLL_CORE */
424static struct dpll_data dpll_core_dd = {
425 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_CORE,
426 .clk_bypass = &core_hsd_byp_clk_mux_ck,
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600427 .clk_ref = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700428 .control_reg = OMAP4430_CM_CLKMODE_DPLL_CORE,
429 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
430 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_CORE,
431 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_CORE,
432 .mult_mask = OMAP4430_DPLL_MULT_MASK,
433 .div1_mask = OMAP4430_DPLL_DIV_MASK,
434 .enable_mask = OMAP4430_DPLL_EN_MASK,
435 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
436 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
Benoit Cousson628479a2011-07-09 19:14:46 -0600437 .max_multiplier = 2047,
438 .max_divider = 128,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700439 .min_divider = 1,
440};
441
442
443static struct clk dpll_core_ck = {
444 .name = "dpll_core_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600445 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700446 .dpll_data = &dpll_core_dd,
Rajendra Nayak911bd732009-12-08 18:47:17 -0700447 .init = &omap2_init_dpll_parent,
Rajendra Nayak6c6f5a72011-02-25 15:49:00 -0700448 .ops = &clkops_omap3_core_dpll_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700449 .recalc = &omap3_dpll_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700450};
451
Thara Gopinath032b5a72010-12-21 21:08:13 -0700452static struct clk dpll_core_x2_ck = {
453 .name = "dpll_core_x2_ck",
454 .parent = &dpll_core_ck,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700455 .flags = CLOCK_CLKOUTX2,
Thara Gopinath032b5a72010-12-21 21:08:13 -0700456 .ops = &clkops_null,
457 .recalc = &omap3_clkoutx2_recalc,
458};
459
460static const struct clksel dpll_core_m6x2_div[] = {
461 { .parent = &dpll_core_x2_ck, .rates = div31_1to31_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700462 { .parent = NULL },
463};
464
Thara Gopinath032b5a72010-12-21 21:08:13 -0700465static struct clk dpll_core_m6x2_ck = {
466 .name = "dpll_core_m6x2_ck",
467 .parent = &dpll_core_x2_ck,
468 .clksel = dpll_core_m6x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700469 .clksel_reg = OMAP4430_CM_DIV_M6_DPLL_CORE,
470 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700471 .ops = &clkops_omap4_dpllmx_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700472 .recalc = &omap2_clksel_recalc,
473 .round_rate = &omap2_clksel_round_rate,
474 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700475};
476
477static const struct clksel dbgclk_mux_sel[] = {
478 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
Thara Gopinath032b5a72010-12-21 21:08:13 -0700479 { .parent = &dpll_core_m6x2_ck, .rates = div_1_1_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700480 { .parent = NULL },
481};
482
483static struct clk dbgclk_mux_ck = {
484 .name = "dbgclk_mux_ck",
485 .parent = &sys_clkin_ck,
486 .ops = &clkops_null,
487 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700488};
489
Thara Gopinath032b5a72010-12-21 21:08:13 -0700490static const struct clksel dpll_core_m2_div[] = {
491 { .parent = &dpll_core_ck, .rates = div31_1to31_rates },
492 { .parent = NULL },
493};
494
Rajendra Nayak972c5422009-12-08 18:46:28 -0700495static struct clk dpll_core_m2_ck = {
496 .name = "dpll_core_m2_ck",
497 .parent = &dpll_core_ck,
Thara Gopinath032b5a72010-12-21 21:08:13 -0700498 .clksel = dpll_core_m2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700499 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_CORE,
500 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700501 .ops = &clkops_omap4_dpllmx_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700502 .recalc = &omap2_clksel_recalc,
503 .round_rate = &omap2_clksel_round_rate,
504 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700505};
506
507static struct clk ddrphy_ck = {
508 .name = "ddrphy_ck",
509 .parent = &dpll_core_m2_ck,
510 .ops = &clkops_null,
Jon Hunterf17f9722010-12-09 23:13:40 +0100511 .fixed_div = 2,
512 .recalc = &omap_fixed_divisor_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700513};
514
Thara Gopinath032b5a72010-12-21 21:08:13 -0700515static struct clk dpll_core_m5x2_ck = {
516 .name = "dpll_core_m5x2_ck",
517 .parent = &dpll_core_x2_ck,
518 .clksel = dpll_core_m6x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700519 .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_CORE,
520 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700521 .ops = &clkops_omap4_dpllmx_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700522 .recalc = &omap2_clksel_recalc,
523 .round_rate = &omap2_clksel_round_rate,
524 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700525};
526
527static const struct clksel div_core_div[] = {
Thara Gopinath032b5a72010-12-21 21:08:13 -0700528 { .parent = &dpll_core_m5x2_ck, .rates = div2_1to2_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700529 { .parent = NULL },
530};
531
532static struct clk div_core_ck = {
533 .name = "div_core_ck",
Thara Gopinath032b5a72010-12-21 21:08:13 -0700534 .parent = &dpll_core_m5x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700535 .clksel = div_core_div,
536 .clksel_reg = OMAP4430_CM_CLKSEL_CORE,
537 .clksel_mask = OMAP4430_CLKSEL_CORE_MASK,
538 .ops = &clkops_null,
539 .recalc = &omap2_clksel_recalc,
540 .round_rate = &omap2_clksel_round_rate,
541 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700542};
543
544static const struct clksel_rate div4_1to8_rates[] = {
545 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
546 { .div = 2, .val = 1, .flags = RATE_IN_4430 },
547 { .div = 4, .val = 2, .flags = RATE_IN_4430 },
548 { .div = 8, .val = 3, .flags = RATE_IN_4430 },
549 { .div = 0 },
550};
551
552static const struct clksel div_iva_hs_clk_div[] = {
Thara Gopinath032b5a72010-12-21 21:08:13 -0700553 { .parent = &dpll_core_m5x2_ck, .rates = div4_1to8_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700554 { .parent = NULL },
555};
556
557static struct clk div_iva_hs_clk = {
558 .name = "div_iva_hs_clk",
Thara Gopinath032b5a72010-12-21 21:08:13 -0700559 .parent = &dpll_core_m5x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700560 .clksel = div_iva_hs_clk_div,
561 .clksel_reg = OMAP4430_CM_BYPCLK_DPLL_IVA,
562 .clksel_mask = OMAP4430_CLKSEL_0_1_MASK,
563 .ops = &clkops_null,
564 .recalc = &omap2_clksel_recalc,
565 .round_rate = &omap2_clksel_round_rate,
566 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700567};
568
569static struct clk div_mpu_hs_clk = {
570 .name = "div_mpu_hs_clk",
Thara Gopinath032b5a72010-12-21 21:08:13 -0700571 .parent = &dpll_core_m5x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700572 .clksel = div_iva_hs_clk_div,
573 .clksel_reg = OMAP4430_CM_BYPCLK_DPLL_MPU,
574 .clksel_mask = OMAP4430_CLKSEL_0_1_MASK,
575 .ops = &clkops_null,
576 .recalc = &omap2_clksel_recalc,
577 .round_rate = &omap2_clksel_round_rate,
578 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700579};
580
Thara Gopinath032b5a72010-12-21 21:08:13 -0700581static struct clk dpll_core_m4x2_ck = {
582 .name = "dpll_core_m4x2_ck",
583 .parent = &dpll_core_x2_ck,
584 .clksel = dpll_core_m6x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700585 .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_CORE,
586 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700587 .ops = &clkops_omap4_dpllmx_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700588 .recalc = &omap2_clksel_recalc,
589 .round_rate = &omap2_clksel_round_rate,
590 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700591};
592
593static struct clk dll_clk_div_ck = {
594 .name = "dll_clk_div_ck",
Thara Gopinath032b5a72010-12-21 21:08:13 -0700595 .parent = &dpll_core_m4x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700596 .ops = &clkops_null,
Jon Hunterf17f9722010-12-09 23:13:40 +0100597 .fixed_div = 2,
598 .recalc = &omap_fixed_divisor_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700599};
600
Thara Gopinath032b5a72010-12-21 21:08:13 -0700601static const struct clksel dpll_abe_m2_div[] = {
602 { .parent = &dpll_abe_ck, .rates = div31_1to31_rates },
603 { .parent = NULL },
604};
605
Rajendra Nayak972c5422009-12-08 18:46:28 -0700606static struct clk dpll_abe_m2_ck = {
607 .name = "dpll_abe_m2_ck",
608 .parent = &dpll_abe_ck,
Thara Gopinath032b5a72010-12-21 21:08:13 -0700609 .clksel = dpll_abe_m2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700610 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE,
611 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700612 .ops = &clkops_omap4_dpllmx_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700613 .recalc = &omap2_clksel_recalc,
614 .round_rate = &omap2_clksel_round_rate,
615 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700616};
617
Thara Gopinath032b5a72010-12-21 21:08:13 -0700618static struct clk dpll_core_m3x2_ck = {
619 .name = "dpll_core_m3x2_ck",
620 .parent = &dpll_core_x2_ck,
621 .clksel = dpll_core_m6x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700622 .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_CORE,
623 .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK,
Rajendra Nayakcb134592010-12-21 21:08:14 -0700624 .ops = &clkops_omap2_dflt,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700625 .recalc = &omap2_clksel_recalc,
626 .round_rate = &omap2_clksel_round_rate,
627 .set_rate = &omap2_clksel_set_rate,
Benoit Cousson7ecd4222011-07-09 19:14:45 -0600628 .enable_reg = OMAP4430_CM_DIV_M3_DPLL_CORE,
629 .enable_bit = OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700630};
631
Thara Gopinath032b5a72010-12-21 21:08:13 -0700632static struct clk dpll_core_m7x2_ck = {
633 .name = "dpll_core_m7x2_ck",
634 .parent = &dpll_core_x2_ck,
635 .clksel = dpll_core_m6x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700636 .clksel_reg = OMAP4430_CM_DIV_M7_DPLL_CORE,
637 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700638 .ops = &clkops_omap4_dpllmx_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700639 .recalc = &omap2_clksel_recalc,
640 .round_rate = &omap2_clksel_round_rate,
641 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700642};
643
644static const struct clksel iva_hsd_byp_clk_mux_sel[] = {
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600645 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700646 { .parent = &div_iva_hs_clk, .rates = div_1_1_rates },
647 { .parent = NULL },
648};
649
650static struct clk iva_hsd_byp_clk_mux_ck = {
651 .name = "iva_hsd_byp_clk_mux_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600652 .parent = &sys_clkin_ck,
Jonathan Bergsagel768ab942010-12-21 21:08:13 -0700653 .clksel = iva_hsd_byp_clk_mux_sel,
654 .init = &omap2_init_clksel_parent,
655 .clksel_reg = OMAP4430_CM_CLKSEL_DPLL_IVA,
656 .clksel_mask = OMAP4430_DPLL_BYP_CLKSEL_MASK,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700657 .ops = &clkops_null,
Jonathan Bergsagel768ab942010-12-21 21:08:13 -0700658 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700659};
660
661/* DPLL_IVA */
662static struct dpll_data dpll_iva_dd = {
663 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_IVA,
664 .clk_bypass = &iva_hsd_byp_clk_mux_ck,
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600665 .clk_ref = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700666 .control_reg = OMAP4430_CM_CLKMODE_DPLL_IVA,
667 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
668 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_IVA,
669 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_IVA,
670 .mult_mask = OMAP4430_DPLL_MULT_MASK,
671 .div1_mask = OMAP4430_DPLL_DIV_MASK,
672 .enable_mask = OMAP4430_DPLL_EN_MASK,
673 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
674 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
Benoit Cousson628479a2011-07-09 19:14:46 -0600675 .max_multiplier = 2047,
676 .max_divider = 128,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700677 .min_divider = 1,
678};
679
680
681static struct clk dpll_iva_ck = {
682 .name = "dpll_iva_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600683 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700684 .dpll_data = &dpll_iva_dd,
Rajendra Nayak911bd732009-12-08 18:47:17 -0700685 .init = &omap2_init_dpll_parent,
Paul Walmsley657ebfa2010-02-22 22:09:20 -0700686 .ops = &clkops_omap3_noncore_dpll_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700687 .recalc = &omap3_dpll_recalc,
688 .round_rate = &omap2_dpll_round_rate,
689 .set_rate = &omap3_noncore_dpll_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700690};
691
Thara Gopinath032b5a72010-12-21 21:08:13 -0700692static struct clk dpll_iva_x2_ck = {
693 .name = "dpll_iva_x2_ck",
694 .parent = &dpll_iva_ck,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700695 .flags = CLOCK_CLKOUTX2,
Thara Gopinath032b5a72010-12-21 21:08:13 -0700696 .ops = &clkops_null,
697 .recalc = &omap3_clkoutx2_recalc,
698};
699
700static const struct clksel dpll_iva_m4x2_div[] = {
701 { .parent = &dpll_iva_x2_ck, .rates = div31_1to31_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700702 { .parent = NULL },
703};
704
Thara Gopinath032b5a72010-12-21 21:08:13 -0700705static struct clk dpll_iva_m4x2_ck = {
706 .name = "dpll_iva_m4x2_ck",
707 .parent = &dpll_iva_x2_ck,
708 .clksel = dpll_iva_m4x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700709 .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_IVA,
710 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700711 .ops = &clkops_omap4_dpllmx_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700712 .recalc = &omap2_clksel_recalc,
713 .round_rate = &omap2_clksel_round_rate,
714 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700715};
716
Thara Gopinath032b5a72010-12-21 21:08:13 -0700717static struct clk dpll_iva_m5x2_ck = {
718 .name = "dpll_iva_m5x2_ck",
719 .parent = &dpll_iva_x2_ck,
720 .clksel = dpll_iva_m4x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700721 .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_IVA,
722 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700723 .ops = &clkops_omap4_dpllmx_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700724 .recalc = &omap2_clksel_recalc,
725 .round_rate = &omap2_clksel_round_rate,
726 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700727};
728
729/* DPLL_MPU */
730static struct dpll_data dpll_mpu_dd = {
731 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_MPU,
732 .clk_bypass = &div_mpu_hs_clk,
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600733 .clk_ref = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700734 .control_reg = OMAP4430_CM_CLKMODE_DPLL_MPU,
735 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
736 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_MPU,
737 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_MPU,
738 .mult_mask = OMAP4430_DPLL_MULT_MASK,
739 .div1_mask = OMAP4430_DPLL_DIV_MASK,
740 .enable_mask = OMAP4430_DPLL_EN_MASK,
741 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
742 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
Benoit Cousson628479a2011-07-09 19:14:46 -0600743 .max_multiplier = 2047,
744 .max_divider = 128,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700745 .min_divider = 1,
746};
747
748
749static struct clk dpll_mpu_ck = {
750 .name = "dpll_mpu_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600751 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700752 .dpll_data = &dpll_mpu_dd,
Rajendra Nayak911bd732009-12-08 18:47:17 -0700753 .init = &omap2_init_dpll_parent,
Paul Walmsley657ebfa2010-02-22 22:09:20 -0700754 .ops = &clkops_omap3_noncore_dpll_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700755 .recalc = &omap3_dpll_recalc,
756 .round_rate = &omap2_dpll_round_rate,
757 .set_rate = &omap3_noncore_dpll_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700758};
759
760static const struct clksel dpll_mpu_m2_div[] = {
761 { .parent = &dpll_mpu_ck, .rates = div31_1to31_rates },
762 { .parent = NULL },
763};
764
765static struct clk dpll_mpu_m2_ck = {
766 .name = "dpll_mpu_m2_ck",
767 .parent = &dpll_mpu_ck,
768 .clksel = dpll_mpu_m2_div,
769 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_MPU,
770 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700771 .ops = &clkops_omap4_dpllmx_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700772 .recalc = &omap2_clksel_recalc,
773 .round_rate = &omap2_clksel_round_rate,
774 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700775};
776
777static struct clk per_hs_clk_div_ck = {
778 .name = "per_hs_clk_div_ck",
Thara Gopinath032b5a72010-12-21 21:08:13 -0700779 .parent = &dpll_abe_m3x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700780 .ops = &clkops_null,
Jon Hunterf17f9722010-12-09 23:13:40 +0100781 .fixed_div = 2,
782 .recalc = &omap_fixed_divisor_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700783};
784
785static const struct clksel per_hsd_byp_clk_mux_sel[] = {
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600786 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -0700787 { .parent = &per_hs_clk_div_ck, .rates = div_1_1_rates },
788 { .parent = NULL },
789};
790
791static struct clk per_hsd_byp_clk_mux_ck = {
792 .name = "per_hsd_byp_clk_mux_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600793 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700794 .clksel = per_hsd_byp_clk_mux_sel,
795 .init = &omap2_init_clksel_parent,
796 .clksel_reg = OMAP4430_CM_CLKSEL_DPLL_PER,
797 .clksel_mask = OMAP4430_DPLL_BYP_CLKSEL_MASK,
798 .ops = &clkops_null,
799 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700800};
801
802/* DPLL_PER */
803static struct dpll_data dpll_per_dd = {
804 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_PER,
805 .clk_bypass = &per_hsd_byp_clk_mux_ck,
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600806 .clk_ref = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700807 .control_reg = OMAP4430_CM_CLKMODE_DPLL_PER,
808 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
809 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_PER,
810 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_PER,
811 .mult_mask = OMAP4430_DPLL_MULT_MASK,
812 .div1_mask = OMAP4430_DPLL_DIV_MASK,
813 .enable_mask = OMAP4430_DPLL_EN_MASK,
814 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
815 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
Benoit Cousson628479a2011-07-09 19:14:46 -0600816 .max_multiplier = 2047,
817 .max_divider = 128,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700818 .min_divider = 1,
819};
820
821
822static struct clk dpll_per_ck = {
823 .name = "dpll_per_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600824 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700825 .dpll_data = &dpll_per_dd,
Rajendra Nayak911bd732009-12-08 18:47:17 -0700826 .init = &omap2_init_dpll_parent,
Paul Walmsley657ebfa2010-02-22 22:09:20 -0700827 .ops = &clkops_omap3_noncore_dpll_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700828 .recalc = &omap3_dpll_recalc,
829 .round_rate = &omap2_dpll_round_rate,
830 .set_rate = &omap3_noncore_dpll_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700831};
832
833static const struct clksel dpll_per_m2_div[] = {
834 { .parent = &dpll_per_ck, .rates = div31_1to31_rates },
835 { .parent = NULL },
836};
837
838static struct clk dpll_per_m2_ck = {
839 .name = "dpll_per_m2_ck",
840 .parent = &dpll_per_ck,
841 .clksel = dpll_per_m2_div,
842 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER,
843 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700844 .ops = &clkops_omap4_dpllmx_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700845 .recalc = &omap2_clksel_recalc,
846 .round_rate = &omap2_clksel_round_rate,
847 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700848};
849
Thara Gopinath032b5a72010-12-21 21:08:13 -0700850static struct clk dpll_per_x2_ck = {
851 .name = "dpll_per_x2_ck",
Rajendra Nayak972c5422009-12-08 18:46:28 -0700852 .parent = &dpll_per_ck,
Benoit Cousson7ecd4222011-07-09 19:14:45 -0600853 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700854 .flags = CLOCK_CLKOUTX2,
855 .ops = &clkops_omap4_dpllmx_ops,
Thara Gopinath032b5a72010-12-21 21:08:13 -0700856 .recalc = &omap3_clkoutx2_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700857};
858
Thara Gopinath032b5a72010-12-21 21:08:13 -0700859static const struct clksel dpll_per_m2x2_div[] = {
860 { .parent = &dpll_per_x2_ck, .rates = div31_1to31_rates },
861 { .parent = NULL },
862};
863
864static struct clk dpll_per_m2x2_ck = {
865 .name = "dpll_per_m2x2_ck",
866 .parent = &dpll_per_x2_ck,
867 .clksel = dpll_per_m2x2_div,
868 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER,
869 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700870 .ops = &clkops_omap4_dpllmx_ops,
Thara Gopinath032b5a72010-12-21 21:08:13 -0700871 .recalc = &omap2_clksel_recalc,
872 .round_rate = &omap2_clksel_round_rate,
873 .set_rate = &omap2_clksel_set_rate,
874};
875
876static struct clk dpll_per_m3x2_ck = {
877 .name = "dpll_per_m3x2_ck",
878 .parent = &dpll_per_x2_ck,
879 .clksel = dpll_per_m2x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700880 .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_PER,
881 .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK,
Rajendra Nayakcb134592010-12-21 21:08:14 -0700882 .ops = &clkops_omap2_dflt,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700883 .recalc = &omap2_clksel_recalc,
884 .round_rate = &omap2_clksel_round_rate,
885 .set_rate = &omap2_clksel_set_rate,
Benoit Cousson7ecd4222011-07-09 19:14:45 -0600886 .enable_reg = OMAP4430_CM_DIV_M3_DPLL_PER,
887 .enable_bit = OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700888};
889
Thara Gopinath032b5a72010-12-21 21:08:13 -0700890static struct clk dpll_per_m4x2_ck = {
891 .name = "dpll_per_m4x2_ck",
892 .parent = &dpll_per_x2_ck,
893 .clksel = dpll_per_m2x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700894 .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_PER,
895 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700896 .ops = &clkops_omap4_dpllmx_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700897 .recalc = &omap2_clksel_recalc,
898 .round_rate = &omap2_clksel_round_rate,
899 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700900};
901
Thara Gopinath032b5a72010-12-21 21:08:13 -0700902static struct clk dpll_per_m5x2_ck = {
903 .name = "dpll_per_m5x2_ck",
904 .parent = &dpll_per_x2_ck,
905 .clksel = dpll_per_m2x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700906 .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_PER,
907 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700908 .ops = &clkops_omap4_dpllmx_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700909 .recalc = &omap2_clksel_recalc,
910 .round_rate = &omap2_clksel_round_rate,
911 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700912};
913
Thara Gopinath032b5a72010-12-21 21:08:13 -0700914static struct clk dpll_per_m6x2_ck = {
915 .name = "dpll_per_m6x2_ck",
916 .parent = &dpll_per_x2_ck,
917 .clksel = dpll_per_m2x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700918 .clksel_reg = OMAP4430_CM_DIV_M6_DPLL_PER,
919 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700920 .ops = &clkops_omap4_dpllmx_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700921 .recalc = &omap2_clksel_recalc,
922 .round_rate = &omap2_clksel_round_rate,
923 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700924};
925
Thara Gopinath032b5a72010-12-21 21:08:13 -0700926static struct clk dpll_per_m7x2_ck = {
927 .name = "dpll_per_m7x2_ck",
928 .parent = &dpll_per_x2_ck,
929 .clksel = dpll_per_m2x2_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700930 .clksel_reg = OMAP4430_CM_DIV_M7_DPLL_PER,
931 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700932 .ops = &clkops_omap4_dpllmx_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700933 .recalc = &omap2_clksel_recalc,
934 .round_rate = &omap2_clksel_round_rate,
935 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700936};
937
Rajendra Nayak972c5422009-12-08 18:46:28 -0700938static struct clk usb_hs_clk_div_ck = {
939 .name = "usb_hs_clk_div_ck",
Thara Gopinath032b5a72010-12-21 21:08:13 -0700940 .parent = &dpll_abe_m3x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700941 .ops = &clkops_null,
Jon Hunterf17f9722010-12-09 23:13:40 +0100942 .fixed_div = 3,
943 .recalc = &omap_fixed_divisor_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700944};
945
946/* DPLL_USB */
947static struct dpll_data dpll_usb_dd = {
948 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_USB,
949 .clk_bypass = &usb_hs_clk_div_ck,
Jon Huntera36795c2010-12-21 21:31:43 -0700950 .flags = DPLL_J_TYPE,
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600951 .clk_ref = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700952 .control_reg = OMAP4430_CM_CLKMODE_DPLL_USB,
953 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
954 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_USB,
955 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_USB,
956 .mult_mask = OMAP4430_DPLL_MULT_MASK,
957 .div1_mask = OMAP4430_DPLL_DIV_MASK,
958 .enable_mask = OMAP4430_DPLL_EN_MASK,
959 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
960 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
Benoit Cousson962519e2011-07-09 19:14:45 -0600961 .sddiv_mask = OMAP4430_DPLL_SD_DIV_MASK,
Benoit Cousson628479a2011-07-09 19:14:46 -0600962 .max_multiplier = 4095,
963 .max_divider = 256,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700964 .min_divider = 1,
965};
966
967
968static struct clk dpll_usb_ck = {
969 .name = "dpll_usb_ck",
Rajendra Nayak76cf5292010-09-27 14:02:54 -0600970 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700971 .dpll_data = &dpll_usb_dd,
Rajendra Nayak911bd732009-12-08 18:47:17 -0700972 .init = &omap2_init_dpll_parent,
Paul Walmsley657ebfa2010-02-22 22:09:20 -0700973 .ops = &clkops_omap3_noncore_dpll_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700974 .recalc = &omap3_dpll_recalc,
975 .round_rate = &omap2_dpll_round_rate,
976 .set_rate = &omap3_noncore_dpll_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700977};
978
979static struct clk dpll_usb_clkdcoldo_ck = {
980 .name = "dpll_usb_clkdcoldo_ck",
981 .parent = &dpll_usb_ck,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700982 .clksel_reg = OMAP4430_CM_CLKDCOLDO_DPLL_USB,
Benoit Cousson7ecd4222011-07-09 19:14:45 -0600983 .ops = &clkops_omap4_dpllmx_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700984 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700985};
986
987static const struct clksel dpll_usb_m2_div[] = {
988 { .parent = &dpll_usb_ck, .rates = div31_1to31_rates },
989 { .parent = NULL },
990};
991
992static struct clk dpll_usb_m2_ck = {
993 .name = "dpll_usb_m2_ck",
994 .parent = &dpll_usb_ck,
995 .clksel = dpll_usb_m2_div,
996 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_USB,
997 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK,
Rajendra Nayak70db8a62011-02-25 15:49:02 -0700998 .ops = &clkops_omap4_dpllmx_ops,
Rajendra Nayak972c5422009-12-08 18:46:28 -0700999 .recalc = &omap2_clksel_recalc,
1000 .round_rate = &omap2_clksel_round_rate,
1001 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001002};
1003
1004static const struct clksel ducati_clk_mux_sel[] = {
1005 { .parent = &div_core_ck, .rates = div_1_0_rates },
Thara Gopinath032b5a72010-12-21 21:08:13 -07001006 { .parent = &dpll_per_m6x2_ck, .rates = div_1_1_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -07001007 { .parent = NULL },
1008};
1009
1010static struct clk ducati_clk_mux_ck = {
1011 .name = "ducati_clk_mux_ck",
1012 .parent = &div_core_ck,
1013 .clksel = ducati_clk_mux_sel,
1014 .init = &omap2_init_clksel_parent,
1015 .clksel_reg = OMAP4430_CM_CLKSEL_DUCATI_ISS_ROOT,
1016 .clksel_mask = OMAP4430_CLKSEL_0_0_MASK,
1017 .ops = &clkops_null,
1018 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001019};
1020
1021static struct clk func_12m_fclk = {
1022 .name = "func_12m_fclk",
1023 .parent = &dpll_per_m2x2_ck,
1024 .ops = &clkops_null,
Jon Hunterf17f9722010-12-09 23:13:40 +01001025 .fixed_div = 16,
1026 .recalc = &omap_fixed_divisor_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001027};
1028
1029static struct clk func_24m_clk = {
1030 .name = "func_24m_clk",
1031 .parent = &dpll_per_m2_ck,
1032 .ops = &clkops_null,
Jon Hunterf17f9722010-12-09 23:13:40 +01001033 .fixed_div = 4,
1034 .recalc = &omap_fixed_divisor_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001035};
1036
1037static struct clk func_24mc_fclk = {
1038 .name = "func_24mc_fclk",
1039 .parent = &dpll_per_m2x2_ck,
1040 .ops = &clkops_null,
Jon Hunterf17f9722010-12-09 23:13:40 +01001041 .fixed_div = 8,
1042 .recalc = &omap_fixed_divisor_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001043};
1044
1045static const struct clksel_rate div2_4to8_rates[] = {
1046 { .div = 4, .val = 0, .flags = RATE_IN_4430 },
1047 { .div = 8, .val = 1, .flags = RATE_IN_4430 },
1048 { .div = 0 },
1049};
1050
1051static const struct clksel func_48m_fclk_div[] = {
1052 { .parent = &dpll_per_m2x2_ck, .rates = div2_4to8_rates },
1053 { .parent = NULL },
1054};
1055
1056static struct clk func_48m_fclk = {
1057 .name = "func_48m_fclk",
1058 .parent = &dpll_per_m2x2_ck,
1059 .clksel = func_48m_fclk_div,
1060 .clksel_reg = OMAP4430_CM_SCALE_FCLK,
1061 .clksel_mask = OMAP4430_SCALE_FCLK_MASK,
1062 .ops = &clkops_null,
1063 .recalc = &omap2_clksel_recalc,
1064 .round_rate = &omap2_clksel_round_rate,
1065 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001066};
1067
1068static struct clk func_48mc_fclk = {
1069 .name = "func_48mc_fclk",
1070 .parent = &dpll_per_m2x2_ck,
1071 .ops = &clkops_null,
Jon Hunterf17f9722010-12-09 23:13:40 +01001072 .fixed_div = 4,
1073 .recalc = &omap_fixed_divisor_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001074};
1075
1076static const struct clksel_rate div2_2to4_rates[] = {
1077 { .div = 2, .val = 0, .flags = RATE_IN_4430 },
1078 { .div = 4, .val = 1, .flags = RATE_IN_4430 },
1079 { .div = 0 },
1080};
1081
1082static const struct clksel func_64m_fclk_div[] = {
Thara Gopinath032b5a72010-12-21 21:08:13 -07001083 { .parent = &dpll_per_m4x2_ck, .rates = div2_2to4_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -07001084 { .parent = NULL },
1085};
1086
1087static struct clk func_64m_fclk = {
1088 .name = "func_64m_fclk",
Thara Gopinath032b5a72010-12-21 21:08:13 -07001089 .parent = &dpll_per_m4x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001090 .clksel = func_64m_fclk_div,
1091 .clksel_reg = OMAP4430_CM_SCALE_FCLK,
1092 .clksel_mask = OMAP4430_SCALE_FCLK_MASK,
1093 .ops = &clkops_null,
1094 .recalc = &omap2_clksel_recalc,
1095 .round_rate = &omap2_clksel_round_rate,
1096 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001097};
1098
1099static const struct clksel func_96m_fclk_div[] = {
1100 { .parent = &dpll_per_m2x2_ck, .rates = div2_2to4_rates },
1101 { .parent = NULL },
1102};
1103
1104static struct clk func_96m_fclk = {
1105 .name = "func_96m_fclk",
1106 .parent = &dpll_per_m2x2_ck,
1107 .clksel = func_96m_fclk_div,
1108 .clksel_reg = OMAP4430_CM_SCALE_FCLK,
1109 .clksel_mask = OMAP4430_SCALE_FCLK_MASK,
1110 .ops = &clkops_null,
1111 .recalc = &omap2_clksel_recalc,
1112 .round_rate = &omap2_clksel_round_rate,
1113 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001114};
1115
Rajendra Nayak972c5422009-12-08 18:46:28 -07001116static const struct clksel_rate div2_1to8_rates[] = {
1117 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
1118 { .div = 8, .val = 1, .flags = RATE_IN_4430 },
1119 { .div = 0 },
1120};
1121
1122static const struct clksel init_60m_fclk_div[] = {
1123 { .parent = &dpll_usb_m2_ck, .rates = div2_1to8_rates },
1124 { .parent = NULL },
1125};
1126
1127static struct clk init_60m_fclk = {
1128 .name = "init_60m_fclk",
1129 .parent = &dpll_usb_m2_ck,
1130 .clksel = init_60m_fclk_div,
1131 .clksel_reg = OMAP4430_CM_CLKSEL_USB_60MHZ,
1132 .clksel_mask = OMAP4430_CLKSEL_0_0_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 l3_div_div[] = {
1140 { .parent = &div_core_ck, .rates = div2_1to2_rates },
1141 { .parent = NULL },
1142};
1143
1144static struct clk l3_div_ck = {
1145 .name = "l3_div_ck",
1146 .parent = &div_core_ck,
1147 .clksel = l3_div_div,
1148 .clksel_reg = OMAP4430_CM_CLKSEL_CORE,
1149 .clksel_mask = OMAP4430_CLKSEL_L3_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 l4_div_div[] = {
1157 { .parent = &l3_div_ck, .rates = div2_1to2_rates },
1158 { .parent = NULL },
1159};
1160
1161static struct clk l4_div_ck = {
1162 .name = "l4_div_ck",
1163 .parent = &l3_div_ck,
1164 .clksel = l4_div_div,
1165 .clksel_reg = OMAP4430_CM_CLKSEL_CORE,
1166 .clksel_mask = OMAP4430_CLKSEL_L4_MASK,
1167 .ops = &clkops_null,
1168 .recalc = &omap2_clksel_recalc,
1169 .round_rate = &omap2_clksel_round_rate,
1170 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001171};
1172
1173static struct clk lp_clk_div_ck = {
1174 .name = "lp_clk_div_ck",
1175 .parent = &dpll_abe_m2x2_ck,
1176 .ops = &clkops_null,
Jon Hunterf17f9722010-12-09 23:13:40 +01001177 .fixed_div = 16,
1178 .recalc = &omap_fixed_divisor_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001179};
1180
1181static const struct clksel l4_wkup_clk_mux_sel[] = {
1182 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
1183 { .parent = &lp_clk_div_ck, .rates = div_1_1_rates },
1184 { .parent = NULL },
1185};
1186
1187static struct clk l4_wkup_clk_mux_ck = {
1188 .name = "l4_wkup_clk_mux_ck",
1189 .parent = &sys_clkin_ck,
1190 .clksel = l4_wkup_clk_mux_sel,
1191 .init = &omap2_init_clksel_parent,
1192 .clksel_reg = OMAP4430_CM_L4_WKUP_CLKSEL,
1193 .clksel_mask = OMAP4430_CLKSEL_0_0_MASK,
1194 .ops = &clkops_null,
1195 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001196};
1197
Jon Huntercf2a82d2011-10-07 00:53:09 -06001198static const struct clksel_rate div2_2to1_rates[] = {
1199 { .div = 1, .val = 1, .flags = RATE_IN_4430 },
1200 { .div = 2, .val = 0, .flags = RATE_IN_4430 },
1201 { .div = 0 },
1202};
1203
1204static const struct clksel ocp_abe_iclk_div[] = {
1205 { .parent = &aess_fclk, .rates = div2_2to1_rates },
1206 { .parent = NULL },
1207};
1208
Santosh Shilimkar30c95692011-12-16 16:09:12 -08001209static struct clk mpu_periphclk = {
1210 .name = "mpu_periphclk",
1211 .parent = &dpll_mpu_ck,
1212 .ops = &clkops_null,
1213 .fixed_div = 2,
1214 .recalc = &omap_fixed_divisor_recalc,
1215};
1216
Jon Hunterde474532011-07-09 19:14:47 -06001217static struct clk ocp_abe_iclk = {
1218 .name = "ocp_abe_iclk",
1219 .parent = &aess_fclk,
Jon Huntercf2a82d2011-10-07 00:53:09 -06001220 .clksel = ocp_abe_iclk_div,
1221 .clksel_reg = OMAP4430_CM1_ABE_AESS_CLKCTRL,
1222 .clksel_mask = OMAP4430_CLKSEL_AESS_FCLK_MASK,
Jon Hunterde474532011-07-09 19:14:47 -06001223 .ops = &clkops_null,
Jon Huntercf2a82d2011-10-07 00:53:09 -06001224 .recalc = &omap2_clksel_recalc,
Jon Hunterde474532011-07-09 19:14:47 -06001225};
1226
1227static struct clk per_abe_24m_fclk = {
1228 .name = "per_abe_24m_fclk",
1229 .parent = &dpll_abe_m2_ck,
1230 .ops = &clkops_null,
1231 .fixed_div = 4,
1232 .recalc = &omap_fixed_divisor_recalc,
1233};
1234
Rajendra Nayak972c5422009-12-08 18:46:28 -07001235static const struct clksel per_abe_nc_fclk_div[] = {
1236 { .parent = &dpll_abe_m2_ck, .rates = div2_1to2_rates },
1237 { .parent = NULL },
1238};
1239
1240static struct clk per_abe_nc_fclk = {
1241 .name = "per_abe_nc_fclk",
1242 .parent = &dpll_abe_m2_ck,
1243 .clksel = per_abe_nc_fclk_div,
1244 .clksel_reg = OMAP4430_CM_SCALE_FCLK,
1245 .clksel_mask = OMAP4430_SCALE_FCLK_MASK,
1246 .ops = &clkops_null,
1247 .recalc = &omap2_clksel_recalc,
1248 .round_rate = &omap2_clksel_round_rate,
1249 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001250};
1251
Rajendra Nayak972c5422009-12-08 18:46:28 -07001252static const struct clksel pmd_stm_clock_mux_sel[] = {
1253 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
Thara Gopinath032b5a72010-12-21 21:08:13 -07001254 { .parent = &dpll_core_m6x2_ck, .rates = div_1_1_rates },
Rajendra Nayak76cf5292010-09-27 14:02:54 -06001255 { .parent = &tie_low_clock_ck, .rates = div_1_2_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -07001256 { .parent = NULL },
1257};
1258
1259static struct clk pmd_stm_clock_mux_ck = {
1260 .name = "pmd_stm_clock_mux_ck",
1261 .parent = &sys_clkin_ck,
1262 .ops = &clkops_null,
1263 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001264};
1265
1266static struct clk pmd_trace_clk_mux_ck = {
1267 .name = "pmd_trace_clk_mux_ck",
1268 .parent = &sys_clkin_ck,
1269 .ops = &clkops_null,
1270 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001271};
1272
Rajendra Nayak76cf5292010-09-27 14:02:54 -06001273static const struct clksel syc_clk_div_div[] = {
1274 { .parent = &sys_clkin_ck, .rates = div2_1to2_rates },
1275 { .parent = NULL },
1276};
1277
Rajendra Nayak972c5422009-12-08 18:46:28 -07001278static struct clk syc_clk_div_ck = {
1279 .name = "syc_clk_div_ck",
1280 .parent = &sys_clkin_ck,
Rajendra Nayak76cf5292010-09-27 14:02:54 -06001281 .clksel = syc_clk_div_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001282 .clksel_reg = OMAP4430_CM_ABE_DSS_SYS_CLKSEL,
1283 .clksel_mask = OMAP4430_CLKSEL_0_0_MASK,
1284 .ops = &clkops_null,
1285 .recalc = &omap2_clksel_recalc,
1286 .round_rate = &omap2_clksel_round_rate,
1287 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001288};
1289
1290/* Leaf clocks controlled by modules */
1291
Rajendra Nayak54776052010-02-22 22:09:39 -07001292static struct clk aes1_fck = {
1293 .name = "aes1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001294 .ops = &clkops_omap2_dflt,
1295 .enable_reg = OMAP4430_CM_L4SEC_AES1_CLKCTRL,
1296 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1297 .clkdm_name = "l4_secure_clkdm",
1298 .parent = &l3_div_ck,
1299 .recalc = &followparent_recalc,
1300};
1301
Rajendra Nayak54776052010-02-22 22:09:39 -07001302static struct clk aes2_fck = {
1303 .name = "aes2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001304 .ops = &clkops_omap2_dflt,
1305 .enable_reg = OMAP4430_CM_L4SEC_AES2_CLKCTRL,
1306 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1307 .clkdm_name = "l4_secure_clkdm",
1308 .parent = &l3_div_ck,
1309 .recalc = &followparent_recalc,
1310};
1311
Rajendra Nayak54776052010-02-22 22:09:39 -07001312static struct clk aess_fck = {
1313 .name = "aess_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001314 .ops = &clkops_omap2_dflt,
1315 .enable_reg = OMAP4430_CM1_ABE_AESS_CLKCTRL,
1316 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1317 .clkdm_name = "abe_clkdm",
1318 .parent = &aess_fclk,
1319 .recalc = &followparent_recalc,
1320};
1321
Benoit Cousson1c03f422010-09-27 14:02:55 -06001322static struct clk bandgap_fclk = {
1323 .name = "bandgap_fclk",
1324 .ops = &clkops_omap2_dflt,
1325 .enable_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL,
1326 .enable_bit = OMAP4430_OPTFCLKEN_BGAP_32K_SHIFT,
1327 .clkdm_name = "l4_wkup_clkdm",
1328 .parent = &sys_32k_ck,
1329 .recalc = &followparent_recalc,
1330};
1331
Rajendra Nayak54776052010-02-22 22:09:39 -07001332static struct clk des3des_fck = {
1333 .name = "des3des_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001334 .ops = &clkops_omap2_dflt,
1335 .enable_reg = OMAP4430_CM_L4SEC_DES3DES_CLKCTRL,
1336 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1337 .clkdm_name = "l4_secure_clkdm",
1338 .parent = &l4_div_ck,
1339 .recalc = &followparent_recalc,
1340};
1341
1342static const struct clksel dmic_sync_mux_sel[] = {
1343 { .parent = &abe_24m_fclk, .rates = div_1_0_rates },
1344 { .parent = &syc_clk_div_ck, .rates = div_1_1_rates },
1345 { .parent = &func_24m_clk, .rates = div_1_2_rates },
1346 { .parent = NULL },
1347};
1348
1349static struct clk dmic_sync_mux_ck = {
1350 .name = "dmic_sync_mux_ck",
1351 .parent = &abe_24m_fclk,
1352 .clksel = dmic_sync_mux_sel,
1353 .init = &omap2_init_clksel_parent,
1354 .clksel_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL,
1355 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1356 .ops = &clkops_null,
1357 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001358};
1359
1360static const struct clksel func_dmic_abe_gfclk_sel[] = {
1361 { .parent = &dmic_sync_mux_ck, .rates = div_1_0_rates },
1362 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1363 { .parent = &slimbus_clk, .rates = div_1_2_rates },
1364 { .parent = NULL },
1365};
1366
Rajendra Nayak54776052010-02-22 22:09:39 -07001367/* Merged func_dmic_abe_gfclk into dmic */
1368static struct clk dmic_fck = {
1369 .name = "dmic_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001370 .parent = &dmic_sync_mux_ck,
1371 .clksel = func_dmic_abe_gfclk_sel,
1372 .init = &omap2_init_clksel_parent,
1373 .clksel_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL,
1374 .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK,
1375 .ops = &clkops_omap2_dflt,
1376 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001377 .enable_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL,
1378 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1379 .clkdm_name = "abe_clkdm",
1380};
1381
Benoit Cousson0e433272010-09-27 14:02:54 -06001382static struct clk dsp_fck = {
1383 .name = "dsp_fck",
1384 .ops = &clkops_omap2_dflt,
1385 .enable_reg = OMAP4430_CM_TESLA_TESLA_CLKCTRL,
1386 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1387 .clkdm_name = "tesla_clkdm",
Thara Gopinath032b5a72010-12-21 21:08:13 -07001388 .parent = &dpll_iva_m4x2_ck,
Benoit Cousson0e433272010-09-27 14:02:54 -06001389 .recalc = &followparent_recalc,
1390};
1391
Benoit Cousson1c03f422010-09-27 14:02:55 -06001392static struct clk dss_sys_clk = {
1393 .name = "dss_sys_clk",
1394 .ops = &clkops_omap2_dflt,
1395 .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1396 .enable_bit = OMAP4430_OPTFCLKEN_SYS_CLK_SHIFT,
1397 .clkdm_name = "l3_dss_clkdm",
1398 .parent = &syc_clk_div_ck,
1399 .recalc = &followparent_recalc,
1400};
1401
1402static struct clk dss_tv_clk = {
1403 .name = "dss_tv_clk",
1404 .ops = &clkops_omap2_dflt,
1405 .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1406 .enable_bit = OMAP4430_OPTFCLKEN_TV_CLK_SHIFT,
1407 .clkdm_name = "l3_dss_clkdm",
1408 .parent = &extalt_clkin_ck,
1409 .recalc = &followparent_recalc,
1410};
1411
1412static struct clk dss_dss_clk = {
1413 .name = "dss_dss_clk",
1414 .ops = &clkops_omap2_dflt,
1415 .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1416 .enable_bit = OMAP4430_OPTFCLKEN_DSSCLK_SHIFT,
1417 .clkdm_name = "l3_dss_clkdm",
Thara Gopinath032b5a72010-12-21 21:08:13 -07001418 .parent = &dpll_per_m5x2_ck,
Benoit Cousson1c03f422010-09-27 14:02:55 -06001419 .recalc = &followparent_recalc,
1420};
1421
Rajendra Nayak257d6432011-07-02 08:00:24 +05301422static const struct clksel_rate div3_8to32_rates[] = {
Paul Walmsley52a3a4d2011-10-07 00:53:08 -06001423 { .div = 8, .val = 0, .flags = RATE_IN_4460 },
1424 { .div = 16, .val = 1, .flags = RATE_IN_4460 },
1425 { .div = 32, .val = 2, .flags = RATE_IN_4460 },
Rajendra Nayak257d6432011-07-02 08:00:24 +05301426 { .div = 0 },
1427};
1428
1429static const struct clksel div_ts_div[] = {
1430 { .parent = &l4_wkup_clk_mux_ck, .rates = div3_8to32_rates },
1431 { .parent = NULL },
1432};
1433
1434static struct clk div_ts_ck = {
1435 .name = "div_ts_ck",
1436 .parent = &l4_wkup_clk_mux_ck,
1437 .clksel = div_ts_div,
1438 .clksel_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL,
1439 .clksel_mask = OMAP4430_CLKSEL_24_25_MASK,
1440 .ops = &clkops_null,
1441 .recalc = &omap2_clksel_recalc,
1442 .round_rate = &omap2_clksel_round_rate,
1443 .set_rate = &omap2_clksel_set_rate,
1444};
1445
1446static struct clk bandgap_ts_fclk = {
1447 .name = "bandgap_ts_fclk",
1448 .ops = &clkops_omap2_dflt,
1449 .enable_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL,
1450 .enable_bit = OMAP4460_OPTFCLKEN_TS_FCLK_SHIFT,
1451 .clkdm_name = "l4_wkup_clkdm",
1452 .parent = &div_ts_ck,
1453 .recalc = &followparent_recalc,
1454};
1455
Benoit Cousson1c03f422010-09-27 14:02:55 -06001456static struct clk dss_48mhz_clk = {
1457 .name = "dss_48mhz_clk",
1458 .ops = &clkops_omap2_dflt,
1459 .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1460 .enable_bit = OMAP4430_OPTFCLKEN_48MHZ_CLK_SHIFT,
1461 .clkdm_name = "l3_dss_clkdm",
1462 .parent = &func_48mc_fclk,
1463 .recalc = &followparent_recalc,
1464};
1465
Rajendra Nayak54776052010-02-22 22:09:39 -07001466static struct clk dss_fck = {
1467 .name = "dss_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001468 .ops = &clkops_omap2_dflt,
1469 .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1470 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1471 .clkdm_name = "l3_dss_clkdm",
1472 .parent = &l3_div_ck,
1473 .recalc = &followparent_recalc,
1474};
1475
Benoit Cousson0e433272010-09-27 14:02:54 -06001476static struct clk efuse_ctrl_cust_fck = {
1477 .name = "efuse_ctrl_cust_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001478 .ops = &clkops_omap2_dflt,
Benoit Cousson0e433272010-09-27 14:02:54 -06001479 .enable_reg = OMAP4430_CM_CEFUSE_CEFUSE_CLKCTRL,
1480 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1481 .clkdm_name = "l4_cefuse_clkdm",
1482 .parent = &sys_clkin_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001483 .recalc = &followparent_recalc,
1484};
1485
Benoit Cousson0e433272010-09-27 14:02:54 -06001486static struct clk emif1_fck = {
1487 .name = "emif1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001488 .ops = &clkops_omap2_dflt,
1489 .enable_reg = OMAP4430_CM_MEMIF_EMIF_1_CLKCTRL,
1490 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
Santosh Shilimkar090830b2010-06-16 19:01:33 +03001491 .flags = ENABLE_ON_INIT,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001492 .clkdm_name = "l3_emif_clkdm",
1493 .parent = &ddrphy_ck,
1494 .recalc = &followparent_recalc,
1495};
1496
Benoit Cousson0e433272010-09-27 14:02:54 -06001497static struct clk emif2_fck = {
1498 .name = "emif2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001499 .ops = &clkops_omap2_dflt,
1500 .enable_reg = OMAP4430_CM_MEMIF_EMIF_2_CLKCTRL,
1501 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
Santosh Shilimkar090830b2010-06-16 19:01:33 +03001502 .flags = ENABLE_ON_INIT,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001503 .clkdm_name = "l3_emif_clkdm",
1504 .parent = &ddrphy_ck,
1505 .recalc = &followparent_recalc,
1506};
1507
1508static const struct clksel fdif_fclk_div[] = {
Thara Gopinath032b5a72010-12-21 21:08:13 -07001509 { .parent = &dpll_per_m4x2_ck, .rates = div3_1to4_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -07001510 { .parent = NULL },
1511};
1512
Rajendra Nayak54776052010-02-22 22:09:39 -07001513/* Merged fdif_fclk into fdif */
1514static struct clk fdif_fck = {
1515 .name = "fdif_fck",
Thara Gopinath032b5a72010-12-21 21:08:13 -07001516 .parent = &dpll_per_m4x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001517 .clksel = fdif_fclk_div,
1518 .clksel_reg = OMAP4430_CM_CAM_FDIF_CLKCTRL,
1519 .clksel_mask = OMAP4430_CLKSEL_FCLK_MASK,
1520 .ops = &clkops_omap2_dflt,
1521 .recalc = &omap2_clksel_recalc,
1522 .round_rate = &omap2_clksel_round_rate,
1523 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001524 .enable_reg = OMAP4430_CM_CAM_FDIF_CLKCTRL,
1525 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1526 .clkdm_name = "iss_clkdm",
1527};
1528
Benoit Cousson0e433272010-09-27 14:02:54 -06001529static struct clk fpka_fck = {
1530 .name = "fpka_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001531 .ops = &clkops_omap2_dflt,
Benoit Cousson0e433272010-09-27 14:02:54 -06001532 .enable_reg = OMAP4430_CM_L4SEC_PKAEIP29_CLKCTRL,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001533 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
Benoit Cousson0e433272010-09-27 14:02:54 -06001534 .clkdm_name = "l4_secure_clkdm",
1535 .parent = &l4_div_ck,
1536 .recalc = &followparent_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001537};
1538
Benoit Cousson1c03f422010-09-27 14:02:55 -06001539static struct clk gpio1_dbclk = {
1540 .name = "gpio1_dbclk",
1541 .ops = &clkops_omap2_dflt,
1542 .enable_reg = OMAP4430_CM_WKUP_GPIO1_CLKCTRL,
1543 .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT,
1544 .clkdm_name = "l4_wkup_clkdm",
1545 .parent = &sys_32k_ck,
1546 .recalc = &followparent_recalc,
1547};
1548
Rajendra Nayak54776052010-02-22 22:09:39 -07001549static struct clk gpio1_ick = {
1550 .name = "gpio1_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001551 .ops = &clkops_omap2_dflt,
1552 .enable_reg = OMAP4430_CM_WKUP_GPIO1_CLKCTRL,
1553 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1554 .clkdm_name = "l4_wkup_clkdm",
1555 .parent = &l4_wkup_clk_mux_ck,
1556 .recalc = &followparent_recalc,
1557};
1558
Benoit Cousson1c03f422010-09-27 14:02:55 -06001559static struct clk gpio2_dbclk = {
1560 .name = "gpio2_dbclk",
1561 .ops = &clkops_omap2_dflt,
1562 .enable_reg = OMAP4430_CM_L4PER_GPIO2_CLKCTRL,
1563 .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT,
1564 .clkdm_name = "l4_per_clkdm",
1565 .parent = &sys_32k_ck,
1566 .recalc = &followparent_recalc,
1567};
1568
Rajendra Nayak54776052010-02-22 22:09:39 -07001569static struct clk gpio2_ick = {
1570 .name = "gpio2_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001571 .ops = &clkops_omap2_dflt,
1572 .enable_reg = OMAP4430_CM_L4PER_GPIO2_CLKCTRL,
1573 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1574 .clkdm_name = "l4_per_clkdm",
1575 .parent = &l4_div_ck,
1576 .recalc = &followparent_recalc,
1577};
1578
Benoit Cousson1c03f422010-09-27 14:02:55 -06001579static struct clk gpio3_dbclk = {
1580 .name = "gpio3_dbclk",
1581 .ops = &clkops_omap2_dflt,
1582 .enable_reg = OMAP4430_CM_L4PER_GPIO3_CLKCTRL,
1583 .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT,
1584 .clkdm_name = "l4_per_clkdm",
1585 .parent = &sys_32k_ck,
1586 .recalc = &followparent_recalc,
1587};
1588
Rajendra Nayak54776052010-02-22 22:09:39 -07001589static struct clk gpio3_ick = {
1590 .name = "gpio3_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001591 .ops = &clkops_omap2_dflt,
1592 .enable_reg = OMAP4430_CM_L4PER_GPIO3_CLKCTRL,
1593 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1594 .clkdm_name = "l4_per_clkdm",
1595 .parent = &l4_div_ck,
1596 .recalc = &followparent_recalc,
1597};
1598
Benoit Cousson1c03f422010-09-27 14:02:55 -06001599static struct clk gpio4_dbclk = {
1600 .name = "gpio4_dbclk",
1601 .ops = &clkops_omap2_dflt,
1602 .enable_reg = OMAP4430_CM_L4PER_GPIO4_CLKCTRL,
1603 .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT,
1604 .clkdm_name = "l4_per_clkdm",
1605 .parent = &sys_32k_ck,
1606 .recalc = &followparent_recalc,
1607};
1608
Rajendra Nayak54776052010-02-22 22:09:39 -07001609static struct clk gpio4_ick = {
1610 .name = "gpio4_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001611 .ops = &clkops_omap2_dflt,
1612 .enable_reg = OMAP4430_CM_L4PER_GPIO4_CLKCTRL,
1613 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1614 .clkdm_name = "l4_per_clkdm",
1615 .parent = &l4_div_ck,
1616 .recalc = &followparent_recalc,
1617};
1618
Benoit Cousson1c03f422010-09-27 14:02:55 -06001619static struct clk gpio5_dbclk = {
1620 .name = "gpio5_dbclk",
1621 .ops = &clkops_omap2_dflt,
1622 .enable_reg = OMAP4430_CM_L4PER_GPIO5_CLKCTRL,
1623 .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT,
1624 .clkdm_name = "l4_per_clkdm",
1625 .parent = &sys_32k_ck,
1626 .recalc = &followparent_recalc,
1627};
1628
Rajendra Nayak54776052010-02-22 22:09:39 -07001629static struct clk gpio5_ick = {
1630 .name = "gpio5_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001631 .ops = &clkops_omap2_dflt,
1632 .enable_reg = OMAP4430_CM_L4PER_GPIO5_CLKCTRL,
1633 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1634 .clkdm_name = "l4_per_clkdm",
1635 .parent = &l4_div_ck,
1636 .recalc = &followparent_recalc,
1637};
1638
Benoit Cousson1c03f422010-09-27 14:02:55 -06001639static struct clk gpio6_dbclk = {
1640 .name = "gpio6_dbclk",
1641 .ops = &clkops_omap2_dflt,
1642 .enable_reg = OMAP4430_CM_L4PER_GPIO6_CLKCTRL,
1643 .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT,
1644 .clkdm_name = "l4_per_clkdm",
1645 .parent = &sys_32k_ck,
1646 .recalc = &followparent_recalc,
1647};
1648
Rajendra Nayak54776052010-02-22 22:09:39 -07001649static struct clk gpio6_ick = {
1650 .name = "gpio6_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001651 .ops = &clkops_omap2_dflt,
1652 .enable_reg = OMAP4430_CM_L4PER_GPIO6_CLKCTRL,
1653 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1654 .clkdm_name = "l4_per_clkdm",
1655 .parent = &l4_div_ck,
1656 .recalc = &followparent_recalc,
1657};
1658
Rajendra Nayak54776052010-02-22 22:09:39 -07001659static struct clk gpmc_ick = {
1660 .name = "gpmc_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001661 .ops = &clkops_omap2_dflt,
1662 .enable_reg = OMAP4430_CM_L3_2_GPMC_CLKCTRL,
1663 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
Santosh Shilimkar93cac2a2011-07-09 20:42:59 -06001664 .flags = ENABLE_ON_INIT,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001665 .clkdm_name = "l3_2_clkdm",
1666 .parent = &l3_div_ck,
1667 .recalc = &followparent_recalc,
1668};
1669
Benoit Cousson0e433272010-09-27 14:02:54 -06001670static const struct clksel sgx_clk_mux_sel[] = {
Thara Gopinath032b5a72010-12-21 21:08:13 -07001671 { .parent = &dpll_core_m7x2_ck, .rates = div_1_0_rates },
1672 { .parent = &dpll_per_m7x2_ck, .rates = div_1_1_rates },
Rajendra Nayak972c5422009-12-08 18:46:28 -07001673 { .parent = NULL },
1674};
1675
Benoit Cousson0e433272010-09-27 14:02:54 -06001676/* Merged sgx_clk_mux into gpu */
1677static struct clk gpu_fck = {
1678 .name = "gpu_fck",
Thara Gopinath032b5a72010-12-21 21:08:13 -07001679 .parent = &dpll_core_m7x2_ck,
Benoit Cousson0e433272010-09-27 14:02:54 -06001680 .clksel = sgx_clk_mux_sel,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001681 .init = &omap2_init_clksel_parent,
Benoit Cousson0e433272010-09-27 14:02:54 -06001682 .clksel_reg = OMAP4430_CM_GFX_GFX_CLKCTRL,
1683 .clksel_mask = OMAP4430_CLKSEL_SGX_FCLK_MASK,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001684 .ops = &clkops_omap2_dflt,
1685 .recalc = &omap2_clksel_recalc,
Benoit Cousson0e433272010-09-27 14:02:54 -06001686 .enable_reg = OMAP4430_CM_GFX_GFX_CLKCTRL,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001687 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
Benoit Cousson0e433272010-09-27 14:02:54 -06001688 .clkdm_name = "l3_gfx_clkdm",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001689};
1690
Rajendra Nayak54776052010-02-22 22:09:39 -07001691static struct clk hdq1w_fck = {
1692 .name = "hdq1w_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001693 .ops = &clkops_omap2_dflt,
1694 .enable_reg = OMAP4430_CM_L4PER_HDQ1W_CLKCTRL,
1695 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1696 .clkdm_name = "l4_per_clkdm",
1697 .parent = &func_12m_fclk,
1698 .recalc = &followparent_recalc,
1699};
1700
Rajendra Nayak76cf5292010-09-27 14:02:54 -06001701static const struct clksel hsi_fclk_div[] = {
1702 { .parent = &dpll_per_m2x2_ck, .rates = div3_1to4_rates },
1703 { .parent = NULL },
1704};
1705
Rajendra Nayak54776052010-02-22 22:09:39 -07001706/* Merged hsi_fclk into hsi */
Benoit Cousson0e433272010-09-27 14:02:54 -06001707static struct clk hsi_fck = {
1708 .name = "hsi_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001709 .parent = &dpll_per_m2x2_ck,
Rajendra Nayak76cf5292010-09-27 14:02:54 -06001710 .clksel = hsi_fclk_div,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001711 .clksel_reg = OMAP4430_CM_L3INIT_HSI_CLKCTRL,
1712 .clksel_mask = OMAP4430_CLKSEL_24_25_MASK,
1713 .ops = &clkops_omap2_dflt,
1714 .recalc = &omap2_clksel_recalc,
1715 .round_rate = &omap2_clksel_round_rate,
1716 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001717 .enable_reg = OMAP4430_CM_L3INIT_HSI_CLKCTRL,
1718 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1719 .clkdm_name = "l3_init_clkdm",
1720};
1721
Rajendra Nayak54776052010-02-22 22:09:39 -07001722static struct clk i2c1_fck = {
1723 .name = "i2c1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001724 .ops = &clkops_omap2_dflt,
1725 .enable_reg = OMAP4430_CM_L4PER_I2C1_CLKCTRL,
1726 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1727 .clkdm_name = "l4_per_clkdm",
1728 .parent = &func_96m_fclk,
1729 .recalc = &followparent_recalc,
1730};
1731
Rajendra Nayak54776052010-02-22 22:09:39 -07001732static struct clk i2c2_fck = {
1733 .name = "i2c2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001734 .ops = &clkops_omap2_dflt,
1735 .enable_reg = OMAP4430_CM_L4PER_I2C2_CLKCTRL,
1736 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1737 .clkdm_name = "l4_per_clkdm",
1738 .parent = &func_96m_fclk,
1739 .recalc = &followparent_recalc,
1740};
1741
Rajendra Nayak54776052010-02-22 22:09:39 -07001742static struct clk i2c3_fck = {
1743 .name = "i2c3_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001744 .ops = &clkops_omap2_dflt,
1745 .enable_reg = OMAP4430_CM_L4PER_I2C3_CLKCTRL,
1746 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1747 .clkdm_name = "l4_per_clkdm",
1748 .parent = &func_96m_fclk,
1749 .recalc = &followparent_recalc,
1750};
1751
Rajendra Nayak54776052010-02-22 22:09:39 -07001752static struct clk i2c4_fck = {
1753 .name = "i2c4_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001754 .ops = &clkops_omap2_dflt,
1755 .enable_reg = OMAP4430_CM_L4PER_I2C4_CLKCTRL,
1756 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1757 .clkdm_name = "l4_per_clkdm",
1758 .parent = &func_96m_fclk,
1759 .recalc = &followparent_recalc,
1760};
1761
Benoit Cousson0e433272010-09-27 14:02:54 -06001762static struct clk ipu_fck = {
1763 .name = "ipu_fck",
1764 .ops = &clkops_omap2_dflt,
1765 .enable_reg = OMAP4430_CM_DUCATI_DUCATI_CLKCTRL,
1766 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1767 .clkdm_name = "ducati_clkdm",
1768 .parent = &ducati_clk_mux_ck,
1769 .recalc = &followparent_recalc,
1770};
1771
Benoit Cousson1c03f422010-09-27 14:02:55 -06001772static struct clk iss_ctrlclk = {
1773 .name = "iss_ctrlclk",
1774 .ops = &clkops_omap2_dflt,
1775 .enable_reg = OMAP4430_CM_CAM_ISS_CLKCTRL,
1776 .enable_bit = OMAP4430_OPTFCLKEN_CTRLCLK_SHIFT,
1777 .clkdm_name = "iss_clkdm",
1778 .parent = &func_96m_fclk,
1779 .recalc = &followparent_recalc,
1780};
1781
Rajendra Nayak54776052010-02-22 22:09:39 -07001782static struct clk iss_fck = {
1783 .name = "iss_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001784 .ops = &clkops_omap2_dflt,
1785 .enable_reg = OMAP4430_CM_CAM_ISS_CLKCTRL,
1786 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1787 .clkdm_name = "iss_clkdm",
1788 .parent = &ducati_clk_mux_ck,
1789 .recalc = &followparent_recalc,
1790};
1791
Benoit Cousson0e433272010-09-27 14:02:54 -06001792static struct clk iva_fck = {
1793 .name = "iva_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001794 .ops = &clkops_omap2_dflt,
1795 .enable_reg = OMAP4430_CM_IVAHD_IVAHD_CLKCTRL,
1796 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1797 .clkdm_name = "ivahd_clkdm",
Thara Gopinath032b5a72010-12-21 21:08:13 -07001798 .parent = &dpll_iva_m5x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001799 .recalc = &followparent_recalc,
1800};
1801
Benoit Cousson0e433272010-09-27 14:02:54 -06001802static struct clk kbd_fck = {
1803 .name = "kbd_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001804 .ops = &clkops_omap2_dflt,
1805 .enable_reg = OMAP4430_CM_WKUP_KEYBOARD_CLKCTRL,
1806 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1807 .clkdm_name = "l4_wkup_clkdm",
1808 .parent = &sys_32k_ck,
1809 .recalc = &followparent_recalc,
1810};
1811
Benoit Cousson0e433272010-09-27 14:02:54 -06001812static struct clk l3_instr_ick = {
1813 .name = "l3_instr_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001814 .ops = &clkops_omap2_dflt,
1815 .enable_reg = OMAP4430_CM_L3INSTR_L3_INSTR_CLKCTRL,
1816 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
Santosh Shilimkar60a0e5d2010-12-21 22:37:29 -07001817 .flags = ENABLE_ON_INIT,
Benoit Cousson7ecd4222011-07-09 19:14:45 -06001818 .clkdm_name = "l3_instr_clkdm",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001819 .parent = &l3_div_ck,
1820 .recalc = &followparent_recalc,
1821};
1822
Benoit Cousson0e433272010-09-27 14:02:54 -06001823static struct clk l3_main_3_ick = {
1824 .name = "l3_main_3_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001825 .ops = &clkops_omap2_dflt,
1826 .enable_reg = OMAP4430_CM_L3INSTR_L3_3_CLKCTRL,
1827 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
Santosh Shilimkar60a0e5d2010-12-21 22:37:29 -07001828 .flags = ENABLE_ON_INIT,
Benoit Cousson7ecd4222011-07-09 19:14:45 -06001829 .clkdm_name = "l3_instr_clkdm",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001830 .parent = &l3_div_ck,
1831 .recalc = &followparent_recalc,
1832};
1833
1834static struct clk mcasp_sync_mux_ck = {
1835 .name = "mcasp_sync_mux_ck",
1836 .parent = &abe_24m_fclk,
1837 .clksel = dmic_sync_mux_sel,
1838 .init = &omap2_init_clksel_parent,
1839 .clksel_reg = OMAP4430_CM1_ABE_MCASP_CLKCTRL,
1840 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1841 .ops = &clkops_null,
1842 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001843};
1844
1845static const struct clksel func_mcasp_abe_gfclk_sel[] = {
1846 { .parent = &mcasp_sync_mux_ck, .rates = div_1_0_rates },
1847 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1848 { .parent = &slimbus_clk, .rates = div_1_2_rates },
1849 { .parent = NULL },
1850};
1851
Rajendra Nayak54776052010-02-22 22:09:39 -07001852/* Merged func_mcasp_abe_gfclk into mcasp */
1853static struct clk mcasp_fck = {
1854 .name = "mcasp_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001855 .parent = &mcasp_sync_mux_ck,
1856 .clksel = func_mcasp_abe_gfclk_sel,
1857 .init = &omap2_init_clksel_parent,
1858 .clksel_reg = OMAP4430_CM1_ABE_MCASP_CLKCTRL,
1859 .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK,
1860 .ops = &clkops_omap2_dflt,
1861 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001862 .enable_reg = OMAP4430_CM1_ABE_MCASP_CLKCTRL,
1863 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1864 .clkdm_name = "abe_clkdm",
1865};
1866
1867static struct clk mcbsp1_sync_mux_ck = {
1868 .name = "mcbsp1_sync_mux_ck",
1869 .parent = &abe_24m_fclk,
1870 .clksel = dmic_sync_mux_sel,
1871 .init = &omap2_init_clksel_parent,
1872 .clksel_reg = OMAP4430_CM1_ABE_MCBSP1_CLKCTRL,
1873 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1874 .ops = &clkops_null,
1875 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001876};
1877
1878static const struct clksel func_mcbsp1_gfclk_sel[] = {
1879 { .parent = &mcbsp1_sync_mux_ck, .rates = div_1_0_rates },
1880 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1881 { .parent = &slimbus_clk, .rates = div_1_2_rates },
1882 { .parent = NULL },
1883};
1884
Rajendra Nayak54776052010-02-22 22:09:39 -07001885/* Merged func_mcbsp1_gfclk into mcbsp1 */
1886static struct clk mcbsp1_fck = {
1887 .name = "mcbsp1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001888 .parent = &mcbsp1_sync_mux_ck,
1889 .clksel = func_mcbsp1_gfclk_sel,
1890 .init = &omap2_init_clksel_parent,
1891 .clksel_reg = OMAP4430_CM1_ABE_MCBSP1_CLKCTRL,
1892 .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK,
1893 .ops = &clkops_omap2_dflt,
1894 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001895 .enable_reg = OMAP4430_CM1_ABE_MCBSP1_CLKCTRL,
1896 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1897 .clkdm_name = "abe_clkdm",
1898};
1899
1900static struct clk mcbsp2_sync_mux_ck = {
1901 .name = "mcbsp2_sync_mux_ck",
1902 .parent = &abe_24m_fclk,
1903 .clksel = dmic_sync_mux_sel,
1904 .init = &omap2_init_clksel_parent,
1905 .clksel_reg = OMAP4430_CM1_ABE_MCBSP2_CLKCTRL,
1906 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1907 .ops = &clkops_null,
1908 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001909};
1910
1911static const struct clksel func_mcbsp2_gfclk_sel[] = {
1912 { .parent = &mcbsp2_sync_mux_ck, .rates = div_1_0_rates },
1913 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1914 { .parent = &slimbus_clk, .rates = div_1_2_rates },
1915 { .parent = NULL },
1916};
1917
Rajendra Nayak54776052010-02-22 22:09:39 -07001918/* Merged func_mcbsp2_gfclk into mcbsp2 */
1919static struct clk mcbsp2_fck = {
1920 .name = "mcbsp2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001921 .parent = &mcbsp2_sync_mux_ck,
1922 .clksel = func_mcbsp2_gfclk_sel,
1923 .init = &omap2_init_clksel_parent,
1924 .clksel_reg = OMAP4430_CM1_ABE_MCBSP2_CLKCTRL,
1925 .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK,
1926 .ops = &clkops_omap2_dflt,
1927 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001928 .enable_reg = OMAP4430_CM1_ABE_MCBSP2_CLKCTRL,
1929 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1930 .clkdm_name = "abe_clkdm",
1931};
1932
1933static struct clk mcbsp3_sync_mux_ck = {
1934 .name = "mcbsp3_sync_mux_ck",
1935 .parent = &abe_24m_fclk,
1936 .clksel = dmic_sync_mux_sel,
1937 .init = &omap2_init_clksel_parent,
1938 .clksel_reg = OMAP4430_CM1_ABE_MCBSP3_CLKCTRL,
1939 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1940 .ops = &clkops_null,
1941 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001942};
1943
1944static const struct clksel func_mcbsp3_gfclk_sel[] = {
1945 { .parent = &mcbsp3_sync_mux_ck, .rates = div_1_0_rates },
1946 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1947 { .parent = &slimbus_clk, .rates = div_1_2_rates },
1948 { .parent = NULL },
1949};
1950
Rajendra Nayak54776052010-02-22 22:09:39 -07001951/* Merged func_mcbsp3_gfclk into mcbsp3 */
1952static struct clk mcbsp3_fck = {
1953 .name = "mcbsp3_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001954 .parent = &mcbsp3_sync_mux_ck,
1955 .clksel = func_mcbsp3_gfclk_sel,
1956 .init = &omap2_init_clksel_parent,
1957 .clksel_reg = OMAP4430_CM1_ABE_MCBSP3_CLKCTRL,
1958 .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK,
1959 .ops = &clkops_omap2_dflt,
1960 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001961 .enable_reg = OMAP4430_CM1_ABE_MCBSP3_CLKCTRL,
1962 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1963 .clkdm_name = "abe_clkdm",
1964};
1965
Jon Hunterde474532011-07-09 19:14:47 -06001966static const struct clksel mcbsp4_sync_mux_sel[] = {
1967 { .parent = &func_96m_fclk, .rates = div_1_0_rates },
1968 { .parent = &per_abe_nc_fclk, .rates = div_1_1_rates },
1969 { .parent = NULL },
1970};
1971
Rajendra Nayak972c5422009-12-08 18:46:28 -07001972static struct clk mcbsp4_sync_mux_ck = {
1973 .name = "mcbsp4_sync_mux_ck",
1974 .parent = &func_96m_fclk,
Jon Hunterde474532011-07-09 19:14:47 -06001975 .clksel = mcbsp4_sync_mux_sel,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001976 .init = &omap2_init_clksel_parent,
1977 .clksel_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL,
1978 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1979 .ops = &clkops_null,
1980 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001981};
1982
1983static const struct clksel per_mcbsp4_gfclk_sel[] = {
1984 { .parent = &mcbsp4_sync_mux_ck, .rates = div_1_0_rates },
1985 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1986 { .parent = NULL },
1987};
1988
Rajendra Nayak54776052010-02-22 22:09:39 -07001989/* Merged per_mcbsp4_gfclk into mcbsp4 */
1990static struct clk mcbsp4_fck = {
1991 .name = "mcbsp4_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07001992 .parent = &mcbsp4_sync_mux_ck,
1993 .clksel = per_mcbsp4_gfclk_sel,
1994 .init = &omap2_init_clksel_parent,
1995 .clksel_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL,
1996 .clksel_mask = OMAP4430_CLKSEL_SOURCE_24_24_MASK,
1997 .ops = &clkops_omap2_dflt,
1998 .recalc = &omap2_clksel_recalc,
Rajendra Nayak972c5422009-12-08 18:46:28 -07001999 .enable_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL,
2000 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2001 .clkdm_name = "l4_per_clkdm",
2002};
2003
Benoit Cousson0e433272010-09-27 14:02:54 -06002004static struct clk mcpdm_fck = {
2005 .name = "mcpdm_fck",
2006 .ops = &clkops_omap2_dflt,
2007 .enable_reg = OMAP4430_CM1_ABE_PDM_CLKCTRL,
2008 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2009 .clkdm_name = "abe_clkdm",
2010 .parent = &pad_clks_ck,
2011 .recalc = &followparent_recalc,
2012};
2013
Rajendra Nayak54776052010-02-22 22:09:39 -07002014static struct clk mcspi1_fck = {
2015 .name = "mcspi1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002016 .ops = &clkops_omap2_dflt,
2017 .enable_reg = OMAP4430_CM_L4PER_MCSPI1_CLKCTRL,
2018 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2019 .clkdm_name = "l4_per_clkdm",
2020 .parent = &func_48m_fclk,
2021 .recalc = &followparent_recalc,
2022};
2023
Rajendra Nayak54776052010-02-22 22:09:39 -07002024static struct clk mcspi2_fck = {
2025 .name = "mcspi2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002026 .ops = &clkops_omap2_dflt,
2027 .enable_reg = OMAP4430_CM_L4PER_MCSPI2_CLKCTRL,
2028 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2029 .clkdm_name = "l4_per_clkdm",
2030 .parent = &func_48m_fclk,
2031 .recalc = &followparent_recalc,
2032};
2033
Rajendra Nayak54776052010-02-22 22:09:39 -07002034static struct clk mcspi3_fck = {
2035 .name = "mcspi3_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002036 .ops = &clkops_omap2_dflt,
2037 .enable_reg = OMAP4430_CM_L4PER_MCSPI3_CLKCTRL,
2038 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2039 .clkdm_name = "l4_per_clkdm",
2040 .parent = &func_48m_fclk,
2041 .recalc = &followparent_recalc,
2042};
2043
Rajendra Nayak54776052010-02-22 22:09:39 -07002044static struct clk mcspi4_fck = {
2045 .name = "mcspi4_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002046 .ops = &clkops_omap2_dflt,
2047 .enable_reg = OMAP4430_CM_L4PER_MCSPI4_CLKCTRL,
2048 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2049 .clkdm_name = "l4_per_clkdm",
2050 .parent = &func_48m_fclk,
2051 .recalc = &followparent_recalc,
2052};
2053
Jon Hunterde474532011-07-09 19:14:47 -06002054static const struct clksel hsmmc1_fclk_sel[] = {
2055 { .parent = &func_64m_fclk, .rates = div_1_0_rates },
2056 { .parent = &func_96m_fclk, .rates = div_1_1_rates },
2057 { .parent = NULL },
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,
Jon Hunterde474532011-07-09 19:14:47 -06002064 .clksel = hsmmc1_fclk_sel,
Rajendra Nayak972c5422009-12-08 18:46:28 -07002065 .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,
Jon Hunterde474532011-07-09 19:14:47 -06002079 .clksel = hsmmc1_fclk_sel,
Rajendra Nayak972c5422009-12-08 18:46:28 -07002080 .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,
Santosh Shilimkar60a0e5d2010-12-21 22:37:29 -07002145 .flags = ENABLE_ON_INIT,
Benoit Cousson7ecd4222011-07-09 19:14:45 -06002146 .clkdm_name = "l3_instr_clkdm",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002147 .parent = &l3_div_ck,
2148 .recalc = &followparent_recalc,
2149};
2150
Rajendra Nayak54776052010-02-22 22:09:39 -07002151static struct clk rng_ick = {
2152 .name = "rng_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002153 .ops = &clkops_omap2_dflt,
2154 .enable_reg = OMAP4430_CM_L4SEC_RNG_CLKCTRL,
2155 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2156 .clkdm_name = "l4_secure_clkdm",
2157 .parent = &l4_div_ck,
2158 .recalc = &followparent_recalc,
2159};
2160
Benoit Cousson0e433272010-09-27 14:02:54 -06002161static struct clk sha2md5_fck = {
2162 .name = "sha2md5_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002163 .ops = &clkops_omap2_dflt,
2164 .enable_reg = OMAP4430_CM_L4SEC_SHA2MD51_CLKCTRL,
2165 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2166 .clkdm_name = "l4_secure_clkdm",
2167 .parent = &l3_div_ck,
2168 .recalc = &followparent_recalc,
2169};
2170
Benoit Cousson0e433272010-09-27 14:02:54 -06002171static struct clk sl2if_ick = {
2172 .name = "sl2if_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002173 .ops = &clkops_omap2_dflt,
2174 .enable_reg = OMAP4430_CM_IVAHD_SL2_CLKCTRL,
2175 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2176 .clkdm_name = "ivahd_clkdm",
Thara Gopinath032b5a72010-12-21 21:08:13 -07002177 .parent = &dpll_iva_m5x2_ck,
Rajendra Nayak972c5422009-12-08 18:46:28 -07002178 .recalc = &followparent_recalc,
2179};
2180
Benoit Cousson1c03f422010-09-27 14:02:55 -06002181static struct clk slimbus1_fclk_1 = {
2182 .name = "slimbus1_fclk_1",
2183 .ops = &clkops_omap2_dflt,
2184 .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL,
2185 .enable_bit = OMAP4430_OPTFCLKEN_FCLK1_SHIFT,
2186 .clkdm_name = "abe_clkdm",
2187 .parent = &func_24m_clk,
2188 .recalc = &followparent_recalc,
2189};
2190
2191static struct clk slimbus1_fclk_0 = {
2192 .name = "slimbus1_fclk_0",
2193 .ops = &clkops_omap2_dflt,
2194 .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL,
2195 .enable_bit = OMAP4430_OPTFCLKEN_FCLK0_SHIFT,
2196 .clkdm_name = "abe_clkdm",
2197 .parent = &abe_24m_fclk,
2198 .recalc = &followparent_recalc,
2199};
2200
2201static struct clk slimbus1_fclk_2 = {
2202 .name = "slimbus1_fclk_2",
2203 .ops = &clkops_omap2_dflt,
2204 .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL,
2205 .enable_bit = OMAP4430_OPTFCLKEN_FCLK2_SHIFT,
2206 .clkdm_name = "abe_clkdm",
2207 .parent = &pad_clks_ck,
2208 .recalc = &followparent_recalc,
2209};
2210
2211static struct clk slimbus1_slimbus_clk = {
2212 .name = "slimbus1_slimbus_clk",
2213 .ops = &clkops_omap2_dflt,
2214 .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL,
2215 .enable_bit = OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_SHIFT,
2216 .clkdm_name = "abe_clkdm",
2217 .parent = &slimbus_clk,
2218 .recalc = &followparent_recalc,
2219};
2220
Rajendra Nayak54776052010-02-22 22:09:39 -07002221static struct clk slimbus1_fck = {
2222 .name = "slimbus1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002223 .ops = &clkops_omap2_dflt,
2224 .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL,
2225 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2226 .clkdm_name = "abe_clkdm",
2227 .parent = &ocp_abe_iclk,
2228 .recalc = &followparent_recalc,
2229};
2230
Benoit Cousson1c03f422010-09-27 14:02:55 -06002231static struct clk slimbus2_fclk_1 = {
2232 .name = "slimbus2_fclk_1",
2233 .ops = &clkops_omap2_dflt,
2234 .enable_reg = OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL,
2235 .enable_bit = OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_SHIFT,
2236 .clkdm_name = "l4_per_clkdm",
2237 .parent = &per_abe_24m_fclk,
2238 .recalc = &followparent_recalc,
2239};
2240
2241static struct clk slimbus2_fclk_0 = {
2242 .name = "slimbus2_fclk_0",
2243 .ops = &clkops_omap2_dflt,
2244 .enable_reg = OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL,
2245 .enable_bit = OMAP4430_OPTFCLKEN_PER24MC_GFCLK_SHIFT,
2246 .clkdm_name = "l4_per_clkdm",
2247 .parent = &func_24mc_fclk,
2248 .recalc = &followparent_recalc,
2249};
2250
2251static struct clk slimbus2_slimbus_clk = {
2252 .name = "slimbus2_slimbus_clk",
2253 .ops = &clkops_omap2_dflt,
2254 .enable_reg = OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL,
2255 .enable_bit = OMAP4430_OPTFCLKEN_SLIMBUS_CLK_SHIFT,
2256 .clkdm_name = "l4_per_clkdm",
2257 .parent = &pad_slimbus_core_clks_ck,
2258 .recalc = &followparent_recalc,
2259};
2260
Rajendra Nayak54776052010-02-22 22:09:39 -07002261static struct clk slimbus2_fck = {
2262 .name = "slimbus2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002263 .ops = &clkops_omap2_dflt,
2264 .enable_reg = OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL,
2265 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2266 .clkdm_name = "l4_per_clkdm",
2267 .parent = &l4_div_ck,
2268 .recalc = &followparent_recalc,
2269};
2270
Benoit Cousson0e433272010-09-27 14:02:54 -06002271static struct clk smartreflex_core_fck = {
2272 .name = "smartreflex_core_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002273 .ops = &clkops_omap2_dflt,
2274 .enable_reg = OMAP4430_CM_ALWON_SR_CORE_CLKCTRL,
2275 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2276 .clkdm_name = "l4_ao_clkdm",
2277 .parent = &l4_wkup_clk_mux_ck,
2278 .recalc = &followparent_recalc,
2279};
2280
Benoit Cousson0e433272010-09-27 14:02:54 -06002281static struct clk smartreflex_iva_fck = {
2282 .name = "smartreflex_iva_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002283 .ops = &clkops_omap2_dflt,
2284 .enable_reg = OMAP4430_CM_ALWON_SR_IVA_CLKCTRL,
2285 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2286 .clkdm_name = "l4_ao_clkdm",
2287 .parent = &l4_wkup_clk_mux_ck,
2288 .recalc = &followparent_recalc,
2289};
2290
Benoit Cousson0e433272010-09-27 14:02:54 -06002291static struct clk smartreflex_mpu_fck = {
2292 .name = "smartreflex_mpu_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002293 .ops = &clkops_omap2_dflt,
2294 .enable_reg = OMAP4430_CM_ALWON_SR_MPU_CLKCTRL,
2295 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2296 .clkdm_name = "l4_ao_clkdm",
2297 .parent = &l4_wkup_clk_mux_ck,
2298 .recalc = &followparent_recalc,
2299};
2300
Benoit Cousson0e433272010-09-27 14:02:54 -06002301/* Merged dmt1_clk_mux into timer1 */
2302static struct clk timer1_fck = {
2303 .name = "timer1_fck",
2304 .parent = &sys_clkin_ck,
2305 .clksel = abe_dpll_bypass_clk_mux_sel,
2306 .init = &omap2_init_clksel_parent,
2307 .clksel_reg = OMAP4430_CM_WKUP_TIMER1_CLKCTRL,
2308 .clksel_mask = OMAP4430_CLKSEL_MASK,
Rajendra Nayak972c5422009-12-08 18:46:28 -07002309 .ops = &clkops_omap2_dflt,
Benoit Cousson0e433272010-09-27 14:02:54 -06002310 .recalc = &omap2_clksel_recalc,
2311 .enable_reg = OMAP4430_CM_WKUP_TIMER1_CLKCTRL,
2312 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2313 .clkdm_name = "l4_wkup_clkdm",
2314};
2315
2316/* Merged cm2_dm10_mux into timer10 */
2317static struct clk timer10_fck = {
2318 .name = "timer10_fck",
2319 .parent = &sys_clkin_ck,
2320 .clksel = abe_dpll_bypass_clk_mux_sel,
2321 .init = &omap2_init_clksel_parent,
2322 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER10_CLKCTRL,
2323 .clksel_mask = OMAP4430_CLKSEL_MASK,
2324 .ops = &clkops_omap2_dflt,
2325 .recalc = &omap2_clksel_recalc,
2326 .enable_reg = OMAP4430_CM_L4PER_DMTIMER10_CLKCTRL,
2327 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2328 .clkdm_name = "l4_per_clkdm",
2329};
2330
2331/* Merged cm2_dm11_mux into timer11 */
2332static struct clk timer11_fck = {
2333 .name = "timer11_fck",
2334 .parent = &sys_clkin_ck,
2335 .clksel = abe_dpll_bypass_clk_mux_sel,
2336 .init = &omap2_init_clksel_parent,
2337 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER11_CLKCTRL,
2338 .clksel_mask = OMAP4430_CLKSEL_MASK,
2339 .ops = &clkops_omap2_dflt,
2340 .recalc = &omap2_clksel_recalc,
2341 .enable_reg = OMAP4430_CM_L4PER_DMTIMER11_CLKCTRL,
2342 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2343 .clkdm_name = "l4_per_clkdm",
2344};
2345
2346/* Merged cm2_dm2_mux into timer2 */
2347static struct clk timer2_fck = {
2348 .name = "timer2_fck",
2349 .parent = &sys_clkin_ck,
2350 .clksel = abe_dpll_bypass_clk_mux_sel,
2351 .init = &omap2_init_clksel_parent,
2352 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER2_CLKCTRL,
2353 .clksel_mask = OMAP4430_CLKSEL_MASK,
2354 .ops = &clkops_omap2_dflt,
2355 .recalc = &omap2_clksel_recalc,
2356 .enable_reg = OMAP4430_CM_L4PER_DMTIMER2_CLKCTRL,
2357 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2358 .clkdm_name = "l4_per_clkdm",
2359};
2360
2361/* Merged cm2_dm3_mux into timer3 */
2362static struct clk timer3_fck = {
2363 .name = "timer3_fck",
2364 .parent = &sys_clkin_ck,
2365 .clksel = abe_dpll_bypass_clk_mux_sel,
2366 .init = &omap2_init_clksel_parent,
2367 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER3_CLKCTRL,
2368 .clksel_mask = OMAP4430_CLKSEL_MASK,
2369 .ops = &clkops_omap2_dflt,
2370 .recalc = &omap2_clksel_recalc,
2371 .enable_reg = OMAP4430_CM_L4PER_DMTIMER3_CLKCTRL,
2372 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2373 .clkdm_name = "l4_per_clkdm",
2374};
2375
2376/* Merged cm2_dm4_mux into timer4 */
2377static struct clk timer4_fck = {
2378 .name = "timer4_fck",
2379 .parent = &sys_clkin_ck,
2380 .clksel = abe_dpll_bypass_clk_mux_sel,
2381 .init = &omap2_init_clksel_parent,
2382 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER4_CLKCTRL,
2383 .clksel_mask = OMAP4430_CLKSEL_MASK,
2384 .ops = &clkops_omap2_dflt,
2385 .recalc = &omap2_clksel_recalc,
2386 .enable_reg = OMAP4430_CM_L4PER_DMTIMER4_CLKCTRL,
2387 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2388 .clkdm_name = "l4_per_clkdm",
2389};
2390
2391static const struct clksel timer5_sync_mux_sel[] = {
2392 { .parent = &syc_clk_div_ck, .rates = div_1_0_rates },
2393 { .parent = &sys_32k_ck, .rates = div_1_1_rates },
2394 { .parent = NULL },
2395};
2396
2397/* Merged timer5_sync_mux into timer5 */
2398static struct clk timer5_fck = {
2399 .name = "timer5_fck",
2400 .parent = &syc_clk_div_ck,
2401 .clksel = timer5_sync_mux_sel,
2402 .init = &omap2_init_clksel_parent,
2403 .clksel_reg = OMAP4430_CM1_ABE_TIMER5_CLKCTRL,
2404 .clksel_mask = OMAP4430_CLKSEL_MASK,
2405 .ops = &clkops_omap2_dflt,
2406 .recalc = &omap2_clksel_recalc,
2407 .enable_reg = OMAP4430_CM1_ABE_TIMER5_CLKCTRL,
2408 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2409 .clkdm_name = "abe_clkdm",
2410};
2411
2412/* Merged timer6_sync_mux into timer6 */
2413static struct clk timer6_fck = {
2414 .name = "timer6_fck",
2415 .parent = &syc_clk_div_ck,
2416 .clksel = timer5_sync_mux_sel,
2417 .init = &omap2_init_clksel_parent,
2418 .clksel_reg = OMAP4430_CM1_ABE_TIMER6_CLKCTRL,
2419 .clksel_mask = OMAP4430_CLKSEL_MASK,
2420 .ops = &clkops_omap2_dflt,
2421 .recalc = &omap2_clksel_recalc,
2422 .enable_reg = OMAP4430_CM1_ABE_TIMER6_CLKCTRL,
2423 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2424 .clkdm_name = "abe_clkdm",
2425};
2426
2427/* Merged timer7_sync_mux into timer7 */
2428static struct clk timer7_fck = {
2429 .name = "timer7_fck",
2430 .parent = &syc_clk_div_ck,
2431 .clksel = timer5_sync_mux_sel,
2432 .init = &omap2_init_clksel_parent,
2433 .clksel_reg = OMAP4430_CM1_ABE_TIMER7_CLKCTRL,
2434 .clksel_mask = OMAP4430_CLKSEL_MASK,
2435 .ops = &clkops_omap2_dflt,
2436 .recalc = &omap2_clksel_recalc,
2437 .enable_reg = OMAP4430_CM1_ABE_TIMER7_CLKCTRL,
2438 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2439 .clkdm_name = "abe_clkdm",
2440};
2441
2442/* Merged timer8_sync_mux into timer8 */
2443static struct clk timer8_fck = {
2444 .name = "timer8_fck",
2445 .parent = &syc_clk_div_ck,
2446 .clksel = timer5_sync_mux_sel,
2447 .init = &omap2_init_clksel_parent,
2448 .clksel_reg = OMAP4430_CM1_ABE_TIMER8_CLKCTRL,
2449 .clksel_mask = OMAP4430_CLKSEL_MASK,
2450 .ops = &clkops_omap2_dflt,
2451 .recalc = &omap2_clksel_recalc,
2452 .enable_reg = OMAP4430_CM1_ABE_TIMER8_CLKCTRL,
2453 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2454 .clkdm_name = "abe_clkdm",
2455};
2456
2457/* Merged cm2_dm9_mux into timer9 */
2458static struct clk timer9_fck = {
2459 .name = "timer9_fck",
2460 .parent = &sys_clkin_ck,
2461 .clksel = abe_dpll_bypass_clk_mux_sel,
2462 .init = &omap2_init_clksel_parent,
2463 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER9_CLKCTRL,
2464 .clksel_mask = OMAP4430_CLKSEL_MASK,
2465 .ops = &clkops_omap2_dflt,
2466 .recalc = &omap2_clksel_recalc,
2467 .enable_reg = OMAP4430_CM_L4PER_DMTIMER9_CLKCTRL,
2468 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2469 .clkdm_name = "l4_per_clkdm",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002470};
2471
Rajendra Nayak54776052010-02-22 22:09:39 -07002472static struct clk uart1_fck = {
2473 .name = "uart1_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002474 .ops = &clkops_omap2_dflt,
2475 .enable_reg = OMAP4430_CM_L4PER_UART1_CLKCTRL,
2476 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2477 .clkdm_name = "l4_per_clkdm",
2478 .parent = &func_48m_fclk,
2479 .recalc = &followparent_recalc,
2480};
2481
Rajendra Nayak54776052010-02-22 22:09:39 -07002482static struct clk uart2_fck = {
2483 .name = "uart2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002484 .ops = &clkops_omap2_dflt,
2485 .enable_reg = OMAP4430_CM_L4PER_UART2_CLKCTRL,
2486 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2487 .clkdm_name = "l4_per_clkdm",
2488 .parent = &func_48m_fclk,
2489 .recalc = &followparent_recalc,
2490};
2491
Rajendra Nayak54776052010-02-22 22:09:39 -07002492static struct clk uart3_fck = {
2493 .name = "uart3_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002494 .ops = &clkops_omap2_dflt,
2495 .enable_reg = OMAP4430_CM_L4PER_UART3_CLKCTRL,
2496 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2497 .clkdm_name = "l4_per_clkdm",
2498 .parent = &func_48m_fclk,
2499 .recalc = &followparent_recalc,
2500};
2501
Rajendra Nayak54776052010-02-22 22:09:39 -07002502static struct clk uart4_fck = {
2503 .name = "uart4_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002504 .ops = &clkops_omap2_dflt,
2505 .enable_reg = OMAP4430_CM_L4PER_UART4_CLKCTRL,
2506 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2507 .clkdm_name = "l4_per_clkdm",
2508 .parent = &func_48m_fclk,
2509 .recalc = &followparent_recalc,
2510};
2511
Rajendra Nayak54776052010-02-22 22:09:39 -07002512static struct clk usb_host_fs_fck = {
2513 .name = "usb_host_fs_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002514 .ops = &clkops_omap2_dflt,
2515 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_FS_CLKCTRL,
2516 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2517 .clkdm_name = "l3_init_clkdm",
2518 .parent = &func_48mc_fclk,
2519 .recalc = &followparent_recalc,
2520};
2521
Benoit Cousson1c03f422010-09-27 14:02:55 -06002522static const struct clksel utmi_p1_gfclk_sel[] = {
2523 { .parent = &init_60m_fclk, .rates = div_1_0_rates },
2524 { .parent = &xclk60mhsp1_ck, .rates = div_1_1_rates },
2525 { .parent = NULL },
2526};
2527
2528static struct clk utmi_p1_gfclk = {
2529 .name = "utmi_p1_gfclk",
2530 .parent = &init_60m_fclk,
2531 .clksel = utmi_p1_gfclk_sel,
2532 .init = &omap2_init_clksel_parent,
2533 .clksel_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2534 .clksel_mask = OMAP4430_CLKSEL_UTMI_P1_MASK,
2535 .ops = &clkops_null,
2536 .recalc = &omap2_clksel_recalc,
2537};
2538
2539static struct clk usb_host_hs_utmi_p1_clk = {
2540 .name = "usb_host_hs_utmi_p1_clk",
2541 .ops = &clkops_omap2_dflt,
2542 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2543 .enable_bit = OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT,
2544 .clkdm_name = "l3_init_clkdm",
2545 .parent = &utmi_p1_gfclk,
2546 .recalc = &followparent_recalc,
2547};
2548
2549static const struct clksel utmi_p2_gfclk_sel[] = {
2550 { .parent = &init_60m_fclk, .rates = div_1_0_rates },
2551 { .parent = &xclk60mhsp2_ck, .rates = div_1_1_rates },
2552 { .parent = NULL },
2553};
2554
2555static struct clk utmi_p2_gfclk = {
2556 .name = "utmi_p2_gfclk",
2557 .parent = &init_60m_fclk,
2558 .clksel = utmi_p2_gfclk_sel,
2559 .init = &omap2_init_clksel_parent,
2560 .clksel_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2561 .clksel_mask = OMAP4430_CLKSEL_UTMI_P2_MASK,
2562 .ops = &clkops_null,
2563 .recalc = &omap2_clksel_recalc,
2564};
2565
2566static struct clk usb_host_hs_utmi_p2_clk = {
2567 .name = "usb_host_hs_utmi_p2_clk",
2568 .ops = &clkops_omap2_dflt,
2569 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2570 .enable_bit = OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT,
2571 .clkdm_name = "l3_init_clkdm",
2572 .parent = &utmi_p2_gfclk,
2573 .recalc = &followparent_recalc,
2574};
2575
Thara Gopinath032b5a72010-12-21 21:08:13 -07002576static struct clk usb_host_hs_utmi_p3_clk = {
2577 .name = "usb_host_hs_utmi_p3_clk",
2578 .ops = &clkops_omap2_dflt,
2579 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2580 .enable_bit = OMAP4430_OPTFCLKEN_UTMI_P3_CLK_SHIFT,
2581 .clkdm_name = "l3_init_clkdm",
2582 .parent = &init_60m_fclk,
2583 .recalc = &followparent_recalc,
2584};
2585
Benoit Cousson1c03f422010-09-27 14:02:55 -06002586static struct clk usb_host_hs_hsic480m_p1_clk = {
2587 .name = "usb_host_hs_hsic480m_p1_clk",
2588 .ops = &clkops_omap2_dflt,
2589 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2590 .enable_bit = OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT,
2591 .clkdm_name = "l3_init_clkdm",
2592 .parent = &dpll_usb_m2_ck,
2593 .recalc = &followparent_recalc,
2594};
2595
Thara Gopinath032b5a72010-12-21 21:08:13 -07002596static struct clk usb_host_hs_hsic60m_p1_clk = {
2597 .name = "usb_host_hs_hsic60m_p1_clk",
2598 .ops = &clkops_omap2_dflt,
2599 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2600 .enable_bit = OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT,
2601 .clkdm_name = "l3_init_clkdm",
2602 .parent = &init_60m_fclk,
2603 .recalc = &followparent_recalc,
2604};
2605
2606static struct clk usb_host_hs_hsic60m_p2_clk = {
2607 .name = "usb_host_hs_hsic60m_p2_clk",
2608 .ops = &clkops_omap2_dflt,
2609 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2610 .enable_bit = OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT,
2611 .clkdm_name = "l3_init_clkdm",
2612 .parent = &init_60m_fclk,
2613 .recalc = &followparent_recalc,
2614};
2615
Benoit Cousson1c03f422010-09-27 14:02:55 -06002616static struct clk usb_host_hs_hsic480m_p2_clk = {
2617 .name = "usb_host_hs_hsic480m_p2_clk",
2618 .ops = &clkops_omap2_dflt,
2619 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2620 .enable_bit = OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT,
2621 .clkdm_name = "l3_init_clkdm",
2622 .parent = &dpll_usb_m2_ck,
2623 .recalc = &followparent_recalc,
2624};
2625
2626static struct clk usb_host_hs_func48mclk = {
2627 .name = "usb_host_hs_func48mclk",
2628 .ops = &clkops_omap2_dflt,
2629 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2630 .enable_bit = OMAP4430_OPTFCLKEN_FUNC48MCLK_SHIFT,
2631 .clkdm_name = "l3_init_clkdm",
2632 .parent = &func_48mc_fclk,
2633 .recalc = &followparent_recalc,
2634};
2635
Benoit Cousson0e433272010-09-27 14:02:54 -06002636static struct clk usb_host_hs_fck = {
2637 .name = "usb_host_hs_fck",
2638 .ops = &clkops_omap2_dflt,
2639 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2640 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2641 .clkdm_name = "l3_init_clkdm",
2642 .parent = &init_60m_fclk,
2643 .recalc = &followparent_recalc,
2644};
2645
Benoit Cousson1c03f422010-09-27 14:02:55 -06002646static const struct clksel otg_60m_gfclk_sel[] = {
2647 { .parent = &utmi_phy_clkout_ck, .rates = div_1_0_rates },
2648 { .parent = &xclk60motg_ck, .rates = div_1_1_rates },
2649 { .parent = NULL },
2650};
2651
2652static struct clk otg_60m_gfclk = {
2653 .name = "otg_60m_gfclk",
2654 .parent = &utmi_phy_clkout_ck,
2655 .clksel = otg_60m_gfclk_sel,
2656 .init = &omap2_init_clksel_parent,
2657 .clksel_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL,
2658 .clksel_mask = OMAP4430_CLKSEL_60M_MASK,
2659 .ops = &clkops_null,
2660 .recalc = &omap2_clksel_recalc,
2661};
2662
2663static struct clk usb_otg_hs_xclk = {
2664 .name = "usb_otg_hs_xclk",
2665 .ops = &clkops_omap2_dflt,
2666 .enable_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL,
2667 .enable_bit = OMAP4430_OPTFCLKEN_XCLK_SHIFT,
2668 .clkdm_name = "l3_init_clkdm",
2669 .parent = &otg_60m_gfclk,
2670 .recalc = &followparent_recalc,
2671};
2672
Benoit Cousson0e433272010-09-27 14:02:54 -06002673static struct clk usb_otg_hs_ick = {
2674 .name = "usb_otg_hs_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002675 .ops = &clkops_omap2_dflt,
2676 .enable_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL,
2677 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2678 .clkdm_name = "l3_init_clkdm",
2679 .parent = &l3_div_ck,
2680 .recalc = &followparent_recalc,
2681};
2682
Benoit Cousson0edc9e82010-09-27 14:02:56 -06002683static struct clk usb_phy_cm_clk32k = {
2684 .name = "usb_phy_cm_clk32k",
2685 .ops = &clkops_omap2_dflt,
2686 .enable_reg = OMAP4430_CM_ALWON_USBPHY_CLKCTRL,
2687 .enable_bit = OMAP4430_OPTFCLKEN_CLK32K_SHIFT,
2688 .clkdm_name = "l4_ao_clkdm",
2689 .parent = &sys_32k_ck,
2690 .recalc = &followparent_recalc,
2691};
2692
Benoit Cousson1c03f422010-09-27 14:02:55 -06002693static struct clk usb_tll_hs_usb_ch2_clk = {
2694 .name = "usb_tll_hs_usb_ch2_clk",
2695 .ops = &clkops_omap2_dflt,
2696 .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL,
2697 .enable_bit = OMAP4430_OPTFCLKEN_USB_CH2_CLK_SHIFT,
2698 .clkdm_name = "l3_init_clkdm",
2699 .parent = &init_60m_fclk,
2700 .recalc = &followparent_recalc,
2701};
2702
2703static struct clk usb_tll_hs_usb_ch0_clk = {
2704 .name = "usb_tll_hs_usb_ch0_clk",
2705 .ops = &clkops_omap2_dflt,
2706 .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL,
2707 .enable_bit = OMAP4430_OPTFCLKEN_USB_CH0_CLK_SHIFT,
2708 .clkdm_name = "l3_init_clkdm",
2709 .parent = &init_60m_fclk,
2710 .recalc = &followparent_recalc,
2711};
2712
2713static struct clk usb_tll_hs_usb_ch1_clk = {
2714 .name = "usb_tll_hs_usb_ch1_clk",
2715 .ops = &clkops_omap2_dflt,
2716 .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL,
2717 .enable_bit = OMAP4430_OPTFCLKEN_USB_CH1_CLK_SHIFT,
2718 .clkdm_name = "l3_init_clkdm",
2719 .parent = &init_60m_fclk,
2720 .recalc = &followparent_recalc,
2721};
2722
Benoit Cousson0e433272010-09-27 14:02:54 -06002723static struct clk usb_tll_hs_ick = {
2724 .name = "usb_tll_hs_ick",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002725 .ops = &clkops_omap2_dflt,
2726 .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL,
2727 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2728 .clkdm_name = "l3_init_clkdm",
2729 .parent = &l4_div_ck,
2730 .recalc = &followparent_recalc,
2731};
2732
Benoit Cousson0edc9e82010-09-27 14:02:56 -06002733static const struct clksel_rate div2_14to18_rates[] = {
2734 { .div = 14, .val = 0, .flags = RATE_IN_4430 },
2735 { .div = 18, .val = 1, .flags = RATE_IN_4430 },
2736 { .div = 0 },
2737};
2738
2739static const struct clksel usim_fclk_div[] = {
Thara Gopinath032b5a72010-12-21 21:08:13 -07002740 { .parent = &dpll_per_m4x2_ck, .rates = div2_14to18_rates },
Benoit Cousson0edc9e82010-09-27 14:02:56 -06002741 { .parent = NULL },
2742};
2743
2744static struct clk usim_ck = {
2745 .name = "usim_ck",
Thara Gopinath032b5a72010-12-21 21:08:13 -07002746 .parent = &dpll_per_m4x2_ck,
Benoit Cousson0edc9e82010-09-27 14:02:56 -06002747 .clksel = usim_fclk_div,
2748 .clksel_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL,
2749 .clksel_mask = OMAP4430_CLKSEL_DIV_MASK,
2750 .ops = &clkops_null,
2751 .recalc = &omap2_clksel_recalc,
2752 .round_rate = &omap2_clksel_round_rate,
2753 .set_rate = &omap2_clksel_set_rate,
2754};
2755
2756static struct clk usim_fclk = {
2757 .name = "usim_fclk",
2758 .ops = &clkops_omap2_dflt,
2759 .enable_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL,
2760 .enable_bit = OMAP4430_OPTFCLKEN_FCLK_SHIFT,
2761 .clkdm_name = "l4_wkup_clkdm",
2762 .parent = &usim_ck,
2763 .recalc = &followparent_recalc,
2764};
2765
Benoit Cousson0e433272010-09-27 14:02:54 -06002766static struct clk usim_fck = {
2767 .name = "usim_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002768 .ops = &clkops_omap2_dflt,
2769 .enable_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL,
Rajendra Nayak76cf5292010-09-27 14:02:54 -06002770 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
Rajendra Nayak972c5422009-12-08 18:46:28 -07002771 .clkdm_name = "l4_wkup_clkdm",
2772 .parent = &sys_32k_ck,
2773 .recalc = &followparent_recalc,
2774};
2775
Benoit Cousson0e433272010-09-27 14:02:54 -06002776static struct clk wd_timer2_fck = {
2777 .name = "wd_timer2_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002778 .ops = &clkops_omap2_dflt,
2779 .enable_reg = OMAP4430_CM_WKUP_WDT2_CLKCTRL,
2780 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2781 .clkdm_name = "l4_wkup_clkdm",
2782 .parent = &sys_32k_ck,
2783 .recalc = &followparent_recalc,
2784};
2785
Benoit Cousson0e433272010-09-27 14:02:54 -06002786static struct clk wd_timer3_fck = {
2787 .name = "wd_timer3_fck",
Rajendra Nayak972c5422009-12-08 18:46:28 -07002788 .ops = &clkops_omap2_dflt,
2789 .enable_reg = OMAP4430_CM1_ABE_WDT3_CLKCTRL,
2790 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2791 .clkdm_name = "abe_clkdm",
2792 .parent = &sys_32k_ck,
2793 .recalc = &followparent_recalc,
2794};
2795
2796/* Remaining optional clocks */
Rajendra Nayak972c5422009-12-08 18:46:28 -07002797static const struct clksel stm_clk_div_div[] = {
2798 { .parent = &pmd_stm_clock_mux_ck, .rates = div3_1to4_rates },
2799 { .parent = NULL },
2800};
2801
2802static struct clk stm_clk_div_ck = {
2803 .name = "stm_clk_div_ck",
2804 .parent = &pmd_stm_clock_mux_ck,
2805 .clksel = stm_clk_div_div,
2806 .clksel_reg = OMAP4430_CM_EMU_DEBUGSS_CLKCTRL,
2807 .clksel_mask = OMAP4430_CLKSEL_PMD_STM_CLK_MASK,
2808 .ops = &clkops_null,
2809 .recalc = &omap2_clksel_recalc,
2810 .round_rate = &omap2_clksel_round_rate,
2811 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07002812};
2813
2814static const struct clksel trace_clk_div_div[] = {
2815 { .parent = &pmd_trace_clk_mux_ck, .rates = div3_1to4_rates },
2816 { .parent = NULL },
2817};
2818
2819static struct clk trace_clk_div_ck = {
2820 .name = "trace_clk_div_ck",
2821 .parent = &pmd_trace_clk_mux_ck,
2822 .clksel = trace_clk_div_div,
2823 .clksel_reg = OMAP4430_CM_EMU_DEBUGSS_CLKCTRL,
2824 .clksel_mask = OMAP4430_CLKSEL_PMD_TRACE_CLK_MASK,
2825 .ops = &clkops_null,
2826 .recalc = &omap2_clksel_recalc,
2827 .round_rate = &omap2_clksel_round_rate,
2828 .set_rate = &omap2_clksel_set_rate,
Rajendra Nayak972c5422009-12-08 18:46:28 -07002829};
2830
Rajendra Nayake0cb70c2010-12-21 21:08:14 -07002831/* SCRM aux clk nodes */
2832
Rajendra Nayakad03f1c2011-07-10 05:56:14 -06002833static const struct clksel auxclk_src_sel[] = {
Rajendra Nayake0cb70c2010-12-21 21:08:14 -07002834 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
2835 { .parent = &dpll_core_m3x2_ck, .rates = div_1_1_rates },
2836 { .parent = &dpll_per_m3x2_ck, .rates = div_1_2_rates },
2837 { .parent = NULL },
2838};
2839
Rajendra Nayakad03f1c2011-07-10 05:56:14 -06002840static const struct clksel_rate div16_1to16_rates[] = {
2841 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
2842 { .div = 2, .val = 1, .flags = RATE_IN_4430 },
2843 { .div = 3, .val = 2, .flags = RATE_IN_4430 },
2844 { .div = 4, .val = 3, .flags = RATE_IN_4430 },
2845 { .div = 5, .val = 4, .flags = RATE_IN_4430 },
2846 { .div = 6, .val = 5, .flags = RATE_IN_4430 },
2847 { .div = 7, .val = 6, .flags = RATE_IN_4430 },
2848 { .div = 8, .val = 7, .flags = RATE_IN_4430 },
2849 { .div = 9, .val = 8, .flags = RATE_IN_4430 },
2850 { .div = 10, .val = 9, .flags = RATE_IN_4430 },
2851 { .div = 11, .val = 10, .flags = RATE_IN_4430 },
2852 { .div = 12, .val = 11, .flags = RATE_IN_4430 },
2853 { .div = 13, .val = 12, .flags = RATE_IN_4430 },
2854 { .div = 14, .val = 13, .flags = RATE_IN_4430 },
2855 { .div = 15, .val = 14, .flags = RATE_IN_4430 },
2856 { .div = 16, .val = 15, .flags = RATE_IN_4430 },
2857 { .div = 0 },
2858};
2859
2860static struct clk auxclk0_src_ck = {
2861 .name = "auxclk0_src_ck",
Rajendra Nayake0cb70c2010-12-21 21:08:14 -07002862 .parent = &sys_clkin_ck,
2863 .init = &omap2_init_clksel_parent,
2864 .ops = &clkops_omap2_dflt,
Rajendra Nayakad03f1c2011-07-10 05:56:14 -06002865 .clksel = auxclk_src_sel,
Rajendra Nayake0cb70c2010-12-21 21:08:14 -07002866 .clksel_reg = OMAP4_SCRM_AUXCLK0,
2867 .clksel_mask = OMAP4_SRCSELECT_MASK,
2868 .recalc = &omap2_clksel_recalc,
2869 .enable_reg = OMAP4_SCRM_AUXCLK0,
2870 .enable_bit = OMAP4_ENABLE_SHIFT,
2871};
2872
Rajendra Nayakad03f1c2011-07-10 05:56:14 -06002873static const struct clksel auxclk0_sel[] = {
2874 { .parent = &auxclk0_src_ck, .rates = div16_1to16_rates },
2875 { .parent = NULL },
2876};
2877
2878static struct clk auxclk0_ck = {
2879 .name = "auxclk0_ck",
2880 .parent = &auxclk0_src_ck,
2881 .clksel = auxclk0_sel,
2882 .clksel_reg = OMAP4_SCRM_AUXCLK0,
2883 .clksel_mask = OMAP4_CLKDIV_MASK,
2884 .ops = &clkops_null,
2885 .recalc = &omap2_clksel_recalc,
2886 .round_rate = &omap2_clksel_round_rate,
2887 .set_rate = &omap2_clksel_set_rate,
2888};
2889
2890static struct clk auxclk1_src_ck = {
2891 .name = "auxclk1_src_ck",
Rajendra Nayake0cb70c2010-12-21 21:08:14 -07002892 .parent = &sys_clkin_ck,
2893 .init = &omap2_init_clksel_parent,
2894 .ops = &clkops_omap2_dflt,
Rajendra Nayakad03f1c2011-07-10 05:56:14 -06002895 .clksel = auxclk_src_sel,
Rajendra Nayake0cb70c2010-12-21 21:08:14 -07002896 .clksel_reg = OMAP4_SCRM_AUXCLK1,
2897 .clksel_mask = OMAP4_SRCSELECT_MASK,
2898 .recalc = &omap2_clksel_recalc,
2899 .enable_reg = OMAP4_SCRM_AUXCLK1,
2900 .enable_bit = OMAP4_ENABLE_SHIFT,
2901};
2902
Rajendra Nayakad03f1c2011-07-10 05:56:14 -06002903static const struct clksel auxclk1_sel[] = {
2904 { .parent = &auxclk1_src_ck, .rates = div16_1to16_rates },
2905 { .parent = NULL },
2906};
2907
2908static struct clk auxclk1_ck = {
2909 .name = "auxclk1_ck",
2910 .parent = &auxclk1_src_ck,
2911 .clksel = auxclk1_sel,
2912 .clksel_reg = OMAP4_SCRM_AUXCLK1,
2913 .clksel_mask = OMAP4_CLKDIV_MASK,
2914 .ops = &clkops_null,
2915 .recalc = &omap2_clksel_recalc,
2916 .round_rate = &omap2_clksel_round_rate,
2917 .set_rate = &omap2_clksel_set_rate,
2918};
2919
2920static struct clk auxclk2_src_ck = {
2921 .name = "auxclk2_src_ck",
Rajendra Nayake0cb70c2010-12-21 21:08:14 -07002922 .parent = &sys_clkin_ck,
2923 .init = &omap2_init_clksel_parent,
2924 .ops = &clkops_omap2_dflt,
Rajendra Nayakad03f1c2011-07-10 05:56:14 -06002925 .clksel = auxclk_src_sel,
Rajendra Nayake0cb70c2010-12-21 21:08:14 -07002926 .clksel_reg = OMAP4_SCRM_AUXCLK2,
2927 .clksel_mask = OMAP4_SRCSELECT_MASK,
2928 .recalc = &omap2_clksel_recalc,
2929 .enable_reg = OMAP4_SCRM_AUXCLK2,
2930 .enable_bit = OMAP4_ENABLE_SHIFT,
2931};
Benoit Cousson7ecd4222011-07-09 19:14:45 -06002932
Rajendra Nayakad03f1c2011-07-10 05:56:14 -06002933static const struct clksel auxclk2_sel[] = {
2934 { .parent = &auxclk2_src_ck, .rates = div16_1to16_rates },
2935 { .parent = NULL },
2936};
2937
2938static struct clk auxclk2_ck = {
2939 .name = "auxclk2_ck",
2940 .parent = &auxclk2_src_ck,
2941 .clksel = auxclk2_sel,
2942 .clksel_reg = OMAP4_SCRM_AUXCLK2,
2943 .clksel_mask = OMAP4_CLKDIV_MASK,
2944 .ops = &clkops_null,
2945 .recalc = &omap2_clksel_recalc,
2946 .round_rate = &omap2_clksel_round_rate,
2947 .set_rate = &omap2_clksel_set_rate,
2948};
2949
2950static struct clk auxclk3_src_ck = {
2951 .name = "auxclk3_src_ck",
Rajendra Nayake0cb70c2010-12-21 21:08:14 -07002952 .parent = &sys_clkin_ck,
2953 .init = &omap2_init_clksel_parent,
2954 .ops = &clkops_omap2_dflt,
Rajendra Nayakad03f1c2011-07-10 05:56:14 -06002955 .clksel = auxclk_src_sel,
Rajendra Nayake0cb70c2010-12-21 21:08:14 -07002956 .clksel_reg = OMAP4_SCRM_AUXCLK3,
2957 .clksel_mask = OMAP4_SRCSELECT_MASK,
2958 .recalc = &omap2_clksel_recalc,
2959 .enable_reg = OMAP4_SCRM_AUXCLK3,
2960 .enable_bit = OMAP4_ENABLE_SHIFT,
2961};
2962
Rajendra Nayakad03f1c2011-07-10 05:56:14 -06002963static const struct clksel auxclk3_sel[] = {
2964 { .parent = &auxclk3_src_ck, .rates = div16_1to16_rates },
2965 { .parent = NULL },
2966};
2967
2968static struct clk auxclk3_ck = {
2969 .name = "auxclk3_ck",
2970 .parent = &auxclk3_src_ck,
2971 .clksel = auxclk3_sel,
2972 .clksel_reg = OMAP4_SCRM_AUXCLK3,
2973 .clksel_mask = OMAP4_CLKDIV_MASK,
2974 .ops = &clkops_null,
2975 .recalc = &omap2_clksel_recalc,
2976 .round_rate = &omap2_clksel_round_rate,
2977 .set_rate = &omap2_clksel_set_rate,
2978};
2979
2980static struct clk auxclk4_src_ck = {
2981 .name = "auxclk4_src_ck",
Rajendra Nayake0cb70c2010-12-21 21:08:14 -07002982 .parent = &sys_clkin_ck,
2983 .init = &omap2_init_clksel_parent,
2984 .ops = &clkops_omap2_dflt,
Rajendra Nayakad03f1c2011-07-10 05:56:14 -06002985 .clksel = auxclk_src_sel,
Rajendra Nayake0cb70c2010-12-21 21:08:14 -07002986 .clksel_reg = OMAP4_SCRM_AUXCLK4,
2987 .clksel_mask = OMAP4_SRCSELECT_MASK,
2988 .recalc = &omap2_clksel_recalc,
2989 .enable_reg = OMAP4_SCRM_AUXCLK4,
2990 .enable_bit = OMAP4_ENABLE_SHIFT,
2991};
2992
Rajendra Nayakad03f1c2011-07-10 05:56:14 -06002993static const struct clksel auxclk4_sel[] = {
2994 { .parent = &auxclk4_src_ck, .rates = div16_1to16_rates },
2995 { .parent = NULL },
2996};
2997
2998static struct clk auxclk4_ck = {
2999 .name = "auxclk4_ck",
3000 .parent = &auxclk4_src_ck,
3001 .clksel = auxclk4_sel,
3002 .clksel_reg = OMAP4_SCRM_AUXCLK4,
3003 .clksel_mask = OMAP4_CLKDIV_MASK,
3004 .ops = &clkops_null,
3005 .recalc = &omap2_clksel_recalc,
3006 .round_rate = &omap2_clksel_round_rate,
3007 .set_rate = &omap2_clksel_set_rate,
3008};
3009
3010static struct clk auxclk5_src_ck = {
3011 .name = "auxclk5_src_ck",
Rajendra Nayake0cb70c2010-12-21 21:08:14 -07003012 .parent = &sys_clkin_ck,
3013 .init = &omap2_init_clksel_parent,
3014 .ops = &clkops_omap2_dflt,
Rajendra Nayakad03f1c2011-07-10 05:56:14 -06003015 .clksel = auxclk_src_sel,
Rajendra Nayake0cb70c2010-12-21 21:08:14 -07003016 .clksel_reg = OMAP4_SCRM_AUXCLK5,
3017 .clksel_mask = OMAP4_SRCSELECT_MASK,
3018 .recalc = &omap2_clksel_recalc,
3019 .enable_reg = OMAP4_SCRM_AUXCLK5,
3020 .enable_bit = OMAP4_ENABLE_SHIFT,
3021};
3022
Rajendra Nayakad03f1c2011-07-10 05:56:14 -06003023static const struct clksel auxclk5_sel[] = {
3024 { .parent = &auxclk5_src_ck, .rates = div16_1to16_rates },
3025 { .parent = NULL },
3026};
3027
3028static struct clk auxclk5_ck = {
3029 .name = "auxclk5_ck",
3030 .parent = &auxclk5_src_ck,
3031 .clksel = auxclk5_sel,
3032 .clksel_reg = OMAP4_SCRM_AUXCLK5,
3033 .clksel_mask = OMAP4_CLKDIV_MASK,
3034 .ops = &clkops_null,
3035 .recalc = &omap2_clksel_recalc,
3036 .round_rate = &omap2_clksel_round_rate,
3037 .set_rate = &omap2_clksel_set_rate,
3038};
3039
Rajendra Nayake0cb70c2010-12-21 21:08:14 -07003040static const struct clksel auxclkreq_sel[] = {
3041 { .parent = &auxclk0_ck, .rates = div_1_0_rates },
3042 { .parent = &auxclk1_ck, .rates = div_1_1_rates },
3043 { .parent = &auxclk2_ck, .rates = div_1_2_rates },
3044 { .parent = &auxclk3_ck, .rates = div_1_3_rates },
3045 { .parent = &auxclk4_ck, .rates = div_1_4_rates },
3046 { .parent = &auxclk5_ck, .rates = div_1_5_rates },
3047 { .parent = NULL },
3048};
3049
3050static struct clk auxclkreq0_ck = {
3051 .name = "auxclkreq0_ck",
3052 .parent = &auxclk0_ck,
3053 .init = &omap2_init_clksel_parent,
3054 .ops = &clkops_null,
3055 .clksel = auxclkreq_sel,
3056 .clksel_reg = OMAP4_SCRM_AUXCLKREQ0,
3057 .clksel_mask = OMAP4_MAPPING_MASK,
3058 .recalc = &omap2_clksel_recalc,
3059};
3060
3061static struct clk auxclkreq1_ck = {
3062 .name = "auxclkreq1_ck",
3063 .parent = &auxclk1_ck,
3064 .init = &omap2_init_clksel_parent,
3065 .ops = &clkops_null,
3066 .clksel = auxclkreq_sel,
3067 .clksel_reg = OMAP4_SCRM_AUXCLKREQ1,
3068 .clksel_mask = OMAP4_MAPPING_MASK,
3069 .recalc = &omap2_clksel_recalc,
3070};
3071
3072static struct clk auxclkreq2_ck = {
3073 .name = "auxclkreq2_ck",
3074 .parent = &auxclk2_ck,
3075 .init = &omap2_init_clksel_parent,
3076 .ops = &clkops_null,
3077 .clksel = auxclkreq_sel,
3078 .clksel_reg = OMAP4_SCRM_AUXCLKREQ2,
3079 .clksel_mask = OMAP4_MAPPING_MASK,
3080 .recalc = &omap2_clksel_recalc,
3081};
3082
3083static struct clk auxclkreq3_ck = {
3084 .name = "auxclkreq3_ck",
3085 .parent = &auxclk3_ck,
3086 .init = &omap2_init_clksel_parent,
3087 .ops = &clkops_null,
3088 .clksel = auxclkreq_sel,
3089 .clksel_reg = OMAP4_SCRM_AUXCLKREQ3,
3090 .clksel_mask = OMAP4_MAPPING_MASK,
3091 .recalc = &omap2_clksel_recalc,
3092};
3093
3094static struct clk auxclkreq4_ck = {
3095 .name = "auxclkreq4_ck",
3096 .parent = &auxclk4_ck,
3097 .init = &omap2_init_clksel_parent,
3098 .ops = &clkops_null,
3099 .clksel = auxclkreq_sel,
3100 .clksel_reg = OMAP4_SCRM_AUXCLKREQ4,
3101 .clksel_mask = OMAP4_MAPPING_MASK,
3102 .recalc = &omap2_clksel_recalc,
3103};
3104
3105static struct clk auxclkreq5_ck = {
3106 .name = "auxclkreq5_ck",
3107 .parent = &auxclk5_ck,
3108 .init = &omap2_init_clksel_parent,
3109 .ops = &clkops_null,
3110 .clksel = auxclkreq_sel,
3111 .clksel_reg = OMAP4_SCRM_AUXCLKREQ5,
3112 .clksel_mask = OMAP4_MAPPING_MASK,
3113 .recalc = &omap2_clksel_recalc,
3114};
3115
Rajendra Nayak972c5422009-12-08 18:46:28 -07003116/*
3117 * clkdev
3118 */
3119
3120static struct omap_clk omap44xx_clks[] = {
3121 CLK(NULL, "extalt_clkin_ck", &extalt_clkin_ck, CK_443X),
3122 CLK(NULL, "pad_clks_ck", &pad_clks_ck, CK_443X),
3123 CLK(NULL, "pad_slimbus_core_clks_ck", &pad_slimbus_core_clks_ck, CK_443X),
3124 CLK(NULL, "secure_32k_clk_src_ck", &secure_32k_clk_src_ck, CK_443X),
3125 CLK(NULL, "slimbus_clk", &slimbus_clk, CK_443X),
3126 CLK(NULL, "sys_32k_ck", &sys_32k_ck, CK_443X),
3127 CLK(NULL, "virt_12000000_ck", &virt_12000000_ck, CK_443X),
3128 CLK(NULL, "virt_13000000_ck", &virt_13000000_ck, CK_443X),
3129 CLK(NULL, "virt_16800000_ck", &virt_16800000_ck, CK_443X),
3130 CLK(NULL, "virt_19200000_ck", &virt_19200000_ck, CK_443X),
3131 CLK(NULL, "virt_26000000_ck", &virt_26000000_ck, CK_443X),
3132 CLK(NULL, "virt_27000000_ck", &virt_27000000_ck, CK_443X),
3133 CLK(NULL, "virt_38400000_ck", &virt_38400000_ck, CK_443X),
3134 CLK(NULL, "sys_clkin_ck", &sys_clkin_ck, CK_443X),
Rajendra Nayak76cf5292010-09-27 14:02:54 -06003135 CLK(NULL, "tie_low_clock_ck", &tie_low_clock_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003136 CLK(NULL, "utmi_phy_clkout_ck", &utmi_phy_clkout_ck, CK_443X),
3137 CLK(NULL, "xclk60mhsp1_ck", &xclk60mhsp1_ck, CK_443X),
3138 CLK(NULL, "xclk60mhsp2_ck", &xclk60mhsp2_ck, CK_443X),
3139 CLK(NULL, "xclk60motg_ck", &xclk60motg_ck, CK_443X),
Rajendra Nayak76cf5292010-09-27 14:02:54 -06003140 CLK(NULL, "abe_dpll_bypass_clk_mux_ck", &abe_dpll_bypass_clk_mux_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003141 CLK(NULL, "abe_dpll_refclk_mux_ck", &abe_dpll_refclk_mux_ck, CK_443X),
3142 CLK(NULL, "dpll_abe_ck", &dpll_abe_ck, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003143 CLK(NULL, "dpll_abe_x2_ck", &dpll_abe_x2_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003144 CLK(NULL, "dpll_abe_m2x2_ck", &dpll_abe_m2x2_ck, CK_443X),
3145 CLK(NULL, "abe_24m_fclk", &abe_24m_fclk, CK_443X),
3146 CLK(NULL, "abe_clk", &abe_clk, CK_443X),
3147 CLK(NULL, "aess_fclk", &aess_fclk, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003148 CLK(NULL, "dpll_abe_m3x2_ck", &dpll_abe_m3x2_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003149 CLK(NULL, "core_hsd_byp_clk_mux_ck", &core_hsd_byp_clk_mux_ck, CK_443X),
3150 CLK(NULL, "dpll_core_ck", &dpll_core_ck, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003151 CLK(NULL, "dpll_core_x2_ck", &dpll_core_x2_ck, CK_443X),
3152 CLK(NULL, "dpll_core_m6x2_ck", &dpll_core_m6x2_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003153 CLK(NULL, "dbgclk_mux_ck", &dbgclk_mux_ck, CK_443X),
3154 CLK(NULL, "dpll_core_m2_ck", &dpll_core_m2_ck, CK_443X),
3155 CLK(NULL, "ddrphy_ck", &ddrphy_ck, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003156 CLK(NULL, "dpll_core_m5x2_ck", &dpll_core_m5x2_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003157 CLK(NULL, "div_core_ck", &div_core_ck, CK_443X),
3158 CLK(NULL, "div_iva_hs_clk", &div_iva_hs_clk, CK_443X),
3159 CLK(NULL, "div_mpu_hs_clk", &div_mpu_hs_clk, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003160 CLK(NULL, "dpll_core_m4x2_ck", &dpll_core_m4x2_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003161 CLK(NULL, "dll_clk_div_ck", &dll_clk_div_ck, CK_443X),
3162 CLK(NULL, "dpll_abe_m2_ck", &dpll_abe_m2_ck, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003163 CLK(NULL, "dpll_core_m3x2_ck", &dpll_core_m3x2_ck, CK_443X),
3164 CLK(NULL, "dpll_core_m7x2_ck", &dpll_core_m7x2_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003165 CLK(NULL, "iva_hsd_byp_clk_mux_ck", &iva_hsd_byp_clk_mux_ck, CK_443X),
3166 CLK(NULL, "dpll_iva_ck", &dpll_iva_ck, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003167 CLK(NULL, "dpll_iva_x2_ck", &dpll_iva_x2_ck, CK_443X),
3168 CLK(NULL, "dpll_iva_m4x2_ck", &dpll_iva_m4x2_ck, CK_443X),
3169 CLK(NULL, "dpll_iva_m5x2_ck", &dpll_iva_m5x2_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003170 CLK(NULL, "dpll_mpu_ck", &dpll_mpu_ck, CK_443X),
3171 CLK(NULL, "dpll_mpu_m2_ck", &dpll_mpu_m2_ck, CK_443X),
3172 CLK(NULL, "per_hs_clk_div_ck", &per_hs_clk_div_ck, CK_443X),
3173 CLK(NULL, "per_hsd_byp_clk_mux_ck", &per_hsd_byp_clk_mux_ck, CK_443X),
3174 CLK(NULL, "dpll_per_ck", &dpll_per_ck, CK_443X),
3175 CLK(NULL, "dpll_per_m2_ck", &dpll_per_m2_ck, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003176 CLK(NULL, "dpll_per_x2_ck", &dpll_per_x2_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003177 CLK(NULL, "dpll_per_m2x2_ck", &dpll_per_m2x2_ck, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003178 CLK(NULL, "dpll_per_m3x2_ck", &dpll_per_m3x2_ck, CK_443X),
3179 CLK(NULL, "dpll_per_m4x2_ck", &dpll_per_m4x2_ck, CK_443X),
3180 CLK(NULL, "dpll_per_m5x2_ck", &dpll_per_m5x2_ck, CK_443X),
3181 CLK(NULL, "dpll_per_m6x2_ck", &dpll_per_m6x2_ck, CK_443X),
3182 CLK(NULL, "dpll_per_m7x2_ck", &dpll_per_m7x2_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003183 CLK(NULL, "usb_hs_clk_div_ck", &usb_hs_clk_div_ck, CK_443X),
3184 CLK(NULL, "dpll_usb_ck", &dpll_usb_ck, CK_443X),
3185 CLK(NULL, "dpll_usb_clkdcoldo_ck", &dpll_usb_clkdcoldo_ck, CK_443X),
3186 CLK(NULL, "dpll_usb_m2_ck", &dpll_usb_m2_ck, CK_443X),
3187 CLK(NULL, "ducati_clk_mux_ck", &ducati_clk_mux_ck, CK_443X),
3188 CLK(NULL, "func_12m_fclk", &func_12m_fclk, CK_443X),
3189 CLK(NULL, "func_24m_clk", &func_24m_clk, CK_443X),
3190 CLK(NULL, "func_24mc_fclk", &func_24mc_fclk, CK_443X),
3191 CLK(NULL, "func_48m_fclk", &func_48m_fclk, CK_443X),
3192 CLK(NULL, "func_48mc_fclk", &func_48mc_fclk, CK_443X),
3193 CLK(NULL, "func_64m_fclk", &func_64m_fclk, CK_443X),
3194 CLK(NULL, "func_96m_fclk", &func_96m_fclk, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003195 CLK(NULL, "init_60m_fclk", &init_60m_fclk, CK_443X),
3196 CLK(NULL, "l3_div_ck", &l3_div_ck, CK_443X),
3197 CLK(NULL, "l4_div_ck", &l4_div_ck, CK_443X),
3198 CLK(NULL, "lp_clk_div_ck", &lp_clk_div_ck, CK_443X),
3199 CLK(NULL, "l4_wkup_clk_mux_ck", &l4_wkup_clk_mux_ck, CK_443X),
Santosh Shilimkar30c95692011-12-16 16:09:12 -08003200 CLK("smp_twd", NULL, &mpu_periphclk, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003201 CLK(NULL, "ocp_abe_iclk", &ocp_abe_iclk, CK_443X),
3202 CLK(NULL, "per_abe_24m_fclk", &per_abe_24m_fclk, CK_443X),
Jon Hunterde474532011-07-09 19:14:47 -06003203 CLK(NULL, "per_abe_nc_fclk", &per_abe_nc_fclk, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003204 CLK(NULL, "pmd_stm_clock_mux_ck", &pmd_stm_clock_mux_ck, CK_443X),
3205 CLK(NULL, "pmd_trace_clk_mux_ck", &pmd_trace_clk_mux_ck, CK_443X),
3206 CLK(NULL, "syc_clk_div_ck", &syc_clk_div_ck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003207 CLK(NULL, "aes1_fck", &aes1_fck, CK_443X),
3208 CLK(NULL, "aes2_fck", &aes2_fck, CK_443X),
3209 CLK(NULL, "aess_fck", &aess_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003210 CLK(NULL, "bandgap_fclk", &bandgap_fclk, CK_443X),
Rajendra Nayak257d6432011-07-02 08:00:24 +05303211 CLK(NULL, "bandgap_ts_fclk", &bandgap_ts_fclk, CK_446X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003212 CLK(NULL, "des3des_fck", &des3des_fck, CK_443X),
Rajendra Nayak257d6432011-07-02 08:00:24 +05303213 CLK(NULL, "div_ts_ck", &div_ts_ck, CK_446X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003214 CLK(NULL, "dmic_sync_mux_ck", &dmic_sync_mux_ck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003215 CLK(NULL, "dmic_fck", &dmic_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003216 CLK(NULL, "dsp_fck", &dsp_fck, CK_443X),
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06003217 CLK(NULL, "dss_sys_clk", &dss_sys_clk, CK_443X),
3218 CLK(NULL, "dss_tv_clk", &dss_tv_clk, CK_443X),
3219 CLK(NULL, "dss_48mhz_clk", &dss_48mhz_clk, CK_443X),
3220 CLK(NULL, "dss_dss_clk", &dss_dss_clk, CK_443X),
Tomi Valkeinen2df122f2011-04-04 09:26:19 +03003221 CLK("omapdss_dss", "ick", &dss_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003222 CLK(NULL, "efuse_ctrl_cust_fck", &efuse_ctrl_cust_fck, CK_443X),
3223 CLK(NULL, "emif1_fck", &emif1_fck, CK_443X),
3224 CLK(NULL, "emif2_fck", &emif2_fck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003225 CLK(NULL, "fdif_fck", &fdif_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003226 CLK(NULL, "fpka_fck", &fpka_fck, CK_443X),
Benoit Coussonb399bca2010-12-21 21:08:34 -07003227 CLK(NULL, "gpio1_dbclk", &gpio1_dbclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003228 CLK(NULL, "gpio1_ick", &gpio1_ick, CK_443X),
Benoit Coussonb399bca2010-12-21 21:08:34 -07003229 CLK(NULL, "gpio2_dbclk", &gpio2_dbclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003230 CLK(NULL, "gpio2_ick", &gpio2_ick, CK_443X),
Benoit Coussonb399bca2010-12-21 21:08:34 -07003231 CLK(NULL, "gpio3_dbclk", &gpio3_dbclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003232 CLK(NULL, "gpio3_ick", &gpio3_ick, CK_443X),
Benoit Coussonb399bca2010-12-21 21:08:34 -07003233 CLK(NULL, "gpio4_dbclk", &gpio4_dbclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003234 CLK(NULL, "gpio4_ick", &gpio4_ick, CK_443X),
Benoit Coussonb399bca2010-12-21 21:08:34 -07003235 CLK(NULL, "gpio5_dbclk", &gpio5_dbclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003236 CLK(NULL, "gpio5_ick", &gpio5_ick, CK_443X),
Benoit Coussonb399bca2010-12-21 21:08:34 -07003237 CLK(NULL, "gpio6_dbclk", &gpio6_dbclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003238 CLK(NULL, "gpio6_ick", &gpio6_ick, CK_443X),
3239 CLK(NULL, "gpmc_ick", &gpmc_ick, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003240 CLK(NULL, "gpu_fck", &gpu_fck, CK_443X),
Benoit Coussonbf1e0772011-07-10 05:54:12 -06003241 CLK(NULL, "hdq1w_fck", &hdq1w_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003242 CLK(NULL, "hsi_fck", &hsi_fck, CK_443X),
Benoit Coussonbf1e0772011-07-10 05:54:12 -06003243 CLK(NULL, "i2c1_fck", &i2c1_fck, CK_443X),
3244 CLK(NULL, "i2c2_fck", &i2c2_fck, CK_443X),
3245 CLK(NULL, "i2c3_fck", &i2c3_fck, CK_443X),
3246 CLK(NULL, "i2c4_fck", &i2c4_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003247 CLK(NULL, "ipu_fck", &ipu_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003248 CLK(NULL, "iss_ctrlclk", &iss_ctrlclk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003249 CLK(NULL, "iss_fck", &iss_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003250 CLK(NULL, "iva_fck", &iva_fck, CK_443X),
3251 CLK(NULL, "kbd_fck", &kbd_fck, CK_443X),
3252 CLK(NULL, "l3_instr_ick", &l3_instr_ick, CK_443X),
3253 CLK(NULL, "l3_main_3_ick", &l3_main_3_ick, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003254 CLK(NULL, "mcasp_sync_mux_ck", &mcasp_sync_mux_ck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003255 CLK(NULL, "mcasp_fck", &mcasp_fck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003256 CLK(NULL, "mcbsp1_sync_mux_ck", &mcbsp1_sync_mux_ck, CK_443X),
Benoit Coussonbf1e0772011-07-10 05:54:12 -06003257 CLK(NULL, "mcbsp1_fck", &mcbsp1_fck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003258 CLK(NULL, "mcbsp2_sync_mux_ck", &mcbsp2_sync_mux_ck, CK_443X),
Benoit Coussonbf1e0772011-07-10 05:54:12 -06003259 CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003260 CLK(NULL, "mcbsp3_sync_mux_ck", &mcbsp3_sync_mux_ck, CK_443X),
Benoit Coussonbf1e0772011-07-10 05:54:12 -06003261 CLK(NULL, "mcbsp3_fck", &mcbsp3_fck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003262 CLK(NULL, "mcbsp4_sync_mux_ck", &mcbsp4_sync_mux_ck, CK_443X),
Benoit Coussonbf1e0772011-07-10 05:54:12 -06003263 CLK(NULL, "mcbsp4_fck", &mcbsp4_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003264 CLK(NULL, "mcpdm_fck", &mcpdm_fck, CK_443X),
Benoit Coussonbf1e0772011-07-10 05:54:12 -06003265 CLK(NULL, "mcspi1_fck", &mcspi1_fck, CK_443X),
3266 CLK(NULL, "mcspi2_fck", &mcspi2_fck, CK_443X),
3267 CLK(NULL, "mcspi3_fck", &mcspi3_fck, CK_443X),
3268 CLK(NULL, "mcspi4_fck", &mcspi4_fck, CK_443X),
3269 CLK(NULL, "mmc1_fck", &mmc1_fck, CK_443X),
3270 CLK(NULL, "mmc2_fck", &mmc2_fck, CK_443X),
3271 CLK(NULL, "mmc3_fck", &mmc3_fck, CK_443X),
3272 CLK(NULL, "mmc4_fck", &mmc4_fck, CK_443X),
3273 CLK(NULL, "mmc5_fck", &mmc5_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003274 CLK(NULL, "ocp2scp_usb_phy_phy_48m", &ocp2scp_usb_phy_phy_48m, CK_443X),
Benoit Cousson0edc9e82010-09-27 14:02:56 -06003275 CLK(NULL, "ocp2scp_usb_phy_ick", &ocp2scp_usb_phy_ick, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003276 CLK(NULL, "ocp_wp_noc_ick", &ocp_wp_noc_ick, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003277 CLK("omap_rng", "ick", &rng_ick, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003278 CLK(NULL, "sha2md5_fck", &sha2md5_fck, CK_443X),
3279 CLK(NULL, "sl2if_ick", &sl2if_ick, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003280 CLK(NULL, "slimbus1_fclk_1", &slimbus1_fclk_1, CK_443X),
3281 CLK(NULL, "slimbus1_fclk_0", &slimbus1_fclk_0, CK_443X),
3282 CLK(NULL, "slimbus1_fclk_2", &slimbus1_fclk_2, CK_443X),
3283 CLK(NULL, "slimbus1_slimbus_clk", &slimbus1_slimbus_clk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003284 CLK(NULL, "slimbus1_fck", &slimbus1_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003285 CLK(NULL, "slimbus2_fclk_1", &slimbus2_fclk_1, CK_443X),
3286 CLK(NULL, "slimbus2_fclk_0", &slimbus2_fclk_0, CK_443X),
3287 CLK(NULL, "slimbus2_slimbus_clk", &slimbus2_slimbus_clk, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003288 CLK(NULL, "slimbus2_fck", &slimbus2_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003289 CLK(NULL, "smartreflex_core_fck", &smartreflex_core_fck, CK_443X),
3290 CLK(NULL, "smartreflex_iva_fck", &smartreflex_iva_fck, CK_443X),
3291 CLK(NULL, "smartreflex_mpu_fck", &smartreflex_mpu_fck, CK_443X),
3292 CLK(NULL, "gpt1_fck", &timer1_fck, CK_443X),
3293 CLK(NULL, "gpt10_fck", &timer10_fck, CK_443X),
3294 CLK(NULL, "gpt11_fck", &timer11_fck, CK_443X),
3295 CLK(NULL, "gpt2_fck", &timer2_fck, CK_443X),
3296 CLK(NULL, "gpt3_fck", &timer3_fck, CK_443X),
3297 CLK(NULL, "gpt4_fck", &timer4_fck, CK_443X),
3298 CLK(NULL, "gpt5_fck", &timer5_fck, CK_443X),
3299 CLK(NULL, "gpt6_fck", &timer6_fck, CK_443X),
3300 CLK(NULL, "gpt7_fck", &timer7_fck, CK_443X),
3301 CLK(NULL, "gpt8_fck", &timer8_fck, CK_443X),
3302 CLK(NULL, "gpt9_fck", &timer9_fck, CK_443X),
Rajendra Nayak54776052010-02-22 22:09:39 -07003303 CLK(NULL, "uart1_fck", &uart1_fck, CK_443X),
3304 CLK(NULL, "uart2_fck", &uart2_fck, CK_443X),
3305 CLK(NULL, "uart3_fck", &uart3_fck, CK_443X),
3306 CLK(NULL, "uart4_fck", &uart4_fck, CK_443X),
Keshava Munegowdaa6d3a662011-10-11 13:21:51 +05303307 CLK("usbhs_omap", "fs_fck", &usb_host_fs_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003308 CLK(NULL, "utmi_p1_gfclk", &utmi_p1_gfclk, CK_443X),
3309 CLK(NULL, "usb_host_hs_utmi_p1_clk", &usb_host_hs_utmi_p1_clk, CK_443X),
3310 CLK(NULL, "utmi_p2_gfclk", &utmi_p2_gfclk, CK_443X),
3311 CLK(NULL, "usb_host_hs_utmi_p2_clk", &usb_host_hs_utmi_p2_clk, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003312 CLK(NULL, "usb_host_hs_utmi_p3_clk", &usb_host_hs_utmi_p3_clk, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003313 CLK(NULL, "usb_host_hs_hsic480m_p1_clk", &usb_host_hs_hsic480m_p1_clk, CK_443X),
Thara Gopinath032b5a72010-12-21 21:08:13 -07003314 CLK(NULL, "usb_host_hs_hsic60m_p1_clk", &usb_host_hs_hsic60m_p1_clk, CK_443X),
3315 CLK(NULL, "usb_host_hs_hsic60m_p2_clk", &usb_host_hs_hsic60m_p2_clk, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003316 CLK(NULL, "usb_host_hs_hsic480m_p2_clk", &usb_host_hs_hsic480m_p2_clk, CK_443X),
3317 CLK(NULL, "usb_host_hs_func48mclk", &usb_host_hs_func48mclk, CK_443X),
Keshava Munegowdaa6d3a662011-10-11 13:21:51 +05303318 CLK("usbhs_omap", "hs_fck", &usb_host_hs_fck, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003319 CLK(NULL, "otg_60m_gfclk", &otg_60m_gfclk, CK_443X),
3320 CLK(NULL, "usb_otg_hs_xclk", &usb_otg_hs_xclk, CK_443X),
Felipe Balbi03491762010-12-02 09:57:08 +02003321 CLK("musb-omap2430", "ick", &usb_otg_hs_ick, CK_443X),
Benoit Cousson0edc9e82010-09-27 14:02:56 -06003322 CLK(NULL, "usb_phy_cm_clk32k", &usb_phy_cm_clk32k, CK_443X),
Benoit Cousson1c03f422010-09-27 14:02:55 -06003323 CLK(NULL, "usb_tll_hs_usb_ch2_clk", &usb_tll_hs_usb_ch2_clk, CK_443X),
3324 CLK(NULL, "usb_tll_hs_usb_ch0_clk", &usb_tll_hs_usb_ch0_clk, CK_443X),
3325 CLK(NULL, "usb_tll_hs_usb_ch1_clk", &usb_tll_hs_usb_ch1_clk, CK_443X),
Keshava Munegowdaa6d3a662011-10-11 13:21:51 +05303326 CLK("usbhs_omap", "usbtll_ick", &usb_tll_hs_ick, CK_443X),
Benoit Cousson0edc9e82010-09-27 14:02:56 -06003327 CLK(NULL, "usim_ck", &usim_ck, CK_443X),
3328 CLK(NULL, "usim_fclk", &usim_fclk, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003329 CLK(NULL, "usim_fck", &usim_fck, CK_443X),
Benoit Coussonbf1e0772011-07-10 05:54:12 -06003330 CLK(NULL, "wd_timer2_fck", &wd_timer2_fck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003331 CLK(NULL, "wd_timer3_fck", &wd_timer3_fck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003332 CLK(NULL, "stm_clk_div_ck", &stm_clk_div_ck, CK_443X),
3333 CLK(NULL, "trace_clk_div_ck", &trace_clk_div_ck, CK_443X),
Rajendra Nayakad03f1c2011-07-10 05:56:14 -06003334 CLK(NULL, "auxclk0_src_ck", &auxclk0_src_ck, CK_443X),
Benoit Cousson7ecd4222011-07-09 19:14:45 -06003335 CLK(NULL, "auxclk0_ck", &auxclk0_ck, CK_443X),
Benoit Cousson7ecd4222011-07-09 19:14:45 -06003336 CLK(NULL, "auxclkreq0_ck", &auxclkreq0_ck, CK_443X),
Rajendra Nayakad03f1c2011-07-10 05:56:14 -06003337 CLK(NULL, "auxclk1_src_ck", &auxclk1_src_ck, CK_443X),
3338 CLK(NULL, "auxclk1_ck", &auxclk1_ck, CK_443X),
Benoit Cousson7ecd4222011-07-09 19:14:45 -06003339 CLK(NULL, "auxclkreq1_ck", &auxclkreq1_ck, CK_443X),
Rajendra Nayakad03f1c2011-07-10 05:56:14 -06003340 CLK(NULL, "auxclk2_src_ck", &auxclk2_src_ck, CK_443X),
3341 CLK(NULL, "auxclk2_ck", &auxclk2_ck, CK_443X),
Benoit Cousson7ecd4222011-07-09 19:14:45 -06003342 CLK(NULL, "auxclkreq2_ck", &auxclkreq2_ck, CK_443X),
Rajendra Nayakad03f1c2011-07-10 05:56:14 -06003343 CLK(NULL, "auxclk3_src_ck", &auxclk3_src_ck, CK_443X),
3344 CLK(NULL, "auxclk3_ck", &auxclk3_ck, CK_443X),
Benoit Cousson7ecd4222011-07-09 19:14:45 -06003345 CLK(NULL, "auxclkreq3_ck", &auxclkreq3_ck, CK_443X),
Rajendra Nayakad03f1c2011-07-10 05:56:14 -06003346 CLK(NULL, "auxclk4_src_ck", &auxclk4_src_ck, CK_443X),
3347 CLK(NULL, "auxclk4_ck", &auxclk4_ck, CK_443X),
Benoit Cousson7ecd4222011-07-09 19:14:45 -06003348 CLK(NULL, "auxclkreq4_ck", &auxclkreq4_ck, CK_443X),
Rajendra Nayakad03f1c2011-07-10 05:56:14 -06003349 CLK(NULL, "auxclk5_src_ck", &auxclk5_src_ck, CK_443X),
3350 CLK(NULL, "auxclk5_ck", &auxclk5_ck, CK_443X),
Benoit Cousson7ecd4222011-07-09 19:14:45 -06003351 CLK(NULL, "auxclkreq5_ck", &auxclkreq5_ck, CK_443X),
Santosh Shilimkar7c43d542010-02-22 22:09:40 -07003352 CLK(NULL, "gpmc_ck", &dummy_ck, CK_443X),
3353 CLK(NULL, "gpt1_ick", &dummy_ck, CK_443X),
3354 CLK(NULL, "gpt2_ick", &dummy_ck, CK_443X),
3355 CLK(NULL, "gpt3_ick", &dummy_ck, CK_443X),
3356 CLK(NULL, "gpt4_ick", &dummy_ck, CK_443X),
3357 CLK(NULL, "gpt5_ick", &dummy_ck, CK_443X),
3358 CLK(NULL, "gpt6_ick", &dummy_ck, CK_443X),
3359 CLK(NULL, "gpt7_ick", &dummy_ck, CK_443X),
3360 CLK(NULL, "gpt8_ick", &dummy_ck, CK_443X),
3361 CLK(NULL, "gpt9_ick", &dummy_ck, CK_443X),
3362 CLK(NULL, "gpt10_ick", &dummy_ck, CK_443X),
3363 CLK(NULL, "gpt11_ick", &dummy_ck, CK_443X),
Benoit Coussonf7bb0d92010-12-09 14:24:16 +00003364 CLK("omap_i2c.1", "ick", &dummy_ck, CK_443X),
3365 CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X),
3366 CLK("omap_i2c.3", "ick", &dummy_ck, CK_443X),
3367 CLK("omap_i2c.4", "ick", &dummy_ck, CK_443X),
Benoit Cousson7ecd4222011-07-09 19:14:45 -06003368 CLK(NULL, "mailboxes_ick", &dummy_ck, CK_443X),
Kishore Kadiyala0005ae72011-02-28 20:48:05 +05303369 CLK("omap_hsmmc.0", "ick", &dummy_ck, CK_443X),
3370 CLK("omap_hsmmc.1", "ick", &dummy_ck, CK_443X),
3371 CLK("omap_hsmmc.2", "ick", &dummy_ck, CK_443X),
3372 CLK("omap_hsmmc.3", "ick", &dummy_ck, CK_443X),
3373 CLK("omap_hsmmc.4", "ick", &dummy_ck, CK_443X),
Santosh Shilimkar7c43d542010-02-22 22:09:40 -07003374 CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_443X),
3375 CLK("omap-mcbsp.2", "ick", &dummy_ck, CK_443X),
3376 CLK("omap-mcbsp.3", "ick", &dummy_ck, CK_443X),
3377 CLK("omap-mcbsp.4", "ick", &dummy_ck, CK_443X),
Benoit Cousson0e433272010-09-27 14:02:54 -06003378 CLK("omap2_mcspi.1", "ick", &dummy_ck, CK_443X),
3379 CLK("omap2_mcspi.2", "ick", &dummy_ck, CK_443X),
3380 CLK("omap2_mcspi.3", "ick", &dummy_ck, CK_443X),
3381 CLK("omap2_mcspi.4", "ick", &dummy_ck, CK_443X),
Santosh Shilimkar7c43d542010-02-22 22:09:40 -07003382 CLK(NULL, "uart1_ick", &dummy_ck, CK_443X),
3383 CLK(NULL, "uart2_ick", &dummy_ck, CK_443X),
3384 CLK(NULL, "uart3_ick", &dummy_ck, CK_443X),
3385 CLK(NULL, "uart4_ick", &dummy_ck, CK_443X),
Keshava Munegowdaa6d3a662011-10-11 13:21:51 +05303386 CLK("usbhs_omap", "usbhost_ick", &dummy_ck, CK_443X),
3387 CLK("usbhs_omap", "usbtll_fck", &dummy_ck, CK_443X),
Santosh Shilimkar7c43d542010-02-22 22:09:40 -07003388 CLK("omap_wdt", "ick", &dummy_ck, CK_443X),
Tarun Kanti DebBarma318c3e12011-09-20 17:00:16 +05303389 CLK("omap_timer.1", "32k_ck", &sys_32k_ck, CK_443X),
3390 CLK("omap_timer.2", "32k_ck", &sys_32k_ck, CK_443X),
3391 CLK("omap_timer.3", "32k_ck", &sys_32k_ck, CK_443X),
3392 CLK("omap_timer.4", "32k_ck", &sys_32k_ck, CK_443X),
3393 CLK("omap_timer.5", "32k_ck", &sys_32k_ck, CK_443X),
3394 CLK("omap_timer.6", "32k_ck", &sys_32k_ck, CK_443X),
3395 CLK("omap_timer.7", "32k_ck", &sys_32k_ck, CK_443X),
3396 CLK("omap_timer.8", "32k_ck", &sys_32k_ck, CK_443X),
3397 CLK("omap_timer.9", "32k_ck", &sys_32k_ck, CK_443X),
3398 CLK("omap_timer.10", "32k_ck", &sys_32k_ck, CK_443X),
3399 CLK("omap_timer.11", "32k_ck", &sys_32k_ck, CK_443X),
3400 CLK("omap_timer.1", "sys_ck", &sys_clkin_ck, CK_443X),
3401 CLK("omap_timer.2", "sys_ck", &sys_clkin_ck, CK_443X),
3402 CLK("omap_timer.3", "sys_ck", &sys_clkin_ck, CK_443X),
3403 CLK("omap_timer.4", "sys_ck", &sys_clkin_ck, CK_443X),
3404 CLK("omap_timer.9", "sys_ck", &sys_clkin_ck, CK_443X),
3405 CLK("omap_timer.10", "sys_ck", &sys_clkin_ck, CK_443X),
3406 CLK("omap_timer.11", "sys_ck", &sys_clkin_ck, CK_443X),
3407 CLK("omap_timer.5", "sys_ck", &syc_clk_div_ck, CK_443X),
3408 CLK("omap_timer.6", "sys_ck", &syc_clk_div_ck, CK_443X),
3409 CLK("omap_timer.7", "sys_ck", &syc_clk_div_ck, CK_443X),
3410 CLK("omap_timer.8", "sys_ck", &syc_clk_div_ck, CK_443X),
Rajendra Nayak972c5422009-12-08 18:46:28 -07003411};
3412
Paul Walmsleye80a9722010-01-26 20:13:12 -07003413int __init omap4xxx_clk_init(void)
Rajendra Nayak972c5422009-12-08 18:46:28 -07003414{
Rajendra Nayak972c5422009-12-08 18:46:28 -07003415 struct omap_clk *c;
Rajendra Nayak972c5422009-12-08 18:46:28 -07003416 u32 cpu_clkflg;
3417
Paul Walmsley52a3a4d2011-10-07 00:53:08 -06003418 if (cpu_is_omap443x()) {
Rajendra Nayak972c5422009-12-08 18:46:28 -07003419 cpu_mask = RATE_IN_4430;
3420 cpu_clkflg = CK_443X;
Rajendra Nayak257d6432011-07-02 08:00:24 +05303421 } else if (cpu_is_omap446x()) {
Paul Walmsley52a3a4d2011-10-07 00:53:08 -06003422 cpu_mask = RATE_IN_4460 | RATE_IN_4430;
3423 cpu_clkflg = CK_446X | CK_443X;
Paul Walmsley450a37d2011-08-21 00:28:56 -06003424 } else {
3425 return 0;
Rajendra Nayak972c5422009-12-08 18:46:28 -07003426 }
3427
3428 clk_init(&omap2_clk_functions);
Paul Walmsley9c5f5602011-08-19 16:59:56 -06003429
3430 /*
3431 * Must stay commented until all OMAP SoC drivers are
3432 * converted to runtime PM, or drivers may start crashing
3433 *
3434 * omap2_clk_disable_clkdm_control();
3435 */
Rajendra Nayak972c5422009-12-08 18:46:28 -07003436
3437 for (c = omap44xx_clks; c < omap44xx_clks + ARRAY_SIZE(omap44xx_clks);
3438 c++)
3439 clk_preinit(c->lk.clk);
3440
3441 for (c = omap44xx_clks; c < omap44xx_clks + ARRAY_SIZE(omap44xx_clks);
3442 c++)
3443 if (c->cpu & cpu_clkflg) {
3444 clkdev_add(&c->lk);
3445 clk_register(c->lk.clk);
Rajendra Nayak972c5422009-12-08 18:46:28 -07003446 omap2_init_clk_clkdm(c->lk.clk);
Rajendra Nayak972c5422009-12-08 18:46:28 -07003447 }
3448
Paul Walmsleyc6461f52011-02-25 15:49:53 -07003449 /* Disable autoidle on all clocks; let the PM code enable it later */
3450 omap_clk_disable_autoidle_all();
3451
Rajendra Nayak972c5422009-12-08 18:46:28 -07003452 recalculate_root_clocks();
3453
3454 /*
3455 * Only enable those clocks we will need, let the drivers
3456 * enable other clocks as necessary
3457 */
3458 clk_enable_init_clocks();
3459
3460 return 0;
3461}