clock34xx.h 86.9 KB
Newer Older
P
Paul Walmsley 已提交
1 2 3 4 5 6 7
/*
 * OMAP3 clock framework
 *
 * Copyright (C) 2007-2008 Texas Instruments, Inc.
 * Copyright (C) 2007-2008 Nokia Corporation
 *
 * Written by Paul Walmsley
8 9 10 11 12 13 14 15 16
 * With many device clock fixes by Kevin Hilman and Jouni Högander
 * DPLL bypass clock support added by Roman Tereshonkov
 *
 */

/*
 * Virtual clocks are introduced as convenient tools.
 * They are sources for other clocks and not supposed
 * to be requested from drivers directly.
P
Paul Walmsley 已提交
17 18 19 20 21
 */

#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK34XX_H
#define __ARCH_ARM_MACH_OMAP2_CLOCK34XX_H

22
#include <mach/control.h>
P
Paul Walmsley 已提交
23 24 25 26 27 28 29 30 31

#include "clock.h"
#include "cm.h"
#include "cm-regbits-34xx.h"
#include "prm.h"
#include "prm-regbits-34xx.h"

static void omap3_dpll_recalc(struct clk *clk);
static void omap3_clkoutx2_recalc(struct clk *clk);
32 33 34
static void omap3_dpll_allow_idle(struct clk *clk);
static void omap3_dpll_deny_idle(struct clk *clk);
static u32 omap3_dpll_autoidle_read(struct clk *clk);
35 36
static int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate);
static int omap3_dpll4_set_rate(struct clk *clk, unsigned long rate);
P
Paul Walmsley 已提交
37

38 39 40 41
/* Maximum DPLL multiplier, divider values for OMAP3 */
#define OMAP3_MAX_DPLL_MULT		2048
#define OMAP3_MAX_DPLL_DIV		128

P
Paul Walmsley 已提交
42 43 44 45 46 47 48 49
/*
 * DPLL1 supplies clock to the MPU.
 * DPLL2 supplies clock to the IVA2.
 * DPLL3 supplies CORE domain clocks.
 * DPLL4 supplies peripheral clocks.
 * DPLL5 supplies other peripheral clocks (USBHOST, USIM).
 */

50 51 52 53 54
/* CM_CLKEN_PLL*.EN* bit values - not all are available for every DPLL */
#define DPLL_LOW_POWER_STOP		0x1
#define DPLL_LOW_POWER_BYPASS		0x5
#define DPLL_LOCKED			0x7

P
Paul Walmsley 已提交
55 56 57 58 59
/* PRM CLOCKS */

/* According to timer32k.c, this is a 32768Hz clock, not a 32000Hz clock. */
static struct clk omap_32k_fck = {
	.name		= "omap_32k_fck",
60
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
61
	.rate		= 32768,
62
	.flags		= RATE_FIXED | RATE_PROPAGATES,
P
Paul Walmsley 已提交
63 64 65 66
};

static struct clk secure_32k_fck = {
	.name		= "secure_32k_fck",
67
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
68
	.rate		= 32768,
69
	.flags		= RATE_FIXED | RATE_PROPAGATES,
P
Paul Walmsley 已提交
70 71 72 73 74
};

/* Virtual source clocks for osc_sys_ck */
static struct clk virt_12m_ck = {
	.name		= "virt_12m_ck",
75
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
76
	.rate		= 12000000,
77
	.flags		= RATE_FIXED | RATE_PROPAGATES,
P
Paul Walmsley 已提交
78 79 80 81
};

static struct clk virt_13m_ck = {
	.name		= "virt_13m_ck",
82
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
83
	.rate		= 13000000,
84
	.flags		= RATE_FIXED | RATE_PROPAGATES,
P
Paul Walmsley 已提交
85 86 87 88
};

static struct clk virt_16_8m_ck = {
	.name		= "virt_16_8m_ck",
89
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
90
	.rate		= 16800000,
91
	.flags		= RATE_FIXED | RATE_PROPAGATES,
P
Paul Walmsley 已提交
92 93 94 95
};

static struct clk virt_19_2m_ck = {
	.name		= "virt_19_2m_ck",
96
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
97
	.rate		= 19200000,
98
	.flags		= RATE_FIXED | RATE_PROPAGATES,
P
Paul Walmsley 已提交
99 100 101 102
};

static struct clk virt_26m_ck = {
	.name		= "virt_26m_ck",
103
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
104
	.rate		= 26000000,
105
	.flags		= RATE_FIXED | RATE_PROPAGATES,
P
Paul Walmsley 已提交
106 107 108 109
};

static struct clk virt_38_4m_ck = {
	.name		= "virt_38_4m_ck",
110
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
111
	.rate		= 38400000,
112
	.flags		= RATE_FIXED | RATE_PROPAGATES,
P
Paul Walmsley 已提交
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
};

static const struct clksel_rate osc_sys_12m_rates[] = {
	{ .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 }
};

static const struct clksel_rate osc_sys_13m_rates[] = {
	{ .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 }
};

static const struct clksel_rate osc_sys_16_8m_rates[] = {
	{ .div = 1, .val = 5, .flags = RATE_IN_3430ES2 | DEFAULT_RATE },
	{ .div = 0 }
};

static const struct clksel_rate osc_sys_19_2m_rates[] = {
	{ .div = 1, .val = 2, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 }
};

static const struct clksel_rate osc_sys_26m_rates[] = {
	{ .div = 1, .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 }
};

static const struct clksel_rate osc_sys_38_4m_rates[] = {
	{ .div = 1, .val = 4, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 }
};

static const struct clksel osc_sys_clksel[] = {
	{ .parent = &virt_12m_ck,   .rates = osc_sys_12m_rates },
	{ .parent = &virt_13m_ck,   .rates = osc_sys_13m_rates },
	{ .parent = &virt_16_8m_ck, .rates = osc_sys_16_8m_rates },
	{ .parent = &virt_19_2m_ck, .rates = osc_sys_19_2m_rates },
	{ .parent = &virt_26m_ck,   .rates = osc_sys_26m_rates },
	{ .parent = &virt_38_4m_ck, .rates = osc_sys_38_4m_rates },
	{ .parent = NULL },
};

/* Oscillator clock */
/* 12, 13, 16.8, 19.2, 26, or 38.4 MHz */
static struct clk osc_sys_ck = {
	.name		= "osc_sys_ck",
159
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
160 161 162 163 164
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP3430_PRM_CLKSEL,
	.clksel_mask	= OMAP3430_SYS_CLKIN_SEL_MASK,
	.clksel		= osc_sys_clksel,
	/* REVISIT: deal with autoextclkmode? */
165
	.flags		= RATE_FIXED | RATE_PROPAGATES,
P
Paul Walmsley 已提交
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183
	.recalc		= &omap2_clksel_recalc,
};

static const struct clksel_rate div2_rates[] = {
	{ .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 2, .val = 2, .flags = RATE_IN_343X },
	{ .div = 0 }
};

static const struct clksel sys_clksel[] = {
	{ .parent = &osc_sys_ck, .rates = div2_rates },
	{ .parent = NULL }
};

/* Latency: this clock is only enabled after PRM_CLKSETUP.SETUP_TIME */
/* Feeds DPLLs - divided first by PRM_CLKSRC_CTRL.SYSCLKDIV? */
static struct clk sys_ck = {
	.name		= "sys_ck",
184
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
185 186 187 188 189
	.parent		= &osc_sys_ck,
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP3430_PRM_CLKSRC_CTRL,
	.clksel_mask	= OMAP_SYSCLKDIV_MASK,
	.clksel		= sys_clksel,
190
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
191 192 193 194 195
	.recalc		= &omap2_clksel_recalc,
};

static struct clk sys_altclk = {
	.name		= "sys_altclk",
196
	.ops		= &clkops_null,
197
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
198 199 200 201 202
};

/* Optional external clock input for some McBSPs */
static struct clk mcbsp_clks = {
	.name		= "mcbsp_clks",
203
	.ops		= &clkops_null,
204
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
205 206 207 208 209 210
};

/* PRM EXTERNAL CLOCK OUTPUT */

static struct clk sys_clkout1 = {
	.name		= "sys_clkout1",
211
	.ops		= &clkops_omap2_dflt,
P
Paul Walmsley 已提交
212 213 214 215 216 217 218 219 220 221
	.parent		= &osc_sys_ck,
	.enable_reg	= OMAP3430_PRM_CLKOUT_CTRL,
	.enable_bit	= OMAP3430_CLKOUT_EN_SHIFT,
	.recalc		= &followparent_recalc,
};

/* DPLLS */

/* CM CLOCKS */

222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251
static const struct clksel_rate dpll_bypass_rates[] = {
	{ .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 }
};

static const struct clksel_rate dpll_locked_rates[] = {
	{ .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 }
};

static const struct clksel_rate div16_dpll_rates[] = {
	{ .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 2, .val = 2, .flags = RATE_IN_343X },
	{ .div = 3, .val = 3, .flags = RATE_IN_343X },
	{ .div = 4, .val = 4, .flags = RATE_IN_343X },
	{ .div = 5, .val = 5, .flags = RATE_IN_343X },
	{ .div = 6, .val = 6, .flags = RATE_IN_343X },
	{ .div = 7, .val = 7, .flags = RATE_IN_343X },
	{ .div = 8, .val = 8, .flags = RATE_IN_343X },
	{ .div = 9, .val = 9, .flags = RATE_IN_343X },
	{ .div = 10, .val = 10, .flags = RATE_IN_343X },
	{ .div = 11, .val = 11, .flags = RATE_IN_343X },
	{ .div = 12, .val = 12, .flags = RATE_IN_343X },
	{ .div = 13, .val = 13, .flags = RATE_IN_343X },
	{ .div = 14, .val = 14, .flags = RATE_IN_343X },
	{ .div = 15, .val = 15, .flags = RATE_IN_343X },
	{ .div = 16, .val = 16, .flags = RATE_IN_343X },
	{ .div = 0 }
};

P
Paul Walmsley 已提交
252 253 254
/* DPLL1 */
/* MPU clock source */
/* Type: DPLL */
255
static struct dpll_data dpll1_dd = {
P
Paul Walmsley 已提交
256 257 258
	.mult_div1_reg	= OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL1_PLL),
	.mult_mask	= OMAP3430_MPU_DPLL_MULT_MASK,
	.div1_mask	= OMAP3430_MPU_DPLL_DIV_MASK,
259
	.freqsel_mask	= OMAP3430_MPU_DPLL_FREQSEL_MASK,
P
Paul Walmsley 已提交
260 261
	.control_reg	= OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKEN_PLL),
	.enable_mask	= OMAP3430_EN_MPU_DPLL_MASK,
262
	.modes		= (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
P
Paul Walmsley 已提交
263 264 265
	.auto_recal_bit	= OMAP3430_EN_MPU_DPLL_DRIFTGUARD_SHIFT,
	.recal_en_bit	= OMAP3430_MPU_DPLL_RECAL_EN_SHIFT,
	.recal_st_bit	= OMAP3430_MPU_DPLL_ST_SHIFT,
266 267 268 269
	.autoidle_reg	= OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_AUTOIDLE_PLL),
	.autoidle_mask	= OMAP3430_AUTO_MPU_DPLL_MASK,
	.idlest_reg	= OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL),
	.idlest_bit	= OMAP3430_ST_MPU_CLK_SHIFT,
270 271 272
	.max_multiplier = OMAP3_MAX_DPLL_MULT,
	.max_divider	= OMAP3_MAX_DPLL_DIV,
	.rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
P
Paul Walmsley 已提交
273 274 275 276
};

static struct clk dpll1_ck = {
	.name		= "dpll1_ck",
277
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
278 279
	.parent		= &sys_ck,
	.dpll_data	= &dpll1_dd,
280
	.flags		= RATE_PROPAGATES,
281
	.round_rate	= &omap2_dpll_round_rate,
282
	.set_rate	= &omap3_noncore_dpll_set_rate,
P
Paul Walmsley 已提交
283 284 285 286
	.recalc		= &omap3_dpll_recalc,
};

/*
287 288
 * This virtual clock provides the CLKOUTX2 output from the DPLL if the
 * DPLL isn't bypassed.
P
Paul Walmsley 已提交
289
 */
290 291
static struct clk dpll1_x2_ck = {
	.name		= "dpll1_x2_ck",
292
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
293
	.parent		= &dpll1_ck,
294
	.flags		= RATE_PROPAGATES,
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309
	.recalc		= &omap3_clkoutx2_recalc,
};

/* On DPLL1, unlike other DPLLs, the divider is downstream from CLKOUTX2 */
static const struct clksel div16_dpll1_x2m2_clksel[] = {
	{ .parent = &dpll1_x2_ck, .rates = div16_dpll_rates },
	{ .parent = NULL }
};

/*
 * Does not exist in the TRM - needed to separate the M2 divider from
 * bypass selection in mpu_ck
 */
static struct clk dpll1_x2m2_ck = {
	.name		= "dpll1_x2m2_ck",
310
	.ops		= &clkops_null,
311 312 313 314 315
	.parent		= &dpll1_x2_ck,
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL2_PLL),
	.clksel_mask	= OMAP3430_MPU_DPLL_CLKOUT_DIV_MASK,
	.clksel		= div16_dpll1_x2m2_clksel,
316
	.flags		= RATE_PROPAGATES,
317
	.recalc		= &omap2_clksel_recalc,
P
Paul Walmsley 已提交
318 319 320 321 322 323
};

/* DPLL2 */
/* IVA2 clock source */
/* Type: DPLL */

324
static struct dpll_data dpll2_dd = {
P
Paul Walmsley 已提交
325 326 327
	.mult_div1_reg	= OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL1_PLL),
	.mult_mask	= OMAP3430_IVA2_DPLL_MULT_MASK,
	.div1_mask	= OMAP3430_IVA2_DPLL_DIV_MASK,
328
	.freqsel_mask	= OMAP3430_IVA2_DPLL_FREQSEL_MASK,
P
Paul Walmsley 已提交
329 330
	.control_reg	= OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKEN_PLL),
	.enable_mask	= OMAP3430_EN_IVA2_DPLL_MASK,
331 332
	.modes		= (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED) |
				(1 << DPLL_LOW_POWER_BYPASS),
P
Paul Walmsley 已提交
333 334 335
	.auto_recal_bit	= OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_SHIFT,
	.recal_en_bit	= OMAP3430_PRM_IRQENABLE_MPU_IVA2_DPLL_RECAL_EN_SHIFT,
	.recal_st_bit	= OMAP3430_PRM_IRQSTATUS_MPU_IVA2_DPLL_ST_SHIFT,
