2 * linux/arch/arm/mach-omap1/clock.h
4 * Copyright (C) 2004 - 2005 Nokia corporation
5 * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
6 * Based on clocks.h by Tony Lindgren, Gordon McNutt and RidgeRun, Inc
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #ifndef __ARCH_ARM_MACH_OMAP1_CLOCK_H
14 #define __ARCH_ARM_MACH_OMAP1_CLOCK_H
16 static void omap1_ckctl_recalc(struct clk
* clk
);
17 static void omap1_watchdog_recalc(struct clk
* clk
);
18 static int omap1_set_sossi_rate(struct clk
*clk
, unsigned long rate
);
19 static void omap1_sossi_recalc(struct clk
*clk
);
20 static void omap1_ckctl_recalc_dsp_domain(struct clk
* clk
);
21 static int omap1_clk_set_rate_dsp_domain(struct clk
* clk
, unsigned long rate
);
22 static int omap1_set_uart_rate(struct clk
* clk
, unsigned long rate
);
23 static void omap1_uart_recalc(struct clk
* clk
);
24 static int omap1_set_ext_clk_rate(struct clk
* clk
, unsigned long rate
);
25 static long omap1_round_ext_clk_rate(struct clk
* clk
, unsigned long rate
);
26 static void omap1_init_ext_clk(struct clk
* clk
);
27 static int omap1_select_table_rate(struct clk
* clk
, unsigned long rate
);
28 static long omap1_round_to_table_rate(struct clk
* clk
, unsigned long rate
);
33 unsigned long pll_rate
;
40 unsigned long sysc_addr
;
43 /* Provide a method for preventing idling some ARM IDLECT clocks */
44 struct arm_idlect1_clk
{
46 unsigned long no_idle_count
;
50 /* ARM_CKCTL bit shifts */
51 #define CKCTL_PERDIV_OFFSET 0
52 #define CKCTL_LCDDIV_OFFSET 2
53 #define CKCTL_ARMDIV_OFFSET 4
54 #define CKCTL_DSPDIV_OFFSET 6
55 #define CKCTL_TCDIV_OFFSET 8
56 #define CKCTL_DSPMMUDIV_OFFSET 10
57 /*#define ARM_TIMXO 12*/
59 /*#define ARM_INTHCK_SEL 14*/ /* Divide-by-2 for mpu inth_ck */
60 /* DSP_CKCTL bit shifts */
61 #define CKCTL_DSPPERDIV_OFFSET 0
63 /* ARM_IDLECT2 bit shifts */
68 #define EN_LBCK 4 /* Not on 1610/1710 */
69 /*#define EN_HSABCK 5*/
73 #define EN_GPIOCK 9 /* Not on 1610/1710 */
74 /*#define EN_LBFREECK 10*/
75 #define EN_CKOUT_ARM 11
77 /* ARM_IDLECT3 bit shifts */
82 /* DSP_IDLECT2 bit shifts (0,1,2 are same as for ARM_IDLECT2) */
85 /* Various register defines for clock controls scattered around OMAP chip */
86 #define SDW_MCLK_INV_BIT 2 /* In ULPD_CLKC_CTRL */
87 #define USB_MCLK_EN_BIT 4 /* In ULPD_CLKC_CTRL */
88 #define USB_HOST_HHC_UHOST_EN 9 /* In MOD_CONF_CTRL_0 */
89 #define SWD_ULPD_PLL_CLK_REQ 1 /* In SWD_CLK_DIV_CTRL_SEL */
90 #define COM_ULPD_PLL_CLK_REQ 1 /* In COM_CLK_DIV_CTRL_SEL */
91 #define SWD_CLK_DIV_CTRL_SEL 0xfffe0874
92 #define COM_CLK_DIV_CTRL_SEL 0xfffe0878
93 #define SOFT_REQ_REG 0xfffe0834
94 #define SOFT_REQ_REG2 0xfffe0880
96 /*-------------------------------------------------------------------------
97 * Omap1 MPU rate table
98 *-------------------------------------------------------------------------*/
99 static struct mpu_rate rate_table
[] = {
100 /* MPU MHz, xtal MHz, dpll1 MHz, CKCTL, DPLL_CTL
101 * NOTE: Comment order here is different from bits in CKCTL value:
102 * armdiv, dspdiv, dspmmu, tcdiv, perdiv, lcddiv
104 #if defined(CONFIG_OMAP_ARM_216MHZ)
105 { 216000000, 12000000, 216000000, 0x050d, 0x2910 }, /* 1/1/2/2/2/8 */
107 #if defined(CONFIG_OMAP_ARM_195MHZ)
108 { 195000000, 13000000, 195000000, 0x050e, 0x2790 }, /* 1/1/2/2/4/8 */
110 #if defined(CONFIG_OMAP_ARM_192MHZ)
111 { 192000000, 19200000, 192000000, 0x050f, 0x2510 }, /* 1/1/2/2/8/8 */
112 { 192000000, 12000000, 192000000, 0x050f, 0x2810 }, /* 1/1/2/2/8/8 */
113 { 96000000, 12000000, 192000000, 0x055f, 0x2810 }, /* 2/2/2/2/8/8 */
114 { 48000000, 12000000, 192000000, 0x0baf, 0x2810 }, /* 4/4/4/8/8/8 */
115 { 24000000, 12000000, 192000000, 0x0fff, 0x2810 }, /* 8/8/8/8/8/8 */
117 #if defined(CONFIG_OMAP_ARM_182MHZ)
118 { 182000000, 13000000, 182000000, 0x050e, 0x2710 }, /* 1/1/2/2/4/8 */
120 #if defined(CONFIG_OMAP_ARM_168MHZ)
121 { 168000000, 12000000, 168000000, 0x010f, 0x2710 }, /* 1/1/1/2/8/8 */
123 #if defined(CONFIG_OMAP_ARM_150MHZ)
124 { 150000000, 12000000, 150000000, 0x010a, 0x2cb0 }, /* 1/1/1/2/4/4 */
126 #if defined(CONFIG_OMAP_ARM_120MHZ)
127 { 120000000, 12000000, 120000000, 0x010a, 0x2510 }, /* 1/1/1/2/4/4 */
129 #if defined(CONFIG_OMAP_ARM_96MHZ)
130 { 96000000, 12000000, 96000000, 0x0005, 0x2410 }, /* 1/1/1/1/2/2 */
132 #if defined(CONFIG_OMAP_ARM_60MHZ)
133 { 60000000, 12000000, 60000000, 0x0005, 0x2290 }, /* 1/1/1/1/2/2 */
135 #if defined(CONFIG_OMAP_ARM_30MHZ)
136 { 30000000, 12000000, 60000000, 0x0555, 0x2290 }, /* 2/2/2/2/2/2 */
141 /*-------------------------------------------------------------------------
143 *-------------------------------------------------------------------------*/
145 static struct clk ck_ref
= {
149 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP16XX
|
153 static struct clk ck_dpll1
= {
157 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP16XX
|
158 CLOCK_IN_OMAP310
| RATE_PROPAGATES
,
161 static struct arm_idlect1_clk ck_dpll1out
= {
163 .name
= "ck_dpll1out",
164 .ops
= &clkops_generic
,
166 .flags
= CLOCK_IN_OMAP16XX
| CLOCK_IDLE_CONTROL
|
167 ENABLE_REG_32BIT
| RATE_PROPAGATES
,
168 .enable_reg
= (void __iomem
*)ARM_IDLECT2
,
169 .enable_bit
= EN_CKOUT_ARM
,
170 .recalc
= &followparent_recalc
,
175 static struct clk sossi_ck
= {
177 .ops
= &clkops_generic
,
178 .parent
= &ck_dpll1out
.clk
,
179 .flags
= CLOCK_IN_OMAP16XX
| CLOCK_NO_IDLE_PARENT
|
181 .enable_reg
= (void __iomem
*)MOD_CONF_CTRL_1
,
183 .recalc
= &omap1_sossi_recalc
,
184 .set_rate
= &omap1_set_sossi_rate
,
187 static struct clk arm_ck
= {
191 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP16XX
|
192 CLOCK_IN_OMAP310
| RATE_CKCTL
| RATE_PROPAGATES
,
193 .rate_offset
= CKCTL_ARMDIV_OFFSET
,
194 .recalc
= &omap1_ckctl_recalc
,
197 static struct arm_idlect1_clk armper_ck
= {
200 .ops
= &clkops_generic
,
202 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP16XX
|
203 CLOCK_IN_OMAP310
| RATE_CKCTL
|
205 .enable_reg
= (void __iomem
*)ARM_IDLECT2
,
206 .enable_bit
= EN_PERCK
,
207 .rate_offset
= CKCTL_PERDIV_OFFSET
,
208 .recalc
= &omap1_ckctl_recalc
,
213 static struct clk arm_gpio_ck
= {
214 .name
= "arm_gpio_ck",
215 .ops
= &clkops_generic
,
217 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP310
,
218 .enable_reg
= (void __iomem
*)ARM_IDLECT2
,
219 .enable_bit
= EN_GPIOCK
,
220 .recalc
= &followparent_recalc
,
223 static struct arm_idlect1_clk armxor_ck
= {
226 .ops
= &clkops_generic
,
228 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP16XX
|
229 CLOCK_IN_OMAP310
| CLOCK_IDLE_CONTROL
,
230 .enable_reg
= (void __iomem
*)ARM_IDLECT2
,
231 .enable_bit
= EN_XORPCK
,
232 .recalc
= &followparent_recalc
,
237 static struct arm_idlect1_clk armtim_ck
= {
240 .ops
= &clkops_generic
,
242 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP16XX
|
243 CLOCK_IN_OMAP310
| CLOCK_IDLE_CONTROL
,
244 .enable_reg
= (void __iomem
*)ARM_IDLECT2
,
245 .enable_bit
= EN_TIMCK
,
246 .recalc
= &followparent_recalc
,
251 static struct arm_idlect1_clk armwdt_ck
= {
254 .ops
= &clkops_generic
,
256 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP16XX
|
257 CLOCK_IN_OMAP310
| CLOCK_IDLE_CONTROL
,
258 .enable_reg
= (void __iomem
*)ARM_IDLECT2
,
259 .enable_bit
= EN_WDTCK
,
260 .recalc
= &omap1_watchdog_recalc
,
265 static struct clk arminth_ck16xx
= {
266 .name
= "arminth_ck",
269 .flags
= CLOCK_IN_OMAP16XX
,
270 .recalc
= &followparent_recalc
,
271 /* Note: On 16xx the frequency can be divided by 2 by programming
272 * ARM_CKCTL:ARM_INTHCK_SEL(14) to 1
274 * 1510 version is in TC clocks.
278 static struct clk dsp_ck
= {
280 .ops
= &clkops_generic
,
282 .flags
= CLOCK_IN_OMAP310
| CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP16XX
|
284 .enable_reg
= (void __iomem
*)ARM_CKCTL
,
285 .enable_bit
= EN_DSPCK
,
286 .rate_offset
= CKCTL_DSPDIV_OFFSET
,
287 .recalc
= &omap1_ckctl_recalc
,
290 static struct clk dspmmu_ck
= {
294 .flags
= CLOCK_IN_OMAP310
| CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP16XX
|
296 .rate_offset
= CKCTL_DSPMMUDIV_OFFSET
,
297 .recalc
= &omap1_ckctl_recalc
,
300 static struct clk dspper_ck
= {
302 .ops
= &clkops_dspck
,
304 .flags
= CLOCK_IN_OMAP310
| CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP16XX
|
305 RATE_CKCTL
| VIRTUAL_IO_ADDRESS
,
306 .enable_reg
= DSP_IDLECT2
,
307 .enable_bit
= EN_PERCK
,
308 .rate_offset
= CKCTL_PERDIV_OFFSET
,
309 .recalc
= &omap1_ckctl_recalc_dsp_domain
,
310 .set_rate
= &omap1_clk_set_rate_dsp_domain
,
313 static struct clk dspxor_ck
= {
315 .ops
= &clkops_dspck
,
317 .flags
= CLOCK_IN_OMAP310
| CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP16XX
|
319 .enable_reg
= DSP_IDLECT2
,
320 .enable_bit
= EN_XORPCK
,
321 .recalc
= &followparent_recalc
,
324 static struct clk dsptim_ck
= {
326 .ops
= &clkops_dspck
,
328 .flags
= CLOCK_IN_OMAP310
| CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP16XX
|
330 .enable_reg
= DSP_IDLECT2
,
331 .enable_bit
= EN_DSPTIMCK
,
332 .recalc
= &followparent_recalc
,
335 /* Tie ARM_IDLECT1:IDLIF_ARM to this logical clock structure */
336 static struct arm_idlect1_clk tc_ck
= {
341 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP16XX
|
342 CLOCK_IN_OMAP730
| CLOCK_IN_OMAP310
|
343 RATE_CKCTL
| RATE_PROPAGATES
|
345 .rate_offset
= CKCTL_TCDIV_OFFSET
,
346 .recalc
= &omap1_ckctl_recalc
,
351 static struct clk arminth_ck1510
= {
352 .name
= "arminth_ck",
354 .parent
= &tc_ck
.clk
,
355 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP310
,
356 .recalc
= &followparent_recalc
,
357 /* Note: On 1510 the frequency follows TC_CK
359 * 16xx version is in MPU clocks.
363 static struct clk tipb_ck
= {
364 /* No-idle controlled by "tc_ck" */
367 .parent
= &tc_ck
.clk
,
368 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP310
,
369 .recalc
= &followparent_recalc
,
372 static struct clk l3_ocpi_ck
= {
373 /* No-idle controlled by "tc_ck" */
374 .name
= "l3_ocpi_ck",
375 .ops
= &clkops_generic
,
376 .parent
= &tc_ck
.clk
,
377 .flags
= CLOCK_IN_OMAP16XX
,
378 .enable_reg
= (void __iomem
*)ARM_IDLECT3
,
379 .enable_bit
= EN_OCPI_CK
,
380 .recalc
= &followparent_recalc
,
383 static struct clk tc1_ck
= {
385 .ops
= &clkops_generic
,
386 .parent
= &tc_ck
.clk
,
387 .flags
= CLOCK_IN_OMAP16XX
,
388 .enable_reg
= (void __iomem
*)ARM_IDLECT3
,
389 .enable_bit
= EN_TC1_CK
,
390 .recalc
= &followparent_recalc
,
393 static struct clk tc2_ck
= {
395 .ops
= &clkops_generic
,
396 .parent
= &tc_ck
.clk
,
397 .flags
= CLOCK_IN_OMAP16XX
,
398 .enable_reg
= (void __iomem
*)ARM_IDLECT3
,
399 .enable_bit
= EN_TC2_CK
,
400 .recalc
= &followparent_recalc
,
403 static struct clk dma_ck
= {
404 /* No-idle controlled by "tc_ck" */
407 .parent
= &tc_ck
.clk
,
408 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP16XX
|
410 .recalc
= &followparent_recalc
,
413 static struct clk dma_lcdfree_ck
= {
414 .name
= "dma_lcdfree_ck",
416 .parent
= &tc_ck
.clk
,
417 .flags
= CLOCK_IN_OMAP16XX
,
418 .recalc
= &followparent_recalc
,
421 static struct arm_idlect1_clk api_ck
= {
424 .ops
= &clkops_generic
,
425 .parent
= &tc_ck
.clk
,
426 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP16XX
|
427 CLOCK_IN_OMAP310
| CLOCK_IDLE_CONTROL
,
428 .enable_reg
= (void __iomem
*)ARM_IDLECT2
,
429 .enable_bit
= EN_APICK
,
430 .recalc
= &followparent_recalc
,
435 static struct arm_idlect1_clk lb_ck
= {
438 .ops
= &clkops_generic
,
439 .parent
= &tc_ck
.clk
,
440 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP310
|
442 .enable_reg
= (void __iomem
*)ARM_IDLECT2
,
443 .enable_bit
= EN_LBCK
,
444 .recalc
= &followparent_recalc
,
449 static struct clk rhea1_ck
= {
452 .parent
= &tc_ck
.clk
,
453 .flags
= CLOCK_IN_OMAP16XX
,
454 .recalc
= &followparent_recalc
,
457 static struct clk rhea2_ck
= {
460 .parent
= &tc_ck
.clk
,
461 .flags
= CLOCK_IN_OMAP16XX
,
462 .recalc
= &followparent_recalc
,
465 static struct clk lcd_ck_16xx
= {
467 .ops
= &clkops_generic
,
469 .flags
= CLOCK_IN_OMAP16XX
| CLOCK_IN_OMAP730
| RATE_CKCTL
,
470 .enable_reg
= (void __iomem
*)ARM_IDLECT2
,
471 .enable_bit
= EN_LCDCK
,
472 .rate_offset
= CKCTL_LCDDIV_OFFSET
,
473 .recalc
= &omap1_ckctl_recalc
,
476 static struct arm_idlect1_clk lcd_ck_1510
= {
479 .ops
= &clkops_generic
,
481 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP310
|
482 RATE_CKCTL
| CLOCK_IDLE_CONTROL
,
483 .enable_reg
= (void __iomem
*)ARM_IDLECT2
,
484 .enable_bit
= EN_LCDCK
,
485 .rate_offset
= CKCTL_LCDDIV_OFFSET
,
486 .recalc
= &omap1_ckctl_recalc
,
491 static struct clk uart1_1510
= {
494 /* Direct from ULPD, no real parent */
495 .parent
= &armper_ck
.clk
,
497 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP310
|
498 ENABLE_REG_32BIT
| CLOCK_NO_IDLE_PARENT
,
499 .enable_reg
= (void __iomem
*)MOD_CONF_CTRL_0
,
500 .enable_bit
= 29, /* Chooses between 12MHz and 48MHz */
501 .set_rate
= &omap1_set_uart_rate
,
502 .recalc
= &omap1_uart_recalc
,
505 static struct uart_clk uart1_16xx
= {
509 /* Direct from ULPD, no real parent */
510 .parent
= &armper_ck
.clk
,
512 .flags
= CLOCK_IN_OMAP16XX
| RATE_FIXED
|
513 ENABLE_REG_32BIT
| CLOCK_NO_IDLE_PARENT
,
514 .enable_reg
= (void __iomem
*)MOD_CONF_CTRL_0
,
517 .sysc_addr
= 0xfffb0054,
520 static struct clk uart2_ck
= {
523 /* Direct from ULPD, no real parent */
524 .parent
= &armper_ck
.clk
,
526 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP16XX
|
527 CLOCK_IN_OMAP310
| ENABLE_REG_32BIT
|
528 CLOCK_NO_IDLE_PARENT
,
529 .enable_reg
= (void __iomem
*)MOD_CONF_CTRL_0
,
530 .enable_bit
= 30, /* Chooses between 12MHz and 48MHz */
531 .set_rate
= &omap1_set_uart_rate
,
532 .recalc
= &omap1_uart_recalc
,
535 static struct clk uart3_1510
= {
538 /* Direct from ULPD, no real parent */
539 .parent
= &armper_ck
.clk
,
541 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP310
|
542 ENABLE_REG_32BIT
| CLOCK_NO_IDLE_PARENT
,
543 .enable_reg
= (void __iomem
*)MOD_CONF_CTRL_0
,
544 .enable_bit
= 31, /* Chooses between 12MHz and 48MHz */
545 .set_rate
= &omap1_set_uart_rate
,
546 .recalc
= &omap1_uart_recalc
,
549 static struct uart_clk uart3_16xx
= {
553 /* Direct from ULPD, no real parent */
554 .parent
= &armper_ck
.clk
,
556 .flags
= CLOCK_IN_OMAP16XX
| RATE_FIXED
|
557 ENABLE_REG_32BIT
| CLOCK_NO_IDLE_PARENT
,
558 .enable_reg
= (void __iomem
*)MOD_CONF_CTRL_0
,
561 .sysc_addr
= 0xfffb9854,
564 static struct clk usb_clko
= { /* 6 MHz output on W4_USB_CLKO */
566 .ops
= &clkops_generic
,
567 /* Direct from ULPD, no parent */
569 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP16XX
|
570 CLOCK_IN_OMAP310
| RATE_FIXED
| ENABLE_REG_32BIT
,
571 .enable_reg
= (void __iomem
*)ULPD_CLOCK_CTRL
,
572 .enable_bit
= USB_MCLK_EN_BIT
,
575 static struct clk usb_hhc_ck1510
= {
576 .name
= "usb_hhc_ck",
577 .ops
= &clkops_generic
,
578 /* Direct from ULPD, no parent */
579 .rate
= 48000000, /* Actually 2 clocks, 12MHz and 48MHz */
580 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP310
|
581 RATE_FIXED
| ENABLE_REG_32BIT
,
582 .enable_reg
= (void __iomem
*)MOD_CONF_CTRL_0
,
583 .enable_bit
= USB_HOST_HHC_UHOST_EN
,
586 static struct clk usb_hhc_ck16xx
= {
587 .name
= "usb_hhc_ck",
588 .ops
= &clkops_generic
,
589 /* Direct from ULPD, no parent */
591 /* OTG_SYSCON_2.OTG_PADEN == 0 (not 1510-compatible) */
592 .flags
= CLOCK_IN_OMAP16XX
|
593 RATE_FIXED
| ENABLE_REG_32BIT
,
594 .enable_reg
= (void __iomem
*)OTG_BASE
+ 0x08 /* OTG_SYSCON_2 */,
595 .enable_bit
= 8 /* UHOST_EN */,
598 static struct clk usb_dc_ck
= {
600 .ops
= &clkops_generic
,
601 /* Direct from ULPD, no parent */
603 .flags
= CLOCK_IN_OMAP16XX
| RATE_FIXED
,
604 .enable_reg
= (void __iomem
*)SOFT_REQ_REG
,
608 static struct clk mclk_1510
= {
610 .ops
= &clkops_generic
,
611 /* Direct from ULPD, no parent. May be enabled by ext hardware. */
613 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP310
| RATE_FIXED
,
614 .enable_reg
= (void __iomem
*)SOFT_REQ_REG
,
618 static struct clk mclk_16xx
= {
620 .ops
= &clkops_generic
,
621 /* Direct from ULPD, no parent. May be enabled by ext hardware. */
622 .flags
= CLOCK_IN_OMAP16XX
,
623 .enable_reg
= (void __iomem
*)COM_CLK_DIV_CTRL_SEL
,
624 .enable_bit
= COM_ULPD_PLL_CLK_REQ
,
625 .set_rate
= &omap1_set_ext_clk_rate
,
626 .round_rate
= &omap1_round_ext_clk_rate
,
627 .init
= &omap1_init_ext_clk
,
630 static struct clk bclk_1510
= {
632 .ops
= &clkops_generic
,
633 /* Direct from ULPD, no parent. May be enabled by ext hardware. */
635 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP310
| RATE_FIXED
,
638 static struct clk bclk_16xx
= {
640 .ops
= &clkops_generic
,
641 /* Direct from ULPD, no parent. May be enabled by ext hardware. */
642 .flags
= CLOCK_IN_OMAP16XX
,
643 .enable_reg
= (void __iomem
*)SWD_CLK_DIV_CTRL_SEL
,
644 .enable_bit
= SWD_ULPD_PLL_CLK_REQ
,
645 .set_rate
= &omap1_set_ext_clk_rate
,
646 .round_rate
= &omap1_round_ext_clk_rate
,
647 .init
= &omap1_init_ext_clk
,
650 static struct clk mmc1_ck
= {
652 .ops
= &clkops_generic
,
653 /* Functional clock is direct from ULPD, interface clock is ARMPER */
654 .parent
= &armper_ck
.clk
,
656 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP16XX
|
657 CLOCK_IN_OMAP310
| RATE_FIXED
| ENABLE_REG_32BIT
|
658 CLOCK_NO_IDLE_PARENT
,
659 .enable_reg
= (void __iomem
*)MOD_CONF_CTRL_0
,
663 static struct clk mmc2_ck
= {
666 .ops
= &clkops_generic
,
667 /* Functional clock is direct from ULPD, interface clock is ARMPER */
668 .parent
= &armper_ck
.clk
,
670 .flags
= CLOCK_IN_OMAP16XX
|
671 RATE_FIXED
| ENABLE_REG_32BIT
| CLOCK_NO_IDLE_PARENT
,
672 .enable_reg
= (void __iomem
*)MOD_CONF_CTRL_0
,
676 static struct clk virtual_ck_mpu
= {
679 .flags
= CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP16XX
|
681 .parent
= &arm_ck
, /* Is smarter alias for */
682 .recalc
= &followparent_recalc
,
683 .set_rate
= &omap1_select_table_rate
,
684 .round_rate
= &omap1_round_to_table_rate
,
687 /* virtual functional clock domain for I2C. Just for making sure that ARMXOR_CK
688 remains active during MPU idle whenever this is enabled */
689 static struct clk i2c_fck
= {
693 .flags
= CLOCK_IN_OMAP310
| CLOCK_IN_OMAP1510
| CLOCK_IN_OMAP16XX
|
694 CLOCK_NO_IDLE_PARENT
,
695 .parent
= &armxor_ck
.clk
,
696 .recalc
= &followparent_recalc
,
699 static struct clk i2c_ick
= {
703 .flags
= CLOCK_IN_OMAP16XX
| CLOCK_NO_IDLE_PARENT
,
704 .parent
= &armper_ck
.clk
,
705 .recalc
= &followparent_recalc
,
708 static struct clk
* onchip_clks
[] = {
709 /* non-ULPD clocks */
721 &arminth_ck1510
, &arminth_ck16xx
,
749 &usb_hhc_ck1510
, &usb_hhc_ck16xx
,
751 &mclk_1510
, &mclk_16xx
,
752 &bclk_1510
, &bclk_16xx
,