aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clock24xx.h
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-11-04 11:35:03 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-02-08 06:38:39 -0500
commit897dcded6fb6565f4d1c22a55d21f135403db132 (patch)
treeda9c4028ed49a1482445131760b4fc45c6524abe /arch/arm/mach-omap2/clock24xx.h
parent548d849574847b788fe846fe21a41386063be161 (diff)
[ARM] omap: provide a NULL clock operations structure
... and use it for clocks which are ALWAYS_ENABLED. These clocks use a non-NULL enable_reg pointer for other purposes (such as selecting clock rates.) Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-omap2/clock24xx.h')
-rw-r--r--arch/arm/mach-omap2/clock24xx.h31
1 files changed, 22 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/clock24xx.h b/arch/arm/mach-omap2/clock24xx.h
index 2aa0b5e65608..d4869377307a 100644
--- a/arch/arm/mach-omap2/clock24xx.h
+++ b/arch/arm/mach-omap2/clock24xx.h
@@ -619,9 +619,10 @@ static struct prcm_config rate_table[] = {
619/* Base external input clocks */ 619/* Base external input clocks */
620static struct clk func_32k_ck = { 620static struct clk func_32k_ck = {
621 .name = "func_32k_ck", 621 .name = "func_32k_ck",
622 .ops = &clkops_null,
622 .rate = 32000, 623 .rate = 32000,
623 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | 624 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
624 RATE_FIXED | ALWAYS_ENABLED | RATE_PROPAGATES, 625 RATE_FIXED | RATE_PROPAGATES,
625 .clkdm_name = "wkup_clkdm", 626 .clkdm_name = "wkup_clkdm",
626 .recalc = &propagate_rate, 627 .recalc = &propagate_rate,
627}; 628};
@@ -639,18 +640,20 @@ static struct clk osc_ck = { /* (*12, *13, 19.2, *26, 38.4)MHz */
639/* Without modem likely 12MHz, with modem likely 13MHz */ 640/* Without modem likely 12MHz, with modem likely 13MHz */
640static struct clk sys_ck = { /* (*12, *13, 19.2, 26, 38.4)MHz */ 641static struct clk sys_ck = { /* (*12, *13, 19.2, 26, 38.4)MHz */
641 .name = "sys_ck", /* ~ ref_clk also */ 642 .name = "sys_ck", /* ~ ref_clk also */
643 .ops = &clkops_null,
642 .parent = &osc_ck, 644 .parent = &osc_ck,
643 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | 645 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
644 ALWAYS_ENABLED | RATE_PROPAGATES, 646 RATE_PROPAGATES,
645 .clkdm_name = "wkup_clkdm", 647 .clkdm_name = "wkup_clkdm",
646 .recalc = &omap2_sys_clk_recalc, 648 .recalc = &omap2_sys_clk_recalc,
647}; 649};
648 650
649static struct clk alt_ck = { /* Typical 54M or 48M, may not exist */ 651static struct clk alt_ck = { /* Typical 54M or 48M, may not exist */
650 .name = "alt_ck", 652 .name = "alt_ck",
653 .ops = &clkops_null,
651 .rate = 54000000, 654 .rate = 54000000,
652 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | 655 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
653 RATE_FIXED | ALWAYS_ENABLED | RATE_PROPAGATES, 656 RATE_FIXED | RATE_PROPAGATES,
654 .clkdm_name = "wkup_clkdm", 657 .clkdm_name = "wkup_clkdm",
655 .recalc = &propagate_rate, 658 .recalc = &propagate_rate,
656}; 659};
@@ -679,10 +682,11 @@ static struct dpll_data dpll_dd = {
679 */ 682 */
680static struct clk dpll_ck = { 683static struct clk dpll_ck = {
681 .name = "dpll_ck", 684 .name = "dpll_ck",
685 .ops = &clkops_null,
682 .parent = &sys_ck, /* Can be func_32k also */ 686 .parent = &sys_ck, /* Can be func_32k also */
683 .dpll_data = &dpll_dd, 687 .dpll_data = &dpll_dd,
684 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | 688 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
685 RATE_PROPAGATES | ALWAYS_ENABLED, 689 RATE_PROPAGATES,
686 .clkdm_name = "wkup_clkdm", 690 .clkdm_name = "wkup_clkdm",
687 .recalc = &omap2_dpllcore_recalc, 691 .recalc = &omap2_dpllcore_recalc,
688 .set_rate = &omap2_reprogram_dpllcore, 692 .set_rate = &omap2_reprogram_dpllcore,
@@ -751,9 +755,10 @@ static struct clk func_54m_ck = {
751 755
752static struct clk core_ck = { 756static struct clk core_ck = {
753 .name = "core_ck", 757 .name = "core_ck",
758 .ops = &clkops_null,
754 .parent = &dpll_ck, /* can also be 32k */ 759 .parent = &dpll_ck, /* can also be 32k */
755 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | 760 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
756 ALWAYS_ENABLED | RATE_PROPAGATES, 761 RATE_PROPAGATES,
757 .clkdm_name = "wkup_clkdm", 762 .clkdm_name = "wkup_clkdm",
758 .recalc = &followparent_recalc, 763 .recalc = &followparent_recalc,
759}; 764};
@@ -837,6 +842,7 @@ static struct clk func_12m_ck = {
837/* Secure timer, only available in secure mode */ 842/* Secure timer, only available in secure mode */
838static struct clk wdt1_osc_ck = { 843static struct clk wdt1_osc_ck = {
839 .name = "ck_wdt1_osc", 844 .name = "ck_wdt1_osc",
845 .ops = &clkops_null, /* RMK: missing? */
840 .parent = &osc_ck, 846 .parent = &osc_ck,
841 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, 847 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
842 .recalc = &followparent_recalc, 848 .recalc = &followparent_recalc,
@@ -996,9 +1002,10 @@ static const struct clksel mpu_clksel[] = {
996 1002
997static struct clk mpu_ck = { /* Control cpu */ 1003static struct clk mpu_ck = { /* Control cpu */
998 .name = "mpu_ck", 1004 .name = "mpu_ck",
1005 .ops = &clkops_null,
999 .parent = &core_ck, 1006 .parent = &core_ck,
1000 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | 1007 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1001 ALWAYS_ENABLED | DELAYED_APP | 1008 DELAYED_APP |
1002 CONFIG_PARTICIPANT | RATE_PROPAGATES, 1009 CONFIG_PARTICIPANT | RATE_PROPAGATES,
1003 .clkdm_name = "mpu_clkdm", 1010 .clkdm_name = "mpu_clkdm",
1004 .init = &omap2_init_clksel_parent, 1011 .init = &omap2_init_clksel_parent,
@@ -1168,9 +1175,10 @@ static const struct clksel core_l3_clksel[] = {
1168 1175
1169static struct clk core_l3_ck = { /* Used for ick and fck, interconnect */ 1176static struct clk core_l3_ck = { /* Used for ick and fck, interconnect */
1170 .name = "core_l3_ck", 1177 .name = "core_l3_ck",
1178 .ops = &clkops_null,
1171 .parent = &core_ck, 1179 .parent = &core_ck,
1172 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | 1180 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1173 ALWAYS_ENABLED | DELAYED_APP | 1181 DELAYED_APP |
1174 CONFIG_PARTICIPANT | RATE_PROPAGATES, 1182 CONFIG_PARTICIPANT | RATE_PROPAGATES,
1175 .clkdm_name = "core_l3_clkdm", 1183 .clkdm_name = "core_l3_clkdm",
1176 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1), 1184 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
@@ -1231,9 +1239,10 @@ static const struct clksel l4_clksel[] = {
1231 1239
1232static struct clk l4_ck = { /* used both as an ick and fck */ 1240static struct clk l4_ck = { /* used both as an ick and fck */
1233 .name = "l4_ck", 1241 .name = "l4_ck",
1242 .ops = &clkops_null,
1234 .parent = &core_l3_ck, 1243 .parent = &core_l3_ck,
1235 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | 1244 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1236 ALWAYS_ENABLED | DELAYED_APP | RATE_PROPAGATES, 1245 DELAYED_APP | RATE_PROPAGATES,
1237 .clkdm_name = "core_l4_clkdm", 1246 .clkdm_name = "core_l4_clkdm",
1238 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1), 1247 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
1239 .clksel_mask = OMAP24XX_CLKSEL_L4_MASK, 1248 .clksel_mask = OMAP24XX_CLKSEL_L4_MASK,
@@ -2359,6 +2368,7 @@ static struct clk i2chs1_fck = {
2359 2368
2360static struct clk gpmc_fck = { 2369static struct clk gpmc_fck = {
2361 .name = "gpmc_fck", 2370 .name = "gpmc_fck",
2371 .ops = &clkops_null, /* RMK: missing? */
2362 .parent = &core_l3_ck, 2372 .parent = &core_l3_ck,
2363 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | 2373 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
2364 ENABLE_ON_INIT, 2374 ENABLE_ON_INIT,
@@ -2368,6 +2378,7 @@ static struct clk gpmc_fck = {
2368 2378
2369static struct clk sdma_fck = { 2379static struct clk sdma_fck = {
2370 .name = "sdma_fck", 2380 .name = "sdma_fck",
2381 .ops = &clkops_null, /* RMK: missing? */
2371 .parent = &core_l3_ck, 2382 .parent = &core_l3_ck,
2372 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, 2383 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
2373 .clkdm_name = "core_l3_clkdm", 2384 .clkdm_name = "core_l3_clkdm",
@@ -2376,6 +2387,7 @@ static struct clk sdma_fck = {
2376 2387
2377static struct clk sdma_ick = { 2388static struct clk sdma_ick = {
2378 .name = "sdma_ick", 2389 .name = "sdma_ick",
2390 .ops = &clkops_null, /* RMK: missing? */
2379 .parent = &l4_ck, 2391 .parent = &l4_ck,
2380 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, 2392 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
2381 .clkdm_name = "core_l3_clkdm", 2393 .clkdm_name = "core_l3_clkdm",
@@ -2621,8 +2633,9 @@ static struct clk mmchsdb2_fck = {
2621 */ 2633 */
2622static struct clk virt_prcm_set = { 2634static struct clk virt_prcm_set = {
2623 .name = "virt_prcm_set", 2635 .name = "virt_prcm_set",
2636 .ops = &clkops_null,
2624 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | 2637 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
2625 ALWAYS_ENABLED | DELAYED_APP, 2638 DELAYED_APP,
2626 .parent = &mpu_ck, /* Indexed by mpu speed, no parent */ 2639 .parent = &mpu_ck, /* Indexed by mpu speed, no parent */
2627 .recalc = &omap2_table_mpu_recalc, /* sets are keyed on mpu rate */ 2640 .recalc = &omap2_table_mpu_recalc, /* sets are keyed on mpu rate */
2628 .set_rate = &omap2_select_table_rate, 2641 .set_rate = &omap2_select_table_rate,