336 337 338
	.autoidle_reg	= OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_AUTOIDLE_PLL),
	.autoidle_mask	= OMAP3430_AUTO_IVA2_DPLL_MASK,
	.idlest_reg	= OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_IDLEST_PLL),
339 340 341 342
	.idlest_bit	= OMAP3430_ST_IVA2_CLK_SHIFT,
	.max_multiplier = OMAP3_MAX_DPLL_MULT,
	.max_divider	= OMAP3_MAX_DPLL_DIV,
	.rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
P
Paul Walmsley 已提交
343 344 345 346
};

static struct clk dpll2_ck = {
	.name		= "dpll2_ck",
347
	.ops		= &clkops_noncore_dpll_ops,
P
Paul Walmsley 已提交
348 349
	.parent		= &sys_ck,
	.dpll_data	= &dpll2_dd,
350
	.flags		= RATE_PROPAGATES,
351
	.round_rate	= &omap2_dpll_round_rate,
352
	.set_rate	= &omap3_noncore_dpll_set_rate,
P
Paul Walmsley 已提交
353 354 355
	.recalc		= &omap3_dpll_recalc,
};

356 357 358 359 360 361 362 363 364 365 366
static const struct clksel div16_dpll2_m2x2_clksel[] = {
	{ .parent = &dpll2_ck, .rates = div16_dpll_rates },
	{ .parent = NULL }
};

/*
 * The TRM is conflicted on whether IVA2 clock comes from DPLL2 CLKOUT
 * or CLKOUTX2. CLKOUT seems most plausible.
 */
static struct clk dpll2_m2_ck = {
	.name		= "dpll2_m2_ck",
367
	.ops		= &clkops_null,
368 369 370 371 372 373
	.parent		= &dpll2_ck,
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_IVA2_MOD,
					  OMAP3430_CM_CLKSEL2_PLL),
	.clksel_mask	= OMAP3430_IVA2_DPLL_CLKOUT_DIV_MASK,
	.clksel		= div16_dpll2_m2x2_clksel,
374
	.flags		= RATE_PROPAGATES,
375 376 377
	.recalc		= &omap2_clksel_recalc,
};

378 379 380 381 382
/*
 * DPLL3
 * Source clock for all interfaces and for some device fclks
 * REVISIT: Also supports fast relock bypass - not included below
 */
383
static struct dpll_data dpll3_dd = {
P
Paul Walmsley 已提交
384 385 386
	.mult_div1_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
	.mult_mask	= OMAP3430_CORE_DPLL_MULT_MASK,
	.div1_mask	= OMAP3430_CORE_DPLL_DIV_MASK,
387
	.freqsel_mask	= OMAP3430_CORE_DPLL_FREQSEL_MASK,
P
Paul Walmsley 已提交
388 389 390 391 392
	.control_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
	.enable_mask	= OMAP3430_EN_CORE_DPLL_MASK,
	.auto_recal_bit	= OMAP3430_EN_CORE_DPLL_DRIFTGUARD_SHIFT,
	.recal_en_bit	= OMAP3430_CORE_DPLL_RECAL_EN_SHIFT,
	.recal_st_bit	= OMAP3430_CORE_DPLL_ST_SHIFT,
393 394
	.autoidle_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_AUTOIDLE),
	.autoidle_mask	= OMAP3430_AUTO_CORE_DPLL_MASK,
395 396 397
	.max_multiplier = OMAP3_MAX_DPLL_MULT,
	.max_divider	= OMAP3_MAX_DPLL_DIV,
	.rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
P
Paul Walmsley 已提交
398 399 400 401
};

static struct clk dpll3_ck = {
	.name		= "dpll3_ck",
402
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
403 404
	.parent		= &sys_ck,
	.dpll_data	= &dpll3_dd,
405
	.flags		= RATE_PROPAGATES,
406
	.round_rate	= &omap2_dpll_round_rate,
P
Paul Walmsley 已提交
407 408 409
	.recalc		= &omap3_dpll_recalc,
};

410 411 412 413 414 415
/*
 * This virtual clock provides the CLKOUTX2 output from the DPLL if the
 * DPLL isn't bypassed
 */
static struct clk dpll3_x2_ck = {
	.name		= "dpll3_x2_ck",
416
	.ops		= &clkops_null,
417
	.parent		= &dpll3_ck,
418
	.flags		= RATE_PROPAGATES,
419
	.recalc		= &omap3_clkoutx2_recalc,
P
Paul Walmsley 已提交
420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462
};

static const struct clksel_rate div31_dpll3_rates[] = {
	{ .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 2, .val = 2, .flags = RATE_IN_343X },
	{ .div = 3, .val = 3, .flags = RATE_IN_3430ES2 },
	{ .div = 4, .val = 4, .flags = RATE_IN_3430ES2 },
	{ .div = 5, .val = 5, .flags = RATE_IN_3430ES2 },
	{ .div = 6, .val = 6, .flags = RATE_IN_3430ES2 },
	{ .div = 7, .val = 7, .flags = RATE_IN_3430ES2 },
	{ .div = 8, .val = 8, .flags = RATE_IN_3430ES2 },
	{ .div = 9, .val = 9, .flags = RATE_IN_3430ES2 },
	{ .div = 10, .val = 10, .flags = RATE_IN_3430ES2 },
	{ .div = 11, .val = 11, .flags = RATE_IN_3430ES2 },
	{ .div = 12, .val = 12, .flags = RATE_IN_3430ES2 },
	{ .div = 13, .val = 13, .flags = RATE_IN_3430ES2 },
	{ .div = 14, .val = 14, .flags = RATE_IN_3430ES2 },
	{ .div = 15, .val = 15, .flags = RATE_IN_3430ES2 },
	{ .div = 16, .val = 16, .flags = RATE_IN_3430ES2 },
	{ .div = 17, .val = 17, .flags = RATE_IN_3430ES2 },
	{ .div = 18, .val = 18, .flags = RATE_IN_3430ES2 },
	{ .div = 19, .val = 19, .flags = RATE_IN_3430ES2 },
	{ .div = 20, .val = 20, .flags = RATE_IN_3430ES2 },
	{ .div = 21, .val = 21, .flags = RATE_IN_3430ES2 },
	{ .div = 22, .val = 22, .flags = RATE_IN_3430ES2 },
	{ .div = 23, .val = 23, .flags = RATE_IN_3430ES2 },
	{ .div = 24, .val = 24, .flags = RATE_IN_3430ES2 },
	{ .div = 25, .val = 25, .flags = RATE_IN_3430ES2 },
	{ .div = 26, .val = 26, .flags = RATE_IN_3430ES2 },
	{ .div = 27, .val = 27, .flags = RATE_IN_3430ES2 },
	{ .div = 28, .val = 28, .flags = RATE_IN_3430ES2 },
	{ .div = 29, .val = 29, .flags = RATE_IN_3430ES2 },
	{ .div = 30, .val = 30, .flags = RATE_IN_3430ES2 },
	{ .div = 31, .val = 31, .flags = RATE_IN_3430ES2 },
	{ .div = 0 },
};

static const struct clksel div31_dpll3m2_clksel[] = {
	{ .parent = &dpll3_ck, .rates = div31_dpll3_rates },
	{ .parent = NULL }
};

/*
463 464 465
 * DPLL3 output M2
 * REVISIT: This DPLL output divider must be changed in SRAM, so until
 * that code is ready, this should remain a 'read-only' clksel clock.
P
Paul Walmsley 已提交
466 467 468
 */
static struct clk dpll3_m2_ck = {
	.name		= "dpll3_m2_ck",
469
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
470 471 472 473 474
	.parent		= &dpll3_ck,
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
	.clksel_mask	= OMAP3430_CORE_DPLL_CLKOUT_DIV_MASK,
	.clksel		= div31_dpll3m2_clksel,
475
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
476 477 478
	.recalc		= &omap2_clksel_recalc,
};

479
static const struct clksel core_ck_clksel[] = {
480
	{ .parent = &sys_ck,	  .rates = dpll_bypass_rates },
481 482 483 484
	{ .parent = &dpll3_m2_ck, .rates = dpll_locked_rates },
	{ .parent = NULL }
};

P
Paul Walmsley 已提交
485 486
static struct clk core_ck = {
	.name		= "core_ck",
487
	.ops		= &clkops_null,
488 489
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
490
	.clksel_mask	= OMAP3430_ST_CORE_CLK_MASK,
491
	.clksel		= core_ck_clksel,
492
	.flags		= RATE_PROPAGATES,
493
	.recalc		= &omap2_clksel_recalc,
P
Paul Walmsley 已提交
494 495
};

496
static const struct clksel dpll3_m2x2_ck_clksel[] = {
497
	{ .parent = &sys_ck,	  .rates = dpll_bypass_rates },
498 499
	{ .parent = &dpll3_x2_ck, .rates = dpll_locked_rates },
	{ .parent = NULL }
P
Paul Walmsley 已提交
500 501 502 503
};

static struct clk dpll3_m2x2_ck = {
	.name		= "dpll3_m2x2_ck",
504
	.ops		= &clkops_null,
505 506
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
507
	.clksel_mask	= OMAP3430_ST_CORE_CLK_MASK,
508
	.clksel		= dpll3_m2x2_ck_clksel,
509
	.flags		= RATE_PROPAGATES,
510 511 512 513 514 515 516 517 518 519 520 521
	.recalc		= &omap2_clksel_recalc,
};

/* The PWRDN bit is apparently only available on 3430ES2 and above */
static const struct clksel div16_dpll3_clksel[] = {
	{ .parent = &dpll3_ck, .rates = div16_dpll_rates },
	{ .parent = NULL }
};

/* This virtual clock is the source for dpll3_m3x2_ck */
static struct clk dpll3_m3_ck = {
	.name		= "dpll3_m3_ck",
522
	.ops		= &clkops_null,
523 524 525 526 527
	.parent		= &dpll3_ck,
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
	.clksel_mask	= OMAP3430_DIV_DPLL3_MASK,
	.clksel		= div16_dpll3_clksel,
528
	.flags		= RATE_PROPAGATES,
529
	.recalc		= &omap2_clksel_recalc,
P
Paul Walmsley 已提交
530 531 532 533 534
};

/* The PWRDN bit is apparently only available on 3430ES2 and above */
static struct clk dpll3_m3x2_ck = {
	.name		= "dpll3_m3x2_ck",
535
	.ops		= &clkops_omap2_dflt_wait,
536
	.parent		= &dpll3_m3_ck,
P
Paul Walmsley 已提交
537 538
	.enable_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
	.enable_bit	= OMAP3430_PWRDN_EMU_CORE_SHIFT,
539
	.flags		= RATE_PROPAGATES | INVERT_ENABLE,
540
	.recalc		= &omap3_clkoutx2_recalc,
P
Paul Walmsley 已提交
541 542
};

543
static const struct clksel emu_core_alwon_ck_clksel[] = {
544
	{ .parent = &sys_ck,	    .rates = dpll_bypass_rates },
545
	{ .parent = &dpll3_m3x2_ck, .rates = dpll_locked_rates },
P
Paul Walmsley 已提交
546 547 548 549 550
	{ .parent = NULL }
};

static struct clk emu_core_alwon_ck = {
	.name		= "emu_core_alwon_ck",
551
	.ops		= &clkops_null,
552
	.parent		= &dpll3_m3x2_ck,
P
Paul Walmsley 已提交
553
	.init		= &omap2_init_clksel_parent,
554
	.clksel_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
555
	.clksel_mask	= OMAP3430_ST_CORE_CLK_MASK,
556
	.clksel		= emu_core_alwon_ck_clksel,
557
	.flags		= RATE_PROPAGATES,
558
	.recalc		= &omap2_clksel_recalc,
P
Paul Walmsley 已提交
559 560 561 562 563
};

/* DPLL4 */
/* Supplies 96MHz, 54Mhz TV DAC, DSS fclk, CAM sensor clock, emul trace clk */
/* Type: DPLL */
564
static struct dpll_data dpll4_dd = {
P
Paul Walmsley 已提交
565 566 567
	.mult_div1_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL2),
	.mult_mask	= OMAP3430_PERIPH_DPLL_MULT_MASK,
	.div1_mask	= OMAP3430_PERIPH_DPLL_DIV_MASK,
568
	.freqsel_mask	= OMAP3430_PERIPH_DPLL_FREQSEL_MASK,
P
Paul Walmsley 已提交
569 570
	.control_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
	.enable_mask	= OMAP3430_EN_PERIPH_DPLL_MASK,
571
	.modes		= (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED),
P
Paul Walmsley 已提交
572 573 574
	.auto_recal_bit	= OMAP3430_EN_PERIPH_DPLL_DRIFTGUARD_SHIFT,
	.recal_en_bit	= OMAP3430_PERIPH_DPLL_RECAL_EN_SHIFT,
	.recal_st_bit	= OMAP3430_PERIPH_DPLL_ST_SHIFT,
575 576 577 578
	.autoidle_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_AUTOIDLE),
	.autoidle_mask	= OMAP3430_AUTO_PERIPH_DPLL_MASK,
	.idlest_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
	.idlest_bit	= OMAP3430_ST_PERIPH_CLK_SHIFT,
579 580 581
	.max_multiplier = OMAP3_MAX_DPLL_MULT,
	.max_divider	= OMAP3_MAX_DPLL_DIV,
	.rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
P
Paul Walmsley 已提交
582 583 584 585
};

static struct clk dpll4_ck = {
	.name		= "dpll4_ck",
586
	.ops		= &clkops_noncore_dpll_ops,
P
Paul Walmsley 已提交
587 588
	.parent		= &sys_ck,
	.dpll_data	= &dpll4_dd,
589
	.flags		= RATE_PROPAGATES,
590
	.round_rate	= &omap2_dpll_round_rate,
591
	.set_rate	= &omap3_dpll4_set_rate,
P
Paul Walmsley 已提交
592 593 594 595 596
	.recalc		= &omap3_dpll_recalc,
};

/*
 * This virtual clock provides the CLKOUTX2 output from the DPLL if the
597 598
 * DPLL isn't bypassed --
 * XXX does this serve any downstream clocks?
P
Paul Walmsley 已提交
599 600 601
 */
static struct clk dpll4_x2_ck = {
	.name		= "dpll4_x2_ck",
602
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
603
	.parent		= &dpll4_ck,
604
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
605 606 607 608
	.recalc		= &omap3_clkoutx2_recalc,
};

static const struct clksel div16_dpll4_clksel[] = {
609
	{ .parent = &dpll4_ck, .rates = div16_dpll_rates },
P
Paul Walmsley 已提交
610 611 612
	{ .parent = NULL }
};

