aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2011-02-25 17:39:29 -0500
committerPaul Walmsley <paul@pwsan.com>2011-03-07 22:02:57 -0500
commit6ae690da1b6315f34ab7312bd2a02d49a606ccf7 (patch)
treec3229b16cdc7e7b8cc9438faf71e80e1c66d6070
parenta56d9ea865e42a6bf6393fc3d3a143553dbf68c5 (diff)
OMAP2420: clock: use autoidle clkops for all autoidle-controllable interface clocks
Mark each interface clock with a corresponding CM_AUTOIDLE bit with a clkops that has the allow_idle/deny_idle function pointers populated. This allows the OMAP clock framework to enable and disable autoidle for these clocks. Signed-off-by: Paul Walmsley <paul@pwsan.com> Tested-by: Rajendra Nayak <rnayak@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com>
-rw-r--r--arch/arm/mach-omap2/clock2420_data.c109
-rw-r--r--arch/arm/mach-omap2/cm-regbits-24xx.h2
2 files changed, 63 insertions, 48 deletions
diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c
index 63ed4816b920..68c03691e56a 100644
--- a/arch/arm/mach-omap2/clock2420_data.c
+++ b/arch/arm/mach-omap2/clock2420_data.c
@@ -2,7 +2,7 @@
2 * linux/arch/arm/mach-omap2/clock2420_data.c 2 * linux/arch/arm/mach-omap2/clock2420_data.c
3 * 3 *
4 * Copyright (C) 2005-2009 Texas Instruments, Inc. 4 * Copyright (C) 2005-2009 Texas Instruments, Inc.
5 * Copyright (C) 2004-2010 Nokia Corporation 5 * Copyright (C) 2004-2011 Nokia Corporation
6 * 6 *
7 * Contacts: 7 * Contacts:
8 * Richard Woodruff <r-woodruff2@ti.com> 8 * Richard Woodruff <r-woodruff2@ti.com>
@@ -481,7 +481,7 @@ static struct clk dsp_irate_ick = {
481/* 2420 only */ 481/* 2420 only */
482static struct clk dsp_ick = { 482static struct clk dsp_ick = {
483 .name = "dsp_ick", /* apparently ipi and isp */ 483 .name = "dsp_ick", /* apparently ipi and isp */
484 .ops = &clkops_omap2_dflt_wait, 484 .ops = &clkops_omap2_iclk_dflt_wait,
485 .parent = &dsp_irate_ick, 485 .parent = &dsp_irate_ick,
486 .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_ICLKEN), 486 .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_ICLKEN),
487 .enable_bit = OMAP2420_EN_DSP_IPI_SHIFT, /* for ipi */ 487 .enable_bit = OMAP2420_EN_DSP_IPI_SHIFT, /* for ipi */
@@ -579,7 +579,7 @@ static const struct clksel usb_l4_ick_clksel[] = {
579/* It is unclear from TRM whether usb_l4_ick is really in L3 or L4 clkdm */ 579/* It is unclear from TRM whether usb_l4_ick is really in L3 or L4 clkdm */
580static struct clk usb_l4_ick = { /* FS-USB interface clock */ 580static struct clk usb_l4_ick = { /* FS-USB interface clock */
581 .name = "usb_l4_ick", 581 .name = "usb_l4_ick",
582 .ops = &clkops_omap2_dflt_wait, 582 .ops = &clkops_omap2_iclk_dflt_wait,
583 .parent = &core_l3_ck, 583 .parent = &core_l3_ck,
584 .clkdm_name = "core_l4_clkdm", 584 .clkdm_name = "core_l4_clkdm",
585 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), 585 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
@@ -661,7 +661,7 @@ static struct clk ssi_ssr_sst_fck = {
661 */ 661 */
662static struct clk ssi_l4_ick = { 662static struct clk ssi_l4_ick = {
663 .name = "ssi_l4_ick", 663 .name = "ssi_l4_ick",
664 .ops = &clkops_omap2_dflt_wait, 664 .ops = &clkops_omap2_iclk_dflt_wait,
665 .parent = &l4_ck, 665 .parent = &l4_ck,
666 .clkdm_name = "core_l4_clkdm", 666 .clkdm_name = "core_l4_clkdm",
667 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), 667 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
@@ -716,6 +716,7 @@ static struct clk gfx_2d_fck = {
716 .recalc = &omap2_clksel_recalc, 716 .recalc = &omap2_clksel_recalc,
717}; 717};
718 718
719/* This interface clock does not have a CM_AUTOIDLE bit */
719static struct clk gfx_ick = { 720static struct clk gfx_ick = {
720 .name = "gfx_ick", /* From l3 */ 721 .name = "gfx_ick", /* From l3 */
721 .ops = &clkops_omap2_dflt_wait, 722 .ops = &clkops_omap2_dflt_wait,
@@ -763,7 +764,7 @@ static const struct clksel dss1_fck_clksel[] = {
763 764
764static struct clk dss_ick = { /* Enables both L3,L4 ICLK's */ 765static struct clk dss_ick = { /* Enables both L3,L4 ICLK's */
765 .name = "dss_ick", 766 .name = "dss_ick",
766 .ops = &clkops_omap2_dflt, 767 .ops = &clkops_omap2_iclk_dflt,
767 .parent = &l4_ck, /* really both l3 and l4 */ 768 .parent = &l4_ck, /* really both l3 and l4 */
768 .clkdm_name = "dss_clkdm", 769 .clkdm_name = "dss_clkdm",
769 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 770 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -845,7 +846,7 @@ static const struct clksel omap24xx_gpt_clksel[] = {
845 846
846static struct clk gpt1_ick = { 847static struct clk gpt1_ick = {
847 .name = "gpt1_ick", 848 .name = "gpt1_ick",
848 .ops = &clkops_omap2_dflt_wait, 849 .ops = &clkops_omap2_iclk_dflt_wait,
849 .parent = &l4_ck, 850 .parent = &l4_ck,
850 .clkdm_name = "core_l4_clkdm", 851 .clkdm_name = "core_l4_clkdm",
851 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), 852 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
@@ -871,7 +872,7 @@ static struct clk gpt1_fck = {
871 872
872static struct clk gpt2_ick = { 873static struct clk gpt2_ick = {
873 .name = "gpt2_ick", 874 .name = "gpt2_ick",
874 .ops = &clkops_omap2_dflt_wait, 875 .ops = &clkops_omap2_iclk_dflt_wait,
875 .parent = &l4_ck, 876 .parent = &l4_ck,
876 .clkdm_name = "core_l4_clkdm", 877 .clkdm_name = "core_l4_clkdm",
877 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 878 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -895,7 +896,7 @@ static struct clk gpt2_fck = {
895 896
896static struct clk gpt3_ick = { 897static struct clk gpt3_ick = {
897 .name = "gpt3_ick", 898 .name = "gpt3_ick",
898 .ops = &clkops_omap2_dflt_wait, 899 .ops = &clkops_omap2_iclk_dflt_wait,
899 .parent = &l4_ck, 900 .parent = &l4_ck,
900 .clkdm_name = "core_l4_clkdm", 901 .clkdm_name = "core_l4_clkdm",
901 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 902 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -919,7 +920,7 @@ static struct clk gpt3_fck = {
919 920
920static struct clk gpt4_ick = { 921static struct clk gpt4_ick = {
921 .name = "gpt4_ick", 922 .name = "gpt4_ick",
922 .ops = &clkops_omap2_dflt_wait, 923 .ops = &clkops_omap2_iclk_dflt_wait,
923 .parent = &l4_ck, 924 .parent = &l4_ck,
924 .clkdm_name = "core_l4_clkdm", 925 .clkdm_name = "core_l4_clkdm",
925 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 926 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -943,7 +944,7 @@ static struct clk gpt4_fck = {
943 944
944static struct clk gpt5_ick = { 945static struct clk gpt5_ick = {
945 .name = "gpt5_ick", 946 .name = "gpt5_ick",
946 .ops = &clkops_omap2_dflt_wait, 947 .ops = &clkops_omap2_iclk_dflt_wait,
947 .parent = &l4_ck, 948 .parent = &l4_ck,
948 .clkdm_name = "core_l4_clkdm", 949 .clkdm_name = "core_l4_clkdm",
949 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 950 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -967,7 +968,7 @@ static struct clk gpt5_fck = {
967 968
968static struct clk gpt6_ick = { 969static struct clk gpt6_ick = {
969 .name = "gpt6_ick", 970 .name = "gpt6_ick",
970 .ops = &clkops_omap2_dflt_wait, 971 .ops = &clkops_omap2_iclk_dflt_wait,
971 .parent = &l4_ck, 972 .parent = &l4_ck,
972 .clkdm_name = "core_l4_clkdm", 973 .clkdm_name = "core_l4_clkdm",
973 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 974 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -991,7 +992,7 @@ static struct clk gpt6_fck = {
991 992
992static struct clk gpt7_ick = { 993static struct clk gpt7_ick = {
993 .name = "gpt7_ick", 994 .name = "gpt7_ick",
994 .ops = &clkops_omap2_dflt_wait, 995 .ops = &clkops_omap2_iclk_dflt_wait,
995 .parent = &l4_ck, 996 .parent = &l4_ck,
996 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 997 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
997 .enable_bit = OMAP24XX_EN_GPT7_SHIFT, 998 .enable_bit = OMAP24XX_EN_GPT7_SHIFT,
@@ -1014,7 +1015,7 @@ static struct clk gpt7_fck = {
1014 1015
1015static struct clk gpt8_ick = { 1016static struct clk gpt8_ick = {
1016 .name = "gpt8_ick", 1017 .name = "gpt8_ick",
1017 .ops = &clkops_omap2_dflt_wait, 1018 .ops = &clkops_omap2_iclk_dflt_wait,
1018 .parent = &l4_ck, 1019 .parent = &l4_ck,
1019 .clkdm_name = "core_l4_clkdm", 1020 .clkdm_name = "core_l4_clkdm",
1020 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1021 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1038,7 +1039,7 @@ static struct clk gpt8_fck = {
1038 1039
1039static struct clk gpt9_ick = { 1040static struct clk gpt9_ick = {
1040 .name = "gpt9_ick", 1041 .name = "gpt9_ick",
1041 .ops = &clkops_omap2_dflt_wait, 1042 .ops = &clkops_omap2_iclk_dflt_wait,
1042 .parent = &l4_ck, 1043 .parent = &l4_ck,
1043 .clkdm_name = "core_l4_clkdm", 1044 .clkdm_name = "core_l4_clkdm",
1044 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1045 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1062,7 +1063,7 @@ static struct clk gpt9_fck = {
1062 1063
1063static struct clk gpt10_ick = { 1064static struct clk gpt10_ick = {
1064 .name = "gpt10_ick", 1065 .name = "gpt10_ick",
1065 .ops = &clkops_omap2_dflt_wait, 1066 .ops = &clkops_omap2_iclk_dflt_wait,
1066 .parent = &l4_ck, 1067 .parent = &l4_ck,
1067 .clkdm_name = "core_l4_clkdm", 1068 .clkdm_name = "core_l4_clkdm",
1068 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1069 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1086,7 +1087,7 @@ static struct clk gpt10_fck = {
1086 1087
1087static struct clk gpt11_ick = { 1088static struct clk gpt11_ick = {
1088 .name = "gpt11_ick", 1089 .name = "gpt11_ick",
1089 .ops = &clkops_omap2_dflt_wait, 1090 .ops = &clkops_omap2_iclk_dflt_wait,
1090 .parent = &l4_ck, 1091 .parent = &l4_ck,
1091 .clkdm_name = "core_l4_clkdm", 1092 .clkdm_name = "core_l4_clkdm",
1092 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1093 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1110,7 +1111,7 @@ static struct clk gpt11_fck = {
1110 1111
1111static struct clk gpt12_ick = { 1112static struct clk gpt12_ick = {
1112 .name = "gpt12_ick", 1113 .name = "gpt12_ick",
1113 .ops = &clkops_omap2_dflt_wait, 1114 .ops = &clkops_omap2_iclk_dflt_wait,
1114 .parent = &l4_ck, 1115 .parent = &l4_ck,
1115 .clkdm_name = "core_l4_clkdm", 1116 .clkdm_name = "core_l4_clkdm",
1116 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1117 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1134,7 +1135,7 @@ static struct clk gpt12_fck = {
1134 1135
1135static struct clk mcbsp1_ick = { 1136static struct clk mcbsp1_ick = {
1136 .name = "mcbsp1_ick", 1137 .name = "mcbsp1_ick",
1137 .ops = &clkops_omap2_dflt_wait, 1138 .ops = &clkops_omap2_iclk_dflt_wait,
1138 .parent = &l4_ck, 1139 .parent = &l4_ck,
1139 .clkdm_name = "core_l4_clkdm", 1140 .clkdm_name = "core_l4_clkdm",
1140 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1141 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1174,7 +1175,7 @@ static struct clk mcbsp1_fck = {
1174 1175
1175static struct clk mcbsp2_ick = { 1176static struct clk mcbsp2_ick = {
1176 .name = "mcbsp2_ick", 1177 .name = "mcbsp2_ick",
1177 .ops = &clkops_omap2_dflt_wait, 1178 .ops = &clkops_omap2_iclk_dflt_wait,
1178 .parent = &l4_ck, 1179 .parent = &l4_ck,
1179 .clkdm_name = "core_l4_clkdm", 1180 .clkdm_name = "core_l4_clkdm",
1180 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1181 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1198,7 +1199,7 @@ static struct clk mcbsp2_fck = {
1198 1199
1199static struct clk mcspi1_ick = { 1200static struct clk mcspi1_ick = {
1200 .name = "mcspi1_ick", 1201 .name = "mcspi1_ick",
1201 .ops = &clkops_omap2_dflt_wait, 1202 .ops = &clkops_omap2_iclk_dflt_wait,
1202 .parent = &l4_ck, 1203 .parent = &l4_ck,
1203 .clkdm_name = "core_l4_clkdm", 1204 .clkdm_name = "core_l4_clkdm",
1204 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1205 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1218,7 +1219,7 @@ static struct clk mcspi1_fck = {
1218 1219
1219static struct clk mcspi2_ick = { 1220static struct clk mcspi2_ick = {
1220 .name = "mcspi2_ick", 1221 .name = "mcspi2_ick",
1221 .ops = &clkops_omap2_dflt_wait, 1222 .ops = &clkops_omap2_iclk_dflt_wait,
1222 .parent = &l4_ck, 1223 .parent = &l4_ck,
1223 .clkdm_name = "core_l4_clkdm", 1224 .clkdm_name = "core_l4_clkdm",
1224 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1225 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1238,7 +1239,7 @@ static struct clk mcspi2_fck = {
1238 1239
1239static struct clk uart1_ick = { 1240static struct clk uart1_ick = {
1240 .name = "uart1_ick", 1241 .name = "uart1_ick",
1241 .ops = &clkops_omap2_dflt_wait, 1242 .ops = &clkops_omap2_iclk_dflt_wait,
1242 .parent = &l4_ck, 1243 .parent = &l4_ck,
1243 .clkdm_name = "core_l4_clkdm", 1244 .clkdm_name = "core_l4_clkdm",
1244 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1245 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1258,7 +1259,7 @@ static struct clk uart1_fck = {
1258 1259
1259static struct clk uart2_ick = { 1260static struct clk uart2_ick = {
1260 .name = "uart2_ick", 1261 .name = "uart2_ick",
1261 .ops = &clkops_omap2_dflt_wait, 1262 .ops = &clkops_omap2_iclk_dflt_wait,
1262 .parent = &l4_ck, 1263 .parent = &l4_ck,
1263 .clkdm_name = "core_l4_clkdm", 1264 .clkdm_name = "core_l4_clkdm",
1264 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1265 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1278,7 +1279,7 @@ static struct clk uart2_fck = {
1278 1279
1279static struct clk uart3_ick = { 1280static struct clk uart3_ick = {
1280 .name = "uart3_ick", 1281 .name = "uart3_ick",
1281 .ops = &clkops_omap2_dflt_wait, 1282 .ops = &clkops_omap2_iclk_dflt_wait,
1282 .parent = &l4_ck, 1283 .parent = &l4_ck,
1283 .clkdm_name = "core_l4_clkdm", 1284 .clkdm_name = "core_l4_clkdm",
1284 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), 1285 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
@@ -1298,7 +1299,7 @@ static struct clk uart3_fck = {
1298 1299
1299static struct clk gpios_ick = { 1300static struct clk gpios_ick = {
1300 .name = "gpios_ick", 1301 .name = "gpios_ick",
1301 .ops = &clkops_omap2_dflt_wait, 1302 .ops = &clkops_omap2_iclk_dflt_wait,
1302 .parent = &l4_ck, 1303 .parent = &l4_ck,
1303 .clkdm_name = "core_l4_clkdm", 1304 .clkdm_name = "core_l4_clkdm",
1304 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), 1305 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
@@ -1318,7 +1319,7 @@ static struct clk gpios_fck = {
1318 1319
1319static struct clk mpu_wdt_ick = { 1320static struct clk mpu_wdt_ick = {
1320 .name = "mpu_wdt_ick", 1321 .name = "mpu_wdt_ick",
1321 .ops = &clkops_omap2_dflt_wait, 1322 .ops = &clkops_omap2_iclk_dflt_wait,
1322 .parent = &l4_ck, 1323 .parent = &l4_ck,
1323 .clkdm_name = "core_l4_clkdm", 1324 .clkdm_name = "core_l4_clkdm",
1324 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), 1325 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
@@ -1338,7 +1339,7 @@ static struct clk mpu_wdt_fck = {
1338 1339
1339static struct clk sync_32k_ick = { 1340static struct clk sync_32k_ick = {
1340 .name = "sync_32k_ick", 1341 .name = "sync_32k_ick",
1341 .ops = &clkops_omap2_dflt_wait, 1342 .ops = &clkops_omap2_iclk_dflt_wait,
1342 .parent = &l4_ck, 1343 .parent = &l4_ck,
1343 .flags = ENABLE_ON_INIT, 1344 .flags = ENABLE_ON_INIT,
1344 .clkdm_name = "core_l4_clkdm", 1345 .clkdm_name = "core_l4_clkdm",
@@ -1349,7 +1350,7 @@ static struct clk sync_32k_ick = {
1349 1350
1350static struct clk wdt1_ick = { 1351static struct clk wdt1_ick = {
1351 .name = "wdt1_ick", 1352 .name = "wdt1_ick",
1352 .ops = &clkops_omap2_dflt_wait, 1353 .ops = &clkops_omap2_iclk_dflt_wait,
1353 .parent = &l4_ck, 1354 .parent = &l4_ck,
1354 .clkdm_name = "core_l4_clkdm", 1355 .clkdm_name = "core_l4_clkdm",
1355 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), 1356 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
@@ -1359,7 +1360,7 @@ static struct clk wdt1_ick = {
1359 1360
1360static struct clk omapctrl_ick = { 1361static struct clk omapctrl_ick = {
1361 .name = "omapctrl_ick", 1362 .name = "omapctrl_ick",
1362 .ops = &clkops_omap2_dflt_wait, 1363 .ops = &clkops_omap2_iclk_dflt_wait,
1363 .parent = &l4_ck, 1364 .parent = &l4_ck,
1364 .flags = ENABLE_ON_INIT, 1365 .flags = ENABLE_ON_INIT,
1365 .clkdm_name = "core_l4_clkdm", 1366 .clkdm_name = "core_l4_clkdm",
@@ -1370,7 +1371,7 @@ static struct clk omapctrl_ick = {
1370 1371
1371static struct clk cam_ick = { 1372static struct clk cam_ick = {
1372 .name = "cam_ick", 1373 .name = "cam_ick",
1373 .ops = &clkops_omap2_dflt, 1374 .ops = &clkops_omap2_iclk_dflt,
1374 .parent = &l4_ck, 1375 .parent = &l4_ck,
1375 .clkdm_name = "core_l4_clkdm", 1376 .clkdm_name = "core_l4_clkdm",
1376 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1377 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1395,7 +1396,7 @@ static struct clk cam_fck = {
1395 1396
1396static struct clk mailboxes_ick = { 1397static struct clk mailboxes_ick = {
1397 .name = "mailboxes_ick", 1398 .name = "mailboxes_ick",
1398 .ops = &clkops_omap2_dflt_wait, 1399 .ops = &clkops_omap2_iclk_dflt_wait,
1399 .parent = &l4_ck, 1400 .parent = &l4_ck,
1400 .clkdm_name = "core_l4_clkdm", 1401 .clkdm_name = "core_l4_clkdm",
1401 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1402 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1405,7 +1406,7 @@ static struct clk mailboxes_ick = {
1405 1406
1406static struct clk wdt4_ick = { 1407static struct clk wdt4_ick = {
1407 .name = "wdt4_ick", 1408 .name = "wdt4_ick",
1408 .ops = &clkops_omap2_dflt_wait, 1409 .ops = &clkops_omap2_iclk_dflt_wait,
1409 .parent = &l4_ck, 1410 .parent = &l4_ck,
1410 .clkdm_name = "core_l4_clkdm", 1411 .clkdm_name = "core_l4_clkdm",
1411 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1412 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1425,7 +1426,7 @@ static struct clk wdt4_fck = {
1425 1426
1426static struct clk wdt3_ick = { 1427static struct clk wdt3_ick = {
1427 .name = "wdt3_ick", 1428 .name = "wdt3_ick",
1428 .ops = &clkops_omap2_dflt_wait, 1429 .ops = &clkops_omap2_iclk_dflt_wait,
1429 .parent = &l4_ck, 1430 .parent = &l4_ck,
1430 .clkdm_name = "core_l4_clkdm", 1431 .clkdm_name = "core_l4_clkdm",
1431 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1432 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1445,7 +1446,7 @@ static struct clk wdt3_fck = {
1445 1446
1446static struct clk mspro_ick = { 1447static struct clk mspro_ick = {
1447 .name = "mspro_ick", 1448 .name = "mspro_ick",
1448 .ops = &clkops_omap2_dflt_wait, 1449 .ops = &clkops_omap2_iclk_dflt_wait,
1449 .parent = &l4_ck, 1450 .parent = &l4_ck,
1450 .clkdm_name = "core_l4_clkdm", 1451 .clkdm_name = "core_l4_clkdm",
1451 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1452 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1465,7 +1466,7 @@ static struct clk mspro_fck = {
1465 1466
1466static struct clk mmc_ick = { 1467static struct clk mmc_ick = {
1467 .name = "mmc_ick", 1468 .name = "mmc_ick",
1468 .ops = &clkops_omap2_dflt_wait, 1469 .ops = &clkops_omap2_iclk_dflt_wait,
1469 .parent = &l4_ck, 1470 .parent = &l4_ck,
1470 .clkdm_name = "core_l4_clkdm", 1471 .clkdm_name = "core_l4_clkdm",
1471 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1472 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1485,7 +1486,7 @@ static struct clk mmc_fck = {
1485 1486
1486static struct clk fac_ick = { 1487static struct clk fac_ick = {
1487 .name = "fac_ick", 1488 .name = "fac_ick",
1488 .ops = &clkops_omap2_dflt_wait, 1489 .ops = &clkops_omap2_iclk_dflt_wait,
1489 .parent = &l4_ck, 1490 .parent = &l4_ck,
1490 .clkdm_name = "core_l4_clkdm", 1491 .clkdm_name = "core_l4_clkdm",
1491 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1492 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1505,7 +1506,7 @@ static struct clk fac_fck = {
1505 1506
1506static struct clk eac_ick = { 1507static struct clk eac_ick = {
1507 .name = "eac_ick", 1508 .name = "eac_ick",
1508 .ops = &clkops_omap2_dflt_wait, 1509 .ops = &clkops_omap2_iclk_dflt_wait,
1509 .parent = &l4_ck, 1510 .parent = &l4_ck,
1510 .clkdm_name = "core_l4_clkdm", 1511 .clkdm_name = "core_l4_clkdm",
1511 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1512 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1525,7 +1526,7 @@ static struct clk eac_fck = {
1525 1526
1526static struct clk hdq_ick = { 1527static struct clk hdq_ick = {
1527 .name = "hdq_ick", 1528 .name = "hdq_ick",
1528 .ops = &clkops_omap2_dflt_wait, 1529 .ops = &clkops_omap2_iclk_dflt_wait,
1529 .parent = &l4_ck, 1530 .parent = &l4_ck,
1530 .clkdm_name = "core_l4_clkdm", 1531 .clkdm_name = "core_l4_clkdm",
1531 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1532 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1545,7 +1546,7 @@ static struct clk hdq_fck = {
1545 1546
1546static struct clk i2c2_ick = { 1547static struct clk i2c2_ick = {
1547 .name = "i2c2_ick", 1548 .name = "i2c2_ick",
1548 .ops = &clkops_omap2_dflt_wait, 1549 .ops = &clkops_omap2_iclk_dflt_wait,
1549 .parent = &l4_ck, 1550 .parent = &l4_ck,
1550 .clkdm_name = "core_l4_clkdm", 1551 .clkdm_name = "core_l4_clkdm",
1551 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1552 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1565,7 +1566,7 @@ static struct clk i2c2_fck = {
1565 1566
1566static struct clk i2c1_ick = { 1567static struct clk i2c1_ick = {
1567 .name = "i2c1_ick", 1568 .name = "i2c1_ick",
1568 .ops = &clkops_omap2_dflt_wait, 1569 .ops = &clkops_omap2_iclk_dflt_wait,
1569 .parent = &l4_ck, 1570 .parent = &l4_ck,
1570 .clkdm_name = "core_l4_clkdm", 1571 .clkdm_name = "core_l4_clkdm",
1571 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1572 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1583,12 +1584,18 @@ static struct clk i2c1_fck = {
1583 .recalc = &followparent_recalc, 1584 .recalc = &followparent_recalc,
1584}; 1585};
1585 1586
1587/*
1588 * The enable_reg/enable_bit in this clock is only used for CM_AUTOIDLE
1589 * accesses derived from this data.
1590 */
1586static struct clk gpmc_fck = { 1591static struct clk gpmc_fck = {
1587 .name = "gpmc_fck", 1592 .name = "gpmc_fck",
1588 .ops = &clkops_null, /* RMK: missing? */ 1593 .ops = &clkops_omap2_iclk_idle_only,
1589 .parent = &core_l3_ck, 1594 .parent = &core_l3_ck,
1590 .flags = ENABLE_ON_INIT, 1595 .flags = ENABLE_ON_INIT,
1591 .clkdm_name = "core_l3_clkdm", 1596 .clkdm_name = "core_l3_clkdm",
1597 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
1598 .enable_bit = OMAP24XX_AUTO_GPMC_SHIFT,
1592 .recalc = &followparent_recalc, 1599 .recalc = &followparent_recalc,
1593}; 1600};
1594 1601
@@ -1600,11 +1607,17 @@ static struct clk sdma_fck = {
1600 .recalc = &followparent_recalc, 1607 .recalc = &followparent_recalc,
1601}; 1608};
1602 1609
1610/*
1611 * The enable_reg/enable_bit in this clock is only used for CM_AUTOIDLE
1612 * accesses derived from this data.
1613 */
1603static struct clk sdma_ick = { 1614static struct clk sdma_ick = {
1604 .name = "sdma_ick", 1615 .name = "sdma_ick",
1605 .ops = &clkops_null, /* RMK: missing? */ 1616 .ops = &clkops_omap2_iclk_idle_only,
1606 .parent = &l4_ck, 1617 .parent = &l4_ck,
1607 .clkdm_name = "core_l3_clkdm", 1618 .clkdm_name = "core_l3_clkdm",
1619 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
1620 .enable_bit = OMAP24XX_AUTO_SDMA_SHIFT,
1608 .recalc = &followparent_recalc, 1621 .recalc = &followparent_recalc,
1609}; 1622};
1610 1623
@@ -1625,7 +1638,7 @@ static struct clk sdrc_ick = {
1625 1638
1626static struct clk vlynq_ick = { 1639static struct clk vlynq_ick = {
1627 .name = "vlynq_ick", 1640 .name = "vlynq_ick",
1628 .ops = &clkops_omap2_dflt_wait, 1641 .ops = &clkops_omap2_iclk_dflt_wait,
1629 .parent = &core_l3_ck, 1642 .parent = &core_l3_ck,
1630 .clkdm_name = "core_l3_clkdm", 1643 .clkdm_name = "core_l3_clkdm",
1631 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 1644 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1674,7 +1687,7 @@ static struct clk vlynq_fck = {
1674 1687
1675static struct clk des_ick = { 1688static struct clk des_ick = {
1676 .name = "des_ick", 1689 .name = "des_ick",
1677 .ops = &clkops_omap2_dflt_wait, 1690 .ops = &clkops_omap2_iclk_dflt_wait,
1678 .parent = &l4_ck, 1691 .parent = &l4_ck,
1679 .clkdm_name = "core_l4_clkdm", 1692 .clkdm_name = "core_l4_clkdm",
1680 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), 1693 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
@@ -1684,7 +1697,7 @@ static struct clk des_ick = {
1684 1697
1685static struct clk sha_ick = { 1698static struct clk sha_ick = {
1686 .name = "sha_ick", 1699 .name = "sha_ick",
1687 .ops = &clkops_omap2_dflt_wait, 1700 .ops = &clkops_omap2_iclk_dflt_wait,
1688 .parent = &l4_ck, 1701 .parent = &l4_ck,
1689 .clkdm_name = "core_l4_clkdm", 1702 .clkdm_name = "core_l4_clkdm",
1690 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), 1703 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
@@ -1694,7 +1707,7 @@ static struct clk sha_ick = {
1694 1707
1695static struct clk rng_ick = { 1708static struct clk rng_ick = {
1696 .name = "rng_ick", 1709 .name = "rng_ick",
1697 .ops = &clkops_omap2_dflt_wait, 1710 .ops = &clkops_omap2_iclk_dflt_wait,
1698 .parent = &l4_ck, 1711 .parent = &l4_ck,
1699 .clkdm_name = "core_l4_clkdm", 1712 .clkdm_name = "core_l4_clkdm",
1700 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), 1713 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
@@ -1704,7 +1717,7 @@ static struct clk rng_ick = {
1704 1717
1705static struct clk aes_ick = { 1718static struct clk aes_ick = {
1706 .name = "aes_ick", 1719 .name = "aes_ick",
1707 .ops = &clkops_omap2_dflt_wait, 1720 .ops = &clkops_omap2_iclk_dflt_wait,
1708 .parent = &l4_ck, 1721 .parent = &l4_ck,
1709 .clkdm_name = "core_l4_clkdm", 1722 .clkdm_name = "core_l4_clkdm",
1710 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), 1723 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
@@ -1714,7 +1727,7 @@ static struct clk aes_ick = {
1714 1727
1715static struct clk pka_ick = { 1728static struct clk pka_ick = {
1716 .name = "pka_ick", 1729 .name = "pka_ick",
1717 .ops = &clkops_omap2_dflt_wait, 1730 .ops = &clkops_omap2_iclk_dflt_wait,
1718 .parent = &l4_ck, 1731 .parent = &l4_ck,
1719 .clkdm_name = "core_l4_clkdm", 1732 .clkdm_name = "core_l4_clkdm",
1720 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), 1733 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
diff --git a/arch/arm/mach-omap2/cm-regbits-24xx.h b/arch/arm/mach-omap2/cm-regbits-24xx.h
index 409c813eb2e2..686290437568 100644
--- a/arch/arm/mach-omap2/cm-regbits-24xx.h
+++ b/arch/arm/mach-omap2/cm-regbits-24xx.h
@@ -212,7 +212,9 @@
212/* CM_AUTOIDLE3_CORE */ 212/* CM_AUTOIDLE3_CORE */
213#define OMAP24XX_AUTO_SDRC_SHIFT 2 213#define OMAP24XX_AUTO_SDRC_SHIFT 2
214#define OMAP24XX_AUTO_SDRC_MASK (1 << 2) 214#define OMAP24XX_AUTO_SDRC_MASK (1 << 2)
215#define OMAP24XX_AUTO_GPMC_SHIFT 1
215#define OMAP24XX_AUTO_GPMC_MASK (1 << 1) 216#define OMAP24XX_AUTO_GPMC_MASK (1 << 1)
217#define OMAP24XX_AUTO_SDMA_SHIFT 0
216#define OMAP24XX_AUTO_SDMA_MASK (1 << 0) 218#define OMAP24XX_AUTO_SDMA_MASK (1 << 0)
217 219
218/* CM_AUTOIDLE4_CORE */ 220/* CM_AUTOIDLE4_CORE */