aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap1/clock.c3
-rw-r--r--arch/arm/mach-omap1/clock.h7
-rw-r--r--arch/arm/mach-omap2/clock.c4
-rw-r--r--arch/arm/mach-omap2/clock24xx.c3
-rw-r--r--arch/arm/mach-omap2/clock24xx.h28
-rw-r--r--arch/arm/mach-omap2/clock34xx.c3
-rw-r--r--arch/arm/mach-omap2/clock34xx.h96
-rw-r--r--arch/arm/plat-omap/clock.c51
-rw-r--r--arch/arm/plat-omap/include/mach/clock.h7
9 files changed, 74 insertions, 128 deletions
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
index 1e477af666ee..ccf989f4aa7d 100644
--- a/arch/arm/mach-omap1/clock.c
+++ b/arch/arm/mach-omap1/clock.c
@@ -782,6 +782,9 @@ int __init omap1_clk_init(void)
782 /* By default all idlect1 clocks are allowed to idle */ 782 /* By default all idlect1 clocks are allowed to idle */
783 arm_idlect1_mask = ~0; 783 arm_idlect1_mask = ~0;
784 784
785 for (c = omap_clks; c < omap_clks + ARRAY_SIZE(omap_clks); c++)
786 clk_init_one(c->lk.clk);
787
785 cpu_mask = 0; 788 cpu_mask = 0;
786 if (cpu_is_omap16xx()) 789 if (cpu_is_omap16xx())
787 cpu_mask |= CK_16XX; 790 cpu_mask |= CK_16XX;
diff --git a/arch/arm/mach-omap1/clock.h b/arch/arm/mach-omap1/clock.h
index 1b4dd056d9bd..28bc74e93e8d 100644
--- a/arch/arm/mach-omap1/clock.h
+++ b/arch/arm/mach-omap1/clock.h
@@ -155,7 +155,6 @@ static struct clk ck_dpll1 = {
155 .name = "ck_dpll1", 155 .name = "ck_dpll1",
156 .ops = &clkops_null, 156 .ops = &clkops_null,
157 .parent = &ck_ref, 157 .parent = &ck_ref,
158 .flags = RATE_PROPAGATES,
159}; 158};
160 159
161static struct arm_idlect1_clk ck_dpll1out = { 160static struct arm_idlect1_clk ck_dpll1out = {
@@ -163,8 +162,7 @@ static struct arm_idlect1_clk ck_dpll1out = {
163 .name = "ck_dpll1out", 162 .name = "ck_dpll1out",
164 .ops = &clkops_generic, 163 .ops = &clkops_generic,
165 .parent = &ck_dpll1, 164 .parent = &ck_dpll1,
166 .flags = CLOCK_IDLE_CONTROL | 165 .flags = CLOCK_IDLE_CONTROL | ENABLE_REG_32BIT,
167 ENABLE_REG_32BIT | RATE_PROPAGATES,
168 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2), 166 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
169 .enable_bit = EN_CKOUT_ARM, 167 .enable_bit = EN_CKOUT_ARM,
170 .recalc = &followparent_recalc, 168 .recalc = &followparent_recalc,
@@ -187,7 +185,6 @@ static struct clk arm_ck = {
187 .name = "arm_ck", 185 .name = "arm_ck",
188 .ops = &clkops_null, 186 .ops = &clkops_null,
189 .parent = &ck_dpll1, 187 .parent = &ck_dpll1,
190 .flags = RATE_PROPAGATES,
191 .rate_offset = CKCTL_ARMDIV_OFFSET, 188 .rate_offset = CKCTL_ARMDIV_OFFSET,
192 .recalc = &omap1_ckctl_recalc, 189 .recalc = &omap1_ckctl_recalc,
193 .round_rate = omap1_clk_round_rate_ckctl_arm, 190 .round_rate = omap1_clk_round_rate_ckctl_arm,
@@ -328,7 +325,7 @@ static struct arm_idlect1_clk tc_ck = {
328 .name = "tc_ck", 325 .name = "tc_ck",
329 .ops = &clkops_null, 326 .ops = &clkops_null,
330 .parent = &ck_dpll1, 327 .parent = &ck_dpll1,
331 .flags = RATE_PROPAGATES | CLOCK_IDLE_CONTROL, 328 .flags = CLOCK_IDLE_CONTROL,
332 .rate_offset = CKCTL_TCDIV_OFFSET, 329 .rate_offset = CKCTL_TCDIV_OFFSET,
333 .recalc = &omap1_ckctl_recalc, 330 .recalc = &omap1_ckctl_recalc,
334 .round_rate = omap1_clk_round_rate_ckctl_arm, 331 .round_rate = omap1_clk_round_rate_ckctl_arm,
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 478ca660fffd..38a7898d0ce3 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -175,7 +175,7 @@ void omap2_init_clksel_parent(struct clk *clk)
175 clk->name, clks->parent->name, 175 clk->name, clks->parent->name,
176 ((clk->parent) ? 176 ((clk->parent) ?
177 clk->parent->name : "NULL")); 177 clk->parent->name : "NULL"));
178 clk->parent = clks->parent; 178 clk_reparent(clk, clks->parent);
179 }; 179 };
180 found = 1; 180 found = 1;
181 } 181 }
@@ -780,7 +780,7 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)
780 if (clk->usecount > 0) 780 if (clk->usecount > 0)
781 _omap2_clk_enable(clk); 781 _omap2_clk_enable(clk);
782 782
783 clk->parent = new_parent; 783 clk_reparent(clk, new_parent);
784 784
785 /* CLKSEL clocks follow their parents' rates, divided by a divisor */ 785 /* CLKSEL clocks follow their parents' rates, divided by a divisor */
786 clk->rate = new_parent->rate; 786 clk->rate = new_parent->rate;
diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c
index 4564ae32ae02..1a885976c257 100644
--- a/arch/arm/mach-omap2/clock24xx.c
+++ b/arch/arm/mach-omap2/clock24xx.c
@@ -718,6 +718,9 @@ int __init omap2_clk_init(void)
718 omap2_sys_clk_recalc(&sys_ck); 718 omap2_sys_clk_recalc(&sys_ck);
719 propagate_rate(&sys_ck); 719 propagate_rate(&sys_ck);
720 720
721 for (c = omap24xx_clks; c < omap24xx_clks + ARRAY_SIZE(omap24xx_clks); c++)
722 clk_init_one(c->lk.clk);
723
721 cpu_mask = 0; 724 cpu_mask = 0;
722 if (cpu_is_omap2420()) 725 if (cpu_is_omap2420())
723 cpu_mask |= CK_242X; 726 cpu_mask |= CK_242X;
diff --git a/arch/arm/mach-omap2/clock24xx.h b/arch/arm/mach-omap2/clock24xx.h
index 7731ab6acd18..759489822ee9 100644
--- a/arch/arm/mach-omap2/clock24xx.h
+++ b/arch/arm/mach-omap2/clock24xx.h
@@ -621,7 +621,7 @@ static struct clk func_32k_ck = {
621 .name = "func_32k_ck", 621 .name = "func_32k_ck",
622 .ops = &clkops_null, 622 .ops = &clkops_null,
623 .rate = 32000, 623 .rate = 32000,
624 .flags = RATE_FIXED | RATE_PROPAGATES, 624 .flags = RATE_FIXED,
625 .clkdm_name = "wkup_clkdm", 625 .clkdm_name = "wkup_clkdm",
626}; 626};
627 627
@@ -629,7 +629,6 @@ static struct clk func_32k_ck = {
629static struct clk osc_ck = { /* (*12, *13, 19.2, *26, 38.4)MHz */ 629static struct clk osc_ck = { /* (*12, *13, 19.2, *26, 38.4)MHz */
630 .name = "osc_ck", 630 .name = "osc_ck",
631 .ops = &clkops_oscck, 631 .ops = &clkops_oscck,
632 .flags = RATE_PROPAGATES,
633 .clkdm_name = "wkup_clkdm", 632 .clkdm_name = "wkup_clkdm",
634 .recalc = &omap2_osc_clk_recalc, 633 .recalc = &omap2_osc_clk_recalc,
635}; 634};
@@ -639,7 +638,6 @@ static struct clk sys_ck = { /* (*12, *13, 19.2, 26, 38.4)MHz */
639 .name = "sys_ck", /* ~ ref_clk also */ 638 .name = "sys_ck", /* ~ ref_clk also */
640 .ops = &clkops_null, 639 .ops = &clkops_null,
641 .parent = &osc_ck, 640 .parent = &osc_ck,
642 .flags = RATE_PROPAGATES,
643 .clkdm_name = "wkup_clkdm", 641 .clkdm_name = "wkup_clkdm",
644 .recalc = &omap2_sys_clk_recalc, 642 .recalc = &omap2_sys_clk_recalc,
645}; 643};
@@ -648,7 +646,7 @@ static struct clk alt_ck = { /* Typical 54M or 48M, may not exist */
648 .name = "alt_ck", 646 .name = "alt_ck",
649 .ops = &clkops_null, 647 .ops = &clkops_null,
650 .rate = 54000000, 648 .rate = 54000000,
651 .flags = RATE_FIXED | RATE_PROPAGATES, 649 .flags = RATE_FIXED,
652 .clkdm_name = "wkup_clkdm", 650 .clkdm_name = "wkup_clkdm",
653}; 651};
654 652
@@ -680,7 +678,6 @@ static struct clk dpll_ck = {
680 .ops = &clkops_null, 678 .ops = &clkops_null,
681 .parent = &sys_ck, /* Can be func_32k also */ 679 .parent = &sys_ck, /* Can be func_32k also */
682 .dpll_data = &dpll_dd, 680 .dpll_data = &dpll_dd,
683 .flags = RATE_PROPAGATES,
684 .clkdm_name = "wkup_clkdm", 681 .clkdm_name = "wkup_clkdm",
685 .recalc = &omap2_dpllcore_recalc, 682 .recalc = &omap2_dpllcore_recalc,
686 .set_rate = &omap2_reprogram_dpllcore, 683 .set_rate = &omap2_reprogram_dpllcore,
@@ -691,7 +688,7 @@ static struct clk apll96_ck = {
691 .ops = &clkops_fixed, 688 .ops = &clkops_fixed,
692 .parent = &sys_ck, 689 .parent = &sys_ck,
693 .rate = 96000000, 690 .rate = 96000000,
694 .flags = RATE_FIXED | RATE_PROPAGATES | ENABLE_ON_INIT, 691 .flags = RATE_FIXED | ENABLE_ON_INIT,
695 .clkdm_name = "wkup_clkdm", 692 .clkdm_name = "wkup_clkdm",
696 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), 693 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
697 .enable_bit = OMAP24XX_EN_96M_PLL_SHIFT, 694 .enable_bit = OMAP24XX_EN_96M_PLL_SHIFT,
@@ -702,7 +699,7 @@ static struct clk apll54_ck = {
702 .ops = &clkops_fixed, 699 .ops = &clkops_fixed,
703 .parent = &sys_ck, 700 .parent = &sys_ck,
704 .rate = 54000000, 701 .rate = 54000000,
705 .flags = RATE_FIXED | RATE_PROPAGATES | ENABLE_ON_INIT, 702 .flags = RATE_FIXED | ENABLE_ON_INIT,
706 .clkdm_name = "wkup_clkdm", 703 .clkdm_name = "wkup_clkdm",
707 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), 704 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
708 .enable_bit = OMAP24XX_EN_54M_PLL_SHIFT, 705 .enable_bit = OMAP24XX_EN_54M_PLL_SHIFT,
@@ -734,7 +731,6 @@ static struct clk func_54m_ck = {
734 .name = "func_54m_ck", 731 .name = "func_54m_ck",
735 .ops = &clkops_null, 732 .ops = &clkops_null,
736 .parent = &apll54_ck, /* can also be alt_clk */ 733 .parent = &apll54_ck, /* can also be alt_clk */
737 .flags = RATE_PROPAGATES,
738 .clkdm_name = "wkup_clkdm", 734 .clkdm_name = "wkup_clkdm",
739 .init = &omap2_init_clksel_parent, 735 .init = &omap2_init_clksel_parent,
740 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), 736 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
@@ -747,7 +743,6 @@ static struct clk core_ck = {
747 .name = "core_ck", 743 .name = "core_ck",
748 .ops = &clkops_null, 744 .ops = &clkops_null,
749 .parent = &dpll_ck, /* can also be 32k */ 745 .parent = &dpll_ck, /* can also be 32k */
750 .flags = RATE_PROPAGATES,
751 .clkdm_name = "wkup_clkdm", 746 .clkdm_name = "wkup_clkdm",
752 .recalc = &followparent_recalc, 747 .recalc = &followparent_recalc,
753}; 748};
@@ -774,7 +769,6 @@ static struct clk func_96m_ck = {
774 .name = "func_96m_ck", 769 .name = "func_96m_ck",
775 .ops = &clkops_null, 770 .ops = &clkops_null,
776 .parent = &apll96_ck, 771 .parent = &apll96_ck,
777 .flags = RATE_PROPAGATES,
778 .clkdm_name = "wkup_clkdm", 772 .clkdm_name = "wkup_clkdm",
779 .init = &omap2_init_clksel_parent, 773 .init = &omap2_init_clksel_parent,
780 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), 774 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
@@ -807,7 +801,6 @@ static struct clk func_48m_ck = {
807 .name = "func_48m_ck", 801 .name = "func_48m_ck",
808 .ops = &clkops_null, 802 .ops = &clkops_null,
809 .parent = &apll96_ck, /* 96M or Alt */ 803 .parent = &apll96_ck, /* 96M or Alt */
810 .flags = RATE_PROPAGATES,
811 .clkdm_name = "wkup_clkdm", 804 .clkdm_name = "wkup_clkdm",
812 .init = &omap2_init_clksel_parent, 805 .init = &omap2_init_clksel_parent,
813 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), 806 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
@@ -823,7 +816,6 @@ static struct clk func_12m_ck = {
823 .ops = &clkops_null, 816 .ops = &clkops_null,
824 .parent = &func_48m_ck, 817 .parent = &func_48m_ck,
825 .fixed_div = 4, 818 .fixed_div = 4,
826 .flags = RATE_PROPAGATES,
827 .clkdm_name = "wkup_clkdm", 819 .clkdm_name = "wkup_clkdm",
828 .recalc = &omap2_fixed_divisor_recalc, 820 .recalc = &omap2_fixed_divisor_recalc,
829}; 821};
@@ -876,7 +868,6 @@ static struct clk sys_clkout_src = {
876 .name = "sys_clkout_src", 868 .name = "sys_clkout_src",
877 .ops = &clkops_omap2_dflt, 869 .ops = &clkops_omap2_dflt,
878 .parent = &func_54m_ck, 870 .parent = &func_54m_ck,
879 .flags = RATE_PROPAGATES,
880 .clkdm_name = "wkup_clkdm", 871 .clkdm_name = "wkup_clkdm",
881 .enable_reg = OMAP24XX_PRCM_CLKOUT_CTRL, 872 .enable_reg = OMAP24XX_PRCM_CLKOUT_CTRL,
882 .enable_bit = OMAP24XX_CLKOUT_EN_SHIFT, 873 .enable_bit = OMAP24XX_CLKOUT_EN_SHIFT,
@@ -921,7 +912,6 @@ static struct clk sys_clkout2_src = {
921 .name = "sys_clkout2_src", 912 .name = "sys_clkout2_src",
922 .ops = &clkops_omap2_dflt, 913 .ops = &clkops_omap2_dflt,
923 .parent = &func_54m_ck, 914 .parent = &func_54m_ck,
924 .flags = RATE_PROPAGATES,
925 .clkdm_name = "wkup_clkdm", 915 .clkdm_name = "wkup_clkdm",
926 .enable_reg = OMAP24XX_PRCM_CLKOUT_CTRL, 916 .enable_reg = OMAP24XX_PRCM_CLKOUT_CTRL,
927 .enable_bit = OMAP2420_CLKOUT2_EN_SHIFT, 917 .enable_bit = OMAP2420_CLKOUT2_EN_SHIFT,
@@ -992,7 +982,7 @@ static struct clk mpu_ck = { /* Control cpu */
992 .name = "mpu_ck", 982 .name = "mpu_ck",
993 .ops = &clkops_null, 983 .ops = &clkops_null,
994 .parent = &core_ck, 984 .parent = &core_ck,
995 .flags = DELAYED_APP | CONFIG_PARTICIPANT | RATE_PROPAGATES, 985 .flags = DELAYED_APP | CONFIG_PARTICIPANT,
996 .clkdm_name = "mpu_clkdm", 986 .clkdm_name = "mpu_clkdm",
997 .init = &omap2_init_clksel_parent, 987 .init = &omap2_init_clksel_parent,
998 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, CM_CLKSEL), 988 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, CM_CLKSEL),
@@ -1034,7 +1024,7 @@ static struct clk dsp_fck = {
1034 .name = "dsp_fck", 1024 .name = "dsp_fck",
1035 .ops = &clkops_omap2_dflt_wait, 1025 .ops = &clkops_omap2_dflt_wait,
1036 .parent = &core_ck, 1026 .parent = &core_ck,
1037 .flags = DELAYED_APP | CONFIG_PARTICIPANT | RATE_PROPAGATES, 1027 .flags = DELAYED_APP | CONFIG_PARTICIPANT,
1038 .clkdm_name = "dsp_clkdm", 1028 .clkdm_name = "dsp_clkdm",
1039 .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN), 1029 .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
1040 .enable_bit = OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT, 1030 .enable_bit = OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT,
@@ -1102,7 +1092,7 @@ static struct clk iva1_ifck = {
1102 .name = "iva1_ifck", 1092 .name = "iva1_ifck",
1103 .ops = &clkops_omap2_dflt_wait, 1093 .ops = &clkops_omap2_dflt_wait,
1104 .parent = &core_ck, 1094 .parent = &core_ck,
1105 .flags = CONFIG_PARTICIPANT | RATE_PROPAGATES | DELAYED_APP, 1095 .flags = CONFIG_PARTICIPANT | DELAYED_APP,
1106 .clkdm_name = "iva1_clkdm", 1096 .clkdm_name = "iva1_clkdm",
1107 .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN), 1097 .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
1108 .enable_bit = OMAP2420_EN_IVA_COP_SHIFT, 1098 .enable_bit = OMAP2420_EN_IVA_COP_SHIFT,
@@ -1165,7 +1155,7 @@ static struct clk core_l3_ck = { /* Used for ick and fck, interconnect */
1165 .name = "core_l3_ck", 1155 .name = "core_l3_ck",
1166 .ops = &clkops_null, 1156 .ops = &clkops_null,
1167 .parent = &core_ck, 1157 .parent = &core_ck,
1168 .flags = DELAYED_APP | CONFIG_PARTICIPANT | RATE_PROPAGATES, 1158 .flags = DELAYED_APP | CONFIG_PARTICIPANT,
1169 .clkdm_name = "core_l3_clkdm", 1159 .clkdm_name = "core_l3_clkdm",
1170 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1), 1160 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
1171 .clksel_mask = OMAP24XX_CLKSEL_L3_MASK, 1161 .clksel_mask = OMAP24XX_CLKSEL_L3_MASK,
@@ -1227,7 +1217,7 @@ static struct clk l4_ck = { /* used both as an ick and fck */
1227 .name = "l4_ck", 1217 .name = "l4_ck",
1228 .ops = &clkops_null, 1218 .ops = &clkops_null,
1229 .parent = &core_l3_ck, 1219 .parent = &core_l3_ck,
1230 .flags = DELAYED_APP | RATE_PROPAGATES, 1220 .flags = DELAYED_APP,
1231 .clkdm_name = "core_l4_clkdm", 1221 .clkdm_name = "core_l4_clkdm",
1232 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1), 1222 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
1233 .clksel_mask = OMAP24XX_CLKSEL_L4_MASK, 1223 .clksel_mask = OMAP24XX_CLKSEL_L4_MASK,
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
index 75eb2546bb06..a853b1e149ee 100644
--- a/arch/arm/mach-omap2/clock34xx.c
+++ b/arch/arm/mach-omap2/clock34xx.c
@@ -904,6 +904,9 @@ int __init omap2_clk_init(void)
904 clk_init(&omap2_clk_functions); 904 clk_init(&omap2_clk_functions);
905 905
906 for (c = omap34xx_clks; c < omap34xx_clks + ARRAY_SIZE(omap34xx_clks); c++) 906 for (c = omap34xx_clks; c < omap34xx_clks + ARRAY_SIZE(omap34xx_clks); c++)
907 clk_init_one(c->lk.clk);
908
909 for (c = omap34xx_clks; c < omap34xx_clks + ARRAY_SIZE(omap34xx_clks); c++)
907 if (c->cpu & cpu_clkflg) { 910 if (c->cpu & cpu_clkflg) {
908 clkdev_add(&c->lk); 911 clkdev_add(&c->lk);
909 clk_register(c->lk.clk); 912 clk_register(c->lk.clk);
diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h
index 681acf0427c1..2138a58f6346 100644
--- a/arch/arm/mach-omap2/clock34xx.h
+++ b/arch/arm/mach-omap2/clock34xx.h
@@ -60,14 +60,14 @@ static struct clk omap_32k_fck = {
60 .name = "omap_32k_fck", 60 .name = "omap_32k_fck",
61 .ops = &clkops_null, 61 .ops = &clkops_null,
62 .rate = 32768, 62 .rate = 32768,
63 .flags = RATE_FIXED | RATE_PROPAGATES, 63 .flags = RATE_FIXED,
64}; 64};
65 65
66static struct clk secure_32k_fck = { 66static struct clk secure_32k_fck = {
67 .name = "secure_32k_fck", 67 .name = "secure_32k_fck",
68 .ops = &clkops_null, 68 .ops = &clkops_null,
69 .rate = 32768, 69 .rate = 32768,
70 .flags = RATE_FIXED | RATE_PROPAGATES, 70 .flags = RATE_FIXED,
71}; 71};
72 72
73/* Virtual source clocks for osc_sys_ck */ 73/* Virtual source clocks for osc_sys_ck */
@@ -75,42 +75,42 @@ static struct clk virt_12m_ck = {
75 .name = "virt_12m_ck", 75 .name = "virt_12m_ck",
76 .ops = &clkops_null, 76 .ops = &clkops_null,
77 .rate = 12000000, 77 .rate = 12000000,
78 .flags = RATE_FIXED | RATE_PROPAGATES, 78 .flags = RATE_FIXED,
79}; 79};
80 80
81static struct clk virt_13m_ck = { 81static struct clk virt_13m_ck = {
82 .name = "virt_13m_ck", 82 .name = "virt_13m_ck",
83 .ops = &clkops_null, 83 .ops = &clkops_null,
84 .rate = 13000000, 84 .rate = 13000000,
85 .flags = RATE_FIXED | RATE_PROPAGATES, 85 .flags = RATE_FIXED,
86}; 86};
87 87
88static struct clk virt_16_8m_ck = { 88static struct clk virt_16_8m_ck = {
89 .name = "virt_16_8m_ck", 89 .name = "virt_16_8m_ck",
90 .ops = &clkops_null, 90 .ops = &clkops_null,
91 .rate = 16800000, 91 .rate = 16800000,
92 .flags = RATE_FIXED | RATE_PROPAGATES, 92 .flags = RATE_FIXED,
93}; 93};
94 94
95static struct clk virt_19_2m_ck = { 95static struct clk virt_19_2m_ck = {
96 .name = "virt_19_2m_ck", 96 .name = "virt_19_2m_ck",
97 .ops = &clkops_null, 97 .ops = &clkops_null,
98 .rate = 19200000, 98 .rate = 19200000,
99 .flags = RATE_FIXED | RATE_PROPAGATES, 99 .flags = RATE_FIXED,
100}; 100};
101 101
102static struct clk virt_26m_ck = { 102static struct clk virt_26m_ck = {
103 .name = "virt_26m_ck", 103 .name = "virt_26m_ck",
104 .ops = &clkops_null, 104 .ops = &clkops_null,
105 .rate = 26000000, 105 .rate = 26000000,
106 .flags = RATE_FIXED | RATE_PROPAGATES, 106 .flags = RATE_FIXED,
107}; 107};
108 108
109static struct clk virt_38_4m_ck = { 109static struct clk virt_38_4m_ck = {
110 .name = "virt_38_4m_ck", 110 .name = "virt_38_4m_ck",
111 .ops = &clkops_null, 111 .ops = &clkops_null,
112 .rate = 38400000, 112 .rate = 38400000,
113 .flags = RATE_FIXED | RATE_PROPAGATES, 113 .flags = RATE_FIXED,
114}; 114};
115 115
116static const struct clksel_rate osc_sys_12m_rates[] = { 116static const struct clksel_rate osc_sys_12m_rates[] = {
@@ -163,7 +163,7 @@ static struct clk osc_sys_ck = {
163 .clksel_mask = OMAP3430_SYS_CLKIN_SEL_MASK, 163 .clksel_mask = OMAP3430_SYS_CLKIN_SEL_MASK,
164 .clksel = osc_sys_clksel, 164 .clksel = osc_sys_clksel,
165 /* REVISIT: deal with autoextclkmode? */ 165 /* REVISIT: deal with autoextclkmode? */
166 .flags = RATE_FIXED | RATE_PROPAGATES, 166 .flags = RATE_FIXED,
167 .recalc = &omap2_clksel_recalc, 167 .recalc = &omap2_clksel_recalc,
168}; 168};
169 169
@@ -188,21 +188,18 @@ static struct clk sys_ck = {
188 .clksel_reg = OMAP3430_PRM_CLKSRC_CTRL, 188 .clksel_reg = OMAP3430_PRM_CLKSRC_CTRL,
189 .clksel_mask = OMAP_SYSCLKDIV_MASK, 189 .clksel_mask = OMAP_SYSCLKDIV_MASK,
190 .clksel = sys_clksel, 190 .clksel = sys_clksel,
191 .flags = RATE_PROPAGATES,
192 .recalc = &omap2_clksel_recalc, 191 .recalc = &omap2_clksel_recalc,
193}; 192};
194 193
195static struct clk sys_altclk = { 194static struct clk sys_altclk = {
196 .name = "sys_altclk", 195 .name = "sys_altclk",
197 .ops = &clkops_null, 196 .ops = &clkops_null,
198 .flags = RATE_PROPAGATES,
199}; 197};
200 198
201/* Optional external clock input for some McBSPs */ 199/* Optional external clock input for some McBSPs */
202static struct clk mcbsp_clks = { 200static struct clk mcbsp_clks = {
203 .name = "mcbsp_clks", 201 .name = "mcbsp_clks",
204 .ops = &clkops_null, 202 .ops = &clkops_null,
205 .flags = RATE_PROPAGATES,
206}; 203};
207 204
208/* PRM EXTERNAL CLOCK OUTPUT */ 205/* PRM EXTERNAL CLOCK OUTPUT */
@@ -279,7 +276,6 @@ static struct clk dpll1_ck = {
279 .ops = &clkops_null, 276 .ops = &clkops_null,
280 .parent = &sys_ck, 277 .parent = &sys_ck,
281 .dpll_data = &dpll1_dd, 278 .dpll_data = &dpll1_dd,
282 .flags = RATE_PROPAGATES,
283 .round_rate = &omap2_dpll_round_rate, 279 .round_rate = &omap2_dpll_round_rate,
284 .set_rate = &omap3_noncore_dpll_set_rate, 280 .set_rate = &omap3_noncore_dpll_set_rate,
285 .clkdm_name = "dpll1_clkdm", 281 .clkdm_name = "dpll1_clkdm",
@@ -294,7 +290,6 @@ static struct clk dpll1_x2_ck = {
294 .name = "dpll1_x2_ck", 290 .name = "dpll1_x2_ck",
295 .ops = &clkops_null, 291 .ops = &clkops_null,
296 .parent = &dpll1_ck, 292 .parent = &dpll1_ck,
297 .flags = RATE_PROPAGATES,
298 .clkdm_name = "dpll1_clkdm", 293 .clkdm_name = "dpll1_clkdm",
299 .recalc = &omap3_clkoutx2_recalc, 294 .recalc = &omap3_clkoutx2_recalc,
300}; 295};
@@ -317,7 +312,6 @@ static struct clk dpll1_x2m2_ck = {
317 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL2_PLL), 312 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL2_PLL),
318 .clksel_mask = OMAP3430_MPU_DPLL_CLKOUT_DIV_MASK, 313 .clksel_mask = OMAP3430_MPU_DPLL_CLKOUT_DIV_MASK,
319 .clksel = div16_dpll1_x2m2_clksel, 314 .clksel = div16_dpll1_x2m2_clksel,
320 .flags = RATE_PROPAGATES,
321 .clkdm_name = "dpll1_clkdm", 315 .clkdm_name = "dpll1_clkdm",
322 .recalc = &omap2_clksel_recalc, 316 .recalc = &omap2_clksel_recalc,
323}; 317};
@@ -353,7 +347,6 @@ static struct clk dpll2_ck = {
353 .ops = &clkops_noncore_dpll_ops, 347 .ops = &clkops_noncore_dpll_ops,
354 .parent = &sys_ck, 348 .parent = &sys_ck,
355 .dpll_data = &dpll2_dd, 349 .dpll_data = &dpll2_dd,
356 .flags = RATE_PROPAGATES,
357 .round_rate = &omap2_dpll_round_rate, 350 .round_rate = &omap2_dpll_round_rate,
358 .set_rate = &omap3_noncore_dpll_set_rate, 351 .set_rate = &omap3_noncore_dpll_set_rate,
359 .clkdm_name = "dpll2_clkdm", 352 .clkdm_name = "dpll2_clkdm",
@@ -378,7 +371,6 @@ static struct clk dpll2_m2_ck = {
378 OMAP3430_CM_CLKSEL2_PLL), 371 OMAP3430_CM_CLKSEL2_PLL),
379 .clksel_mask = OMAP3430_IVA2_DPLL_CLKOUT_DIV_MASK, 372 .clksel_mask = OMAP3430_IVA2_DPLL_CLKOUT_DIV_MASK,
380 .clksel = div16_dpll2_m2x2_clksel, 373 .clksel = div16_dpll2_m2x2_clksel,
381 .flags = RATE_PROPAGATES,
382 .clkdm_name = "dpll2_clkdm", 374 .clkdm_name = "dpll2_clkdm",
383 .recalc = &omap2_clksel_recalc, 375 .recalc = &omap2_clksel_recalc,
384}; 376};
@@ -413,7 +405,6 @@ static struct clk dpll3_ck = {
413 .ops = &clkops_null, 405 .ops = &clkops_null,
414 .parent = &sys_ck, 406 .parent = &sys_ck,
415 .dpll_data = &dpll3_dd, 407 .dpll_data = &dpll3_dd,
416 .flags = RATE_PROPAGATES,
417 .round_rate = &omap2_dpll_round_rate, 408 .round_rate = &omap2_dpll_round_rate,
418 .clkdm_name = "dpll3_clkdm", 409 .clkdm_name = "dpll3_clkdm",
419 .recalc = &omap3_dpll_recalc, 410 .recalc = &omap3_dpll_recalc,
@@ -427,7 +418,6 @@ static struct clk dpll3_x2_ck = {
427 .name = "dpll3_x2_ck", 418 .name = "dpll3_x2_ck",
428 .ops = &clkops_null, 419 .ops = &clkops_null,
429 .parent = &dpll3_ck, 420 .parent = &dpll3_ck,
430 .flags = RATE_PROPAGATES,
431 .clkdm_name = "dpll3_clkdm", 421 .clkdm_name = "dpll3_clkdm",
432 .recalc = &omap3_clkoutx2_recalc, 422 .recalc = &omap3_clkoutx2_recalc,
433}; 423};
@@ -481,7 +471,6 @@ static struct clk dpll3_m2_ck = {
481 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), 471 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
482 .clksel_mask = OMAP3430_CORE_DPLL_CLKOUT_DIV_MASK, 472 .clksel_mask = OMAP3430_CORE_DPLL_CLKOUT_DIV_MASK,
483 .clksel = div31_dpll3m2_clksel, 473 .clksel = div31_dpll3m2_clksel,
484 .flags = RATE_PROPAGATES,
485 .clkdm_name = "dpll3_clkdm", 474 .clkdm_name = "dpll3_clkdm",
486 .round_rate = &omap2_clksel_round_rate, 475 .round_rate = &omap2_clksel_round_rate,
487 .set_rate = &omap3_core_dpll_m2_set_rate, 476 .set_rate = &omap3_core_dpll_m2_set_rate,
@@ -501,7 +490,6 @@ static struct clk core_ck = {
501 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), 490 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
502 .clksel_mask = OMAP3430_ST_CORE_CLK_MASK, 491 .clksel_mask = OMAP3430_ST_CORE_CLK_MASK,
503 .clksel = core_ck_clksel, 492 .clksel = core_ck_clksel,
504 .flags = RATE_PROPAGATES,
505 .recalc = &omap2_clksel_recalc, 493 .recalc = &omap2_clksel_recalc,
506}; 494};
507 495
@@ -518,7 +506,6 @@ static struct clk dpll3_m2x2_ck = {
518 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), 506 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
519 .clksel_mask = OMAP3430_ST_CORE_CLK_MASK, 507 .clksel_mask = OMAP3430_ST_CORE_CLK_MASK,
520 .clksel = dpll3_m2x2_ck_clksel, 508 .clksel = dpll3_m2x2_ck_clksel,
521 .flags = RATE_PROPAGATES,
522 .clkdm_name = "dpll3_clkdm", 509 .clkdm_name = "dpll3_clkdm",
523 .recalc = &omap2_clksel_recalc, 510 .recalc = &omap2_clksel_recalc,
524}; 511};
@@ -538,7 +525,6 @@ static struct clk dpll3_m3_ck = {
538 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1), 525 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
539 .clksel_mask = OMAP3430_DIV_DPLL3_MASK, 526 .clksel_mask = OMAP3430_DIV_DPLL3_MASK,
540 .clksel = div16_dpll3_clksel, 527 .clksel = div16_dpll3_clksel,
541 .flags = RATE_PROPAGATES,
542 .clkdm_name = "dpll3_clkdm", 528 .clkdm_name = "dpll3_clkdm",
543 .recalc = &omap2_clksel_recalc, 529 .recalc = &omap2_clksel_recalc,
544}; 530};
@@ -550,7 +536,7 @@ static struct clk dpll3_m3x2_ck = {
550 .parent = &dpll3_m3_ck, 536 .parent = &dpll3_m3_ck,
551 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), 537 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
552 .enable_bit = OMAP3430_PWRDN_EMU_CORE_SHIFT, 538 .enable_bit = OMAP3430_PWRDN_EMU_CORE_SHIFT,
553 .flags = RATE_PROPAGATES | INVERT_ENABLE, 539 .flags = INVERT_ENABLE,
554 .clkdm_name = "dpll3_clkdm", 540 .clkdm_name = "dpll3_clkdm",
555 .recalc = &omap3_clkoutx2_recalc, 541 .recalc = &omap3_clkoutx2_recalc,
556}; 542};
@@ -569,7 +555,6 @@ static struct clk emu_core_alwon_ck = {
569 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), 555 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
570 .clksel_mask = OMAP3430_ST_CORE_CLK_MASK, 556 .clksel_mask = OMAP3430_ST_CORE_CLK_MASK,
571 .clksel = emu_core_alwon_ck_clksel, 557 .clksel = emu_core_alwon_ck_clksel,
572 .flags = RATE_PROPAGATES,
573 .clkdm_name = "dpll3_clkdm", 558 .clkdm_name = "dpll3_clkdm",
574 .recalc = &omap2_clksel_recalc, 559 .recalc = &omap2_clksel_recalc,
575}; 560};
@@ -603,7 +588,6 @@ static struct clk dpll4_ck = {
603 .ops = &clkops_noncore_dpll_ops, 588 .ops = &clkops_noncore_dpll_ops,
604 .parent = &sys_ck, 589 .parent = &sys_ck,
605 .dpll_data = &dpll4_dd, 590 .dpll_data = &dpll4_dd,
606 .flags = RATE_PROPAGATES,
607 .round_rate = &omap2_dpll_round_rate, 591 .round_rate = &omap2_dpll_round_rate,
608 .set_rate = &omap3_dpll4_set_rate, 592 .set_rate = &omap3_dpll4_set_rate,
609 .clkdm_name = "dpll4_clkdm", 593 .clkdm_name = "dpll4_clkdm",
@@ -619,7 +603,6 @@ static struct clk dpll4_x2_ck = {
619 .name = "dpll4_x2_ck", 603 .name = "dpll4_x2_ck",
620 .ops = &clkops_null, 604 .ops = &clkops_null,
621 .parent = &dpll4_ck, 605 .parent = &dpll4_ck,
622 .flags = RATE_PROPAGATES,
623 .clkdm_name = "dpll4_clkdm", 606 .clkdm_name = "dpll4_clkdm",
624 .recalc = &omap3_clkoutx2_recalc, 607 .recalc = &omap3_clkoutx2_recalc,
625}; 608};
@@ -638,7 +621,6 @@ static struct clk dpll4_m2_ck = {
638 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430_CM_CLKSEL3), 621 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430_CM_CLKSEL3),
639 .clksel_mask = OMAP3430_DIV_96M_MASK, 622 .clksel_mask = OMAP3430_DIV_96M_MASK,
640 .clksel = div16_dpll4_clksel, 623 .clksel = div16_dpll4_clksel,
641 .flags = RATE_PROPAGATES,
642 .clkdm_name = "dpll4_clkdm", 624 .clkdm_name = "dpll4_clkdm",
643 .recalc = &omap2_clksel_recalc, 625 .recalc = &omap2_clksel_recalc,
644}; 626};
@@ -650,7 +632,7 @@ static struct clk dpll4_m2x2_ck = {
650 .parent = &dpll4_m2_ck, 632 .parent = &dpll4_m2_ck,
651 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), 633 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
652 .enable_bit = OMAP3430_PWRDN_96M_SHIFT, 634 .enable_bit = OMAP3430_PWRDN_96M_SHIFT,
653 .flags = RATE_PROPAGATES | INVERT_ENABLE, 635 .flags = INVERT_ENABLE,
654 .clkdm_name = "dpll4_clkdm", 636 .clkdm_name = "dpll4_clkdm",
655 .recalc = &omap3_clkoutx2_recalc, 637 .recalc = &omap3_clkoutx2_recalc,
656}; 638};
@@ -675,7 +657,6 @@ static struct clk omap_96m_alwon_fck = {
675 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), 657 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
676 .clksel_mask = OMAP3430_ST_PERIPH_CLK_MASK, 658 .clksel_mask = OMAP3430_ST_PERIPH_CLK_MASK,
677 .clksel = omap_96m_alwon_fck_clksel, 659 .clksel = omap_96m_alwon_fck_clksel,
678 .flags = RATE_PROPAGATES,
679 .recalc = &omap2_clksel_recalc, 660 .recalc = &omap2_clksel_recalc,
680}; 661};
681 662
@@ -683,7 +664,6 @@ static struct clk cm_96m_fck = {
683 .name = "cm_96m_fck", 664 .name = "cm_96m_fck",
684 .ops = &clkops_null, 665 .ops = &clkops_null,
685 .parent = &omap_96m_alwon_fck, 666 .parent = &omap_96m_alwon_fck,
686 .flags = RATE_PROPAGATES,
687 .recalc = &followparent_recalc, 667 .recalc = &followparent_recalc,
688}; 668};
689 669
@@ -711,7 +691,6 @@ static struct clk omap_96m_fck = {
711 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), 691 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
712 .clksel_mask = OMAP3430_SOURCE_96M_MASK, 692 .clksel_mask = OMAP3430_SOURCE_96M_MASK,
713 .clksel = omap_96m_fck_clksel, 693 .clksel = omap_96m_fck_clksel,
714 .flags = RATE_PROPAGATES,
715 .recalc = &omap2_clksel_recalc, 694 .recalc = &omap2_clksel_recalc,
716}; 695};
717 696
@@ -724,7 +703,6 @@ static struct clk dpll4_m3_ck = {
724 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL), 703 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL),
725 .clksel_mask = OMAP3430_CLKSEL_TV_MASK, 704 .clksel_mask = OMAP3430_CLKSEL_TV_MASK,
726 .clksel = div16_dpll4_clksel, 705 .clksel = div16_dpll4_clksel,
727 .flags = RATE_PROPAGATES,
728 .clkdm_name = "dpll4_clkdm", 706 .clkdm_name = "dpll4_clkdm",
729 .recalc = &omap2_clksel_recalc, 707 .recalc = &omap2_clksel_recalc,
730}; 708};
@@ -737,7 +715,7 @@ static struct clk dpll4_m3x2_ck = {
737 .init = &omap2_init_clksel_parent, 715 .init = &omap2_init_clksel_parent,
738 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), 716 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
739 .enable_bit = OMAP3430_PWRDN_TV_SHIFT, 717 .enable_bit = OMAP3430_PWRDN_TV_SHIFT,
740 .flags = RATE_PROPAGATES | INVERT_ENABLE, 718 .flags = INVERT_ENABLE,
741 .clkdm_name = "dpll4_clkdm", 719 .clkdm_name = "dpll4_clkdm",
742 .recalc = &omap3_clkoutx2_recalc, 720 .recalc = &omap3_clkoutx2_recalc,
743}; 721};
@@ -756,7 +734,6 @@ static struct clk virt_omap_54m_fck = {
756 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), 734 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
757 .clksel_mask = OMAP3430_ST_PERIPH_CLK_MASK, 735 .clksel_mask = OMAP3430_ST_PERIPH_CLK_MASK,
758 .clksel = virt_omap_54m_fck_clksel, 736 .clksel = virt_omap_54m_fck_clksel,
759 .flags = RATE_PROPAGATES,
760 .recalc = &omap2_clksel_recalc, 737 .recalc = &omap2_clksel_recalc,
761}; 738};
762 739
@@ -783,7 +760,6 @@ static struct clk omap_54m_fck = {
783 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), 760 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
784 .clksel_mask = OMAP3430_SOURCE_54M_MASK, 761 .clksel_mask = OMAP3430_SOURCE_54M_MASK,
785 .clksel = omap_54m_clksel, 762 .clksel = omap_54m_clksel,
786 .flags = RATE_PROPAGATES,
787 .recalc = &omap2_clksel_recalc, 763 .recalc = &omap2_clksel_recalc,
788}; 764};
789 765
@@ -810,7 +786,6 @@ static struct clk omap_48m_fck = {
810 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), 786 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
811 .clksel_mask = OMAP3430_SOURCE_48M_MASK, 787 .clksel_mask = OMAP3430_SOURCE_48M_MASK,
812 .clksel = omap_48m_clksel, 788 .clksel = omap_48m_clksel,
813 .flags = RATE_PROPAGATES,
814 .recalc = &omap2_clksel_recalc, 789 .recalc = &omap2_clksel_recalc,
815}; 790};
816 791
@@ -819,7 +794,6 @@ static struct clk omap_12m_fck = {
819 .ops = &clkops_null, 794 .ops = &clkops_null,
820 .parent = &omap_48m_fck, 795 .parent = &omap_48m_fck,
821 .fixed_div = 4, 796 .fixed_div = 4,
822 .flags = RATE_PROPAGATES,
823 .recalc = &omap2_fixed_divisor_recalc, 797 .recalc = &omap2_fixed_divisor_recalc,
824}; 798};
825 799
@@ -832,7 +806,6 @@ static struct clk dpll4_m4_ck = {
832 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL), 806 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL),
833 .clksel_mask = OMAP3430_CLKSEL_DSS1_MASK, 807 .clksel_mask = OMAP3430_CLKSEL_DSS1_MASK,
834 .clksel = div16_dpll4_clksel, 808 .clksel = div16_dpll4_clksel,
835 .flags = RATE_PROPAGATES,
836 .clkdm_name = "dpll4_clkdm", 809 .clkdm_name = "dpll4_clkdm",
837 .recalc = &omap2_clksel_recalc, 810 .recalc = &omap2_clksel_recalc,
838 .set_rate = &omap2_clksel_set_rate, 811 .set_rate = &omap2_clksel_set_rate,
@@ -846,7 +819,7 @@ static struct clk dpll4_m4x2_ck = {
846 .parent = &dpll4_m4_ck, 819 .parent = &dpll4_m4_ck,
847 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), 820 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
848 .enable_bit = OMAP3430_PWRDN_CAM_SHIFT, 821 .enable_bit = OMAP3430_PWRDN_CAM_SHIFT,
849 .flags = RATE_PROPAGATES | INVERT_ENABLE, 822 .flags = INVERT_ENABLE,
850 .clkdm_name = "dpll4_clkdm", 823 .clkdm_name = "dpll4_clkdm",
851 .recalc = &omap3_clkoutx2_recalc, 824 .recalc = &omap3_clkoutx2_recalc,
852}; 825};
@@ -860,7 +833,6 @@ static struct clk dpll4_m5_ck = {
860 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_CLKSEL), 833 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_CLKSEL),
861 .clksel_mask = OMAP3430_CLKSEL_CAM_MASK, 834 .clksel_mask = OMAP3430_CLKSEL_CAM_MASK,
862 .clksel = div16_dpll4_clksel, 835 .clksel = div16_dpll4_clksel,
863 .flags = RATE_PROPAGATES,
864 .clkdm_name = "dpll4_clkdm", 836 .clkdm_name = "dpll4_clkdm",
865 .recalc = &omap2_clksel_recalc, 837 .recalc = &omap2_clksel_recalc,
866}; 838};
@@ -872,7 +844,7 @@ static struct clk dpll4_m5x2_ck = {
872 .parent = &dpll4_m5_ck, 844 .parent = &dpll4_m5_ck,
873 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), 845 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
874 .enable_bit = OMAP3430_PWRDN_CAM_SHIFT, 846 .enable_bit = OMAP3430_PWRDN_CAM_SHIFT,
875 .flags = RATE_PROPAGATES | INVERT_ENABLE, 847 .flags = INVERT_ENABLE,
876 .clkdm_name = "dpll4_clkdm", 848 .clkdm_name = "dpll4_clkdm",
877 .recalc = &omap3_clkoutx2_recalc, 849 .recalc = &omap3_clkoutx2_recalc,
878}; 850};
@@ -886,7 +858,6 @@ static struct clk dpll4_m6_ck = {
886 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1), 858 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
887 .clksel_mask = OMAP3430_DIV_DPLL4_MASK, 859 .clksel_mask = OMAP3430_DIV_DPLL4_MASK,
888 .clksel = div16_dpll4_clksel, 860 .clksel = div16_dpll4_clksel,
889 .flags = RATE_PROPAGATES,
890 .clkdm_name = "dpll4_clkdm", 861 .clkdm_name = "dpll4_clkdm",
891 .recalc = &omap2_clksel_recalc, 862 .recalc = &omap2_clksel_recalc,
892}; 863};
@@ -899,7 +870,7 @@ static struct clk dpll4_m6x2_ck = {
899 .init = &omap2_init_clksel_parent, 870 .init = &omap2_init_clksel_parent,
900 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), 871 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
901 .enable_bit = OMAP3430_PWRDN_EMU_PERIPH_SHIFT, 872 .enable_bit = OMAP3430_PWRDN_EMU_PERIPH_SHIFT,
902 .flags = RATE_PROPAGATES | INVERT_ENABLE, 873 .flags = INVERT_ENABLE,
903 .clkdm_name = "dpll4_clkdm", 874 .clkdm_name = "dpll4_clkdm",
904 .recalc = &omap3_clkoutx2_recalc, 875 .recalc = &omap3_clkoutx2_recalc,
905}; 876};
@@ -908,7 +879,6 @@ static struct clk emu_per_alwon_ck = {
908 .name = "emu_per_alwon_ck", 879 .name = "emu_per_alwon_ck",
909 .ops = &clkops_null, 880 .ops = &clkops_null,
910 .parent = &dpll4_m6x2_ck, 881 .parent = &dpll4_m6x2_ck,
911 .flags = RATE_PROPAGATES,
912 .clkdm_name = "dpll4_clkdm", 882 .clkdm_name = "dpll4_clkdm",
913 .recalc = &followparent_recalc, 883 .recalc = &followparent_recalc,
914}; 884};
@@ -943,7 +913,6 @@ static struct clk dpll5_ck = {
943 .ops = &clkops_noncore_dpll_ops, 913 .ops = &clkops_noncore_dpll_ops,
944 .parent = &sys_ck, 914 .parent = &sys_ck,
945 .dpll_data = &dpll5_dd, 915 .dpll_data = &dpll5_dd,
946 .flags = RATE_PROPAGATES,
947 .round_rate = &omap2_dpll_round_rate, 916 .round_rate = &omap2_dpll_round_rate,
948 .set_rate = &omap3_noncore_dpll_set_rate, 917 .set_rate = &omap3_noncore_dpll_set_rate,
949 .clkdm_name = "dpll5_clkdm", 918 .clkdm_name = "dpll5_clkdm",
@@ -963,7 +932,6 @@ static struct clk dpll5_m2_ck = {
963 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKSEL5), 932 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKSEL5),
964 .clksel_mask = OMAP3430ES2_DIV_120M_MASK, 933 .clksel_mask = OMAP3430ES2_DIV_120M_MASK,
965 .clksel = div16_dpll5_clksel, 934 .clksel = div16_dpll5_clksel,
966 .flags = RATE_PROPAGATES,
967 .clkdm_name = "dpll5_clkdm", 935 .clkdm_name = "dpll5_clkdm",
968 .recalc = &omap2_clksel_recalc, 936 .recalc = &omap2_clksel_recalc,
969}; 937};
@@ -982,7 +950,6 @@ static struct clk omap_120m_fck = {
982 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST2), 950 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST2),
983 .clksel_mask = OMAP3430ES2_ST_PERIPH2_CLK_MASK, 951 .clksel_mask = OMAP3430ES2_ST_PERIPH2_CLK_MASK,
984 .clksel = omap_120m_fck_clksel, 952 .clksel = omap_120m_fck_clksel,
985 .flags = RATE_PROPAGATES,
986 .recalc = &omap2_clksel_recalc, 953 .recalc = &omap2_clksel_recalc,
987}; 954};
988 955
@@ -1025,7 +992,6 @@ static struct clk clkout2_src_ck = {
1025 .clksel_reg = OMAP3430_CM_CLKOUT_CTRL, 992 .clksel_reg = OMAP3430_CM_CLKOUT_CTRL,
1026 .clksel_mask = OMAP3430_CLKOUT2SOURCE_MASK, 993 .clksel_mask = OMAP3430_CLKOUT2SOURCE_MASK,
1027 .clksel = clkout2_src_clksel, 994 .clksel = clkout2_src_clksel,
1028 .flags = RATE_PROPAGATES,
1029 .clkdm_name = "core_clkdm", 995 .clkdm_name = "core_clkdm",
1030 .recalc = &omap2_clksel_recalc, 996 .recalc = &omap2_clksel_recalc,
1031}; 997};
@@ -1060,7 +1026,6 @@ static struct clk corex2_fck = {
1060 .name = "corex2_fck", 1026 .name = "corex2_fck",
1061 .ops = &clkops_null, 1027 .ops = &clkops_null,
1062 .parent = &dpll3_m2x2_ck, 1028 .parent = &dpll3_m2x2_ck,
1063 .flags = RATE_PROPAGATES,
1064 .recalc = &followparent_recalc, 1029 .recalc = &followparent_recalc,
1065}; 1030};
1066 1031
@@ -1090,7 +1055,6 @@ static struct clk dpll1_fck = {
1090 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL1_PLL), 1055 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL1_PLL),
1091 .clksel_mask = OMAP3430_MPU_CLK_SRC_MASK, 1056 .clksel_mask = OMAP3430_MPU_CLK_SRC_MASK,
1092 .clksel = div4_core_clksel, 1057 .clksel = div4_core_clksel,
1093 .flags = RATE_PROPAGATES,
1094 .recalc = &omap2_clksel_recalc, 1058 .recalc = &omap2_clksel_recalc,
1095}; 1059};
1096 1060
@@ -1114,7 +1078,6 @@ static struct clk mpu_ck = {
1114 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL), 1078 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL),
1115 .clksel_mask = OMAP3430_ST_MPU_CLK_MASK, 1079 .clksel_mask = OMAP3430_ST_MPU_CLK_MASK,
1116 .clksel = mpu_clksel, 1080 .clksel = mpu_clksel,
1117 .flags = RATE_PROPAGATES,
1118 .clkdm_name = "mpu_clkdm", 1081 .clkdm_name = "mpu_clkdm",
1119 .recalc = &omap2_clksel_recalc, 1082 .recalc = &omap2_clksel_recalc,
1120}; 1083};
@@ -1139,7 +1102,6 @@ static struct clk arm_fck = {
1139 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL), 1102 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL),
1140 .clksel_mask = OMAP3430_ST_MPU_CLK_MASK, 1103 .clksel_mask = OMAP3430_ST_MPU_CLK_MASK,
1141 .clksel = arm_fck_clksel, 1104 .clksel = arm_fck_clksel,
1142 .flags = RATE_PROPAGATES,
1143 .recalc = &omap2_clksel_recalc, 1105 .recalc = &omap2_clksel_recalc,
1144}; 1106};
1145 1107
@@ -1153,7 +1115,6 @@ static struct clk emu_mpu_alwon_ck = {
1153 .name = "emu_mpu_alwon_ck", 1115 .name = "emu_mpu_alwon_ck",
1154 .ops = &clkops_null, 1116 .ops = &clkops_null,
1155 .parent = &mpu_ck, 1117 .parent = &mpu_ck,
1156 .flags = RATE_PROPAGATES,
1157 .recalc = &followparent_recalc, 1118 .recalc = &followparent_recalc,
1158}; 1119};
1159 1120
@@ -1165,7 +1126,6 @@ static struct clk dpll2_fck = {
1165 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL1_PLL), 1126 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL1_PLL),
1166 .clksel_mask = OMAP3430_IVA2_CLK_SRC_MASK, 1127 .clksel_mask = OMAP3430_IVA2_CLK_SRC_MASK,
1167 .clksel = div4_core_clksel, 1128 .clksel = div4_core_clksel,
1168 .flags = RATE_PROPAGATES,
1169 .recalc = &omap2_clksel_recalc, 1129 .recalc = &omap2_clksel_recalc,
1170}; 1130};
1171 1131
@@ -1193,7 +1153,6 @@ static struct clk iva2_ck = {
1193 OMAP3430_CM_IDLEST_PLL), 1153 OMAP3430_CM_IDLEST_PLL),
1194 .clksel_mask = OMAP3430_ST_IVA2_CLK_MASK, 1154 .clksel_mask = OMAP3430_ST_IVA2_CLK_MASK,
1195 .clksel = iva2_clksel, 1155 .clksel = iva2_clksel,
1196 .flags = RATE_PROPAGATES,
1197 .clkdm_name = "iva2_clkdm", 1156 .clkdm_name = "iva2_clkdm",
1198 .recalc = &omap2_clksel_recalc, 1157 .recalc = &omap2_clksel_recalc,
1199}; 1158};
@@ -1213,7 +1172,6 @@ static struct clk l3_ick = {
1213 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL), 1172 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1214 .clksel_mask = OMAP3430_CLKSEL_L3_MASK, 1173 .clksel_mask = OMAP3430_CLKSEL_L3_MASK,
1215 .clksel = div2_core_clksel, 1174 .clksel = div2_core_clksel,
1216 .flags = RATE_PROPAGATES,
1217 .clkdm_name = "core_l3_clkdm", 1175 .clkdm_name = "core_l3_clkdm",
1218 .recalc = &omap2_clksel_recalc, 1176 .recalc = &omap2_clksel_recalc,
1219}; 1177};
@@ -1231,7 +1189,6 @@ static struct clk l4_ick = {
1231 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL), 1189 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1232 .clksel_mask = OMAP3430_CLKSEL_L4_MASK, 1190 .clksel_mask = OMAP3430_CLKSEL_L4_MASK,
1233 .clksel = div2_l3_clksel, 1191 .clksel = div2_l3_clksel,
1234 .flags = RATE_PROPAGATES,
1235 .clkdm_name = "core_l4_clkdm", 1192 .clkdm_name = "core_l4_clkdm",
1236 .recalc = &omap2_clksel_recalc, 1193 .recalc = &omap2_clksel_recalc,
1237 1194
@@ -1281,7 +1238,6 @@ static struct clk gfx_l3_fck = {
1281 .clksel_reg = OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL), 1238 .clksel_reg = OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL),
1282 .clksel_mask = OMAP_CLKSEL_GFX_MASK, 1239 .clksel_mask = OMAP_CLKSEL_GFX_MASK,
1283 .clksel = gfx_l3_clksel, 1240 .clksel = gfx_l3_clksel,
1284 .flags = RATE_PROPAGATES,
1285 .clkdm_name = "gfx_3430es1_clkdm", 1241 .clkdm_name = "gfx_3430es1_clkdm",
1286 .recalc = &omap2_clksel_recalc, 1242 .recalc = &omap2_clksel_recalc,
1287}; 1243};
@@ -1440,7 +1396,6 @@ static struct clk core_96m_fck = {
1440 .name = "core_96m_fck", 1396 .name = "core_96m_fck",
1441 .ops = &clkops_null, 1397 .ops = &clkops_null,
1442 .parent = &omap_96m_fck, 1398 .parent = &omap_96m_fck,
1443 .flags = RATE_PROPAGATES,
1444 .clkdm_name = "core_l4_clkdm", 1399 .clkdm_name = "core_l4_clkdm",
1445 .recalc = &followparent_recalc, 1400 .recalc = &followparent_recalc,
1446}; 1401};
@@ -1574,7 +1529,6 @@ static struct clk core_48m_fck = {
1574 .name = "core_48m_fck", 1529 .name = "core_48m_fck",
1575 .ops = &clkops_null, 1530 .ops = &clkops_null,
1576 .parent = &omap_48m_fck, 1531 .parent = &omap_48m_fck,
1577 .flags = RATE_PROPAGATES,
1578 .clkdm_name = "core_l4_clkdm", 1532 .clkdm_name = "core_l4_clkdm",
1579 .recalc = &followparent_recalc, 1533 .recalc = &followparent_recalc,
1580}; 1534};
@@ -1652,7 +1606,6 @@ static struct clk core_12m_fck = {
1652 .name = "core_12m_fck", 1606 .name = "core_12m_fck",
1653 .ops = &clkops_null, 1607 .ops = &clkops_null,
1654 .parent = &omap_12m_fck, 1608 .parent = &omap_12m_fck,
1655 .flags = RATE_PROPAGATES,
1656 .clkdm_name = "core_l4_clkdm", 1609 .clkdm_name = "core_l4_clkdm",
1657 .recalc = &followparent_recalc, 1610 .recalc = &followparent_recalc,
1658}; 1611};
@@ -1692,7 +1645,6 @@ static struct clk ssi_ssr_fck = {
1692 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL), 1645 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1693 .clksel_mask = OMAP3430_CLKSEL_SSI_MASK, 1646 .clksel_mask = OMAP3430_CLKSEL_SSI_MASK,
1694 .clksel = ssi_ssr_clksel, 1647 .clksel = ssi_ssr_clksel,
1695 .flags = RATE_PROPAGATES,
1696 .clkdm_name = "core_l4_clkdm", 1648 .clkdm_name = "core_l4_clkdm",
1697 .recalc = &omap2_clksel_recalc, 1649 .recalc = &omap2_clksel_recalc,
1698}; 1650};
@@ -1718,7 +1670,6 @@ static struct clk core_l3_ick = {
1718 .ops = &clkops_null, 1670 .ops = &clkops_null,
1719 .parent = &l3_ick, 1671 .parent = &l3_ick,
1720 .init = &omap2_init_clk_clkdm, 1672 .init = &omap2_init_clk_clkdm,
1721 .flags = RATE_PROPAGATES,
1722 .clkdm_name = "core_l3_clkdm", 1673 .clkdm_name = "core_l3_clkdm",
1723 .recalc = &followparent_recalc, 1674 .recalc = &followparent_recalc,
1724}; 1675};
@@ -1759,7 +1710,6 @@ static struct clk security_l3_ick = {
1759 .name = "security_l3_ick", 1710 .name = "security_l3_ick",
1760 .ops = &clkops_null, 1711 .ops = &clkops_null,
1761 .parent = &l3_ick, 1712 .parent = &l3_ick,
1762 .flags = RATE_PROPAGATES,
1763 .recalc = &followparent_recalc, 1713 .recalc = &followparent_recalc,
1764}; 1714};
1765 1715
@@ -1779,7 +1729,6 @@ static struct clk core_l4_ick = {
1779 .ops = &clkops_null, 1729 .ops = &clkops_null,
1780 .parent = &l4_ick, 1730 .parent = &l4_ick,
1781 .init = &omap2_init_clk_clkdm, 1731 .init = &omap2_init_clk_clkdm,
1782 .flags = RATE_PROPAGATES,
1783 .clkdm_name = "core_l4_clkdm", 1732 .clkdm_name = "core_l4_clkdm",
1784 .recalc = &followparent_recalc, 1733 .recalc = &followparent_recalc,
1785}; 1734};
@@ -2062,7 +2011,6 @@ static struct clk ssi_l4_ick = {
2062 .name = "ssi_l4_ick", 2011 .name = "ssi_l4_ick",
2063 .ops = &clkops_null, 2012 .ops = &clkops_null,
2064 .parent = &l4_ick, 2013 .parent = &l4_ick,
2065 .flags = RATE_PROPAGATES,
2066 .clkdm_name = "core_l4_clkdm", 2014 .clkdm_name = "core_l4_clkdm",
2067 .recalc = &followparent_recalc, 2015 .recalc = &followparent_recalc,
2068}; 2016};
@@ -2106,7 +2054,6 @@ static struct clk security_l4_ick2 = {
2106 .name = "security_l4_ick2", 2054 .name = "security_l4_ick2",
2107 .ops = &clkops_null, 2055 .ops = &clkops_null,
2108 .parent = &l4_ick, 2056 .parent = &l4_ick,
2109 .flags = RATE_PROPAGATES,
2110 .recalc = &followparent_recalc, 2057 .recalc = &followparent_recalc,
2111}; 2058};
2112 2059
@@ -2350,7 +2297,6 @@ static struct clk wkup_32k_fck = {
2350 .ops = &clkops_null, 2297 .ops = &clkops_null,
2351 .init = &omap2_init_clk_clkdm, 2298 .init = &omap2_init_clk_clkdm,
2352 .parent = &omap_32k_fck, 2299 .parent = &omap_32k_fck,
2353 .flags = RATE_PROPAGATES,
2354 .clkdm_name = "wkup_clkdm", 2300 .clkdm_name = "wkup_clkdm",
2355 .recalc = &followparent_recalc, 2301 .recalc = &followparent_recalc,
2356}; 2302};
@@ -2379,7 +2325,6 @@ static struct clk wkup_l4_ick = {
2379 .name = "wkup_l4_ick", 2325 .name = "wkup_l4_ick",
2380 .ops = &clkops_null, 2326 .ops = &clkops_null,
2381 .parent = &sys_ck, 2327 .parent = &sys_ck,
2382 .flags = RATE_PROPAGATES,
2383 .clkdm_name = "wkup_clkdm", 2328 .clkdm_name = "wkup_clkdm",
2384 .recalc = &followparent_recalc, 2329 .recalc = &followparent_recalc,
2385}; 2330};
@@ -2466,7 +2411,6 @@ static struct clk per_96m_fck = {
2466 .ops = &clkops_null, 2411 .ops = &clkops_null,
2467 .parent = &omap_96m_alwon_fck, 2412 .parent = &omap_96m_alwon_fck,
2468 .init = &omap2_init_clk_clkdm, 2413 .init = &omap2_init_clk_clkdm,
2469 .flags = RATE_PROPAGATES,
2470 .clkdm_name = "per_clkdm", 2414 .clkdm_name = "per_clkdm",
2471 .recalc = &followparent_recalc, 2415 .recalc = &followparent_recalc,
2472}; 2416};
@@ -2476,7 +2420,6 @@ static struct clk per_48m_fck = {
2476 .ops = &clkops_null, 2420 .ops = &clkops_null,
2477 .parent = &omap_48m_fck, 2421 .parent = &omap_48m_fck,
2478 .init = &omap2_init_clk_clkdm, 2422 .init = &omap2_init_clk_clkdm,
2479 .flags = RATE_PROPAGATES,
2480 .clkdm_name = "per_clkdm", 2423 .clkdm_name = "per_clkdm",
2481 .recalc = &followparent_recalc, 2424 .recalc = &followparent_recalc,
2482}; 2425};
@@ -2600,7 +2543,6 @@ static struct clk per_32k_alwon_fck = {
2600 .ops = &clkops_null, 2543 .ops = &clkops_null,
2601 .parent = &omap_32k_fck, 2544 .parent = &omap_32k_fck,
2602 .clkdm_name = "per_clkdm", 2545 .clkdm_name = "per_clkdm",
2603 .flags = RATE_PROPAGATES,
2604 .recalc = &followparent_recalc, 2546 .recalc = &followparent_recalc,
2605}; 2547};
2606 2548
@@ -2668,7 +2610,6 @@ static struct clk per_l4_ick = {
2668 .name = "per_l4_ick", 2610 .name = "per_l4_ick",
2669 .ops = &clkops_null, 2611 .ops = &clkops_null,
2670 .parent = &l4_ick, 2612 .parent = &l4_ick,
2671 .flags = RATE_PROPAGATES,
2672 .clkdm_name = "per_clkdm", 2613 .clkdm_name = "per_clkdm",
2673 .recalc = &followparent_recalc, 2614 .recalc = &followparent_recalc,
2674}; 2615};
@@ -2948,7 +2889,6 @@ static struct clk emu_src_ck = {
2948 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1), 2889 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2949 .clksel_mask = OMAP3430_MUX_CTRL_MASK, 2890 .clksel_mask = OMAP3430_MUX_CTRL_MASK,
2950 .clksel = emu_src_clksel, 2891 .clksel = emu_src_clksel,
2951 .flags = RATE_PROPAGATES,
2952 .clkdm_name = "emu_clkdm", 2892 .clkdm_name = "emu_clkdm",
2953 .recalc = &omap2_clksel_recalc, 2893 .recalc = &omap2_clksel_recalc,
2954}; 2894};
@@ -2973,7 +2913,6 @@ static struct clk pclk_fck = {
2973 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1), 2913 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2974 .clksel_mask = OMAP3430_CLKSEL_PCLK_MASK, 2914 .clksel_mask = OMAP3430_CLKSEL_PCLK_MASK,
2975 .clksel = pclk_emu_clksel, 2915 .clksel = pclk_emu_clksel,
2976 .flags = RATE_PROPAGATES,
2977 .clkdm_name = "emu_clkdm", 2916 .clkdm_name = "emu_clkdm",
2978 .recalc = &omap2_clksel_recalc, 2917 .recalc = &omap2_clksel_recalc,
2979}; 2918};
@@ -2997,7 +2936,6 @@ static struct clk pclkx2_fck = {
2997 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1), 2936 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2998 .clksel_mask = OMAP3430_CLKSEL_PCLKX2_MASK, 2937 .clksel_mask = OMAP3430_CLKSEL_PCLKX2_MASK,
2999 .clksel = pclkx2_emu_clksel, 2938 .clksel = pclkx2_emu_clksel,
3000 .flags = RATE_PROPAGATES,
3001 .clkdm_name = "emu_clkdm", 2939 .clkdm_name = "emu_clkdm",
3002 .recalc = &omap2_clksel_recalc, 2940 .recalc = &omap2_clksel_recalc,
3003}; 2941};
@@ -3014,7 +2952,6 @@ static struct clk atclk_fck = {
3014 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1), 2952 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
3015 .clksel_mask = OMAP3430_CLKSEL_ATCLK_MASK, 2953 .clksel_mask = OMAP3430_CLKSEL_ATCLK_MASK,
3016 .clksel = atclk_emu_clksel, 2954 .clksel = atclk_emu_clksel,
3017 .flags = RATE_PROPAGATES,
3018 .clkdm_name = "emu_clkdm", 2955 .clkdm_name = "emu_clkdm",
3019 .recalc = &omap2_clksel_recalc, 2956 .recalc = &omap2_clksel_recalc,
3020}; 2957};
@@ -3026,7 +2963,6 @@ static struct clk traceclk_src_fck = {
3026 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1), 2963 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
3027 .clksel_mask = OMAP3430_TRACE_MUX_CTRL_MASK, 2964 .clksel_mask = OMAP3430_TRACE_MUX_CTRL_MASK,
3028 .clksel = emu_src_clksel, 2965 .clksel = emu_src_clksel,
3029 .flags = RATE_PROPAGATES,
3030 .clkdm_name = "emu_clkdm", 2966 .clkdm_name = "emu_clkdm",
3031 .recalc = &omap2_clksel_recalc, 2967 .recalc = &omap2_clksel_recalc,
3032}; 2968};
@@ -3063,7 +2999,6 @@ static struct clk sr1_fck = {
3063 .parent = &sys_ck, 2999 .parent = &sys_ck,
3064 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN), 3000 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
3065 .enable_bit = OMAP3430_EN_SR1_SHIFT, 3001 .enable_bit = OMAP3430_EN_SR1_SHIFT,
3066 .flags = RATE_PROPAGATES,
3067 .recalc = &followparent_recalc, 3002 .recalc = &followparent_recalc,
3068}; 3003};
3069 3004
@@ -3074,7 +3009,6 @@ static struct clk sr2_fck = {
3074 .parent = &sys_ck, 3009 .parent = &sys_ck,
3075 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN), 3010 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
3076 .enable_bit = OMAP3430_EN_SR2_SHIFT, 3011 .enable_bit = OMAP3430_EN_SR2_SHIFT,
3077 .flags = RATE_PROPAGATES,
3078 .recalc = &followparent_recalc, 3012 .recalc = &followparent_recalc,
3079}; 3013};
3080 3014
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 54da27af0bd5..6a1737a74477 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -143,8 +143,7 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
143 if (ret == 0) { 143 if (ret == 0) {
144 if (clk->recalc) 144 if (clk->recalc)
145 clk->recalc(clk); 145 clk->recalc(clk);
146 if (clk->flags & RATE_PROPAGATES) 146 propagate_rate(clk);
147 propagate_rate(clk);
148 } 147 }
149 spin_unlock_irqrestore(&clockfw_lock, flags); 148 spin_unlock_irqrestore(&clockfw_lock, flags);
150 149
@@ -166,8 +165,7 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
166 if (ret == 0) { 165 if (ret == 0) {
167 if (clk->recalc) 166 if (clk->recalc)
168 clk->recalc(clk); 167 clk->recalc(clk);
169 if (clk->flags & RATE_PROPAGATES) 168 propagate_rate(clk);
170 propagate_rate(clk);
171 } 169 }
172 spin_unlock_irqrestore(&clockfw_lock, flags); 170 spin_unlock_irqrestore(&clockfw_lock, flags);
173 171
@@ -214,24 +212,31 @@ void followparent_recalc(struct clk *clk)
214 clk->rate = clk->parent->rate; 212 clk->rate = clk->parent->rate;
215} 213}
216 214
215void clk_reparent(struct clk *child, struct clk *parent)
216{
217 list_del_init(&child->sibling);
218 if (parent)
219 list_add(&child->sibling, &parent->children);
220 child->parent = parent;
221
222 /* now do the debugfs renaming to reattach the child
223 to the proper parent */
224}
225
217/* Propagate rate to children */ 226/* Propagate rate to children */
218void propagate_rate(struct clk * tclk) 227void propagate_rate(struct clk * tclk)
219{ 228{
220 struct clk *clkp; 229 struct clk *clkp;
221 230
222 if (tclk == NULL || IS_ERR(tclk)) 231 list_for_each_entry(clkp, &tclk->children, sibling) {
223 return;
224
225 list_for_each_entry(clkp, &clocks, node) {
226 if (likely(clkp->parent != tclk))
227 continue;
228 if (clkp->recalc) 232 if (clkp->recalc)
229 clkp->recalc(clkp); 233 clkp->recalc(clkp);
230 if (clkp->flags & RATE_PROPAGATES) 234 propagate_rate(clkp);
231 propagate_rate(clkp);
232 } 235 }
233} 236}
234 237
238static LIST_HEAD(root_clks);
239
235/** 240/**
236 * recalculate_root_clocks - recalculate and propagate all root clocks 241 * recalculate_root_clocks - recalculate and propagate all root clocks
237 * 242 *
@@ -243,16 +248,18 @@ void recalculate_root_clocks(void)
243{ 248{
244 struct clk *clkp; 249 struct clk *clkp;
245 250
246 list_for_each_entry(clkp, &clocks, node) { 251 list_for_each_entry(clkp, &root_clks, sibling) {
247 if (!clkp->parent) { 252 if (clkp->recalc)
248 if (clkp->recalc) 253 clkp->recalc(clkp);
249 clkp->recalc(clkp); 254 propagate_rate(clkp);
250 if (clkp->flags & RATE_PROPAGATES)
251 propagate_rate(clkp);
252 }
253 } 255 }
254} 256}
255 257
258void clk_init_one(struct clk *clk)
259{
260 INIT_LIST_HEAD(&clk->children);
261}
262
256int clk_register(struct clk *clk) 263int clk_register(struct clk *clk)
257{ 264{
258 if (clk == NULL || IS_ERR(clk)) 265 if (clk == NULL || IS_ERR(clk))
@@ -265,6 +272,11 @@ int clk_register(struct clk *clk)
265 return 0; 272 return 0;
266 273
267 mutex_lock(&clocks_mutex); 274 mutex_lock(&clocks_mutex);
275 if (clk->parent)
276 list_add(&clk->sibling, &clk->parent->children);
277 else
278 list_add(&clk->sibling, &root_clks);
279
268 list_add(&clk->node, &clocks); 280 list_add(&clk->node, &clocks);
269 if (clk->init) 281 if (clk->init)
270 clk->init(clk); 282 clk->init(clk);
@@ -280,6 +292,7 @@ void clk_unregister(struct clk *clk)
280 return; 292 return;
281 293
282 mutex_lock(&clocks_mutex); 294 mutex_lock(&clocks_mutex);
295 list_del(&clk->sibling);
283 list_del(&clk->node); 296 list_del(&clk->node);
284 mutex_unlock(&clocks_mutex); 297 mutex_unlock(&clocks_mutex);
285} 298}
diff --git a/arch/arm/plat-omap/include/mach/clock.h b/arch/arm/plat-omap/include/mach/clock.h
index 8705902de1d6..af6ae4fa46d6 100644
--- a/arch/arm/plat-omap/include/mach/clock.h
+++ b/arch/arm/plat-omap/include/mach/clock.h
@@ -70,6 +70,8 @@ struct clk {
70 const char *name; 70 const char *name;
71 int id; 71 int id;
72 struct clk *parent; 72 struct clk *parent;
73 struct list_head children;
74 struct list_head sibling; /* node for children */
73 unsigned long rate; 75 unsigned long rate;
74 __u32 flags; 76 __u32 flags;
75 void __iomem *enable_reg; 77 void __iomem *enable_reg;
@@ -115,7 +117,9 @@ struct clk_functions {
115extern unsigned int mpurate; 117extern unsigned int mpurate;
116 118
117extern int clk_init(struct clk_functions *custom_clocks); 119extern int clk_init(struct clk_functions *custom_clocks);
120extern void clk_init_one(struct clk *clk);
118extern int clk_register(struct clk *clk); 121extern int clk_register(struct clk *clk);
122extern void clk_reparent(struct clk *child, struct clk *parent);
119extern void clk_unregister(struct clk *clk); 123extern void clk_unregister(struct clk *clk);
120extern void propagate_rate(struct clk *clk); 124extern void propagate_rate(struct clk *clk);
121extern void recalculate_root_clocks(void); 125extern void recalculate_root_clocks(void);
@@ -131,8 +135,7 @@ extern const struct clkops clkops_null;
131/* Clock flags */ 135/* Clock flags */
132/* bit 0 is free */ 136/* bit 0 is free */
133#define RATE_FIXED (1 << 1) /* Fixed clock rate */ 137#define RATE_FIXED (1 << 1) /* Fixed clock rate */
134#define RATE_PROPAGATES (1 << 2) /* Program children too */ 138/* bits 2-4 are free */
135/* bits 3-4 are free */
136#define ENABLE_REG_32BIT (1 << 5) /* Use 32-bit access */ 139#define ENABLE_REG_32BIT (1 << 5) /* Use 32-bit access */
137#define CLOCK_IDLE_CONTROL (1 << 7) 140#define CLOCK_IDLE_CONTROL (1 << 7)
138#define CLOCK_NO_IDLE_PARENT (1 << 8) 141#define CLOCK_NO_IDLE_PARENT (1 << 8)