613 614 615
/* This virtual clock is the source for dpll4_m2x2_ck */
static struct clk dpll4_m2_ck = {
	.name		= "dpll4_m2_ck",
616
	.ops		= &clkops_null,
617 618 619 620 621
	.parent		= &dpll4_ck,
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(PLL_MOD, OMAP3430_CM_CLKSEL3),
	.clksel_mask	= OMAP3430_DIV_96M_MASK,
	.clksel		= div16_dpll4_clksel,
622
	.flags		= RATE_PROPAGATES,
623 624 625
	.recalc		= &omap2_clksel_recalc,
};

P
Paul Walmsley 已提交
626 627 628
/* The PWRDN bit is apparently only available on 3430ES2 and above */
static struct clk dpll4_m2x2_ck = {
	.name		= "dpll4_m2x2_ck",
629
	.ops		= &clkops_omap2_dflt_wait,
630
	.parent		= &dpll4_m2_ck,
P
Paul Walmsley 已提交
631 632
	.enable_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
	.enable_bit	= OMAP3430_PWRDN_96M_SHIFT,
633
	.flags		= RATE_PROPAGATES | INVERT_ENABLE,
634 635 636 637
	.recalc		= &omap3_clkoutx2_recalc,
};

static const struct clksel omap_96m_alwon_fck_clksel[] = {
638
	{ .parent = &sys_ck,	    .rates = dpll_bypass_rates },
639 640
	{ .parent = &dpll4_m2x2_ck, .rates = dpll_locked_rates },
	{ .parent = NULL }
P
Paul Walmsley 已提交
641 642
};

643 644 645 646 647 648
/*
 * DPLL4 generates DPLL4_M2X2_CLK which is then routed into the PRM as
 * PRM_96M_ALWON_(F)CLK.  Two clocks then emerge from the PRM:
 * 96M_ALWON_FCLK (called "omap_96m_alwon_fck" below) and
 * CM_96K_(F)CLK.
 */
P
Paul Walmsley 已提交
649 650
static struct clk omap_96m_alwon_fck = {
	.name		= "omap_96m_alwon_fck",
651
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
652
	.parent		= &dpll4_m2x2_ck,
653 654
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
655
	.clksel_mask	= OMAP3430_ST_PERIPH_CLK_MASK,
656
	.clksel		= omap_96m_alwon_fck_clksel,
657
	.flags		= RATE_PROPAGATES,
658
	.recalc		= &omap2_clksel_recalc,
P
Paul Walmsley 已提交
659 660
};

661 662
static struct clk cm_96m_fck = {
	.name		= "cm_96m_fck",
663
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
664
	.parent		= &omap_96m_alwon_fck,
665
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
666 667 668
	.recalc		= &followparent_recalc,
};

669 670 671 672 673 674 675 676 677 678 679 680 681
static const struct clksel_rate omap_96m_dpll_rates[] = {
	{ .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 }
};

static const struct clksel_rate omap_96m_sys_rates[] = {
	{ .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 }
};

static const struct clksel omap_96m_fck_clksel[] = {
	{ .parent = &cm_96m_fck, .rates = omap_96m_dpll_rates },
	{ .parent = &sys_ck,	 .rates = omap_96m_sys_rates },
682 683 684
	{ .parent = NULL }
};

685 686
static struct clk omap_96m_fck = {
	.name		= "omap_96m_fck",
687
	.ops		= &clkops_null,
688
	.parent		= &sys_ck,
689
	.init		= &omap2_init_clksel_parent,
690 691 692
	.clksel_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
	.clksel_mask	= OMAP3430_SOURCE_96M_MASK,
	.clksel		= omap_96m_fck_clksel,
693
	.flags		= RATE_PROPAGATES,
694 695 696 697 698 699
	.recalc		= &omap2_clksel_recalc,
};

/* This virtual clock is the source for dpll4_m3x2_ck */
static struct clk dpll4_m3_ck = {
	.name		= "dpll4_m3_ck",
700
	.ops		= &clkops_null,
701 702 703 704 705
	.parent		= &dpll4_ck,
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430_CLKSEL_TV_MASK,
	.clksel		= div16_dpll4_clksel,
706
	.flags		= RATE_PROPAGATES,
707
	.recalc		= &omap2_clksel_recalc,
P
Paul Walmsley 已提交
708 709 710 711 712
};

/* The PWRDN bit is apparently only available on 3430ES2 and above */
static struct clk dpll4_m3x2_ck = {
	.name		= "dpll4_m3x2_ck",
713
	.ops		= &clkops_omap2_dflt_wait,
714
	.parent		= &dpll4_m3_ck,
P
Paul Walmsley 已提交
715 716 717
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
	.enable_bit	= OMAP3430_PWRDN_TV_SHIFT,
718
	.flags		= RATE_PROPAGATES | INVERT_ENABLE,
719 720 721 722
	.recalc		= &omap3_clkoutx2_recalc,
};

static const struct clksel virt_omap_54m_fck_clksel[] = {
723
	{ .parent = &sys_ck,	    .rates = dpll_bypass_rates },
724 725 726 727 728 729
	{ .parent = &dpll4_m3x2_ck, .rates = dpll_locked_rates },
	{ .parent = NULL }
};

static struct clk virt_omap_54m_fck = {
	.name		= "virt_omap_54m_fck",
730
	.ops		= &clkops_null,
731 732 733
	.parent		= &dpll4_m3x2_ck,
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
734
	.clksel_mask	= OMAP3430_ST_PERIPH_CLK_MASK,
735
	.clksel		= virt_omap_54m_fck_clksel,
736
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
737 738 739 740 741 742 743 744 745 746 747 748 749 750
	.recalc		= &omap2_clksel_recalc,
};

static const struct clksel_rate omap_54m_d4m3x2_rates[] = {
	{ .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 }
};

static const struct clksel_rate omap_54m_alt_rates[] = {
	{ .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 }
};

static const struct clksel omap_54m_clksel[] = {
751
	{ .parent = &virt_omap_54m_fck, .rates = omap_54m_d4m3x2_rates },
P
Paul Walmsley 已提交
752 753 754 755 756 757
	{ .parent = &sys_altclk,    .rates = omap_54m_alt_rates },
	{ .parent = NULL }
};

static struct clk omap_54m_fck = {
	.name		= "omap_54m_fck",
758
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
759 760
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
761
	.clksel_mask	= OMAP3430_SOURCE_54M_MASK,
P
Paul Walmsley 已提交
762
	.clksel		= omap_54m_clksel,
763
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
764 765 766
	.recalc		= &omap2_clksel_recalc,
};

767
static const struct clksel_rate omap_48m_cm96m_rates[] = {
P
Paul Walmsley 已提交
768 769 770 771 772 773 774 775 776 777
	{ .div = 2, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 }
};

static const struct clksel_rate omap_48m_alt_rates[] = {
	{ .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 }
};

static const struct clksel omap_48m_clksel[] = {
778
	{ .parent = &cm_96m_fck, .rates = omap_48m_cm96m_rates },
P
Paul Walmsley 已提交
779 780 781 782 783 784
	{ .parent = &sys_altclk, .rates = omap_48m_alt_rates },
	{ .parent = NULL }
};

static struct clk omap_48m_fck = {
	.name		= "omap_48m_fck",
785
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
786 787
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
788
	.clksel_mask	= OMAP3430_SOURCE_48M_MASK,
P
Paul Walmsley 已提交
789
	.clksel		= omap_48m_clksel,
790
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
791 792 793 794 795
	.recalc		= &omap2_clksel_recalc,
};

static struct clk omap_12m_fck = {
	.name		= "omap_12m_fck",
796
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
797 798
	.parent		= &omap_48m_fck,
	.fixed_div	= 4,
799
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
800 801 802
	.recalc		= &omap2_fixed_divisor_recalc,
};

803 804 805
/* This virstual clock is the source for dpll4_m4x2_ck */
static struct clk dpll4_m4_ck = {
	.name		= "dpll4_m4_ck",
806
	.ops		= &clkops_null,
807 808 809 810 811
	.parent		= &dpll4_ck,
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430_CLKSEL_DSS1_MASK,
	.clksel		= div16_dpll4_clksel,
812
	.flags		= RATE_PROPAGATES,
813
	.recalc		= &omap2_clksel_recalc,
814 815
	.set_rate	= &omap2_clksel_set_rate,
	.round_rate	= &omap2_clksel_round_rate,
816 817
};

P
Paul Walmsley 已提交
818 819 820
/* The PWRDN bit is apparently only available on 3430ES2 and above */
static struct clk dpll4_m4x2_ck = {
	.name		= "dpll4_m4x2_ck",
821
	.ops		= &clkops_omap2_dflt_wait,
822
	.parent		= &dpll4_m4_ck,
P
Paul Walmsley 已提交
823 824
	.enable_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
	.enable_bit	= OMAP3430_PWRDN_CAM_SHIFT,
825
	.flags		= RATE_PROPAGATES | INVERT_ENABLE,
826 827 828 829 830 831
	.recalc		= &omap3_clkoutx2_recalc,
};

/* This virtual clock is the source for dpll4_m5x2_ck */
static struct clk dpll4_m5_ck = {
	.name		= "dpll4_m5_ck",
832
	.ops		= &clkops_null,
833 834 835 836 837
	.parent		= &dpll4_ck,
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430_CLKSEL_CAM_MASK,
	.clksel		= div16_dpll4_clksel,
838
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
839 840 841 842 843 844
	.recalc		= &omap2_clksel_recalc,
};

/* The PWRDN bit is apparently only available on 3430ES2 and above */
static struct clk dpll4_m5x2_ck = {
	.name		= "dpll4_m5x2_ck",
845
	.ops		= &clkops_omap2_dflt_wait,
846
	.parent		= &dpll4_m5_ck,
P
Paul Walmsley 已提交
847 848
	.enable_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
	.enable_bit	= OMAP3430_PWRDN_CAM_SHIFT,
849
	.flags		= RATE_PROPAGATES | INVERT_ENABLE,
850 851 852 853 854 855
	.recalc		= &omap3_clkoutx2_recalc,
};

/* This virtual clock is the source for dpll4_m6x2_ck */
static struct clk dpll4_m6_ck = {
	.name		= "dpll4_m6_ck",
856
	.ops		= &clkops_null,
857 858 859 860 861
	.parent		= &dpll4_ck,
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
	.clksel_mask	= OMAP3430_DIV_DPLL4_MASK,
	.clksel		= div16_dpll4_clksel,
862
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
863 864 865 866 867 868
	.recalc		= &omap2_clksel_recalc,
};

/* The PWRDN bit is apparently only available on 3430ES2 and above */
static struct clk dpll4_m6x2_ck = {
	.name		= "dpll4_m6x2_ck",
869
	.ops		= &clkops_omap2_dflt_wait,
870
	.parent		= &dpll4_m6_ck,
P
Paul Walmsley 已提交
871 872 873
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
	.enable_bit	= OMAP3430_PWRDN_EMU_PERIPH_SHIFT,
874
	.flags		= RATE_PROPAGATES | INVERT_ENABLE,
875
	.recalc		= &omap3_clkoutx2_recalc,
P
Paul Walmsley 已提交
876 877 878 879
};

static struct clk emu_per_alwon_ck = {
	.name		= "emu_per_alwon_ck",
880
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
881
	.parent		= &dpll4_m6x2_ck,
882
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
883 884 885 886 887 888 889
	.recalc		= &followparent_recalc,
};

/* DPLL5 */
/* Supplies 120MHz clock, USIM source clock */
/* Type: DPLL */
/* 3430ES2 only */
890
static struct dpll_data dpll5_dd = {
P
Paul Walmsley 已提交
891 892 893
	.mult_div1_reg	= OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKSEL4),
	.mult_mask	= OMAP3430ES2_PERIPH2_DPLL_MULT_MASK,
	.div1_mask	= OMAP3430ES2_PERIPH2_DPLL_DIV_MASK,
894
	.freqsel_mask	= OMAP3430ES2_PERIPH2_DPLL_FREQSEL_MASK,
P
Paul Walmsley 已提交
895 896
	.control_reg	= OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKEN2),
	.enable_mask	= OMAP3430ES2_EN_PERIPH2_DPLL_MASK,
897
	.modes		= (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED),
P
Paul Walmsley 已提交
898 899 900
	.auto_recal_bit	= OMAP3430ES2_EN_PERIPH2_DPLL_DRIFTGUARD_SHIFT,
	.recal_en_bit	= OMAP3430ES2_SND_PERIPH_DPLL_RECAL_EN_SHIFT,
	.recal_st_bit	= OMAP3430ES2_SND_PERIPH_DPLL_ST_SHIFT,
901 902 903 904
	.autoidle_reg	= OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_AUTOIDLE2_PLL),
	.autoidle_mask	= OMAP3430ES2_AUTO_PERIPH2_DPLL_MASK,
	.idlest_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST2),
	.idlest_bit	= OMAP3430ES2_ST_PERIPH2_CLK_SHIFT,
905 906 907
	.max_multiplier = OMAP3_MAX_DPLL_MULT,
	.max_divider	= OMAP3_MAX_DPLL_DIV,
	.rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
P
Paul Walmsley 已提交
908 909 910 911
};

static struct clk dpll5_ck = {
	.name		= "dpll5_ck",
912
	.ops		= &clkops_noncore_dpll_ops,
P
Paul Walmsley 已提交
913 914
	.parent		= &sys_ck,
	.dpll_data	= &dpll5_dd,
915
	.flags		= RATE_PROPAGATES,
916
	.round_rate	= &omap2_dpll_round_rate,
917
	.set_rate	= &omap3_noncore_dpll_set_rate,
P
Paul Walmsley 已提交
918 919 920
	.recalc		= &omap3_dpll_recalc,
};

921
static const struct clksel div16_dpll5_clksel[] = {
P
Paul Walmsley 已提交
922 923 924 925 926 927
	{ .parent = &dpll5_ck, .rates = div16_dpll_rates },
	{ .parent = NULL }
};

static struct clk dpll5_m2_ck = {
	.name		= "dpll5_m2_ck",
928
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
929 930 931 932
	.parent		= &dpll5_ck,
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKSEL5),
	.clksel_mask	= OMAP3430ES2_DIV_120M_MASK,
933
	.clksel		= div16_dpll5_clksel,
934
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
935 936 937
	.recalc		= &omap2_clksel_recalc,
};

938
static const struct clksel omap_120m_fck_clksel[] = {
939
	{ .parent = &sys_ck,	  .rates = dpll_bypass_rates },
940 941 942 943
	{ .parent = &dpll5_m2_ck, .rates = dpll_locked_rates },
	{ .parent = NULL }
};

