Merge branch 'for-paul' of git://gitorious.org/linux-omap-dss2/linux
[pandora-kernel.git] / arch / arm / mach-omap2 / clock2420_data.c
index 26d89d5..2926d02 100644 (file)
@@ -1,12 +1,12 @@
 /*
- *  linux/arch/arm/mach-omap2/clock2420_data.c
+ * OMAP2420 clock data
  *
- *  Copyright (C) 2005-2009 Texas Instruments, Inc.
- *  Copyright (C) 2004-2010 Nokia Corporation
+ * Copyright (C) 2005-2009 Texas Instruments, Inc.
+ * Copyright (C) 2004-2011 Nokia Corporation
  *
- *  Contacts:
- *  Richard Woodruff <r-woodruff2@ti.com>
- *  Paul Walmsley
+ * Contacts:
+ * Richard Woodruff <r-woodruff2@ti.com>
+ * Paul Walmsley
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
 /*
  * 2420 clock tree.
  *
- * NOTE:In many cases here we are assigning a 'default' parent.        In many
- *     cases the parent is selectable. The get/set parent calls will also
- *     switch sources.
- *
- *     Many some clocks say always_enabled, but they can be auto idled for
- *     power savings. They will always be available upon clock request.
+ * NOTE:In many cases here we are assigning a 'default' parent. In
+ *     many cases the parent is selectable. The set parent calls will
+ *     also switch sources.
  *
  *     Several sources are given initial rates which may be wrong, this will
  *     be fixed up in the init func.
  *
  *     Things are broadly separated below by clock domains. It is
- *     noteworthy that most periferals have dependencies on multiple clock
+ *     noteworthy that most peripherals have dependencies on multiple clock
  *     domains. Many get their interface clocks from the L4 domain, but get
  *     functional clocks from fixed sources or other core domain derived
  *     clocks.
@@ -55,7 +52,7 @@
 static struct clk func_32k_ck = {
        .name           = "func_32k_ck",
        .ops            = &clkops_null,
-       .rate           = 32000,
+       .rate           = 32768,
        .clkdm_name     = "wkup_clkdm",
 };
 
@@ -116,7 +113,6 @@ static struct dpll_data dpll_dd = {
        .max_multiplier         = 1023,
        .min_divider            = 1,
        .max_divider            = 16,
-       .rate_tolerance         = DEFAULT_DPLL_RATE_TOLERANCE
 };
 
 /*
@@ -125,7 +121,7 @@ static struct dpll_data dpll_dd = {
  */
 static struct clk dpll_ck = {
        .name           = "dpll_ck",
-       .ops            = &clkops_null,
+       .ops            = &clkops_omap2xxx_dpll_ops,
        .parent         = &sys_ck,              /* Can be func_32k also */
        .dpll_data      = &dpll_dd,
        .clkdm_name     = "wkup_clkdm",
@@ -455,36 +451,22 @@ static struct clk dsp_fck = {
        .recalc         = &omap2_clksel_recalc,
 };
 
-/* DSP interface clock */
-static const struct clksel_rate dsp_irate_ick_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_24XX },
-       { .div = 2, .val = 2, .flags = RATE_IN_24XX },
-       { .div = 0 },
-};
-
-static const struct clksel dsp_irate_ick_clksel[] = {
-       { .parent = &dsp_fck, .rates = dsp_irate_ick_rates },
+static const struct clksel dsp_ick_clksel[] = {
+       { .parent = &dsp_fck, .rates = dsp_ick_rates },
        { .parent = NULL }
 };
 
-/* This clock does not exist as such in the TRM. */
-static struct clk dsp_irate_ick = {
-       .name           = "dsp_irate_ick",
-       .ops            = &clkops_null,
-       .parent         = &dsp_fck,
-       .clksel_reg     = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL),
-       .clksel_mask    = OMAP24XX_CLKSEL_DSP_IF_MASK,
-       .clksel         = dsp_irate_ick_clksel,
-       .recalc         = &omap2_clksel_recalc,
-};
-
-/* 2420 only */
 static struct clk dsp_ick = {
        .name           = "dsp_ick",     /* apparently ipi and isp */
-       .ops            = &clkops_omap2_dflt_wait,
-       .parent         = &dsp_irate_ick,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
+       .parent         = &dsp_fck,
+       .clkdm_name     = "dsp_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP2420_EN_DSP_IPI_SHIFT,          /* for ipi */
+       .clksel_reg     = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL),
+       .clksel_mask    = OMAP24XX_CLKSEL_DSP_IF_MASK,
+       .clksel         = dsp_ick_clksel,
+       .recalc         = &omap2_clksel_recalc,
 };
 
 /*
@@ -579,7 +561,7 @@ static const struct clksel usb_l4_ick_clksel[] = {
 /* It is unclear from TRM whether usb_l4_ick is really in L3 or L4 clkdm */
 static struct clk usb_l4_ick = {       /* FS-USB interface clock */
        .name           = "usb_l4_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &core_l3_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
@@ -661,7 +643,7 @@ static struct clk ssi_ssr_sst_fck = {
  */
 static struct clk ssi_l4_ick = {
        .name           = "ssi_l4_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
@@ -716,6 +698,7 @@ static struct clk gfx_2d_fck = {
        .recalc         = &omap2_clksel_recalc,
 };
 
+/* This interface clock does not have a CM_AUTOIDLE bit */
 static struct clk gfx_ick = {
        .name           = "gfx_ick",            /* From l3 */
        .ops            = &clkops_omap2_dflt_wait,
@@ -763,7 +746,7 @@ static const struct clksel dss1_fck_clksel[] = {
 
 static struct clk dss_ick = {          /* Enables both L3,L4 ICLK's */
        .name           = "dss_ick",
-       .ops            = &clkops_omap2_dflt,
+       .ops            = &clkops_omap2_iclk_dflt,
        .parent         = &l4_ck,       /* really both l3 and l4 */
        .clkdm_name     = "dss_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -825,6 +808,14 @@ static struct clk dss_54m_fck = {  /* Alt clk used in power management */
        .recalc         = &followparent_recalc,
 };
 
+static struct clk wu_l4_ick = {
+       .name           = "wu_l4_ick",
+       .ops            = &clkops_null,
+       .parent         = &sys_ck,
+       .clkdm_name     = "wkup_clkdm",
+       .recalc         = &followparent_recalc,
+};
+
 /*
  * CORE power domain ICLK & FCLK defines.
  * Many of the these can have more than one possible parent. Entries
@@ -845,9 +836,9 @@ static const struct clksel omap24xx_gpt_clksel[] = {
 
 static struct clk gpt1_ick = {
        .name           = "gpt1_ick",
-       .ops            = &clkops_omap2_dflt_wait,
-       .parent         = &l4_ck,
-       .clkdm_name     = "core_l4_clkdm",
+       .ops            = &clkops_omap2_iclk_dflt_wait,
+       .parent         = &wu_l4_ick,
+       .clkdm_name     = "wkup_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP24XX_EN_GPT1_SHIFT,
        .recalc         = &followparent_recalc,
@@ -871,7 +862,7 @@ static struct clk gpt1_fck = {
 
 static struct clk gpt2_ick = {
        .name           = "gpt2_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -895,7 +886,7 @@ static struct clk gpt2_fck = {
 
 static struct clk gpt3_ick = {
        .name           = "gpt3_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -919,7 +910,7 @@ static struct clk gpt3_fck = {
 
 static struct clk gpt4_ick = {
        .name           = "gpt4_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -943,7 +934,7 @@ static struct clk gpt4_fck = {
 
 static struct clk gpt5_ick = {
        .name           = "gpt5_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -967,7 +958,7 @@ static struct clk gpt5_fck = {
 
 static struct clk gpt6_ick = {
        .name           = "gpt6_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -991,8 +982,9 @@ static struct clk gpt6_fck = {
 
 static struct clk gpt7_ick = {
        .name           = "gpt7_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
+       .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT7_SHIFT,
        .recalc         = &followparent_recalc,
@@ -1014,7 +1006,7 @@ static struct clk gpt7_fck = {
 
 static struct clk gpt8_ick = {
        .name           = "gpt8_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1038,7 +1030,7 @@ static struct clk gpt8_fck = {
 
 static struct clk gpt9_ick = {
        .name           = "gpt9_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1062,7 +1054,7 @@ static struct clk gpt9_fck = {
 
 static struct clk gpt10_ick = {
        .name           = "gpt10_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1086,7 +1078,7 @@ static struct clk gpt10_fck = {
 
 static struct clk gpt11_ick = {
        .name           = "gpt11_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1110,7 +1102,7 @@ static struct clk gpt11_fck = {
 
 static struct clk gpt12_ick = {
        .name           = "gpt12_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1134,7 +1126,7 @@ static struct clk gpt12_fck = {
 
 static struct clk mcbsp1_ick = {
        .name           = "mcbsp1_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1174,7 +1166,7 @@ static struct clk mcbsp1_fck = {
 
 static struct clk mcbsp2_ick = {
        .name           = "mcbsp2_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1198,7 +1190,7 @@ static struct clk mcbsp2_fck = {
 
 static struct clk mcspi1_ick = {
        .name           = "mcspi1_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1218,7 +1210,7 @@ static struct clk mcspi1_fck = {
 
 static struct clk mcspi2_ick = {
        .name           = "mcspi2_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1238,7 +1230,7 @@ static struct clk mcspi2_fck = {
 
 static struct clk uart1_ick = {
        .name           = "uart1_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1258,7 +1250,7 @@ static struct clk uart1_fck = {
 
 static struct clk uart2_ick = {
        .name           = "uart2_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1278,7 +1270,7 @@ static struct clk uart2_fck = {
 
 static struct clk uart3_ick = {
        .name           = "uart3_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
@@ -1298,9 +1290,9 @@ static struct clk uart3_fck = {
 
 static struct clk gpios_ick = {
        .name           = "gpios_ick",
-       .ops            = &clkops_omap2_dflt_wait,
-       .parent         = &l4_ck,
-       .clkdm_name     = "core_l4_clkdm",
+       .ops            = &clkops_omap2_iclk_dflt_wait,
+       .parent         = &wu_l4_ick,
+       .clkdm_name     = "wkup_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP24XX_EN_GPIOS_SHIFT,
        .recalc         = &followparent_recalc,
@@ -1318,9 +1310,9 @@ static struct clk gpios_fck = {
 
 static struct clk mpu_wdt_ick = {
        .name           = "mpu_wdt_ick",
-       .ops            = &clkops_omap2_dflt_wait,
-       .parent         = &l4_ck,
-       .clkdm_name     = "core_l4_clkdm",
+       .ops            = &clkops_omap2_iclk_dflt_wait,
+       .parent         = &wu_l4_ick,
+       .clkdm_name     = "wkup_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP24XX_EN_MPU_WDT_SHIFT,
        .recalc         = &followparent_recalc,
@@ -1338,10 +1330,10 @@ static struct clk mpu_wdt_fck = {
 
 static struct clk sync_32k_ick = {
        .name           = "sync_32k_ick",
-       .ops            = &clkops_omap2_dflt_wait,
-       .parent         = &l4_ck,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
+       .parent         = &wu_l4_ick,
+       .clkdm_name     = "wkup_clkdm",
        .flags          = ENABLE_ON_INIT,
-       .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP24XX_EN_32KSYNC_SHIFT,
        .recalc         = &followparent_recalc,
@@ -1349,9 +1341,9 @@ static struct clk sync_32k_ick = {
 
 static struct clk wdt1_ick = {
        .name           = "wdt1_ick",
-       .ops            = &clkops_omap2_dflt_wait,
-       .parent         = &l4_ck,
-       .clkdm_name     = "core_l4_clkdm",
+       .ops            = &clkops_omap2_iclk_dflt_wait,
+       .parent         = &wu_l4_ick,
+       .clkdm_name     = "wkup_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP24XX_EN_WDT1_SHIFT,
        .recalc         = &followparent_recalc,
@@ -1359,10 +1351,10 @@ static struct clk wdt1_ick = {
 
 static struct clk omapctrl_ick = {
        .name           = "omapctrl_ick",
-       .ops            = &clkops_omap2_dflt_wait,
-       .parent         = &l4_ck,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
+       .parent         = &wu_l4_ick,
+       .clkdm_name     = "wkup_clkdm",
        .flags          = ENABLE_ON_INIT,
-       .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP24XX_EN_OMAPCTRL_SHIFT,
        .recalc         = &followparent_recalc,
@@ -1370,7 +1362,7 @@ static struct clk omapctrl_ick = {
 
 static struct clk cam_ick = {
        .name           = "cam_ick",
-       .ops            = &clkops_omap2_dflt,
+       .ops            = &clkops_omap2_iclk_dflt,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1395,7 +1387,7 @@ static struct clk cam_fck = {
 
 static struct clk mailboxes_ick = {
        .name           = "mailboxes_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1405,7 +1397,7 @@ static struct clk mailboxes_ick = {
 
 static struct clk wdt4_ick = {
        .name           = "wdt4_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1425,7 +1417,7 @@ static struct clk wdt4_fck = {
 
 static struct clk wdt3_ick = {
        .name           = "wdt3_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1445,7 +1437,7 @@ static struct clk wdt3_fck = {
 
 static struct clk mspro_ick = {
        .name           = "mspro_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1465,7 +1457,7 @@ static struct clk mspro_fck = {
 
 static struct clk mmc_ick = {
        .name           = "mmc_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1485,7 +1477,7 @@ static struct clk mmc_fck = {
 
 static struct clk fac_ick = {
        .name           = "fac_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1505,7 +1497,7 @@ static struct clk fac_fck = {
 
 static struct clk eac_ick = {
        .name           = "eac_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1525,7 +1517,7 @@ static struct clk eac_fck = {
 
 static struct clk hdq_ick = {
        .name           = "hdq_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1545,7 +1537,7 @@ static struct clk hdq_fck = {
 
 static struct clk i2c2_ick = {
        .name           = "i2c2_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1565,7 +1557,7 @@ static struct clk i2c2_fck = {
 
 static struct clk i2c1_ick = {
        .name           = "i2c1_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1583,12 +1575,18 @@ static struct clk i2c1_fck = {
        .recalc         = &followparent_recalc,
 };
 
+/*
+ * The enable_reg/enable_bit in this clock is only used for CM_AUTOIDLE
+ * accesses derived from this data.
+ */
 static struct clk gpmc_fck = {
        .name           = "gpmc_fck",
-       .ops            = &clkops_null, /* RMK: missing? */
+       .ops            = &clkops_omap2_iclk_idle_only,
        .parent         = &core_l3_ck,
        .flags          = ENABLE_ON_INIT,
        .clkdm_name     = "core_l3_clkdm",
+       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
+       .enable_bit     = OMAP24XX_AUTO_GPMC_SHIFT,
        .recalc         = &followparent_recalc,
 };
 
@@ -1600,17 +1598,38 @@ static struct clk sdma_fck = {
        .recalc         = &followparent_recalc,
 };
 
+/*
+ * The enable_reg/enable_bit in this clock is only used for CM_AUTOIDLE
+ * accesses derived from this data.
+ */
 static struct clk sdma_ick = {
        .name           = "sdma_ick",
-       .ops            = &clkops_null, /* RMK: missing? */
-       .parent         = &l4_ck,
+       .ops            = &clkops_omap2_iclk_idle_only,
+       .parent         = &core_l3_ck,
+       .clkdm_name     = "core_l3_clkdm",
+       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
+       .enable_bit     = OMAP24XX_AUTO_SDMA_SHIFT,
+       .recalc         = &followparent_recalc,
+};
+
+/*
+ * The enable_reg/enable_bit in this clock is only used for CM_AUTOIDLE
+ * accesses derived from this data.
+ */
+static struct clk sdrc_ick = {
+       .name           = "sdrc_ick",
+       .ops            = &clkops_omap2_iclk_idle_only,
+       .parent         = &core_l3_ck,
+       .flags          = ENABLE_ON_INIT,
        .clkdm_name     = "core_l3_clkdm",
+       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
+       .enable_bit     = OMAP24XX_AUTO_SDRC_SHIFT,
        .recalc         = &followparent_recalc,
 };
 
 static struct clk vlynq_ick = {
        .name           = "vlynq_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &core_l3_ck,
        .clkdm_name     = "core_l3_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1659,7 +1678,7 @@ static struct clk vlynq_fck = {
 
 static struct clk des_ick = {
        .name           = "des_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
@@ -1669,7 +1688,7 @@ static struct clk des_ick = {
 
 static struct clk sha_ick = {
        .name           = "sha_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
@@ -1679,7 +1698,7 @@ static struct clk sha_ick = {
 
 static struct clk rng_ick = {
        .name           = "rng_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
@@ -1689,7 +1708,7 @@ static struct clk rng_ick = {
 
 static struct clk aes_ick = {
        .name           = "aes_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
@@ -1699,7 +1718,7 @@ static struct clk aes_ick = {
 
 static struct clk pka_ick = {
        .name           = "pka_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
@@ -1777,7 +1796,6 @@ static struct omap_clk omap2420_clks[] = {
        CLK(NULL,       "mpu_ck",       &mpu_ck,        CK_242X),
        /* dsp domain clocks */
        CLK(NULL,       "dsp_fck",      &dsp_fck,       CK_242X),
-       CLK(NULL,       "dsp_irate_ick", &dsp_irate_ick, CK_242X),
        CLK(NULL,       "dsp_ick",      &dsp_ick,       CK_242X),
        CLK(NULL,       "iva1_ifck",    &iva1_ifck,     CK_242X),
        CLK(NULL,       "iva1_mpu_int_ifck", &iva1_mpu_int_ifck, CK_242X),
@@ -1797,6 +1815,7 @@ static struct omap_clk omap2420_clks[] = {
        /* L4 domain clocks */
        CLK(NULL,       "l4_ck",        &l4_ck,         CK_242X),
        CLK(NULL,       "ssi_l4_ick",   &ssi_l4_ick,    CK_242X),
+       CLK(NULL,       "wu_l4_ick",    &wu_l4_ick,     CK_242X),
        /* virtual meta-group clock */
        CLK(NULL,       "virt_prcm_set", &virt_prcm_set, CK_242X),
        /* general l4 interface ck, multi-parent functional clk */
@@ -1869,6 +1888,7 @@ static struct omap_clk omap2420_clks[] = {
        CLK(NULL,       "gpmc_fck",     &gpmc_fck,      CK_242X),
        CLK(NULL,       "sdma_fck",     &sdma_fck,      CK_242X),
        CLK(NULL,       "sdma_ick",     &sdma_ick,      CK_242X),
+       CLK(NULL,       "sdrc_ick",     &sdrc_ick,      CK_242X),
        CLK(NULL,       "vlynq_ick",    &vlynq_ick,     CK_242X),
        CLK(NULL,       "vlynq_fck",    &vlynq_fck,     CK_242X),
        CLK(NULL,       "des_ick",      &des_ick,       CK_242X),
@@ -1913,6 +1933,9 @@ int __init omap2420_clk_init(void)
                omap2_init_clk_clkdm(c->lk.clk);
        }
 
+       /* Disable autoidle on all clocks; let the PM code enable it later */
+       omap_clk_disable_autoidle_all();
+
        /* Check the MPU rate set by bootloader */
        clkrate = omap2xxx_clk_get_core_rate(&dpll_ck);
        for (prcm = rate_table; prcm->mpu_speed; prcm++) {