P
Paul Walmsley 已提交
944 945
static struct clk omap_120m_fck = {
	.name		= "omap_120m_fck",
946
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
947
	.parent		= &dpll5_m2_ck,
948 949 950 951
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST2),
	.clksel_mask	= OMAP3430ES2_ST_PERIPH2_CLK_MASK,
	.clksel		= omap_120m_fck_clksel,
952
	.flags		= RATE_PROPAGATES,
953
	.recalc		= &omap2_clksel_recalc,
P
Paul Walmsley 已提交
954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978
};

/* CM EXTERNAL CLOCK OUTPUTS */

static const struct clksel_rate clkout2_src_core_rates[] = {
	{ .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 }
};

static const struct clksel_rate clkout2_src_sys_rates[] = {
	{ .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 }
};

static const struct clksel_rate clkout2_src_96m_rates[] = {
	{ .div = 1, .val = 2, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 }
};

static const struct clksel_rate clkout2_src_54m_rates[] = {
	{ .div = 1, .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 }
};

static const struct clksel clkout2_src_clksel[] = {
979 980 981 982
	{ .parent = &core_ck,		.rates = clkout2_src_core_rates },
	{ .parent = &sys_ck,		.rates = clkout2_src_sys_rates },
	{ .parent = &cm_96m_fck,	.rates = clkout2_src_96m_rates },
	{ .parent = &omap_54m_fck,	.rates = clkout2_src_54m_rates },
P
Paul Walmsley 已提交
983 984 985 986 987
	{ .parent = NULL }
};

static struct clk clkout2_src_ck = {
	.name		= "clkout2_src_ck",
988
	.ops		= &clkops_omap2_dflt,
P
Paul Walmsley 已提交
989 990 991 992 993 994
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP3430_CM_CLKOUT_CTRL,
	.enable_bit	= OMAP3430_CLKOUT2_EN_SHIFT,
	.clksel_reg	= OMAP3430_CM_CLKOUT_CTRL,
	.clksel_mask	= OMAP3430_CLKOUT2SOURCE_MASK,
	.clksel		= clkout2_src_clksel,
995
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014
	.recalc		= &omap2_clksel_recalc,
};

static const struct clksel_rate sys_clkout2_rates[] = {
	{ .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 2, .val = 1, .flags = RATE_IN_343X },
	{ .div = 4, .val = 2, .flags = RATE_IN_343X },
	{ .div = 8, .val = 3, .flags = RATE_IN_343X },
	{ .div = 16, .val = 4, .flags = RATE_IN_343X },
	{ .div = 0 },
};

static const struct clksel sys_clkout2_clksel[] = {
	{ .parent = &clkout2_src_ck, .rates = sys_clkout2_rates },
	{ .parent = NULL },
};

static struct clk sys_clkout2 = {
	.name		= "sys_clkout2",
1015
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP3430_CM_CLKOUT_CTRL,
	.clksel_mask	= OMAP3430_CLKOUT2_DIV_MASK,
	.clksel		= sys_clkout2_clksel,
	.recalc		= &omap2_clksel_recalc,
};

/* CM OUTPUT CLOCKS */

static struct clk corex2_fck = {
	.name		= "corex2_fck",
1027
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
1028
	.parent		= &dpll3_m2x2_ck,
1029
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
1030 1031 1032 1033 1034 1035 1036 1037 1038 1039
	.recalc		= &followparent_recalc,
};

/* DPLL power domain clock controls */

static const struct clksel div2_core_clksel[] = {
	{ .parent = &core_ck, .rates = div2_rates },
	{ .parent = NULL }
};

1040 1041 1042 1043
/*
 * REVISIT: Are these in DPLL power domain or CM power domain? docs
 * may be inconsistent here?
 */
P
Paul Walmsley 已提交
1044 1045
static struct clk dpll1_fck = {
	.name		= "dpll1_fck",
1046
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
1047 1048 1049 1050 1051
	.parent		= &core_ck,
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL1_PLL),
	.clksel_mask	= OMAP3430_MPU_CLK_SRC_MASK,
	.clksel		= div2_core_clksel,
1052
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
1053 1054 1055
	.recalc		= &omap2_clksel_recalc,
};

1056 1057 1058 1059 1060 1061 1062
/*
 * MPU clksel:
 * If DPLL1 is locked, mpu_ck derives from DPLL1; otherwise, mpu_ck
 * derives from the high-frequency bypass clock originating from DPLL3,
 * called 'dpll1_fck'
 */
static const struct clksel mpu_clksel[] = {
1063
	{ .parent = &dpll1_fck,	    .rates = dpll_bypass_rates },
1064 1065 1066 1067 1068 1069
	{ .parent = &dpll1_x2m2_ck, .rates = dpll_locked_rates },
	{ .parent = NULL }
};

static struct clk mpu_ck = {
	.name		= "mpu_ck",
1070
	.ops		= &clkops_null,
1071 1072 1073 1074 1075
	.parent		= &dpll1_x2m2_ck,
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL),
	.clksel_mask	= OMAP3430_ST_MPU_CLK_MASK,
	.clksel		= mpu_clksel,
1076
	.flags		= RATE_PROPAGATES,
1077
	.clkdm_name	= "mpu_clkdm",
1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094
	.recalc		= &omap2_clksel_recalc,
};

/* arm_fck is divided by two when DPLL1 locked; otherwise, passthrough mpu_ck */
static const struct clksel_rate arm_fck_rates[] = {
	{ .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 2, .val = 1, .flags = RATE_IN_343X },
	{ .div = 0 },
};

static const struct clksel arm_fck_clksel[] = {
	{ .parent = &mpu_ck, .rates = arm_fck_rates },
	{ .parent = NULL }
};

static struct clk arm_fck = {
	.name		= "arm_fck",
1095
	.ops		= &clkops_null,
1096 1097 1098 1099 1100
	.parent		= &mpu_ck,
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL),
	.clksel_mask	= OMAP3430_ST_MPU_CLK_MASK,
	.clksel		= arm_fck_clksel,
1101
	.flags		= RATE_PROPAGATES,
1102 1103 1104
	.recalc		= &omap2_clksel_recalc,
};

1105 1106
/* XXX What about neon_clkdm ? */

1107 1108 1109 1110 1111 1112
/*
 * REVISIT: This clock is never specifically defined in the 3430 TRM,
 * although it is referenced - so this is a guess
 */
static struct clk emu_mpu_alwon_ck = {
	.name		= "emu_mpu_alwon_ck",
1113
	.ops		= &clkops_null,
1114
	.parent		= &mpu_ck,
1115
	.flags		= RATE_PROPAGATES,
1116 1117 1118
	.recalc		= &followparent_recalc,
};

P
Paul Walmsley 已提交
1119 1120
static struct clk dpll2_fck = {
	.name		= "dpll2_fck",
1121
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
1122 1123 1124 1125 1126
	.parent		= &core_ck,
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL1_PLL),
	.clksel_mask	= OMAP3430_IVA2_CLK_SRC_MASK,
	.clksel		= div2_core_clksel,
1127
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
1128 1129 1130
	.recalc		= &omap2_clksel_recalc,
};

1131 1132 1133 1134 1135 1136 1137 1138
/*
 * IVA2 clksel:
 * If DPLL2 is locked, iva2_ck derives from DPLL2; otherwise, iva2_ck
 * derives from the high-frequency bypass clock originating from DPLL3,
 * called 'dpll2_fck'
 */

static const struct clksel iva2_clksel[] = {
1139
	{ .parent = &dpll2_fck,	  .rates = dpll_bypass_rates },
1140 1141 1142 1143 1144 1145
	{ .parent = &dpll2_m2_ck, .rates = dpll_locked_rates },
	{ .parent = NULL }
};

static struct clk iva2_ck = {
	.name		= "iva2_ck",
1146
	.ops		= &clkops_omap2_dflt_wait,
1147 1148
	.parent		= &dpll2_m2_ck,
	.init		= &omap2_init_clksel_parent,
1149 1150
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT,
1151 1152 1153 1154
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_IVA2_MOD,
					  OMAP3430_CM_IDLEST_PLL),
	.clksel_mask	= OMAP3430_ST_IVA2_CLK_MASK,
	.clksel		= iva2_clksel,
1155
	.flags		= RATE_PROPAGATES,
1156
	.clkdm_name	= "iva2_clkdm",
1157 1158 1159
	.recalc		= &omap2_clksel_recalc,
};

P
Paul Walmsley 已提交
1160 1161 1162 1163
/* Common interface clocks */

static struct clk l3_ick = {
	.name		= "l3_ick",
1164
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
1165 1166 1167 1168 1169
	.parent		= &core_ck,
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430_CLKSEL_L3_MASK,
	.clksel		= div2_core_clksel,
1170
	.flags		= RATE_PROPAGATES,
1171
	.clkdm_name	= "core_l3_clkdm",
P
Paul Walmsley 已提交
1172 1173 1174 1175 1176 1177 1178 1179 1180 1181
	.recalc		= &omap2_clksel_recalc,
};

static const struct clksel div2_l3_clksel[] = {
	{ .parent = &l3_ick, .rates = div2_rates },
	{ .parent = NULL }
};

static struct clk l4_ick = {
	.name		= "l4_ick",
1182
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
1183 1184 1185 1186 1187
	.parent		= &l3_ick,
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430_CLKSEL_L4_MASK,
	.clksel		= div2_l3_clksel,
1188
	.flags		= RATE_PROPAGATES,
1189
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200
	.recalc		= &omap2_clksel_recalc,

};

static const struct clksel div2_l4_clksel[] = {
	{ .parent = &l4_ick, .rates = div2_rates },
	{ .parent = NULL }
};

static struct clk rm_ick = {
	.name		= "rm_ick",
1201
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
1202 1203 1204 1205 1206 1207 1208 1209 1210 1211
	.parent		= &l4_ick,
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430_CLKSEL_RM_MASK,
	.clksel		= div2_l4_clksel,
	.recalc		= &omap2_clksel_recalc,
};

/* GFX power domain */

1212
/* GFX clocks are in 3430ES1 only. 3430ES2 and later uses the SGX instead */
P
Paul Walmsley 已提交
1213 1214 1215 1216 1217 1218

static const struct clksel gfx_l3_clksel[] = {
	{ .parent = &l3_ick, .rates = gfx_l3_rates },
	{ .parent = NULL }
};

1219 1220 1221
/* Virtual parent clock for gfx_l3_ick and gfx_l3_fck */
static struct clk gfx_l3_ck = {
	.name		= "gfx_l3_ck",
1222
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1223 1224 1225 1226
	.parent		= &l3_ick,
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(GFX_MOD, CM_ICLKEN),
	.enable_bit	= OMAP_EN_GFX_SHIFT,
1227 1228 1229 1230 1231
	.recalc		= &followparent_recalc,
};

static struct clk gfx_l3_fck = {
	.name		= "gfx_l3_fck",
1232
	.ops		= &clkops_null,
1233 1234
	.parent		= &gfx_l3_ck,
	.init		= &omap2_init_clksel_parent,
P
Paul Walmsley 已提交
1235 1236 1237
	.clksel_reg	= OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP_CLKSEL_GFX_MASK,
	.clksel		= gfx_l3_clksel,
1238
	.flags		= RATE_PROPAGATES,
1239
	.clkdm_name	= "gfx_3430es1_clkdm",
P
Paul Walmsley 已提交
1240 1241 1242 1243 1244
	.recalc		= &omap2_clksel_recalc,
};

static struct clk gfx_l3_ick = {
	.name		= "gfx_l3_ick",
1245
	.ops		= &clkops_null,
1246
	.parent		= &gfx_l3_ck,
1247
	.clkdm_name	= "gfx_3430es1_clkdm",
P
Paul Walmsley 已提交
1248 1249 1250 1251 1252
	.recalc		= &followparent_recalc,
};

static struct clk gfx_cg1_ck = {
	.name		= "gfx_cg1_ck",
1253
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1254
	.parent		= &gfx_l3_fck, /* REVISIT: correct? */
1255
	.init		= &omap2_init_clk_clkdm,
P
Paul Walmsley 已提交
1256 1257
	.enable_reg	= OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430ES1_EN_2D_SHIFT,
1258
	.clkdm_name	= "gfx_3430es1_clkdm",
P
Paul Walmsley 已提交
1259 1260 1261 1262 1263
	.recalc		= &followparent_recalc,
};

static struct clk gfx_cg2_ck = {
	.name		= "gfx_cg2_ck",
1264
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1265
	.parent		= &gfx_l3_fck, /* REVISIT: correct? */
1266
	.init		= &omap2_init_clk_clkdm,
P
Paul Walmsley 已提交
1267 1268
	.enable_reg	= OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430ES1_EN_3D_SHIFT,
1269
	.clkdm_name	= "gfx_3430es1_clkdm",
P
Paul Walmsley 已提交
1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294
	.recalc		= &followparent_recalc,
};

/* SGX power domain - 3430ES2 only */

static const struct clksel_rate sgx_core_rates[] = {
	{ .div = 3, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 4, .val = 1, .flags = RATE_IN_343X },
	{ .div = 6, .val = 2, .flags = RATE_IN_343X },
	{ .div = 0 },
};

static const struct clksel_rate sgx_96m_rates[] = {
	{ .div = 1,  .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 },
};

static const struct clksel sgx_clksel[] = {
	{ .parent = &core_ck,	 .rates = sgx_core_rates },
	{ .parent = &cm_96m_fck, .rates = sgx_96m_rates },
	{ .parent = NULL },
};

static struct clk sgx_fck = {
	.name		= "sgx_fck",
1295
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1296 1297
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_FCLKEN),
1298
	.enable_bit	= OMAP3430ES2_CM_FCLKEN_SGX_EN_SGX_SHIFT,
P
Paul Walmsley 已提交
1299 1300 1301
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430ES2_CLKSEL_SGX_MASK,
	.clksel		= sgx_clksel,
1302
	.clkdm_name	= "sgx_clkdm",
P
Paul Walmsley 已提交
1303 1304 1305 1306 1307
	.recalc		= &omap2_clksel_recalc,
};

static struct clk sgx_ick = {
	.name		= "sgx_ick",
1308
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1309
	.parent		= &l3_ick,
1310
	.init		= &omap2_init_clk_clkdm,
P
Paul Walmsley 已提交
1311
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_ICLKEN),
1312
	.enable_bit	= OMAP3430ES2_CM_ICLKEN_SGX_EN_SGX_SHIFT,
1313
	.clkdm_name	= "sgx_clkdm",
P
Paul Walmsley 已提交
1314 1315 1316 1317 1318 1319 1320
	.recalc		= &followparent_recalc,
};

/* CORE power domain */

static struct clk d2d_26m_fck = {
	.name		= "d2d_26m_fck",
1321
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1322
	.parent		= &sys_ck,
1323
	.init		= &omap2_init_clk_clkdm,
P
Paul Walmsley 已提交
1324 1325
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430ES1_EN_D2D_SHIFT,
1326
	.clkdm_name	= "d2d_clkdm",
P
Paul Walmsley 已提交
1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337
	.recalc		= &followparent_recalc,
};

static const struct clksel omap343x_gpt_clksel[] = {
	{ .parent = &omap_32k_fck, .rates = gpt_32k_rates },
	{ .parent = &sys_ck,	   .rates = gpt_sys_rates },
	{ .parent = NULL}
};

static struct clk gpt10_fck = {
	.name		= "gpt10_fck",
1338
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1339 1340 1341 1342 1343 1344 1345
	.parent		= &sys_ck,
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430_EN_GPT10_SHIFT,
	.clksel_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430_CLKSEL_GPT10_MASK,
	.clksel		= omap343x_gpt_clksel,
1346
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1347 1348 1349 1350 1351
	.recalc		= &omap2_clksel_recalc,
};

static struct clk gpt11_fck = {
	.name		= "gpt11_fck",
1352
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1353 1354 1355 1356 1357 1358 1359
	.parent		= &sys_ck,
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430_EN_GPT11_SHIFT,
	.clksel_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430_CLKSEL_GPT11_MASK,
	.clksel		= omap343x_gpt_clksel,
1360
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1361 1362 1363 1364 1365
	.recalc		= &omap2_clksel_recalc,
};

static struct clk cpefuse_fck = {
	.name		= "cpefuse_fck",
1366
	.ops		= &clkops_omap2_dflt,
P
Paul Walmsley 已提交
1367 1368 1369 1370 1371 1372 1373 1374
	.parent		= &sys_ck,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
	.enable_bit	= OMAP3430ES2_EN_CPEFUSE_SHIFT,
	.recalc		= &followparent_recalc,
};

static struct clk ts_fck = {
	.name		= "ts_fck",
1375
	.ops		= &clkops_omap2_dflt,
P
Paul Walmsley 已提交
1376 1377 1378 1379 1380 1381 1382 1383
	.parent		= &omap_32k_fck,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
	.enable_bit	= OMAP3430ES2_EN_TS_SHIFT,
	.recalc		= &followparent_recalc,
};

static struct clk usbtll_fck = {
	.name		= "usbtll_fck",
1384
	.ops		= &clkops_omap2_dflt,
P
Paul Walmsley 已提交
1385 1386 1387 1388 1389 1390 1391 1392 1393 1394
	.parent		= &omap_120m_fck,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
	.enable_bit	= OMAP3430ES2_EN_USBTLL_SHIFT,
	.recalc		= &followparent_recalc,
};

/* CORE 96M FCLK-derived clocks */

static struct clk core_96m_fck = {
	.name		= "core_96m_fck",
1395
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
1396
	.parent		= &omap_96m_fck,
1397
	.flags		= RATE_PROPAGATES,
1398
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1399 1400 1401 1402 1403
	.recalc		= &followparent_recalc,
};

static struct clk mmchs3_fck = {
	.name		= "mmchs_fck",
1404
	.ops		= &clkops_omap2_dflt_wait,
1405
	.id		= 2,
P
Paul Walmsley 已提交
1406 1407 1408
	.parent		= &core_96m_fck,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430ES2_EN_MMC3_SHIFT,
1409
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1410 1411 1412 1413 1414
	.recalc		= &followparent_recalc,
};

static struct clk mmchs2_fck = {
	.name		= "mmchs_fck",
1415
	.ops		= &clkops_omap2_dflt_wait,
1416
	.id		= 1,
P
Paul Walmsley 已提交
1417 1418 1419
	.parent		= &core_96m_fck,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430_EN_MMC2_SHIFT,
1420
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1421 1422 1423 1424 1425
	.recalc		= &followparent_recalc,
};

static struct clk mspro_fck = {
	.name		= "mspro_fck",
1426
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1427 1428 1429
	.parent		= &core_96m_fck,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430_EN_MSPRO_SHIFT,
1430
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1431 1432 1433 1434 1435
	.recalc		= &followparent_recalc,
};

static struct clk mmchs1_fck = {
	.name		= "mmchs_fck",
1436
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1437 1438 1439
	.parent		= &core_96m_fck,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430_EN_MMC1_SHIFT,
1440
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1441 1442 1443 1444 1445
	.recalc		= &followparent_recalc,
};

static struct clk i2c3_fck = {
	.name		= "i2c_fck",
1446
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1447 1448 1449 1450
	.id		= 3,
	.parent		= &core_96m_fck,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430_EN_I2C3_SHIFT,
1451
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1452 1453 1454 1455 1456
	.recalc		= &followparent_recalc,
};

static struct clk i2c2_fck = {
	.name		= "i2c_fck",
1457
	.ops		= &clkops_omap2_dflt_wait,
1458
	.id		= 2,
P
Paul Walmsley 已提交
1459 1460 1461
	.parent		= &core_96m_fck,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430_EN_I2C2_SHIFT,
1462
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1463 1464 1465 1466 1467
	.recalc		= &followparent_recalc,
};

static struct clk i2c1_fck = {
	.name		= "i2c_fck",
1468
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1469 1470 1471 1472
	.id		= 1,
	.parent		= &core_96m_fck,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430_EN_I2C1_SHIFT,
1473
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497
	.recalc		= &followparent_recalc,
};

/*
 * MCBSP 1 & 5 get their 96MHz clock from core_96m_fck;
 * MCBSP 2, 3, 4 get their 96MHz clock from per_96m_fck.
 */
static const struct clksel_rate common_mcbsp_96m_rates[] = {
	{ .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 }
};

static const struct clksel_rate common_mcbsp_mcbsp_rates[] = {
	{ .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 }
};

static const struct clksel mcbsp_15_clksel[] = {
	{ .parent = &core_96m_fck, .rates = common_mcbsp_96m_rates },
	{ .parent = &mcbsp_clks,   .rates = common_mcbsp_mcbsp_rates },
	{ .parent = NULL }
};

static struct clk mcbsp5_fck = {
1498
	.name		= "mcbsp_fck",
1499
	.ops		= &clkops_omap2_dflt_wait,
1500
	.id		= 5,
P
Paul Walmsley 已提交
1501 1502 1503 1504 1505 1506
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430_EN_MCBSP5_SHIFT,
	.clksel_reg	= OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
	.clksel_mask	= OMAP2_MCBSP5_CLKS_MASK,
	.clksel		= mcbsp_15_clksel,
1507
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1508 1509 1510 1511
	.recalc		= &omap2_clksel_recalc,
};

static struct clk mcbsp1_fck = {
1512
	.name		= "mcbsp_fck",
1513
	.ops		= &clkops_omap2_dflt_wait,
1514
	.id		= 1,
P
Paul Walmsley 已提交
1515 1516 1517 1518 1519 1520
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430_EN_MCBSP1_SHIFT,
	.clksel_reg	= OMAP343X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0),
	.clksel_mask	= OMAP2_MCBSP1_CLKS_MASK,
	.clksel		= mcbsp_15_clksel,
1521
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1522 1523 1524 1525 1526 1527 1528
	.recalc		= &omap2_clksel_recalc,
};

/* CORE_48M_FCK-derived clocks */

static struct clk core_48m_fck = {
	.name		= "core_48m_fck",
1529
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
1530
	.parent		= &omap_48m_fck,
1531
	.flags		= RATE_PROPAGATES,
1532
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1533 1534 1535 1536 1537
	.recalc		= &followparent_recalc,
};

static struct clk mcspi4_fck = {
	.name		= "mcspi_fck",
1538
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1539 1540 1541 1542 1543 1544 1545 1546 1547
	.id		= 4,
	.parent		= &core_48m_fck,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430_EN_MCSPI4_SHIFT,
	.recalc		= &followparent_recalc,
};

static struct clk mcspi3_fck = {
	.name		= "mcspi_fck",
1548
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1549 1550 1551 1552 1553 1554 1555 1556 1557
	.id		= 3,
	.parent		= &core_48m_fck,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430_EN_MCSPI3_SHIFT,
	.recalc		= &followparent_recalc,
};

static struct clk mcspi2_fck = {
	.name		= "mcspi_fck",
1558
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1559 1560 1561 1562 1563 1564 1565 1566 1567
	.id		= 2,
	.parent		= &core_48m_fck,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430_EN_MCSPI2_SHIFT,
	.recalc		= &followparent_recalc,
};

static struct clk mcspi1_fck = {
	.name		= "mcspi_fck",
1568
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1569 1570 1571 1572 1573 1574 1575 1576 1577
	.id		= 1,
	.parent		= &core_48m_fck,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430_EN_MCSPI1_SHIFT,
	.recalc		= &followparent_recalc,
};

static struct clk uart2_fck = {
	.name		= "uart2_fck",
1578
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1579 1580 1581 1582 1583 1584 1585 1586
	.parent		= &core_48m_fck,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430_EN_UART2_SHIFT,
	.recalc		= &followparent_recalc,
};

static struct clk uart1_fck = {
	.name		= "uart1_fck",
1587
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1588 1589 1590 1591 1592 1593 1594 1595
	.parent		= &core_48m_fck,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430_EN_UART1_SHIFT,
	.recalc		= &followparent_recalc,
};

static struct clk fshostusb_fck = {
	.name		= "fshostusb_fck",
1596
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1597 1598 1599 1600 1601 1602 1603 1604 1605 1606
	.parent		= &core_48m_fck,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430ES1_EN_FSHOSTUSB_SHIFT,
	.recalc		= &followparent_recalc,
};

/* CORE_12M_FCK based clocks */

static struct clk core_12m_fck = {
	.name		= "core_12m_fck",
1607
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
1608
	.parent		= &omap_12m_fck,
1609
	.flags		= RATE_PROPAGATES,
1610
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1611 1612 1613 1614 1615
	.recalc		= &followparent_recalc,
};

static struct clk hdq_fck = {
	.name		= "hdq_fck",
1616
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641
	.parent		= &core_12m_fck,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430_EN_HDQ_SHIFT,
	.recalc		= &followparent_recalc,
};

/* DPLL3-derived clock */

static const struct clksel_rate ssi_ssr_corex2_rates[] = {
	{ .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 2, .val = 2, .flags = RATE_IN_343X },
	{ .div = 3, .val = 3, .flags = RATE_IN_343X },
	{ .div = 4, .val = 4, .flags = RATE_IN_343X },
	{ .div = 6, .val = 6, .flags = RATE_IN_343X },
	{ .div = 8, .val = 8, .flags = RATE_IN_343X },
	{ .div = 0 }
};

static const struct clksel ssi_ssr_clksel[] = {
	{ .parent = &corex2_fck, .rates = ssi_ssr_corex2_rates },
	{ .parent = NULL }
};

static struct clk ssi_ssr_fck = {
	.name		= "ssi_ssr_fck",
1642
	.ops		= &clkops_omap2_dflt,
P
Paul Walmsley 已提交
1643 1644 1645 1646 1647 1648
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
	.enable_bit	= OMAP3430_EN_SSI_SHIFT,
	.clksel_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430_CLKSEL_SSI_MASK,
	.clksel		= ssi_ssr_clksel,
1649
	.flags		= RATE_PROPAGATES,
1650
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1651 1652 1653 1654 1655
	.recalc		= &omap2_clksel_recalc,
};

static struct clk ssi_sst_fck = {
	.name		= "ssi_sst_fck",
1656
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
1657 1658 1659 1660 1661 1662 1663 1664 1665
	.parent		= &ssi_ssr_fck,
	.fixed_div	= 2,
	.recalc		= &omap2_fixed_divisor_recalc,
};



/* CORE_L3_ICK based clocks */

1666 1667 1668 1669
/*
 * XXX must add clk_enable/clk_disable for these if standard code won't
 * handle it
 */
P
Paul Walmsley 已提交
1670 1671
static struct clk core_l3_ick = {
	.name		= "core_l3_ick",
1672
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
1673
	.parent		= &l3_ick,
1674
	.init		= &omap2_init_clk_clkdm,
1675
	.flags		= RATE_PROPAGATES,
1676
	.clkdm_name	= "core_l3_clkdm",
P
Paul Walmsley 已提交
1677 1678 1679 1680 1681
	.recalc		= &followparent_recalc,
};

static struct clk hsotgusb_ick = {
	.name		= "hsotgusb_ick",
1682
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1683 1684 1685
	.parent		= &core_l3_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_HSOTGUSB_SHIFT,
1686
	.clkdm_name	= "core_l3_clkdm",
P
Paul Walmsley 已提交
1687 1688 1689 1690 1691
	.recalc		= &followparent_recalc,
};

static struct clk sdrc_ick = {
	.name		= "sdrc_ick",
1692
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1693 1694 1695
	.parent		= &core_l3_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_SDRC_SHIFT,
1696
	.flags		= ENABLE_ON_INIT,
1697
	.clkdm_name	= "core_l3_clkdm",
P
Paul Walmsley 已提交
1698 1699 1700 1701 1702
	.recalc		= &followparent_recalc,
};

static struct clk gpmc_fck = {
	.name		= "gpmc_fck",
1703
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
1704
	.parent		= &core_l3_ick,
1705
	.flags		= ENABLE_ON_INIT, /* huh? */
1706
	.clkdm_name	= "core_l3_clkdm",
P
Paul Walmsley 已提交
1707 1708 1709 1710 1711 1712 1713
	.recalc		= &followparent_recalc,
};

/* SECURITY_L3_ICK based clocks */

static struct clk security_l3_ick = {
	.name		= "security_l3_ick",
1714
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
1715
	.parent		= &l3_ick,
1716
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
1717 1718 1719 1720 1721
	.recalc		= &followparent_recalc,
};

static struct clk pka_ick = {
	.name		= "pka_ick",
1722
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1723 1724 1725 1726 1727 1728 1729 1730 1731 1732
	.parent		= &security_l3_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
	.enable_bit	= OMAP3430_EN_PKA_SHIFT,
	.recalc		= &followparent_recalc,
};

/* CORE_L4_ICK based clocks */

static struct clk core_l4_ick = {
	.name		= "core_l4_ick",
1733
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
1734
	.parent		= &l4_ick,
1735
	.init		= &omap2_init_clk_clkdm,
1736
	.flags		= RATE_PROPAGATES,
1737
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1738 1739 1740 1741 1742
	.recalc		= &followparent_recalc,
};

static struct clk usbtll_ick = {
	.name		= "usbtll_ick",
1743
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1744 1745 1746
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
	.enable_bit	= OMAP3430ES2_EN_USBTLL_SHIFT,
1747
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1748 1749 1750 1751 1752
	.recalc		= &followparent_recalc,
};

static struct clk mmchs3_ick = {
	.name		= "mmchs_ick",
1753
	.ops		= &clkops_omap2_dflt_wait,
1754
	.id		= 2,
P
Paul Walmsley 已提交
1755 1756 1757
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430ES2_EN_MMC3_SHIFT,
1758
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1759 1760 1761 1762 1763 1764
	.recalc		= &followparent_recalc,
};

/* Intersystem Communication Registers - chassis mode only */
static struct clk icr_ick = {
	.name		= "icr_ick",
1765
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1766 1767 1768
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_ICR_SHIFT,
1769
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1770 1771 1772 1773 1774
	.recalc		= &followparent_recalc,
};

static struct clk aes2_ick = {
	.name		= "aes2_ick",
1775
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1776 1777 1778
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_AES2_SHIFT,
1779
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1780 1781 1782 1783 1784
	.recalc		= &followparent_recalc,
};

static struct clk sha12_ick = {
	.name		= "sha12_ick",
1785
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1786 1787 1788
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_SHA12_SHIFT,
1789
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1790 1791 1792 1793 1794
	.recalc		= &followparent_recalc,
};

static struct clk des2_ick = {
	.name		= "des2_ick",
1795
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1796 1797 1798
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_DES2_SHIFT,
1799
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1800 1801 1802 1803 1804
	.recalc		= &followparent_recalc,
};

static struct clk mmchs2_ick = {
	.name		= "mmchs_ick",
1805
	.ops		= &clkops_omap2_dflt_wait,
1806
	.id		= 1,
P
Paul Walmsley 已提交
1807 1808 1809
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_MMC2_SHIFT,
1810
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1811 1812 1813 1814 1815
	.recalc		= &followparent_recalc,
};

static struct clk mmchs1_ick = {
	.name		= "mmchs_ick",
1816
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1817 1818 1819
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_MMC1_SHIFT,
1820
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1821 1822 1823 1824 1825
	.recalc		= &followparent_recalc,
};

static struct clk mspro_ick = {
	.name		= "mspro_ick",
1826
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1827 1828 1829
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_MSPRO_SHIFT,
1830
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1831 1832 1833 1834 1835
	.recalc		= &followparent_recalc,
};

static struct clk hdq_ick = {
	.name		= "hdq_ick",
1836
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1837 1838 1839
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_HDQ_SHIFT,
1840
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1841 1842 1843 1844 1845
	.recalc		= &followparent_recalc,
};

static struct clk mcspi4_ick = {
	.name		= "mcspi_ick",
1846
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1847 1848 1849 1850
	.id		= 4,
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_MCSPI4_SHIFT,
1851
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1852 1853 1854 1855 1856
	.recalc		= &followparent_recalc,
};

static struct clk mcspi3_ick = {
	.name		= "mcspi_ick",
1857
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1858 1859 1860 1861
	.id		= 3,
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_MCSPI3_SHIFT,
1862
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1863 1864 1865 1866 1867
	.recalc		= &followparent_recalc,
};

static struct clk mcspi2_ick = {
	.name		= "mcspi_ick",
1868
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1869 1870 1871 1872
	.id		= 2,
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_MCSPI2_SHIFT,
1873
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1874 1875 1876 1877 1878
	.recalc		= &followparent_recalc,
};

static struct clk mcspi1_ick = {
	.name		= "mcspi_ick",
1879
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1880 1881 1882 1883
	.id		= 1,
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_MCSPI1_SHIFT,
1884
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1885 1886 1887 1888 1889
	.recalc		= &followparent_recalc,
};

static struct clk i2c3_ick = {
	.name		= "i2c_ick",
1890
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1891 1892 1893 1894
	.id		= 3,
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_I2C3_SHIFT,
1895
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1896 1897 1898 1899 1900
	.recalc		= &followparent_recalc,
};

static struct clk i2c2_ick = {
	.name		= "i2c_ick",
1901
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1902 1903 1904 1905
	.id		= 2,
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_I2C2_SHIFT,
1906
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1907 1908 1909 1910 1911
	.recalc		= &followparent_recalc,
};

static struct clk i2c1_ick = {
	.name		= "i2c_ick",
1912
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1913 1914 1915 1916
	.id		= 1,
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_I2C1_SHIFT,
1917
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1918 1919 1920 1921 1922
	.recalc		= &followparent_recalc,
};

static struct clk uart2_ick = {
	.name		= "uart2_ick",
1923
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1924 1925 1926
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_UART2_SHIFT,
1927
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1928 1929 1930 1931 1932
	.recalc		= &followparent_recalc,
};

static struct clk uart1_ick = {
	.name		= "uart1_ick",
1933
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1934 1935 1936
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_UART1_SHIFT,
1937
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1938 1939 1940 1941 1942
	.recalc		= &followparent_recalc,
};

static struct clk gpt11_ick = {
	.name		= "gpt11_ick",
1943
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1944 1945 1946
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_GPT11_SHIFT,
1947
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1948 1949 1950 1951 1952
	.recalc		= &followparent_recalc,
};

static struct clk gpt10_ick = {
	.name		= "gpt10_ick",
1953
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1954 1955 1956
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_GPT10_SHIFT,
1957
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1958 1959 1960 1961
	.recalc		= &followparent_recalc,
};

static struct clk mcbsp5_ick = {
1962
	.name		= "mcbsp_ick",
1963
	.ops		= &clkops_omap2_dflt_wait,
1964
	.id		= 5,
P
Paul Walmsley 已提交
1965 1966 1967
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_MCBSP5_SHIFT,
1968
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1969 1970 1971 1972
	.recalc		= &followparent_recalc,
};

static struct clk mcbsp1_ick = {
1973
	.name		= "mcbsp_ick",
1974
	.ops		= &clkops_omap2_dflt_wait,
1975
	.id		= 1,
P
Paul Walmsley 已提交
1976 1977 1978
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_MCBSP1_SHIFT,
1979
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1980 1981 1982 1983 1984
	.recalc		= &followparent_recalc,
};

static struct clk fac_ick = {
	.name		= "fac_ick",
1985
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1986 1987 1988
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430ES1_EN_FAC_SHIFT,
1989
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
1990 1991 1992 1993 1994
	.recalc		= &followparent_recalc,
};

static struct clk mailboxes_ick = {
	.name		= "mailboxes_ick",
1995
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
1996 1997 1998
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_MAILBOXES_SHIFT,
1999
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
2000 2001 2002 2003 2004
	.recalc		= &followparent_recalc,
};

static struct clk omapctrl_ick = {
	.name		= "omapctrl_ick",
2005
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2006 2007 2008
	.parent		= &core_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_OMAPCTRL_SHIFT,
2009
	.flags		= ENABLE_ON_INIT,
P
Paul Walmsley 已提交
2010 2011 2012 2013 2014 2015 2016
	.recalc		= &followparent_recalc,
};

/* SSI_L4_ICK based clocks */

static struct clk ssi_l4_ick = {
	.name		= "ssi_l4_ick",
2017
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
2018
	.parent		= &l4_ick,
2019
	.flags		= RATE_PROPAGATES,
2020
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
2021 2022 2023 2024 2025
	.recalc		= &followparent_recalc,
};

static struct clk ssi_ick = {
	.name		= "ssi_ick",
2026
	.ops		= &clkops_omap2_dflt,
P
Paul Walmsley 已提交
2027 2028 2029
	.parent		= &ssi_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430_EN_SSI_SHIFT,
2030
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043
	.recalc		= &followparent_recalc,
};

/* REVISIT: Technically the TRM claims that this is CORE_CLK based,
 * but l4_ick makes more sense to me */

static const struct clksel usb_l4_clksel[] = {
	{ .parent = &l4_ick, .rates = div2_rates },
	{ .parent = NULL },
};

static struct clk usb_l4_ick = {
	.name		= "usb_l4_ick",
2044
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060
	.parent		= &l4_ick,
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
	.enable_bit	= OMAP3430ES1_EN_FSHOSTUSB_SHIFT,
	.clksel_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430ES1_CLKSEL_FSHOSTUSB_MASK,
	.clksel		= usb_l4_clksel,
	.recalc		= &omap2_clksel_recalc,
};

/* XXX MDM_INTC_ICK, SAD2D_ICK ?? */

/* SECURITY_L4_ICK2 based clocks */

static struct clk security_l4_ick2 = {
	.name		= "security_l4_ick2",
2061
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
2062
	.parent		= &l4_ick,
2063
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
2064 2065 2066 2067 2068
	.recalc		= &followparent_recalc,
};

static struct clk aes1_ick = {
	.name		= "aes1_ick",
2069
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2070 2071 2072 2073 2074 2075 2076 2077
	.parent		= &security_l4_ick2,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
	.enable_bit	= OMAP3430_EN_AES1_SHIFT,
	.recalc		= &followparent_recalc,
};

static struct clk rng_ick = {
	.name		= "rng_ick",
2078
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2079 2080 2081 2082 2083 2084 2085 2086
	.parent		= &security_l4_ick2,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
	.enable_bit	= OMAP3430_EN_RNG_SHIFT,
	.recalc		= &followparent_recalc,
};

static struct clk sha11_ick = {
	.name		= "sha11_ick",
2087
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2088 2089 2090 2091 2092 2093 2094 2095
	.parent		= &security_l4_ick2,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
	.enable_bit	= OMAP3430_EN_SHA11_SHIFT,
	.recalc		= &followparent_recalc,
};

static struct clk des1_ick = {
	.name		= "des1_ick",
2096
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2097 2098 2099 2100 2101 2102 2103
	.parent		= &security_l4_ick2,
	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
	.enable_bit	= OMAP3430_EN_DES1_SHIFT,
	.recalc		= &followparent_recalc,
};

/* DSS */
2104
static const struct clksel dss1_alwon_fck_clksel[] = {
2105
	{ .parent = &sys_ck,	    .rates = dpll_bypass_rates },
2106 2107 2108
	{ .parent = &dpll4_m4x2_ck, .rates = dpll_locked_rates },
	{ .parent = NULL }
};
P
Paul Walmsley 已提交
2109 2110 2111

static struct clk dss1_alwon_fck = {
	.name		= "dss1_alwon_fck",
2112
	.ops		= &clkops_omap2_dflt,
P
Paul Walmsley 已提交
2113
	.parent		= &dpll4_m4x2_ck,
2114
	.init		= &omap2_init_clksel_parent,
P
Paul Walmsley 已提交
2115 2116
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_DSS1_SHIFT,
2117
	.clksel_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
2118
	.clksel_mask	= OMAP3430_ST_PERIPH_CLK_MASK,
2119
	.clksel		= dss1_alwon_fck_clksel,
2120
	.clkdm_name	= "dss_clkdm",
2121
	.recalc		= &omap2_clksel_recalc,
P
Paul Walmsley 已提交
2122 2123 2124 2125
};

static struct clk dss_tv_fck = {
	.name		= "dss_tv_fck",
2126
	.ops		= &clkops_omap2_dflt,
P
Paul Walmsley 已提交
2127
	.parent		= &omap_54m_fck,
2128
	.init		= &omap2_init_clk_clkdm,
P
Paul Walmsley 已提交
2129 2130
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_TV_SHIFT,
2131
	.clkdm_name	= "dss_clkdm",
P
Paul Walmsley 已提交
2132 2133 2134 2135 2136
	.recalc		= &followparent_recalc,
};

static struct clk dss_96m_fck = {
	.name		= "dss_96m_fck",
2137
	.ops		= &clkops_omap2_dflt,
P
Paul Walmsley 已提交
2138
	.parent		= &omap_96m_fck,
2139
	.init		= &omap2_init_clk_clkdm,
P
Paul Walmsley 已提交
2140 2141
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_TV_SHIFT,
2142
	.clkdm_name	= "dss_clkdm",
P
Paul Walmsley 已提交
2143 2144 2145 2146 2147
	.recalc		= &followparent_recalc,
};

static struct clk dss2_alwon_fck = {
	.name		= "dss2_alwon_fck",
2148
	.ops		= &clkops_omap2_dflt,
P
Paul Walmsley 已提交
2149
	.parent		= &sys_ck,
2150
	.init		= &omap2_init_clk_clkdm,
P
Paul Walmsley 已提交
2151 2152
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_DSS2_SHIFT,
2153
	.clkdm_name	= "dss_clkdm",
P
Paul Walmsley 已提交
2154 2155 2156 2157 2158 2159
	.recalc		= &followparent_recalc,
};

static struct clk dss_ick = {
	/* Handles both L3 and L4 clocks */
	.name		= "dss_ick",
2160
	.ops		= &clkops_omap2_dflt,
P
Paul Walmsley 已提交
2161
	.parent		= &l4_ick,
2162
	.init		= &omap2_init_clk_clkdm,
P
Paul Walmsley 已提交
2163 2164
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT,
2165
	.clkdm_name	= "dss_clkdm",
P
Paul Walmsley 已提交
2166 2167 2168 2169 2170
	.recalc		= &followparent_recalc,
};

/* CAM */

2171
static const struct clksel cam_mclk_clksel[] = {
2172
	{ .parent = &sys_ck,	    .rates = dpll_bypass_rates },
2173 2174 2175 2176
	{ .parent = &dpll4_m5x2_ck, .rates = dpll_locked_rates },
	{ .parent = NULL }
};

P
Paul Walmsley 已提交
2177 2178
static struct clk cam_mclk = {
	.name		= "cam_mclk",
2179
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2180
	.parent		= &dpll4_m5x2_ck,
2181 2182
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
2183
	.clksel_mask	= OMAP3430_ST_PERIPH_CLK_MASK,
2184
	.clksel		= cam_mclk_clksel,
P
Paul Walmsley 已提交
2185 2186
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_CAM_SHIFT,
2187
	.clkdm_name	= "cam_clkdm",
2188
	.recalc		= &omap2_clksel_recalc,
P
Paul Walmsley 已提交
2189 2190
};

2191 2192 2193
static struct clk cam_ick = {
	/* Handles both L3 and L4 clocks */
	.name		= "cam_ick",
2194
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2195
	.parent		= &l4_ick,
2196
	.init		= &omap2_init_clk_clkdm,
P
Paul Walmsley 已提交
2197 2198
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_CAM_SHIFT,
2199
	.clkdm_name	= "cam_clkdm",
P
Paul Walmsley 已提交
2200 2201 2202
	.recalc		= &followparent_recalc,
};

2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213
static struct clk csi2_96m_fck = {
	.name		= "csi2_96m_fck",
	.ops		= &clkops_omap2_dflt_wait,
	.parent		= &core_96m_fck,
	.init		= &omap2_init_clk_clkdm,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_CSI2_SHIFT,
	.clkdm_name	= "cam_clkdm",
	.recalc		= &followparent_recalc,
};

P
Paul Walmsley 已提交
2214 2215 2216 2217
/* USBHOST - 3430ES2 only */

static struct clk usbhost_120m_fck = {
	.name		= "usbhost_120m_fck",
2218
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2219
	.parent		= &omap_120m_fck,
2220
	.init		= &omap2_init_clk_clkdm,
P
Paul Walmsley 已提交
2221 2222
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430ES2_EN_USBHOST2_SHIFT,
2223
	.clkdm_name	= "usbhost_clkdm",
P
Paul Walmsley 已提交
2224 2225 2226 2227 2228
	.recalc		= &followparent_recalc,
};

static struct clk usbhost_48m_fck = {
	.name		= "usbhost_48m_fck",
2229
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2230
	.parent		= &omap_48m_fck,
2231
	.init		= &omap2_init_clk_clkdm,
P
Paul Walmsley 已提交
2232 2233
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430ES2_EN_USBHOST1_SHIFT,
2234
	.clkdm_name	= "usbhost_clkdm",
P
Paul Walmsley 已提交
2235 2236 2237
	.recalc		= &followparent_recalc,
};

2238 2239 2240
static struct clk usbhost_ick = {
	/* Handles both L3 and L4 clocks */
	.name		= "usbhost_ick",
2241
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2242
	.parent		= &l4_ick,
2243
	.init		= &omap2_init_clk_clkdm,
P
Paul Walmsley 已提交
2244 2245
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430ES2_EN_USBHOST_SHIFT,
2246
	.clkdm_name	= "usbhost_clkdm",
P
Paul Walmsley 已提交
2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277
	.recalc		= &followparent_recalc,
};

/* WKUP */

static const struct clksel_rate usim_96m_rates[] = {
	{ .div = 2,  .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 4,  .val = 4, .flags = RATE_IN_343X },
	{ .div = 8,  .val = 5, .flags = RATE_IN_343X },
	{ .div = 10, .val = 6, .flags = RATE_IN_343X },
	{ .div = 0 },
};

static const struct clksel_rate usim_120m_rates[] = {
	{ .div = 4,  .val = 7,	.flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 8,  .val = 8,	.flags = RATE_IN_343X },
	{ .div = 16, .val = 9,	.flags = RATE_IN_343X },
	{ .div = 20, .val = 10, .flags = RATE_IN_343X },
	{ .div = 0 },
};

static const struct clksel usim_clksel[] = {
	{ .parent = &omap_96m_fck,	.rates = usim_96m_rates },
	{ .parent = &omap_120m_fck,	.rates = usim_120m_rates },
	{ .parent = &sys_ck,		.rates = div2_rates },
	{ .parent = NULL },
};

/* 3430ES2 only */
static struct clk usim_fck = {
	.name		= "usim_fck",
2278
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2279 2280 2281 2282 2283 2284 2285 2286 2287
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430ES2_EN_USIMOCP_SHIFT,
	.clksel_reg	= OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430ES2_CLKSEL_USIMOCP_MASK,
	.clksel		= usim_clksel,
	.recalc		= &omap2_clksel_recalc,
};

2288
/* XXX should gpt1's clksel have wkup_32k_fck as the 32k opt? */
P
Paul Walmsley 已提交
2289 2290
static struct clk gpt1_fck = {
	.name		= "gpt1_fck",
2291
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2292 2293 2294 2295 2296 2297
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_GPT1_SHIFT,
	.clksel_reg	= OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430_CLKSEL_GPT1_MASK,
	.clksel		= omap343x_gpt_clksel,
2298
	.clkdm_name	= "wkup_clkdm",
P
Paul Walmsley 已提交
2299 2300 2301 2302 2303
	.recalc		= &omap2_clksel_recalc,
};

static struct clk wkup_32k_fck = {
	.name		= "wkup_32k_fck",
2304
	.ops		= &clkops_null,
2305
	.init		= &omap2_init_clk_clkdm,
P
Paul Walmsley 已提交
2306
	.parent		= &omap_32k_fck,
2307
	.flags		= RATE_PROPAGATES,
2308
	.clkdm_name	= "wkup_clkdm",
P
Paul Walmsley 已提交
2309 2310 2311
	.recalc		= &followparent_recalc,
};

2312 2313
static struct clk gpio1_dbck = {
	.name		= "gpio1_dbck",
2314
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2315 2316 2317
	.parent		= &wkup_32k_fck,
	.enable_reg	= OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_GPIO1_SHIFT,
2318
	.clkdm_name	= "wkup_clkdm",
P
Paul Walmsley 已提交
2319 2320 2321 2322 2323
	.recalc		= &followparent_recalc,
};

static struct clk wdt2_fck = {
	.name		= "wdt2_fck",
2324
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2325 2326 2327
	.parent		= &wkup_32k_fck,
	.enable_reg	= OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_WDT2_SHIFT,
2328
	.clkdm_name	= "wkup_clkdm",
P
Paul Walmsley 已提交
2329 2330 2331 2332 2333
	.recalc		= &followparent_recalc,
};

static struct clk wkup_l4_ick = {
	.name		= "wkup_l4_ick",
2334
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
2335
	.parent		= &sys_ck,
2336
	.flags		= RATE_PROPAGATES,
2337
	.clkdm_name	= "wkup_clkdm",
P
Paul Walmsley 已提交
2338 2339 2340 2341 2342 2343 2344
	.recalc		= &followparent_recalc,
};

/* 3430ES2 only */
/* Never specifically named in the TRM, so we have to infer a likely name */
static struct clk usim_ick = {
	.name		= "usim_ick",
2345
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2346 2347 2348
	.parent		= &wkup_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430ES2_EN_USIMOCP_SHIFT,
2349
	.clkdm_name	= "wkup_clkdm",
P
Paul Walmsley 已提交
2350 2351 2352 2353 2354
	.recalc		= &followparent_recalc,
};

static struct clk wdt2_ick = {
	.name		= "wdt2_ick",
2355
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2356 2357 2358
	.parent		= &wkup_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_WDT2_SHIFT,
2359
	.clkdm_name	= "wkup_clkdm",
P
Paul Walmsley 已提交
2360 2361 2362 2363 2364
	.recalc		= &followparent_recalc,
};

static struct clk wdt1_ick = {
	.name		= "wdt1_ick",
2365
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2366 2367 2368
	.parent		= &wkup_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_WDT1_SHIFT,
2369
	.clkdm_name	= "wkup_clkdm",
P
Paul Walmsley 已提交
2370 2371 2372 2373 2374
	.recalc		= &followparent_recalc,
};

static struct clk gpio1_ick = {
	.name		= "gpio1_ick",
2375
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2376 2377 2378
	.parent		= &wkup_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_GPIO1_SHIFT,
2379
	.clkdm_name	= "wkup_clkdm",
P
Paul Walmsley 已提交
2380 2381 2382 2383 2384
	.recalc		= &followparent_recalc,
};

static struct clk omap_32ksync_ick = {
	.name		= "omap_32ksync_ick",
2385
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2386 2387 2388
	.parent		= &wkup_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_32KSYNC_SHIFT,
2389
	.clkdm_name	= "wkup_clkdm",
P
Paul Walmsley 已提交
2390 2391 2392
	.recalc		= &followparent_recalc,
};

2393
/* XXX This clock no longer exists in 3430 TRM rev F */
P
Paul Walmsley 已提交
2394 2395
static struct clk gpt12_ick = {
	.name		= "gpt12_ick",
2396
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2397 2398 2399
	.parent		= &wkup_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_GPT12_SHIFT,
2400
	.clkdm_name	= "wkup_clkdm",
P
Paul Walmsley 已提交
2401 2402 2403 2404 2405
	.recalc		= &followparent_recalc,
};

static struct clk gpt1_ick = {
	.name		= "gpt1_ick",
2406
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2407 2408 2409
	.parent		= &wkup_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_GPT1_SHIFT,
2410
	.clkdm_name	= "wkup_clkdm",
P
Paul Walmsley 已提交
2411 2412 2413 2414 2415 2416 2417 2418 2419
	.recalc		= &followparent_recalc,
};



/* PER clock domain */

static struct clk per_96m_fck = {
	.name		= "per_96m_fck",
2420
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
2421
	.parent		= &omap_96m_alwon_fck,
2422
	.init		= &omap2_init_clk_clkdm,
2423
	.flags		= RATE_PROPAGATES,
2424
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2425 2426 2427 2428 2429
	.recalc		= &followparent_recalc,
};

static struct clk per_48m_fck = {
	.name		= "per_48m_fck",
2430
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
2431
	.parent		= &omap_48m_fck,
2432
	.init		= &omap2_init_clk_clkdm,
2433
	.flags		= RATE_PROPAGATES,
2434
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2435 2436 2437 2438 2439
	.recalc		= &followparent_recalc,
};

static struct clk uart3_fck = {
	.name		= "uart3_fck",
2440
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2441 2442 2443
	.parent		= &per_48m_fck,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_UART3_SHIFT,
2444
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2445 2446 2447 2448 2449
	.recalc		= &followparent_recalc,
};

static struct clk gpt2_fck = {
	.name		= "gpt2_fck",
2450
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2451 2452 2453 2454 2455 2456
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_GPT2_SHIFT,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430_CLKSEL_GPT2_MASK,
	.clksel		= omap343x_gpt_clksel,
2457
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2458 2459 2460 2461 2462
	.recalc		= &omap2_clksel_recalc,
};

static struct clk gpt3_fck = {
	.name		= "gpt3_fck",
2463
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2464 2465 2466 2467 2468 2469
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_GPT3_SHIFT,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430_CLKSEL_GPT3_MASK,
	.clksel		= omap343x_gpt_clksel,
2470
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2471 2472 2473 2474 2475
	.recalc		= &omap2_clksel_recalc,
};

static struct clk gpt4_fck = {
	.name		= "gpt4_fck",
2476
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2477 2478 2479 2480 2481 2482
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_GPT4_SHIFT,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430_CLKSEL_GPT4_MASK,
	.clksel		= omap343x_gpt_clksel,
2483
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2484 2485 2486 2487 2488
	.recalc		= &omap2_clksel_recalc,
};

static struct clk gpt5_fck = {
	.name		= "gpt5_fck",
2489
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2490 2491 2492 2493 2494 2495
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_GPT5_SHIFT,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430_CLKSEL_GPT5_MASK,
	.clksel		= omap343x_gpt_clksel,
2496
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2497 2498 2499 2500 2501
	.recalc		= &omap2_clksel_recalc,
};

static struct clk gpt6_fck = {
	.name		= "gpt6_fck",
2502
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2503 2504 2505 2506 2507 2508
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_GPT6_SHIFT,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430_CLKSEL_GPT6_MASK,
	.clksel		= omap343x_gpt_clksel,
2509
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2510 2511 2512 2513 2514
	.recalc		= &omap2_clksel_recalc,
};

static struct clk gpt7_fck = {
	.name		= "gpt7_fck",
2515
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2516 2517 2518 2519 2520 2521
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_GPT7_SHIFT,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430_CLKSEL_GPT7_MASK,
	.clksel		= omap343x_gpt_clksel,
2522
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2523 2524 2525 2526 2527
	.recalc		= &omap2_clksel_recalc,
};

static struct clk gpt8_fck = {
	.name		= "gpt8_fck",
2528
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2529 2530 2531 2532 2533 2534
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_GPT8_SHIFT,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430_CLKSEL_GPT8_MASK,
	.clksel		= omap343x_gpt_clksel,
2535
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2536 2537 2538 2539 2540
	.recalc		= &omap2_clksel_recalc,
};

static struct clk gpt9_fck = {
	.name		= "gpt9_fck",
2541
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2542 2543 2544 2545 2546 2547
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_GPT9_SHIFT,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
	.clksel_mask	= OMAP3430_CLKSEL_GPT9_MASK,
	.clksel		= omap343x_gpt_clksel,
2548
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2549 2550 2551 2552 2553
	.recalc		= &omap2_clksel_recalc,
};

static struct clk per_32k_alwon_fck = {
	.name		= "per_32k_alwon_fck",
2554
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
2555
	.parent		= &omap_32k_fck,
2556
	.clkdm_name	= "per_clkdm",
2557
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
2558 2559 2560
	.recalc		= &followparent_recalc,
};

2561 2562
static struct clk gpio6_dbck = {
	.name		= "gpio6_dbck",
2563
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2564 2565
	.parent		= &per_32k_alwon_fck,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2566
	.enable_bit	= OMAP3430_EN_GPIO6_SHIFT,
2567
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2568 2569 2570
	.recalc		= &followparent_recalc,
};

2571 2572
static struct clk gpio5_dbck = {
	.name		= "gpio5_dbck",
2573
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2574 2575
	.parent		= &per_32k_alwon_fck,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2576
	.enable_bit	= OMAP3430_EN_GPIO5_SHIFT,
2577
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2578 2579 2580
	.recalc		= &followparent_recalc,
};

2581 2582
static struct clk gpio4_dbck = {
	.name		= "gpio4_dbck",
2583
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2584 2585
	.parent		= &per_32k_alwon_fck,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2586
	.enable_bit	= OMAP3430_EN_GPIO4_SHIFT,
2587
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2588 2589 2590
	.recalc		= &followparent_recalc,
};

2591 2592
static struct clk gpio3_dbck = {
	.name		= "gpio3_dbck",
2593
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2594 2595
	.parent		= &per_32k_alwon_fck,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2596
	.enable_bit	= OMAP3430_EN_GPIO3_SHIFT,
2597
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2598 2599 2600
	.recalc		= &followparent_recalc,
};

2601 2602
static struct clk gpio2_dbck = {
	.name		= "gpio2_dbck",
2603
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2604 2605
	.parent		= &per_32k_alwon_fck,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2606
	.enable_bit	= OMAP3430_EN_GPIO2_SHIFT,
2607
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2608 2609 2610 2611 2612
	.recalc		= &followparent_recalc,
};

static struct clk wdt3_fck = {
	.name		= "wdt3_fck",
2613
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2614 2615 2616
	.parent		= &per_32k_alwon_fck,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_WDT3_SHIFT,
2617
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2618 2619 2620 2621 2622
	.recalc		= &followparent_recalc,
};

static struct clk per_l4_ick = {
	.name		= "per_l4_ick",
2623
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
2624
	.parent		= &l4_ick,
2625
	.flags		= RATE_PROPAGATES,
2626
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2627 2628 2629 2630 2631
	.recalc		= &followparent_recalc,
};

static struct clk gpio6_ick = {
	.name		= "gpio6_ick",
2632
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2633 2634 2635
	.parent		= &per_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_GPIO6_SHIFT,
2636
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2637 2638 2639 2640 2641
	.recalc		= &followparent_recalc,
};

static struct clk gpio5_ick = {
	.name		= "gpio5_ick",
2642
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2643 2644 2645
	.parent		= &per_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_GPIO5_SHIFT,
2646
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2647 2648 2649 2650 2651
	.recalc		= &followparent_recalc,
};

static struct clk gpio4_ick = {
	.name		= "gpio4_ick",
2652
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2653 2654 2655
	.parent		= &per_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_GPIO4_SHIFT,
2656
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2657 2658 2659 2660 2661
	.recalc		= &followparent_recalc,
};

static struct clk gpio3_ick = {
	.name		= "gpio3_ick",
2662
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2663 2664 2665
	.parent		= &per_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_GPIO3_SHIFT,
2666
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2667 2668 2669 2670 2671
	.recalc		= &followparent_recalc,
};

static struct clk gpio2_ick = {
	.name		= "gpio2_ick",
2672
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2673 2674 2675
	.parent		= &per_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_GPIO2_SHIFT,
2676
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2677 2678 2679 2680 2681
	.recalc		= &followparent_recalc,
};

static struct clk wdt3_ick = {
	.name		= "wdt3_ick",
2682
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2683 2684 2685
	.parent		= &per_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_WDT3_SHIFT,
2686
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2687 2688 2689 2690 2691
	.recalc		= &followparent_recalc,
};

static struct clk uart3_ick = {
	.name		= "uart3_ick",
2692
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2693 2694 2695
	.parent		= &per_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_UART3_SHIFT,
2696
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2697 2698 2699 2700 2701
	.recalc		= &followparent_recalc,
};

static struct clk gpt9_ick = {
	.name		= "gpt9_ick",
2702
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2703 2704 2705
	.parent		= &per_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_GPT9_SHIFT,
2706
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2707 2708 2709 2710 2711
	.recalc		= &followparent_recalc,
};

static struct clk gpt8_ick = {
	.name		= "gpt8_ick",
2712
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2713 2714 2715
	.parent		= &per_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_GPT8_SHIFT,
2716
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2717 2718 2719 2720 2721
	.recalc		= &followparent_recalc,
};

static struct clk gpt7_ick = {
	.name		= "gpt7_ick",
2722
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2723 2724 2725
	.parent		= &per_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_GPT7_SHIFT,
2726
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2727 2728 2729 2730 2731
	.recalc		= &followparent_recalc,
};

static struct clk gpt6_ick = {
	.name		= "gpt6_ick",
2732
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2733 2734 2735
	.parent		= &per_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_GPT6_SHIFT,
2736
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2737 2738 2739 2740 2741
	.recalc		= &followparent_recalc,
};

static struct clk gpt5_ick = {
	.name		= "gpt5_ick",
2742
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2743 2744 2745
	.parent		= &per_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_GPT5_SHIFT,
2746
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2747 2748 2749 2750 2751
	.recalc		= &followparent_recalc,
};

static struct clk gpt4_ick = {
	.name		= "gpt4_ick",
2752
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2753 2754 2755
	.parent		= &per_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_GPT4_SHIFT,
2756
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2757 2758 2759 2760 2761
	.recalc		= &followparent_recalc,
};

static struct clk gpt3_ick = {
	.name		= "gpt3_ick",
2762
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2763 2764 2765
	.parent		= &per_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_GPT3_SHIFT,
2766
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2767 2768 2769 2770 2771
	.recalc		= &followparent_recalc,
};

static struct clk gpt2_ick = {
	.name		= "gpt2_ick",
2772
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
2773 2774 2775
	.parent		= &per_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_GPT2_SHIFT,
2776
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2777 2778 2779 2780
	.recalc		= &followparent_recalc,
};

static struct clk mcbsp2_ick = {
2781
	.name		= "mcbsp_ick",
2782
	.ops		= &clkops_omap2_dflt_wait,
2783
	.id		= 2,
P
Paul Walmsley 已提交
2784 2785 2786
	.parent		= &per_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_MCBSP2_SHIFT,
2787
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2788 2789 2790 2791
	.recalc		= &followparent_recalc,
};

static struct clk mcbsp3_ick = {
2792
	.name		= "mcbsp_ick",
2793
	.ops		= &clkops_omap2_dflt_wait,
2794
	.id		= 3,
P
Paul Walmsley 已提交
2795 2796 2797
	.parent		= &per_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_MCBSP3_SHIFT,
2798
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2799 2800 2801 2802
	.recalc		= &followparent_recalc,
};

static struct clk mcbsp4_ick = {
2803
	.name		= "mcbsp_ick",
2804
	.ops		= &clkops_omap2_dflt_wait,
2805
	.id		= 4,
P
Paul Walmsley 已提交
2806 2807 2808
	.parent		= &per_l4_ick,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
	.enable_bit	= OMAP3430_EN_MCBSP4_SHIFT,
2809
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2810 2811 2812 2813
	.recalc		= &followparent_recalc,
};

static const struct clksel mcbsp_234_clksel[] = {
2814 2815
	{ .parent = &core_96m_fck, .rates = common_mcbsp_96m_rates },
	{ .parent = &mcbsp_clks,   .rates = common_mcbsp_mcbsp_rates },
P
Paul Walmsley 已提交
2816 2817 2818 2819
	{ .parent = NULL }
};

static struct clk mcbsp2_fck = {
2820
	.name		= "mcbsp_fck",
2821
	.ops		= &clkops_omap2_dflt_wait,
2822
	.id		= 2,
P
Paul Walmsley 已提交
2823 2824 2825 2826 2827 2828
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_MCBSP2_SHIFT,
	.clksel_reg	= OMAP343X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0),
	.clksel_mask	= OMAP2_MCBSP2_CLKS_MASK,
	.clksel		= mcbsp_234_clksel,
2829
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2830 2831 2832 2833
	.recalc		= &omap2_clksel_recalc,
};

static struct clk mcbsp3_fck = {
2834
	.name		= "mcbsp_fck",
2835
	.ops		= &clkops_omap2_dflt_wait,
2836
	.id		= 3,
P
Paul Walmsley 已提交
2837 2838 2839 2840 2841 2842
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_MCBSP3_SHIFT,
	.clksel_reg	= OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
	.clksel_mask	= OMAP2_MCBSP3_CLKS_MASK,
	.clksel		= mcbsp_234_clksel,
2843
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2844 2845 2846 2847
	.recalc		= &omap2_clksel_recalc,
};

static struct clk mcbsp4_fck = {
2848
	.name		= "mcbsp_fck",
2849
	.ops		= &clkops_omap2_dflt_wait,
2850
	.id		= 4,
P
Paul Walmsley 已提交
2851 2852 2853 2854 2855 2856
	.init		= &omap2_init_clksel_parent,
	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_MCBSP4_SHIFT,
	.clksel_reg	= OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
	.clksel_mask	= OMAP2_MCBSP4_CLKS_MASK,
	.clksel		= mcbsp_234_clksel,
2857
	.clkdm_name	= "per_clkdm",
P
Paul Walmsley 已提交
2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899
	.recalc		= &omap2_clksel_recalc,
};

/* EMU clocks */

/* More information: ARM Cortex-A8 Technical Reference Manual, sect 10.1 */

static const struct clksel_rate emu_src_sys_rates[] = {
	{ .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 },
};

static const struct clksel_rate emu_src_core_rates[] = {
	{ .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 },
};

static const struct clksel_rate emu_src_per_rates[] = {
	{ .div = 1, .val = 2, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 },
};

static const struct clksel_rate emu_src_mpu_rates[] = {
	{ .div = 1, .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 0 },
};

static const struct clksel emu_src_clksel[] = {
	{ .parent = &sys_ck,		.rates = emu_src_sys_rates },
	{ .parent = &emu_core_alwon_ck, .rates = emu_src_core_rates },
	{ .parent = &emu_per_alwon_ck,	.rates = emu_src_per_rates },
	{ .parent = &emu_mpu_alwon_ck,	.rates = emu_src_mpu_rates },
	{ .parent = NULL },
};

/*
 * Like the clkout_src clocks, emu_src_clk is a virtual clock, existing only
 * to switch the source of some of the EMU clocks.
 * XXX Are there CLKEN bits for these EMU clks?
 */
static struct clk emu_src_ck = {
	.name		= "emu_src_ck",
2900
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
2901 2902 2903 2904
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
	.clksel_mask	= OMAP3430_MUX_CTRL_MASK,
	.clksel		= emu_src_clksel,
2905
	.flags		= RATE_PROPAGATES,
2906
	.clkdm_name	= "emu_clkdm",
P
Paul Walmsley 已提交
2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924
	.recalc		= &omap2_clksel_recalc,
};

static const struct clksel_rate pclk_emu_rates[] = {
	{ .div = 2, .val = 2, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 3, .val = 3, .flags = RATE_IN_343X },
	{ .div = 4, .val = 4, .flags = RATE_IN_343X },
	{ .div = 6, .val = 6, .flags = RATE_IN_343X },
	{ .div = 0 },
};

static const struct clksel pclk_emu_clksel[] = {
	{ .parent = &emu_src_ck, .rates = pclk_emu_rates },
	{ .parent = NULL },
};

static struct clk pclk_fck = {
	.name		= "pclk_fck",
2925
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
2926 2927 2928 2929
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
	.clksel_mask	= OMAP3430_CLKSEL_PCLK_MASK,
	.clksel		= pclk_emu_clksel,
2930
	.flags		= RATE_PROPAGATES,
2931
	.clkdm_name	= "emu_clkdm",
P
Paul Walmsley 已提交
2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948
	.recalc		= &omap2_clksel_recalc,
};

static const struct clksel_rate pclkx2_emu_rates[] = {
	{ .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 2, .val = 2, .flags = RATE_IN_343X },
	{ .div = 3, .val = 3, .flags = RATE_IN_343X },
	{ .div = 0 },
};

static const struct clksel pclkx2_emu_clksel[] = {
	{ .parent = &emu_src_ck, .rates = pclkx2_emu_rates },
	{ .parent = NULL },
};

static struct clk pclkx2_fck = {
	.name		= "pclkx2_fck",
2949
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
2950 2951 2952 2953
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
	.clksel_mask	= OMAP3430_CLKSEL_PCLKX2_MASK,
	.clksel		= pclkx2_emu_clksel,
2954
	.flags		= RATE_PROPAGATES,
2955
	.clkdm_name	= "emu_clkdm",
P
Paul Walmsley 已提交
2956 2957 2958 2959 2960 2961 2962 2963 2964 2965
	.recalc		= &omap2_clksel_recalc,
};

static const struct clksel atclk_emu_clksel[] = {
	{ .parent = &emu_src_ck, .rates = div2_rates },
	{ .parent = NULL },
};

static struct clk atclk_fck = {
	.name		= "atclk_fck",
2966
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
2967 2968 2969 2970
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
	.clksel_mask	= OMAP3430_CLKSEL_ATCLK_MASK,
	.clksel		= atclk_emu_clksel,
2971
	.flags		= RATE_PROPAGATES,
2972
	.clkdm_name	= "emu_clkdm",
P
Paul Walmsley 已提交
2973 2974 2975 2976 2977
	.recalc		= &omap2_clksel_recalc,
};

static struct clk traceclk_src_fck = {
	.name		= "traceclk_src_fck",
2978
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
2979 2980 2981 2982
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
	.clksel_mask	= OMAP3430_TRACE_MUX_CTRL_MASK,
	.clksel		= emu_src_clksel,
2983
	.flags		= RATE_PROPAGATES,
2984
	.clkdm_name	= "emu_clkdm",
P
Paul Walmsley 已提交
2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001
	.recalc		= &omap2_clksel_recalc,
};

static const struct clksel_rate traceclk_rates[] = {
	{ .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
	{ .div = 2, .val = 2, .flags = RATE_IN_343X },
	{ .div = 4, .val = 4, .flags = RATE_IN_343X },
	{ .div = 0 },
};

static const struct clksel traceclk_clksel[] = {
	{ .parent = &traceclk_src_fck, .rates = traceclk_rates },
	{ .parent = NULL },
};

static struct clk traceclk_fck = {
	.name		= "traceclk_fck",
3002
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
3003 3004 3005 3006
	.init		= &omap2_init_clksel_parent,
	.clksel_reg	= OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
	.clksel_mask	= OMAP3430_CLKSEL_TRACECLK_MASK,
	.clksel		= traceclk_clksel,
3007
	.clkdm_name	= "emu_clkdm",
P
Paul Walmsley 已提交
3008 3009 3010 3011 3012 3013 3014 3015
	.recalc		= &omap2_clksel_recalc,
};

/* SR clocks */

/* SmartReflex fclk (VDD1) */
static struct clk sr1_fck = {
	.name		= "sr1_fck",
3016
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
3017 3018 3019
	.parent		= &sys_ck,
	.enable_reg	= OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_SR1_SHIFT,
3020
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
3021 3022 3023 3024 3025 3026
	.recalc		= &followparent_recalc,
};

/* SmartReflex fclk (VDD2) */
static struct clk sr2_fck = {
	.name		= "sr2_fck",
3027
	.ops		= &clkops_omap2_dflt_wait,
P
Paul Walmsley 已提交
3028 3029 3030
	.parent		= &sys_ck,
	.enable_reg	= OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
	.enable_bit	= OMAP3430_EN_SR2_SHIFT,
3031
	.flags		= RATE_PROPAGATES,
P
Paul Walmsley 已提交
3032 3033 3034 3035 3036
	.recalc		= &followparent_recalc,
};

static struct clk sr_l4_ick = {
	.name		= "sr_l4_ick",
3037
	.ops		= &clkops_null, /* RMK: missing? */
P
Paul Walmsley 已提交
3038
	.parent		= &l4_ick,
3039
	.clkdm_name	= "core_l4_clkdm",
P
Paul Walmsley 已提交
3040 3041 3042 3043 3044
	.recalc		= &followparent_recalc,
};

/* SECURE_32K_FCK clocks */

3045
/* XXX This clock no longer exists in 3430 TRM rev F */
P
Paul Walmsley 已提交
3046 3047
static struct clk gpt12_fck = {
	.name		= "gpt12_fck",
3048
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
3049 3050 3051 3052 3053 3054
	.parent		= &secure_32k_fck,
	.recalc		= &followparent_recalc,
};

static struct clk wdt1_fck = {
	.name		= "wdt1_fck",
3055
	.ops		= &clkops_null,
P
Paul Walmsley 已提交
3056
	.parent		= &secure_32k_fck,
3057
	.recalc		= &followparent_recalc,
P
Paul Walmsley 已提交
3058 3059 3060
};

#endif