Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1 | /* |
Tony Lindgren | a16e970 | 2008-03-18 11:56:39 +0200 | [diff] [blame] | 2 | * linux/arch/arm/mach-omap2/clock24xx.h |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 3 | * |
Tony Lindgren | a16e970 | 2008-03-18 11:56:39 +0200 | [diff] [blame] | 4 | * Copyright (C) 2005-2008 Texas Instruments, Inc. |
| 5 | * Copyright (C) 2004-2008 Nokia Corporation |
| 6 | * |
| 7 | * Contacts: |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 8 | * Richard Woodruff <r-woodruff2@ti.com> |
Tony Lindgren | a16e970 | 2008-03-18 11:56:39 +0200 | [diff] [blame] | 9 | * Paul Walmsley |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License version 2 as |
| 13 | * published by the Free Software Foundation. |
| 14 | */ |
| 15 | |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 16 | #ifndef __ARCH_ARM_MACH_OMAP2_CLOCK24XX_H |
| 17 | #define __ARCH_ARM_MACH_OMAP2_CLOCK24XX_H |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 18 | |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 19 | #include "clock.h" |
| 20 | |
| 21 | #include "prm.h" |
| 22 | #include "cm.h" |
| 23 | #include "prm-regbits-24xx.h" |
| 24 | #include "cm-regbits-24xx.h" |
| 25 | #include "sdrc.h" |
| 26 | |
Tony Lindgren | a16e970 | 2008-03-18 11:56:39 +0200 | [diff] [blame] | 27 | static void omap2_table_mpu_recalc(struct clk *clk); |
| 28 | static int omap2_select_table_rate(struct clk *clk, unsigned long rate); |
| 29 | static long omap2_round_to_table_rate(struct clk *clk, unsigned long rate); |
| 30 | static void omap2_sys_clk_recalc(struct clk *clk); |
| 31 | static void omap2_osc_clk_recalc(struct clk *clk); |
| 32 | static void omap2_sys_clk_recalc(struct clk *clk); |
Paul Walmsley | 88b8ba9 | 2008-07-03 12:24:46 +0300 | [diff] [blame] | 33 | static void omap2_dpllcore_recalc(struct clk *clk); |
Paul Walmsley | 88b8ba9 | 2008-07-03 12:24:46 +0300 | [diff] [blame] | 34 | static int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate); |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 35 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 36 | /* Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated. |
| 37 | * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU,CM_CLKSEL_DSP |
| 38 | * CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL CM_CLKSEL2_PLL, CM_CLKSEL_MDM |
| 39 | */ |
| 40 | struct prcm_config { |
| 41 | unsigned long xtal_speed; /* crystal rate */ |
| 42 | unsigned long dpll_speed; /* dpll: out*xtal*M/(N-1)table_recalc */ |
| 43 | unsigned long mpu_speed; /* speed of MPU */ |
| 44 | unsigned long cm_clksel_mpu; /* mpu divider */ |
| 45 | unsigned long cm_clksel_dsp; /* dsp+iva1 div(2420), iva2.1(2430) */ |
| 46 | unsigned long cm_clksel_gfx; /* gfx dividers */ |
| 47 | unsigned long cm_clksel1_core; /* major subsystem dividers */ |
| 48 | unsigned long cm_clksel1_pll; /* m,n */ |
| 49 | unsigned long cm_clksel2_pll; /* dpllx1 or x2 out */ |
| 50 | unsigned long cm_clksel_mdm; /* modem dividers 2430 only */ |
| 51 | unsigned long base_sdrc_rfr; /* base refresh timing for a set */ |
| 52 | unsigned char flags; |
| 53 | }; |
| 54 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 55 | /* |
| 56 | * The OMAP2 processor can be run at several discrete 'PRCM configurations'. |
| 57 | * These configurations are characterized by voltage and speed for clocks. |
| 58 | * The device is only validated for certain combinations. One way to express |
| 59 | * these combinations is via the 'ratio's' which the clocks operate with |
| 60 | * respect to each other. These ratio sets are for a given voltage/DPLL |
| 61 | * setting. All configurations can be described by a DPLL setting and a ratio |
| 62 | * There are 3 ratio sets for the 2430 and X ratio sets for 2420. |
| 63 | * |
| 64 | * 2430 differs from 2420 in that there are no more phase synchronizers used. |
| 65 | * They both have a slightly different clock domain setup. 2420(iva1,dsp) vs |
| 66 | * 2430 (iva2.1, NOdsp, mdm) |
| 67 | */ |
| 68 | |
| 69 | /* Core fields for cm_clksel, not ratio governed */ |
| 70 | #define RX_CLKSEL_DSS1 (0x10 << 8) |
| 71 | #define RX_CLKSEL_DSS2 (0x0 << 13) |
| 72 | #define RX_CLKSEL_SSI (0x5 << 20) |
| 73 | |
| 74 | /*------------------------------------------------------------------------- |
| 75 | * Voltage/DPLL ratios |
| 76 | *-------------------------------------------------------------------------*/ |
| 77 | |
| 78 | /* 2430 Ratio's, 2430-Ratio Config 1 */ |
| 79 | #define R1_CLKSEL_L3 (4 << 0) |
| 80 | #define R1_CLKSEL_L4 (2 << 5) |
| 81 | #define R1_CLKSEL_USB (4 << 25) |
| 82 | #define R1_CM_CLKSEL1_CORE_VAL R1_CLKSEL_USB | RX_CLKSEL_SSI | \ |
| 83 | RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \ |
| 84 | R1_CLKSEL_L4 | R1_CLKSEL_L3 |
| 85 | #define R1_CLKSEL_MPU (2 << 0) |
| 86 | #define R1_CM_CLKSEL_MPU_VAL R1_CLKSEL_MPU |
| 87 | #define R1_CLKSEL_DSP (2 << 0) |
| 88 | #define R1_CLKSEL_DSP_IF (2 << 5) |
| 89 | #define R1_CM_CLKSEL_DSP_VAL R1_CLKSEL_DSP | R1_CLKSEL_DSP_IF |
| 90 | #define R1_CLKSEL_GFX (2 << 0) |
| 91 | #define R1_CM_CLKSEL_GFX_VAL R1_CLKSEL_GFX |
| 92 | #define R1_CLKSEL_MDM (4 << 0) |
| 93 | #define R1_CM_CLKSEL_MDM_VAL R1_CLKSEL_MDM |
| 94 | |
| 95 | /* 2430-Ratio Config 2 */ |
| 96 | #define R2_CLKSEL_L3 (6 << 0) |
| 97 | #define R2_CLKSEL_L4 (2 << 5) |
| 98 | #define R2_CLKSEL_USB (2 << 25) |
| 99 | #define R2_CM_CLKSEL1_CORE_VAL R2_CLKSEL_USB | RX_CLKSEL_SSI | \ |
| 100 | RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \ |
| 101 | R2_CLKSEL_L4 | R2_CLKSEL_L3 |
| 102 | #define R2_CLKSEL_MPU (2 << 0) |
| 103 | #define R2_CM_CLKSEL_MPU_VAL R2_CLKSEL_MPU |
| 104 | #define R2_CLKSEL_DSP (2 << 0) |
| 105 | #define R2_CLKSEL_DSP_IF (3 << 5) |
| 106 | #define R2_CM_CLKSEL_DSP_VAL R2_CLKSEL_DSP | R2_CLKSEL_DSP_IF |
| 107 | #define R2_CLKSEL_GFX (2 << 0) |
| 108 | #define R2_CM_CLKSEL_GFX_VAL R2_CLKSEL_GFX |
| 109 | #define R2_CLKSEL_MDM (6 << 0) |
| 110 | #define R2_CM_CLKSEL_MDM_VAL R2_CLKSEL_MDM |
| 111 | |
| 112 | /* 2430-Ratio Bootm (BYPASS) */ |
| 113 | #define RB_CLKSEL_L3 (1 << 0) |
| 114 | #define RB_CLKSEL_L4 (1 << 5) |
| 115 | #define RB_CLKSEL_USB (1 << 25) |
| 116 | #define RB_CM_CLKSEL1_CORE_VAL RB_CLKSEL_USB | RX_CLKSEL_SSI | \ |
| 117 | RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \ |
| 118 | RB_CLKSEL_L4 | RB_CLKSEL_L3 |
| 119 | #define RB_CLKSEL_MPU (1 << 0) |
| 120 | #define RB_CM_CLKSEL_MPU_VAL RB_CLKSEL_MPU |
| 121 | #define RB_CLKSEL_DSP (1 << 0) |
| 122 | #define RB_CLKSEL_DSP_IF (1 << 5) |
| 123 | #define RB_CM_CLKSEL_DSP_VAL RB_CLKSEL_DSP | RB_CLKSEL_DSP_IF |
| 124 | #define RB_CLKSEL_GFX (1 << 0) |
| 125 | #define RB_CM_CLKSEL_GFX_VAL RB_CLKSEL_GFX |
| 126 | #define RB_CLKSEL_MDM (1 << 0) |
| 127 | #define RB_CM_CLKSEL_MDM_VAL RB_CLKSEL_MDM |
| 128 | |
| 129 | /* 2420 Ratio Equivalents */ |
| 130 | #define RXX_CLKSEL_VLYNQ (0x12 << 15) |
| 131 | #define RXX_CLKSEL_SSI (0x8 << 20) |
| 132 | |
| 133 | /* 2420-PRCM III 532MHz core */ |
| 134 | #define RIII_CLKSEL_L3 (4 << 0) /* 133MHz */ |
| 135 | #define RIII_CLKSEL_L4 (2 << 5) /* 66.5MHz */ |
| 136 | #define RIII_CLKSEL_USB (4 << 25) /* 33.25MHz */ |
| 137 | #define RIII_CM_CLKSEL1_CORE_VAL RIII_CLKSEL_USB | RXX_CLKSEL_SSI | \ |
| 138 | RXX_CLKSEL_VLYNQ | RX_CLKSEL_DSS2 | \ |
| 139 | RX_CLKSEL_DSS1 | RIII_CLKSEL_L4 | \ |
| 140 | RIII_CLKSEL_L3 |
| 141 | #define RIII_CLKSEL_MPU (2 << 0) /* 266MHz */ |
| 142 | #define RIII_CM_CLKSEL_MPU_VAL RIII_CLKSEL_MPU |
| 143 | #define RIII_CLKSEL_DSP (3 << 0) /* c5x - 177.3MHz */ |
| 144 | #define RIII_CLKSEL_DSP_IF (2 << 5) /* c5x - 88.67MHz */ |
| 145 | #define RIII_SYNC_DSP (1 << 7) /* Enable sync */ |
| 146 | #define RIII_CLKSEL_IVA (6 << 8) /* iva1 - 88.67MHz */ |
| 147 | #define RIII_SYNC_IVA (1 << 13) /* Enable sync */ |
| 148 | #define RIII_CM_CLKSEL_DSP_VAL RIII_SYNC_IVA | RIII_CLKSEL_IVA | \ |
| 149 | RIII_SYNC_DSP | RIII_CLKSEL_DSP_IF | \ |
| 150 | RIII_CLKSEL_DSP |
| 151 | #define RIII_CLKSEL_GFX (2 << 0) /* 66.5MHz */ |
| 152 | #define RIII_CM_CLKSEL_GFX_VAL RIII_CLKSEL_GFX |
| 153 | |
| 154 | /* 2420-PRCM II 600MHz core */ |
| 155 | #define RII_CLKSEL_L3 (6 << 0) /* 100MHz */ |
| 156 | #define RII_CLKSEL_L4 (2 << 5) /* 50MHz */ |
| 157 | #define RII_CLKSEL_USB (2 << 25) /* 50MHz */ |
| 158 | #define RII_CM_CLKSEL1_CORE_VAL RII_CLKSEL_USB | \ |
| 159 | RXX_CLKSEL_SSI | RXX_CLKSEL_VLYNQ | \ |
| 160 | RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \ |
| 161 | RII_CLKSEL_L4 | RII_CLKSEL_L3 |
| 162 | #define RII_CLKSEL_MPU (2 << 0) /* 300MHz */ |
| 163 | #define RII_CM_CLKSEL_MPU_VAL RII_CLKSEL_MPU |
| 164 | #define RII_CLKSEL_DSP (3 << 0) /* c5x - 200MHz */ |
| 165 | #define RII_CLKSEL_DSP_IF (2 << 5) /* c5x - 100MHz */ |
| 166 | #define RII_SYNC_DSP (0 << 7) /* Bypass sync */ |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 167 | #define RII_CLKSEL_IVA (3 << 8) /* iva1 - 200MHz */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 168 | #define RII_SYNC_IVA (0 << 13) /* Bypass sync */ |
| 169 | #define RII_CM_CLKSEL_DSP_VAL RII_SYNC_IVA | RII_CLKSEL_IVA | \ |
| 170 | RII_SYNC_DSP | RII_CLKSEL_DSP_IF | \ |
| 171 | RII_CLKSEL_DSP |
| 172 | #define RII_CLKSEL_GFX (2 << 0) /* 50MHz */ |
| 173 | #define RII_CM_CLKSEL_GFX_VAL RII_CLKSEL_GFX |
| 174 | |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 175 | /* 2420-PRCM I 660MHz core */ |
| 176 | #define RI_CLKSEL_L3 (4 << 0) /* 165MHz */ |
| 177 | #define RI_CLKSEL_L4 (2 << 5) /* 82.5MHz */ |
| 178 | #define RI_CLKSEL_USB (4 << 25) /* 41.25MHz */ |
| 179 | #define RI_CM_CLKSEL1_CORE_VAL RI_CLKSEL_USB | \ |
| 180 | RXX_CLKSEL_SSI | RXX_CLKSEL_VLYNQ | \ |
| 181 | RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \ |
| 182 | RI_CLKSEL_L4 | RI_CLKSEL_L3 |
| 183 | #define RI_CLKSEL_MPU (2 << 0) /* 330MHz */ |
| 184 | #define RI_CM_CLKSEL_MPU_VAL RI_CLKSEL_MPU |
| 185 | #define RI_CLKSEL_DSP (3 << 0) /* c5x - 220MHz */ |
| 186 | #define RI_CLKSEL_DSP_IF (2 << 5) /* c5x - 110MHz */ |
| 187 | #define RI_SYNC_DSP (1 << 7) /* Activate sync */ |
| 188 | #define RI_CLKSEL_IVA (4 << 8) /* iva1 - 165MHz */ |
| 189 | #define RI_SYNC_IVA (0 << 13) /* Bypass sync */ |
| 190 | #define RI_CM_CLKSEL_DSP_VAL RI_SYNC_IVA | RI_CLKSEL_IVA | \ |
| 191 | RI_SYNC_DSP | RI_CLKSEL_DSP_IF | \ |
| 192 | RI_CLKSEL_DSP |
| 193 | #define RI_CLKSEL_GFX (1 << 0) /* 165MHz */ |
| 194 | #define RI_CM_CLKSEL_GFX_VAL RI_CLKSEL_GFX |
| 195 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 196 | /* 2420-PRCM VII (boot) */ |
| 197 | #define RVII_CLKSEL_L3 (1 << 0) |
| 198 | #define RVII_CLKSEL_L4 (1 << 5) |
| 199 | #define RVII_CLKSEL_DSS1 (1 << 8) |
| 200 | #define RVII_CLKSEL_DSS2 (0 << 13) |
| 201 | #define RVII_CLKSEL_VLYNQ (1 << 15) |
| 202 | #define RVII_CLKSEL_SSI (1 << 20) |
| 203 | #define RVII_CLKSEL_USB (1 << 25) |
| 204 | |
| 205 | #define RVII_CM_CLKSEL1_CORE_VAL RVII_CLKSEL_USB | RVII_CLKSEL_SSI | \ |
| 206 | RVII_CLKSEL_VLYNQ | RVII_CLKSEL_DSS2 | \ |
| 207 | RVII_CLKSEL_DSS1 | RVII_CLKSEL_L4 | RVII_CLKSEL_L3 |
| 208 | |
| 209 | #define RVII_CLKSEL_MPU (1 << 0) /* all divide by 1 */ |
| 210 | #define RVII_CM_CLKSEL_MPU_VAL RVII_CLKSEL_MPU |
| 211 | |
| 212 | #define RVII_CLKSEL_DSP (1 << 0) |
| 213 | #define RVII_CLKSEL_DSP_IF (1 << 5) |
| 214 | #define RVII_SYNC_DSP (0 << 7) |
| 215 | #define RVII_CLKSEL_IVA (1 << 8) |
| 216 | #define RVII_SYNC_IVA (0 << 13) |
| 217 | #define RVII_CM_CLKSEL_DSP_VAL RVII_SYNC_IVA | RVII_CLKSEL_IVA | RVII_SYNC_DSP | \ |
| 218 | RVII_CLKSEL_DSP_IF | RVII_CLKSEL_DSP |
| 219 | |
| 220 | #define RVII_CLKSEL_GFX (1 << 0) |
| 221 | #define RVII_CM_CLKSEL_GFX_VAL RVII_CLKSEL_GFX |
| 222 | |
| 223 | /*------------------------------------------------------------------------- |
| 224 | * 2430 Target modes: Along with each configuration the CPU has several |
| 225 | * modes which goes along with them. Modes mainly are the addition of |
| 226 | * describe DPLL combinations to go along with a ratio. |
| 227 | *-------------------------------------------------------------------------*/ |
| 228 | |
| 229 | /* Hardware governed */ |
| 230 | #define MX_48M_SRC (0 << 3) |
| 231 | #define MX_54M_SRC (0 << 5) |
| 232 | #define MX_APLLS_CLIKIN_12 (3 << 23) |
| 233 | #define MX_APLLS_CLIKIN_13 (2 << 23) |
| 234 | #define MX_APLLS_CLIKIN_19_2 (0 << 23) |
| 235 | |
| 236 | /* |
| 237 | * 2430 - standalone, 2*ref*M/(n+1), M/N is for exactness not relock speed |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 238 | * #5a (ratio1) baseport-target, target DPLL = 266*2 = 532MHz |
| 239 | */ |
| 240 | #define M5A_DPLL_MULT_12 (133 << 12) |
| 241 | #define M5A_DPLL_DIV_12 (5 << 8) |
| 242 | #define M5A_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \ |
| 243 | M5A_DPLL_DIV_12 | M5A_DPLL_MULT_12 | \ |
| 244 | MX_APLLS_CLIKIN_12 |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 245 | #define M5A_DPLL_MULT_13 (61 << 12) |
| 246 | #define M5A_DPLL_DIV_13 (2 << 8) |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 247 | #define M5A_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \ |
| 248 | M5A_DPLL_DIV_13 | M5A_DPLL_MULT_13 | \ |
| 249 | MX_APLLS_CLIKIN_13 |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 250 | #define M5A_DPLL_MULT_19 (55 << 12) |
| 251 | #define M5A_DPLL_DIV_19 (3 << 8) |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 252 | #define M5A_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \ |
| 253 | M5A_DPLL_DIV_19 | M5A_DPLL_MULT_19 | \ |
| 254 | MX_APLLS_CLIKIN_19_2 |
| 255 | /* #5b (ratio1) target DPLL = 200*2 = 400MHz */ |
| 256 | #define M5B_DPLL_MULT_12 (50 << 12) |
| 257 | #define M5B_DPLL_DIV_12 (2 << 8) |
| 258 | #define M5B_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \ |
| 259 | M5B_DPLL_DIV_12 | M5B_DPLL_MULT_12 | \ |
| 260 | MX_APLLS_CLIKIN_12 |
| 261 | #define M5B_DPLL_MULT_13 (200 << 12) |
| 262 | #define M5B_DPLL_DIV_13 (12 << 8) |
| 263 | |
| 264 | #define M5B_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \ |
| 265 | M5B_DPLL_DIV_13 | M5B_DPLL_MULT_13 | \ |
| 266 | MX_APLLS_CLIKIN_13 |
| 267 | #define M5B_DPLL_MULT_19 (125 << 12) |
| 268 | #define M5B_DPLL_DIV_19 (31 << 8) |
| 269 | #define M5B_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \ |
| 270 | M5B_DPLL_DIV_19 | M5B_DPLL_MULT_19 | \ |
| 271 | MX_APLLS_CLIKIN_19_2 |
| 272 | /* |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 273 | * #4 (ratio2), DPLL = 399*2 = 798MHz, L3=133MHz |
| 274 | */ |
| 275 | #define M4_DPLL_MULT_12 (133 << 12) |
| 276 | #define M4_DPLL_DIV_12 (3 << 8) |
| 277 | #define M4_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \ |
| 278 | M4_DPLL_DIV_12 | M4_DPLL_MULT_12 | \ |
| 279 | MX_APLLS_CLIKIN_12 |
| 280 | |
| 281 | #define M4_DPLL_MULT_13 (399 << 12) |
| 282 | #define M4_DPLL_DIV_13 (12 << 8) |
| 283 | #define M4_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \ |
| 284 | M4_DPLL_DIV_13 | M4_DPLL_MULT_13 | \ |
| 285 | MX_APLLS_CLIKIN_13 |
| 286 | |
| 287 | #define M4_DPLL_MULT_19 (145 << 12) |
| 288 | #define M4_DPLL_DIV_19 (6 << 8) |
| 289 | #define M4_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \ |
| 290 | M4_DPLL_DIV_19 | M4_DPLL_MULT_19 | \ |
| 291 | MX_APLLS_CLIKIN_19_2 |
| 292 | |
| 293 | /* |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 294 | * #3 (ratio2) baseport-target, target DPLL = 330*2 = 660MHz |
| 295 | */ |
| 296 | #define M3_DPLL_MULT_12 (55 << 12) |
| 297 | #define M3_DPLL_DIV_12 (1 << 8) |
| 298 | #define M3_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \ |
| 299 | M3_DPLL_DIV_12 | M3_DPLL_MULT_12 | \ |
| 300 | MX_APLLS_CLIKIN_12 |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 301 | #define M3_DPLL_MULT_13 (76 << 12) |
| 302 | #define M3_DPLL_DIV_13 (2 << 8) |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 303 | #define M3_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \ |
| 304 | M3_DPLL_DIV_13 | M3_DPLL_MULT_13 | \ |
| 305 | MX_APLLS_CLIKIN_13 |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 306 | #define M3_DPLL_MULT_19 (17 << 12) |
| 307 | #define M3_DPLL_DIV_19 (0 << 8) |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 308 | #define M3_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \ |
| 309 | M3_DPLL_DIV_19 | M3_DPLL_MULT_19 | \ |
| 310 | MX_APLLS_CLIKIN_19_2 |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 311 | |
| 312 | /* |
| 313 | * #2 (ratio1) DPLL = 330*2 = 660MHz, L3=165MHz |
| 314 | */ |
| 315 | #define M2_DPLL_MULT_12 (55 << 12) |
| 316 | #define M2_DPLL_DIV_12 (1 << 8) |
| 317 | #define M2_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \ |
| 318 | M2_DPLL_DIV_12 | M2_DPLL_MULT_12 | \ |
| 319 | MX_APLLS_CLIKIN_12 |
| 320 | |
| 321 | /* Speed changes - Used 658.7MHz instead of 660MHz for LP-Refresh M=76 N=2, |
| 322 | * relock time issue */ |
| 323 | /* Core frequency changed from 330/165 to 329/164 MHz*/ |
| 324 | #define M2_DPLL_MULT_13 (76 << 12) |
| 325 | #define M2_DPLL_DIV_13 (2 << 8) |
| 326 | #define M2_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \ |
| 327 | M2_DPLL_DIV_13 | M2_DPLL_MULT_13 | \ |
| 328 | MX_APLLS_CLIKIN_13 |
| 329 | |
| 330 | #define M2_DPLL_MULT_19 (17 << 12) |
| 331 | #define M2_DPLL_DIV_19 (0 << 8) |
| 332 | #define M2_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \ |
| 333 | M2_DPLL_DIV_19 | M2_DPLL_MULT_19 | \ |
| 334 | MX_APLLS_CLIKIN_19_2 |
| 335 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 336 | /* boot (boot) */ |
| 337 | #define MB_DPLL_MULT (1 << 12) |
| 338 | #define MB_DPLL_DIV (0 << 8) |
| 339 | #define MB_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | MB_DPLL_DIV |\ |
| 340 | MB_DPLL_MULT | MX_APLLS_CLIKIN_12 |
| 341 | |
| 342 | #define MB_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | MB_DPLL_DIV |\ |
| 343 | MB_DPLL_MULT | MX_APLLS_CLIKIN_13 |
| 344 | |
| 345 | #define MB_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | MB_DPLL_DIV |\ |
| 346 | MB_DPLL_MULT | MX_APLLS_CLIKIN_19 |
| 347 | |
| 348 | /* |
| 349 | * 2430 - chassis (sedna) |
| 350 | * 165 (ratio1) same as above #2 |
| 351 | * 150 (ratio1) |
| 352 | * 133 (ratio2) same as above #4 |
| 353 | * 110 (ratio2) same as above #3 |
| 354 | * 104 (ratio2) |
| 355 | * boot (boot) |
| 356 | */ |
| 357 | |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 358 | /* PRCM I target DPLL = 2*330MHz = 660MHz */ |
| 359 | #define MI_DPLL_MULT_12 (55 << 12) |
| 360 | #define MI_DPLL_DIV_12 (1 << 8) |
| 361 | #define MI_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \ |
| 362 | MI_DPLL_DIV_12 | MI_DPLL_MULT_12 | \ |
| 363 | MX_APLLS_CLIKIN_12 |
| 364 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 365 | /* |
| 366 | * 2420 Equivalent - mode registers |
| 367 | * PRCM II , target DPLL = 2*300MHz = 600MHz |
| 368 | */ |
| 369 | #define MII_DPLL_MULT_12 (50 << 12) |
| 370 | #define MII_DPLL_DIV_12 (1 << 8) |
| 371 | #define MII_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \ |
| 372 | MII_DPLL_DIV_12 | MII_DPLL_MULT_12 | \ |
| 373 | MX_APLLS_CLIKIN_12 |
| 374 | #define MII_DPLL_MULT_13 (300 << 12) |
| 375 | #define MII_DPLL_DIV_13 (12 << 8) |
| 376 | #define MII_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \ |
| 377 | MII_DPLL_DIV_13 | MII_DPLL_MULT_13 | \ |
| 378 | MX_APLLS_CLIKIN_13 |
| 379 | |
| 380 | /* PRCM III target DPLL = 2*266 = 532MHz*/ |
| 381 | #define MIII_DPLL_MULT_12 (133 << 12) |
| 382 | #define MIII_DPLL_DIV_12 (5 << 8) |
| 383 | #define MIII_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \ |
| 384 | MIII_DPLL_DIV_12 | MIII_DPLL_MULT_12 | \ |
| 385 | MX_APLLS_CLIKIN_12 |
| 386 | #define MIII_DPLL_MULT_13 (266 << 12) |
| 387 | #define MIII_DPLL_DIV_13 (12 << 8) |
| 388 | #define MIII_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \ |
| 389 | MIII_DPLL_DIV_13 | MIII_DPLL_MULT_13 | \ |
| 390 | MX_APLLS_CLIKIN_13 |
| 391 | |
| 392 | /* PRCM VII (boot bypass) */ |
| 393 | #define MVII_CM_CLKSEL1_PLL_12_VAL MB_CM_CLKSEL1_PLL_12_VAL |
| 394 | #define MVII_CM_CLKSEL1_PLL_13_VAL MB_CM_CLKSEL1_PLL_13_VAL |
| 395 | |
| 396 | /* High and low operation value */ |
| 397 | #define MX_CLKSEL2_PLL_2x_VAL (2 << 0) |
| 398 | #define MX_CLKSEL2_PLL_1x_VAL (1 << 0) |
| 399 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 400 | /* MPU speed defines */ |
| 401 | #define S12M 12000000 |
| 402 | #define S13M 13000000 |
| 403 | #define S19M 19200000 |
| 404 | #define S26M 26000000 |
| 405 | #define S100M 100000000 |
| 406 | #define S133M 133000000 |
| 407 | #define S150M 150000000 |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 408 | #define S164M 164000000 |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 409 | #define S165M 165000000 |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 410 | #define S199M 199000000 |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 411 | #define S200M 200000000 |
| 412 | #define S266M 266000000 |
| 413 | #define S300M 300000000 |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 414 | #define S329M 329000000 |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 415 | #define S330M 330000000 |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 416 | #define S399M 399000000 |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 417 | #define S400M 400000000 |
| 418 | #define S532M 532000000 |
| 419 | #define S600M 600000000 |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 420 | #define S658M 658000000 |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 421 | #define S660M 660000000 |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 422 | #define S798M 798000000 |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 423 | |
| 424 | /*------------------------------------------------------------------------- |
| 425 | * Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated. |
| 426 | * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU, |
| 427 | * CM_CLKSEL_DSP, CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL, |
| 428 | * CM_CLKSEL2_PLL, CM_CLKSEL_MDM |
| 429 | * |
| 430 | * Filling in table based on H4 boards and 2430-SDPs variants available. |
| 431 | * There are quite a few more rates combinations which could be defined. |
| 432 | * |
Simon Arlott | 6cbdc8c | 2007-05-11 20:40:30 +0100 | [diff] [blame] | 433 | * When multiple values are defined the start up will try and choose the |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 434 | * fastest one. If a 'fast' value is defined, then automatically, the /2 |
| 435 | * one should be included as it can be used. Generally having more that |
| 436 | * one fast set does not make sense, as static timings need to be changed |
| 437 | * to change the set. The exception is the bypass setting which is |
| 438 | * availble for low power bypass. |
| 439 | * |
| 440 | * Note: This table needs to be sorted, fastest to slowest. |
| 441 | *-------------------------------------------------------------------------*/ |
| 442 | static struct prcm_config rate_table[] = { |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 443 | /* PRCM I - FAST */ |
| 444 | {S12M, S660M, S330M, RI_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */ |
| 445 | RI_CM_CLKSEL_DSP_VAL, RI_CM_CLKSEL_GFX_VAL, |
| 446 | RI_CM_CLKSEL1_CORE_VAL, MI_CM_CLKSEL1_PLL_12_VAL, |
| 447 | MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_165MHz, |
| 448 | RATE_IN_242X}, |
| 449 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 450 | /* PRCM II - FAST */ |
| 451 | {S12M, S600M, S300M, RII_CM_CLKSEL_MPU_VAL, /* 300MHz ARM */ |
| 452 | RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL, |
| 453 | RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_12_VAL, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 454 | MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 455 | RATE_IN_242X}, |
| 456 | |
| 457 | {S13M, S600M, S300M, RII_CM_CLKSEL_MPU_VAL, /* 300MHz ARM */ |
| 458 | RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL, |
| 459 | RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_13_VAL, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 460 | MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 461 | RATE_IN_242X}, |
| 462 | |
| 463 | /* PRCM III - FAST */ |
| 464 | {S12M, S532M, S266M, RIII_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */ |
| 465 | RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL, |
| 466 | RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_12_VAL, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 467 | MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 468 | RATE_IN_242X}, |
| 469 | |
| 470 | {S13M, S532M, S266M, RIII_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */ |
| 471 | RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL, |
| 472 | RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_13_VAL, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 473 | MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 474 | RATE_IN_242X}, |
| 475 | |
| 476 | /* PRCM II - SLOW */ |
| 477 | {S12M, S300M, S150M, RII_CM_CLKSEL_MPU_VAL, /* 150MHz ARM */ |
| 478 | RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL, |
| 479 | RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_12_VAL, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 480 | MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 481 | RATE_IN_242X}, |
| 482 | |
| 483 | {S13M, S300M, S150M, RII_CM_CLKSEL_MPU_VAL, /* 150MHz ARM */ |
| 484 | RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL, |
| 485 | RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_13_VAL, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 486 | MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 487 | RATE_IN_242X}, |
| 488 | |
| 489 | /* PRCM III - SLOW */ |
| 490 | {S12M, S266M, S133M, RIII_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */ |
| 491 | RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL, |
| 492 | RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_12_VAL, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 493 | MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 494 | RATE_IN_242X}, |
| 495 | |
| 496 | {S13M, S266M, S133M, RIII_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */ |
| 497 | RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL, |
| 498 | RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_13_VAL, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 499 | MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 500 | RATE_IN_242X}, |
| 501 | |
| 502 | /* PRCM-VII (boot-bypass) */ |
| 503 | {S12M, S12M, S12M, RVII_CM_CLKSEL_MPU_VAL, /* 12MHz ARM*/ |
| 504 | RVII_CM_CLKSEL_DSP_VAL, RVII_CM_CLKSEL_GFX_VAL, |
| 505 | RVII_CM_CLKSEL1_CORE_VAL, MVII_CM_CLKSEL1_PLL_12_VAL, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 506 | MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_BYPASS, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 507 | RATE_IN_242X}, |
| 508 | |
| 509 | /* PRCM-VII (boot-bypass) */ |
| 510 | {S13M, S13M, S13M, RVII_CM_CLKSEL_MPU_VAL, /* 13MHz ARM */ |
| 511 | RVII_CM_CLKSEL_DSP_VAL, RVII_CM_CLKSEL_GFX_VAL, |
| 512 | RVII_CM_CLKSEL1_CORE_VAL, MVII_CM_CLKSEL1_PLL_13_VAL, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 513 | MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_BYPASS, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 514 | RATE_IN_242X}, |
| 515 | |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 516 | /* PRCM #4 - ratio2 (ES2.1) - FAST */ |
| 517 | {S13M, S798M, S399M, R2_CM_CLKSEL_MPU_VAL, /* 399MHz ARM */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 518 | R2_CM_CLKSEL_DSP_VAL, R2_CM_CLKSEL_GFX_VAL, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 519 | R2_CM_CLKSEL1_CORE_VAL, M4_CM_CLKSEL1_PLL_13_VAL, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 520 | MX_CLKSEL2_PLL_2x_VAL, R2_CM_CLKSEL_MDM_VAL, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 521 | SDRC_RFR_CTRL_133MHz, |
| 522 | RATE_IN_243X}, |
| 523 | |
| 524 | /* PRCM #2 - ratio1 (ES2) - FAST */ |
| 525 | {S13M, S658M, S329M, R1_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */ |
| 526 | R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL, |
| 527 | R1_CM_CLKSEL1_CORE_VAL, M2_CM_CLKSEL1_PLL_13_VAL, |
| 528 | MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL, |
| 529 | SDRC_RFR_CTRL_165MHz, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 530 | RATE_IN_243X}, |
| 531 | |
| 532 | /* PRCM #5a - ratio1 - FAST */ |
| 533 | {S13M, S532M, S266M, R1_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */ |
| 534 | R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL, |
| 535 | R1_CM_CLKSEL1_CORE_VAL, M5A_CM_CLKSEL1_PLL_13_VAL, |
| 536 | MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 537 | SDRC_RFR_CTRL_133MHz, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 538 | RATE_IN_243X}, |
| 539 | |
| 540 | /* PRCM #5b - ratio1 - FAST */ |
| 541 | {S13M, S400M, S200M, R1_CM_CLKSEL_MPU_VAL, /* 200MHz ARM */ |
| 542 | R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL, |
| 543 | R1_CM_CLKSEL1_CORE_VAL, M5B_CM_CLKSEL1_PLL_13_VAL, |
| 544 | MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 545 | SDRC_RFR_CTRL_100MHz, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 546 | RATE_IN_243X}, |
| 547 | |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 548 | /* PRCM #4 - ratio1 (ES2.1) - SLOW */ |
| 549 | {S13M, S399M, S199M, R2_CM_CLKSEL_MPU_VAL, /* 200MHz ARM */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 550 | R2_CM_CLKSEL_DSP_VAL, R2_CM_CLKSEL_GFX_VAL, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 551 | R2_CM_CLKSEL1_CORE_VAL, M4_CM_CLKSEL1_PLL_13_VAL, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 552 | MX_CLKSEL2_PLL_1x_VAL, R2_CM_CLKSEL_MDM_VAL, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 553 | SDRC_RFR_CTRL_133MHz, |
| 554 | RATE_IN_243X}, |
| 555 | |
| 556 | /* PRCM #2 - ratio1 (ES2) - SLOW */ |
| 557 | {S13M, S329M, S164M, R1_CM_CLKSEL_MPU_VAL, /* 165MHz ARM */ |
| 558 | R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL, |
| 559 | R1_CM_CLKSEL1_CORE_VAL, M2_CM_CLKSEL1_PLL_13_VAL, |
| 560 | MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL, |
| 561 | SDRC_RFR_CTRL_165MHz, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 562 | RATE_IN_243X}, |
| 563 | |
| 564 | /* PRCM #5a - ratio1 - SLOW */ |
| 565 | {S13M, S266M, S133M, R1_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */ |
| 566 | R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL, |
| 567 | R1_CM_CLKSEL1_CORE_VAL, M5A_CM_CLKSEL1_PLL_13_VAL, |
| 568 | MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 569 | SDRC_RFR_CTRL_133MHz, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 570 | RATE_IN_243X}, |
| 571 | |
| 572 | /* PRCM #5b - ratio1 - SLOW*/ |
| 573 | {S13M, S200M, S100M, R1_CM_CLKSEL_MPU_VAL, /* 100MHz ARM */ |
| 574 | R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL, |
| 575 | R1_CM_CLKSEL1_CORE_VAL, M5B_CM_CLKSEL1_PLL_13_VAL, |
| 576 | MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 577 | SDRC_RFR_CTRL_100MHz, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 578 | RATE_IN_243X}, |
| 579 | |
| 580 | /* PRCM-boot/bypass */ |
| 581 | {S13M, S13M, S13M, RB_CM_CLKSEL_MPU_VAL, /* 13Mhz */ |
| 582 | RB_CM_CLKSEL_DSP_VAL, RB_CM_CLKSEL_GFX_VAL, |
| 583 | RB_CM_CLKSEL1_CORE_VAL, MB_CM_CLKSEL1_PLL_13_VAL, |
| 584 | MX_CLKSEL2_PLL_2x_VAL, RB_CM_CLKSEL_MDM_VAL, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 585 | SDRC_RFR_CTRL_BYPASS, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 586 | RATE_IN_243X}, |
| 587 | |
| 588 | /* PRCM-boot/bypass */ |
| 589 | {S12M, S12M, S12M, RB_CM_CLKSEL_MPU_VAL, /* 12Mhz */ |
| 590 | RB_CM_CLKSEL_DSP_VAL, RB_CM_CLKSEL_GFX_VAL, |
| 591 | RB_CM_CLKSEL1_CORE_VAL, MB_CM_CLKSEL1_PLL_12_VAL, |
| 592 | MX_CLKSEL2_PLL_2x_VAL, RB_CM_CLKSEL_MDM_VAL, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 593 | SDRC_RFR_CTRL_BYPASS, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 594 | RATE_IN_243X}, |
| 595 | |
| 596 | { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
| 597 | }; |
| 598 | |
| 599 | /*------------------------------------------------------------------------- |
| 600 | * 24xx clock tree. |
| 601 | * |
| 602 | * NOTE:In many cases here we are assigning a 'default' parent. In many |
| 603 | * cases the parent is selectable. The get/set parent calls will also |
| 604 | * switch sources. |
| 605 | * |
| 606 | * Many some clocks say always_enabled, but they can be auto idled for |
| 607 | * power savings. They will always be available upon clock request. |
| 608 | * |
| 609 | * Several sources are given initial rates which may be wrong, this will |
| 610 | * be fixed up in the init func. |
| 611 | * |
| 612 | * Things are broadly separated below by clock domains. It is |
| 613 | * noteworthy that most periferals have dependencies on multiple clock |
| 614 | * domains. Many get their interface clocks from the L4 domain, but get |
| 615 | * functional clocks from fixed sources or other core domain derived |
| 616 | * clocks. |
| 617 | *-------------------------------------------------------------------------*/ |
| 618 | |
| 619 | /* Base external input clocks */ |
| 620 | static struct clk func_32k_ck = { |
| 621 | .name = "func_32k_ck", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 622 | .ops = &clkops_null, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 623 | .rate = 32000, |
| 624 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 625 | RATE_FIXED | RATE_PROPAGATES, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 626 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 627 | .recalc = &propagate_rate, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 628 | }; |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 629 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 630 | /* Typical 12/13MHz in standalone mode, will be 26Mhz in chassis mode */ |
| 631 | static struct clk osc_ck = { /* (*12, *13, 19.2, *26, 38.4)MHz */ |
| 632 | .name = "osc_ck", |
Russell King | 548d849 | 2008-11-04 14:02:46 +0000 | [diff] [blame] | 633 | .ops = &clkops_oscck, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 634 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 635 | RATE_PROPAGATES, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 636 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 637 | .recalc = &omap2_osc_clk_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 638 | }; |
| 639 | |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 640 | /* Without modem likely 12MHz, with modem likely 13MHz */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 641 | static struct clk sys_ck = { /* (*12, *13, 19.2, 26, 38.4)MHz */ |
| 642 | .name = "sys_ck", /* ~ ref_clk also */ |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 643 | .ops = &clkops_null, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 644 | .parent = &osc_ck, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 645 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 646 | RATE_PROPAGATES, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 647 | .clkdm_name = "wkup_clkdm", |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 648 | .recalc = &omap2_sys_clk_recalc, |
| 649 | }; |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 650 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 651 | static struct clk alt_ck = { /* Typical 54M or 48M, may not exist */ |
| 652 | .name = "alt_ck", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 653 | .ops = &clkops_null, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 654 | .rate = 54000000, |
| 655 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 656 | RATE_FIXED | RATE_PROPAGATES, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 657 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 658 | .recalc = &propagate_rate, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 659 | }; |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 660 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 661 | /* |
| 662 | * Analog domain root source clocks |
| 663 | */ |
| 664 | |
| 665 | /* dpll_ck, is broken out in to special cases through clksel */ |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 666 | /* REVISIT: Rate changes on dpll_ck trigger a full set change. ... |
| 667 | * deal with this |
| 668 | */ |
| 669 | |
Paul Walmsley | 88b8ba9 | 2008-07-03 12:24:46 +0300 | [diff] [blame] | 670 | static struct dpll_data dpll_dd = { |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 671 | .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), |
| 672 | .mult_mask = OMAP24XX_DPLL_MULT_MASK, |
| 673 | .div1_mask = OMAP24XX_DPLL_DIV_MASK, |
Paul Walmsley | 88b8ba9 | 2008-07-03 12:24:46 +0300 | [diff] [blame] | 674 | .max_multiplier = 1024, |
| 675 | .max_divider = 16, |
| 676 | .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 677 | }; |
| 678 | |
Paul Walmsley | 88b8ba9 | 2008-07-03 12:24:46 +0300 | [diff] [blame] | 679 | /* |
| 680 | * XXX Cannot add round_rate here yet, as this is still a composite clock, |
| 681 | * not just a DPLL |
| 682 | */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 683 | static struct clk dpll_ck = { |
| 684 | .name = "dpll_ck", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 685 | .ops = &clkops_null, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 686 | .parent = &sys_ck, /* Can be func_32k also */ |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 687 | .dpll_data = &dpll_dd, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 688 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 689 | RATE_PROPAGATES, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 690 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | 88b8ba9 | 2008-07-03 12:24:46 +0300 | [diff] [blame] | 691 | .recalc = &omap2_dpllcore_recalc, |
| 692 | .set_rate = &omap2_reprogram_dpllcore, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 693 | }; |
| 694 | |
| 695 | static struct clk apll96_ck = { |
| 696 | .name = "apll96_ck", |
Russell King | 548d849 | 2008-11-04 14:02:46 +0000 | [diff] [blame] | 697 | .ops = &clkops_fixed, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 698 | .parent = &sys_ck, |
| 699 | .rate = 96000000, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 700 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
| 701 | RATE_FIXED | RATE_PROPAGATES | ENABLE_ON_INIT, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 702 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 703 | .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), |
| 704 | .enable_bit = OMAP24XX_EN_96M_PLL_SHIFT, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 705 | .recalc = &propagate_rate, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 706 | }; |
| 707 | |
| 708 | static struct clk apll54_ck = { |
| 709 | .name = "apll54_ck", |
Russell King | 548d849 | 2008-11-04 14:02:46 +0000 | [diff] [blame] | 710 | .ops = &clkops_fixed, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 711 | .parent = &sys_ck, |
| 712 | .rate = 54000000, |
| 713 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 714 | RATE_FIXED | RATE_PROPAGATES | ENABLE_ON_INIT, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 715 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 716 | .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), |
| 717 | .enable_bit = OMAP24XX_EN_54M_PLL_SHIFT, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 718 | .recalc = &propagate_rate, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 719 | }; |
| 720 | |
| 721 | /* |
| 722 | * PRCM digital base sources |
| 723 | */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 724 | |
| 725 | /* func_54m_ck */ |
| 726 | |
| 727 | static const struct clksel_rate func_54m_apll54_rates[] = { |
| 728 | { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 729 | { .div = 0 }, |
| 730 | }; |
| 731 | |
| 732 | static const struct clksel_rate func_54m_alt_rates[] = { |
| 733 | { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 734 | { .div = 0 }, |
| 735 | }; |
| 736 | |
| 737 | static const struct clksel func_54m_clksel[] = { |
| 738 | { .parent = &apll54_ck, .rates = func_54m_apll54_rates, }, |
| 739 | { .parent = &alt_ck, .rates = func_54m_alt_rates, }, |
| 740 | { .parent = NULL }, |
| 741 | }; |
| 742 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 743 | static struct clk func_54m_ck = { |
| 744 | .name = "func_54m_ck", |
| 745 | .parent = &apll54_ck, /* can also be alt_clk */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 746 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 747 | RATE_PROPAGATES | PARENT_CONTROLS_CLOCK, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 748 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 749 | .init = &omap2_init_clksel_parent, |
| 750 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), |
| 751 | .clksel_mask = OMAP24XX_54M_SOURCE, |
| 752 | .clksel = func_54m_clksel, |
| 753 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 754 | }; |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 755 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 756 | static struct clk core_ck = { |
| 757 | .name = "core_ck", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 758 | .ops = &clkops_null, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 759 | .parent = &dpll_ck, /* can also be 32k */ |
| 760 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 761 | RATE_PROPAGATES, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 762 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 763 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 764 | }; |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 765 | |
| 766 | /* func_96m_ck */ |
| 767 | static const struct clksel_rate func_96m_apll96_rates[] = { |
| 768 | { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 769 | { .div = 0 }, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 770 | }; |
| 771 | |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 772 | static const struct clksel_rate func_96m_alt_rates[] = { |
| 773 | { .div = 1, .val = 1, .flags = RATE_IN_243X | DEFAULT_RATE }, |
| 774 | { .div = 0 }, |
| 775 | }; |
| 776 | |
| 777 | static const struct clksel func_96m_clksel[] = { |
| 778 | { .parent = &apll96_ck, .rates = func_96m_apll96_rates }, |
| 779 | { .parent = &alt_ck, .rates = func_96m_alt_rates }, |
| 780 | { .parent = NULL } |
| 781 | }; |
| 782 | |
| 783 | /* The parent of this clock is not selectable on 2420. */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 784 | static struct clk func_96m_ck = { |
| 785 | .name = "func_96m_ck", |
| 786 | .parent = &apll96_ck, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 787 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 788 | RATE_PROPAGATES | PARENT_CONTROLS_CLOCK, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 789 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 790 | .init = &omap2_init_clksel_parent, |
| 791 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), |
| 792 | .clksel_mask = OMAP2430_96M_SOURCE, |
| 793 | .clksel = func_96m_clksel, |
| 794 | .recalc = &omap2_clksel_recalc, |
| 795 | .round_rate = &omap2_clksel_round_rate, |
| 796 | .set_rate = &omap2_clksel_set_rate |
| 797 | }; |
| 798 | |
| 799 | /* func_48m_ck */ |
| 800 | |
| 801 | static const struct clksel_rate func_48m_apll96_rates[] = { |
| 802 | { .div = 2, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 803 | { .div = 0 }, |
| 804 | }; |
| 805 | |
| 806 | static const struct clksel_rate func_48m_alt_rates[] = { |
| 807 | { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 808 | { .div = 0 }, |
| 809 | }; |
| 810 | |
| 811 | static const struct clksel func_48m_clksel[] = { |
| 812 | { .parent = &apll96_ck, .rates = func_48m_apll96_rates }, |
| 813 | { .parent = &alt_ck, .rates = func_48m_alt_rates }, |
| 814 | { .parent = NULL } |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 815 | }; |
| 816 | |
| 817 | static struct clk func_48m_ck = { |
| 818 | .name = "func_48m_ck", |
| 819 | .parent = &apll96_ck, /* 96M or Alt */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 820 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 821 | RATE_PROPAGATES | PARENT_CONTROLS_CLOCK, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 822 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 823 | .init = &omap2_init_clksel_parent, |
| 824 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), |
| 825 | .clksel_mask = OMAP24XX_48M_SOURCE, |
| 826 | .clksel = func_48m_clksel, |
| 827 | .recalc = &omap2_clksel_recalc, |
| 828 | .round_rate = &omap2_clksel_round_rate, |
| 829 | .set_rate = &omap2_clksel_set_rate |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 830 | }; |
| 831 | |
| 832 | static struct clk func_12m_ck = { |
| 833 | .name = "func_12m_ck", |
| 834 | .parent = &func_48m_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 835 | .fixed_div = 4, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 836 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 837 | RATE_PROPAGATES | PARENT_CONTROLS_CLOCK, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 838 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 839 | .recalc = &omap2_fixed_divisor_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 840 | }; |
| 841 | |
| 842 | /* Secure timer, only available in secure mode */ |
| 843 | static struct clk wdt1_osc_ck = { |
| 844 | .name = "ck_wdt1_osc", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 845 | .ops = &clkops_null, /* RMK: missing? */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 846 | .parent = &osc_ck, |
| 847 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 848 | .recalc = &followparent_recalc, |
| 849 | }; |
| 850 | |
| 851 | /* |
| 852 | * The common_clkout* clksel_rate structs are common to |
| 853 | * sys_clkout, sys_clkout_src, sys_clkout2, and sys_clkout2_src. |
| 854 | * sys_clkout2_* are 2420-only, so the |
| 855 | * clksel_rate flags fields are inaccurate for those clocks. This is |
| 856 | * harmless since access to those clocks are gated by the struct clk |
| 857 | * flags fields, which mark them as 2420-only. |
| 858 | */ |
| 859 | static const struct clksel_rate common_clkout_src_core_rates[] = { |
| 860 | { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 861 | { .div = 0 } |
| 862 | }; |
| 863 | |
| 864 | static const struct clksel_rate common_clkout_src_sys_rates[] = { |
| 865 | { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 866 | { .div = 0 } |
| 867 | }; |
| 868 | |
| 869 | static const struct clksel_rate common_clkout_src_96m_rates[] = { |
| 870 | { .div = 1, .val = 2, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 871 | { .div = 0 } |
| 872 | }; |
| 873 | |
| 874 | static const struct clksel_rate common_clkout_src_54m_rates[] = { |
| 875 | { .div = 1, .val = 3, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 876 | { .div = 0 } |
| 877 | }; |
| 878 | |
| 879 | static const struct clksel common_clkout_src_clksel[] = { |
| 880 | { .parent = &core_ck, .rates = common_clkout_src_core_rates }, |
| 881 | { .parent = &sys_ck, .rates = common_clkout_src_sys_rates }, |
| 882 | { .parent = &func_96m_ck, .rates = common_clkout_src_96m_rates }, |
| 883 | { .parent = &func_54m_ck, .rates = common_clkout_src_54m_rates }, |
| 884 | { .parent = NULL } |
| 885 | }; |
| 886 | |
| 887 | static struct clk sys_clkout_src = { |
| 888 | .name = "sys_clkout_src", |
| 889 | .parent = &func_54m_ck, |
| 890 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
| 891 | RATE_PROPAGATES, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 892 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 893 | .enable_reg = OMAP24XX_PRCM_CLKOUT_CTRL, |
| 894 | .enable_bit = OMAP24XX_CLKOUT_EN_SHIFT, |
| 895 | .init = &omap2_init_clksel_parent, |
| 896 | .clksel_reg = OMAP24XX_PRCM_CLKOUT_CTRL, |
| 897 | .clksel_mask = OMAP24XX_CLKOUT_SOURCE_MASK, |
| 898 | .clksel = common_clkout_src_clksel, |
| 899 | .recalc = &omap2_clksel_recalc, |
| 900 | .round_rate = &omap2_clksel_round_rate, |
| 901 | .set_rate = &omap2_clksel_set_rate |
| 902 | }; |
| 903 | |
| 904 | static const struct clksel_rate common_clkout_rates[] = { |
| 905 | { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 906 | { .div = 2, .val = 1, .flags = RATE_IN_24XX }, |
| 907 | { .div = 4, .val = 2, .flags = RATE_IN_24XX }, |
| 908 | { .div = 8, .val = 3, .flags = RATE_IN_24XX }, |
| 909 | { .div = 16, .val = 4, .flags = RATE_IN_24XX }, |
| 910 | { .div = 0 }, |
| 911 | }; |
| 912 | |
| 913 | static const struct clksel sys_clkout_clksel[] = { |
| 914 | { .parent = &sys_clkout_src, .rates = common_clkout_rates }, |
| 915 | { .parent = NULL } |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 916 | }; |
| 917 | |
| 918 | static struct clk sys_clkout = { |
| 919 | .name = "sys_clkout", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 920 | .parent = &sys_clkout_src, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 921 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 922 | PARENT_CONTROLS_CLOCK, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 923 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 924 | .clksel_reg = OMAP24XX_PRCM_CLKOUT_CTRL, |
| 925 | .clksel_mask = OMAP24XX_CLKOUT_DIV_MASK, |
| 926 | .clksel = sys_clkout_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 927 | .recalc = &omap2_clksel_recalc, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 928 | .round_rate = &omap2_clksel_round_rate, |
| 929 | .set_rate = &omap2_clksel_set_rate |
| 930 | }; |
| 931 | |
| 932 | /* In 2430, new in 2420 ES2 */ |
| 933 | static struct clk sys_clkout2_src = { |
| 934 | .name = "sys_clkout2_src", |
| 935 | .parent = &func_54m_ck, |
| 936 | .flags = CLOCK_IN_OMAP242X | RATE_PROPAGATES, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 937 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 938 | .enable_reg = OMAP24XX_PRCM_CLKOUT_CTRL, |
| 939 | .enable_bit = OMAP2420_CLKOUT2_EN_SHIFT, |
| 940 | .init = &omap2_init_clksel_parent, |
| 941 | .clksel_reg = OMAP24XX_PRCM_CLKOUT_CTRL, |
| 942 | .clksel_mask = OMAP2420_CLKOUT2_SOURCE_MASK, |
| 943 | .clksel = common_clkout_src_clksel, |
| 944 | .recalc = &omap2_clksel_recalc, |
| 945 | .round_rate = &omap2_clksel_round_rate, |
| 946 | .set_rate = &omap2_clksel_set_rate |
| 947 | }; |
| 948 | |
| 949 | static const struct clksel sys_clkout2_clksel[] = { |
| 950 | { .parent = &sys_clkout2_src, .rates = common_clkout_rates }, |
| 951 | { .parent = NULL } |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 952 | }; |
| 953 | |
| 954 | /* In 2430, new in 2420 ES2 */ |
| 955 | static struct clk sys_clkout2 = { |
| 956 | .name = "sys_clkout2", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 957 | .parent = &sys_clkout2_src, |
| 958 | .flags = CLOCK_IN_OMAP242X | PARENT_CONTROLS_CLOCK, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 959 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 960 | .clksel_reg = OMAP24XX_PRCM_CLKOUT_CTRL, |
| 961 | .clksel_mask = OMAP2420_CLKOUT2_DIV_MASK, |
| 962 | .clksel = sys_clkout2_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 963 | .recalc = &omap2_clksel_recalc, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 964 | .round_rate = &omap2_clksel_round_rate, |
| 965 | .set_rate = &omap2_clksel_set_rate |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 966 | }; |
| 967 | |
Tony Lindgren | b824efa | 2006-04-02 17:46:20 +0100 | [diff] [blame] | 968 | static struct clk emul_ck = { |
| 969 | .name = "emul_ck", |
| 970 | .parent = &func_54m_ck, |
| 971 | .flags = CLOCK_IN_OMAP242X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 972 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 973 | .enable_reg = OMAP24XX_PRCM_CLKEMUL_CTRL, |
| 974 | .enable_bit = OMAP24XX_EMULATION_EN_SHIFT, |
| 975 | .recalc = &followparent_recalc, |
Tony Lindgren | b824efa | 2006-04-02 17:46:20 +0100 | [diff] [blame] | 976 | |
| 977 | }; |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 978 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 979 | /* |
| 980 | * MPU clock domain |
| 981 | * Clocks: |
| 982 | * MPU_FCLK, MPU_ICLK |
| 983 | * INT_M_FCLK, INT_M_I_CLK |
| 984 | * |
| 985 | * - Individual clocks are hardware managed. |
| 986 | * - Base divider comes from: CM_CLKSEL_MPU |
| 987 | * |
| 988 | */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 989 | static const struct clksel_rate mpu_core_rates[] = { |
| 990 | { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 991 | { .div = 2, .val = 2, .flags = RATE_IN_24XX }, |
| 992 | { .div = 4, .val = 4, .flags = RATE_IN_242X }, |
| 993 | { .div = 6, .val = 6, .flags = RATE_IN_242X }, |
| 994 | { .div = 8, .val = 8, .flags = RATE_IN_242X }, |
| 995 | { .div = 0 }, |
| 996 | }; |
| 997 | |
| 998 | static const struct clksel mpu_clksel[] = { |
| 999 | { .parent = &core_ck, .rates = mpu_core_rates }, |
| 1000 | { .parent = NULL } |
| 1001 | }; |
| 1002 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1003 | static struct clk mpu_ck = { /* Control cpu */ |
| 1004 | .name = "mpu_ck", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 1005 | .ops = &clkops_null, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1006 | .parent = &core_ck, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 1007 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 1008 | DELAYED_APP | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1009 | CONFIG_PARTICIPANT | RATE_PROPAGATES, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1010 | .clkdm_name = "mpu_clkdm", |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 1011 | .init = &omap2_init_clksel_parent, |
| 1012 | .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, CM_CLKSEL), |
| 1013 | .clksel_mask = OMAP24XX_CLKSEL_MPU_MASK, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1014 | .clksel = mpu_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1015 | .recalc = &omap2_clksel_recalc, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1016 | .round_rate = &omap2_clksel_round_rate, |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 1017 | .set_rate = &omap2_clksel_set_rate |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1018 | }; |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1019 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1020 | /* |
| 1021 | * DSP (2430-IVA2.1) (2420-UMA+IVA1) clock domain |
| 1022 | * Clocks: |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1023 | * 2430: IVA2.1_FCLK (really just DSP_FCLK), IVA2.1_ICLK |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1024 | * 2420: UMA_FCLK, UMA_ICLK, IVA_MPU, IVA_COP |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1025 | * |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1026 | * Won't be too specific here. The core clock comes into this block |
| 1027 | * it is divided then tee'ed. One branch goes directly to xyz enable |
| 1028 | * controls. The other branch gets further divided by 2 then possibly |
| 1029 | * routed into a synchronizer and out of clocks abc. |
| 1030 | */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1031 | static const struct clksel_rate dsp_fck_core_rates[] = { |
| 1032 | { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 1033 | { .div = 2, .val = 2, .flags = RATE_IN_24XX }, |
| 1034 | { .div = 3, .val = 3, .flags = RATE_IN_24XX }, |
| 1035 | { .div = 4, .val = 4, .flags = RATE_IN_24XX }, |
| 1036 | { .div = 6, .val = 6, .flags = RATE_IN_242X }, |
| 1037 | { .div = 8, .val = 8, .flags = RATE_IN_242X }, |
| 1038 | { .div = 12, .val = 12, .flags = RATE_IN_242X }, |
| 1039 | { .div = 0 }, |
| 1040 | }; |
| 1041 | |
| 1042 | static const struct clksel dsp_fck_clksel[] = { |
| 1043 | { .parent = &core_ck, .rates = dsp_fck_core_rates }, |
| 1044 | { .parent = NULL } |
| 1045 | }; |
| 1046 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1047 | static struct clk dsp_fck = { |
| 1048 | .name = "dsp_fck", |
| 1049 | .parent = &core_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1050 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | DELAYED_APP | |
| 1051 | CONFIG_PARTICIPANT | RATE_PROPAGATES, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1052 | .clkdm_name = "dsp_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1053 | .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN), |
| 1054 | .enable_bit = OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT, |
| 1055 | .clksel_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL), |
| 1056 | .clksel_mask = OMAP24XX_CLKSEL_DSP_MASK, |
| 1057 | .clksel = dsp_fck_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1058 | .recalc = &omap2_clksel_recalc, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1059 | .round_rate = &omap2_clksel_round_rate, |
| 1060 | .set_rate = &omap2_clksel_set_rate |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1061 | }; |
| 1062 | |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1063 | /* DSP interface clock */ |
| 1064 | static const struct clksel_rate dsp_irate_ick_rates[] = { |
| 1065 | { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 1066 | { .div = 2, .val = 2, .flags = RATE_IN_24XX }, |
| 1067 | { .div = 3, .val = 3, .flags = RATE_IN_243X }, |
| 1068 | { .div = 0 }, |
| 1069 | }; |
| 1070 | |
| 1071 | static const struct clksel dsp_irate_ick_clksel[] = { |
| 1072 | { .parent = &dsp_fck, .rates = dsp_irate_ick_rates }, |
| 1073 | { .parent = NULL } |
| 1074 | }; |
| 1075 | |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1076 | /* This clock does not exist as such in the TRM. */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1077 | static struct clk dsp_irate_ick = { |
| 1078 | .name = "dsp_irate_ick", |
| 1079 | .parent = &dsp_fck, |
| 1080 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | DELAYED_APP | |
| 1081 | CONFIG_PARTICIPANT | PARENT_CONTROLS_CLOCK, |
| 1082 | .clksel_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL), |
| 1083 | .clksel_mask = OMAP24XX_CLKSEL_DSP_IF_MASK, |
| 1084 | .clksel = dsp_irate_ick_clksel, |
| 1085 | .recalc = &omap2_clksel_recalc, |
| 1086 | .round_rate = &omap2_clksel_round_rate, |
| 1087 | .set_rate = &omap2_clksel_set_rate |
| 1088 | }; |
| 1089 | |
| 1090 | /* 2420 only */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1091 | static struct clk dsp_ick = { |
| 1092 | .name = "dsp_ick", /* apparently ipi and isp */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1093 | .parent = &dsp_irate_ick, |
| 1094 | .flags = CLOCK_IN_OMAP242X | DELAYED_APP | CONFIG_PARTICIPANT, |
| 1095 | .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_ICLKEN), |
| 1096 | .enable_bit = OMAP2420_EN_DSP_IPI_SHIFT, /* for ipi */ |
| 1097 | }; |
| 1098 | |
| 1099 | /* 2430 only - EN_DSP controls both dsp fclk and iclk on 2430 */ |
| 1100 | static struct clk iva2_1_ick = { |
| 1101 | .name = "iva2_1_ick", |
| 1102 | .parent = &dsp_irate_ick, |
| 1103 | .flags = CLOCK_IN_OMAP243X | DELAYED_APP | CONFIG_PARTICIPANT, |
| 1104 | .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN), |
| 1105 | .enable_bit = OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1106 | }; |
| 1107 | |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1108 | /* |
| 1109 | * The IVA1 is an ARM7 core on the 2420 that has nothing to do with |
| 1110 | * the C54x, but which is contained in the DSP powerdomain. Does not |
| 1111 | * exist on later OMAPs. |
| 1112 | */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1113 | static struct clk iva1_ifck = { |
| 1114 | .name = "iva1_ifck", |
| 1115 | .parent = &core_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1116 | .flags = CLOCK_IN_OMAP242X | CONFIG_PARTICIPANT | |
| 1117 | RATE_PROPAGATES | DELAYED_APP, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1118 | .clkdm_name = "iva1_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1119 | .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN), |
| 1120 | .enable_bit = OMAP2420_EN_IVA_COP_SHIFT, |
| 1121 | .clksel_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL), |
| 1122 | .clksel_mask = OMAP2420_CLKSEL_IVA_MASK, |
| 1123 | .clksel = dsp_fck_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1124 | .recalc = &omap2_clksel_recalc, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1125 | .round_rate = &omap2_clksel_round_rate, |
| 1126 | .set_rate = &omap2_clksel_set_rate |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1127 | }; |
| 1128 | |
| 1129 | /* IVA1 mpu/int/i/f clocks are /2 of parent */ |
| 1130 | static struct clk iva1_mpu_int_ifck = { |
| 1131 | .name = "iva1_mpu_int_ifck", |
| 1132 | .parent = &iva1_ifck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1133 | .flags = CLOCK_IN_OMAP242X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1134 | .clkdm_name = "iva1_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1135 | .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN), |
| 1136 | .enable_bit = OMAP2420_EN_IVA_MPU_SHIFT, |
| 1137 | .fixed_div = 2, |
| 1138 | .recalc = &omap2_fixed_divisor_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1139 | }; |
| 1140 | |
| 1141 | /* |
| 1142 | * L3 clock domain |
| 1143 | * L3 clocks are used for both interface and functional clocks to |
| 1144 | * multiple entities. Some of these clocks are completely managed |
| 1145 | * by hardware, and some others allow software control. Hardware |
| 1146 | * managed ones general are based on directly CLK_REQ signals and |
| 1147 | * various auto idle settings. The functional spec sets many of these |
| 1148 | * as 'tie-high' for their enables. |
| 1149 | * |
| 1150 | * I-CLOCKS: |
| 1151 | * L3-Interconnect, SMS, GPMC, SDRC, OCM_RAM, OCM_ROM, SDMA |
| 1152 | * CAM, HS-USB. |
| 1153 | * F-CLOCK |
| 1154 | * SSI. |
| 1155 | * |
| 1156 | * GPMC memories and SDRC have timing and clock sensitive registers which |
| 1157 | * may very well need notification when the clock changes. Currently for low |
| 1158 | * operating points, these are taken care of in sleep.S. |
| 1159 | */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1160 | static const struct clksel_rate core_l3_core_rates[] = { |
| 1161 | { .div = 1, .val = 1, .flags = RATE_IN_24XX }, |
| 1162 | { .div = 2, .val = 2, .flags = RATE_IN_242X }, |
| 1163 | { .div = 4, .val = 4, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 1164 | { .div = 6, .val = 6, .flags = RATE_IN_24XX }, |
| 1165 | { .div = 8, .val = 8, .flags = RATE_IN_242X }, |
| 1166 | { .div = 12, .val = 12, .flags = RATE_IN_242X }, |
| 1167 | { .div = 16, .val = 16, .flags = RATE_IN_242X }, |
| 1168 | { .div = 0 } |
| 1169 | }; |
| 1170 | |
| 1171 | static const struct clksel core_l3_clksel[] = { |
| 1172 | { .parent = &core_ck, .rates = core_l3_core_rates }, |
| 1173 | { .parent = NULL } |
| 1174 | }; |
| 1175 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1176 | static struct clk core_l3_ck = { /* Used for ick and fck, interconnect */ |
| 1177 | .name = "core_l3_ck", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 1178 | .ops = &clkops_null, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1179 | .parent = &core_ck, |
| 1180 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 1181 | DELAYED_APP | |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1182 | CONFIG_PARTICIPANT | RATE_PROPAGATES, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1183 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1184 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1), |
| 1185 | .clksel_mask = OMAP24XX_CLKSEL_L3_MASK, |
| 1186 | .clksel = core_l3_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1187 | .recalc = &omap2_clksel_recalc, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1188 | .round_rate = &omap2_clksel_round_rate, |
| 1189 | .set_rate = &omap2_clksel_set_rate |
| 1190 | }; |
| 1191 | |
| 1192 | /* usb_l4_ick */ |
| 1193 | static const struct clksel_rate usb_l4_ick_core_l3_rates[] = { |
| 1194 | { .div = 1, .val = 1, .flags = RATE_IN_24XX }, |
| 1195 | { .div = 2, .val = 2, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 1196 | { .div = 4, .val = 4, .flags = RATE_IN_24XX }, |
| 1197 | { .div = 0 } |
| 1198 | }; |
| 1199 | |
| 1200 | static const struct clksel usb_l4_ick_clksel[] = { |
| 1201 | { .parent = &core_l3_ck, .rates = usb_l4_ick_core_l3_rates }, |
| 1202 | { .parent = NULL }, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1203 | }; |
| 1204 | |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1205 | /* It is unclear from TRM whether usb_l4_ick is really in L3 or L4 clkdm */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1206 | static struct clk usb_l4_ick = { /* FS-USB interface clock */ |
| 1207 | .name = "usb_l4_ick", |
Tony Lindgren | fde0fd4 | 2006-01-17 15:31:18 -0800 | [diff] [blame] | 1208 | .parent = &core_l3_ck, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1209 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1210 | DELAYED_APP | CONFIG_PARTICIPANT, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1211 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1212 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 1213 | .enable_bit = OMAP24XX_EN_USB_SHIFT, |
| 1214 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1), |
| 1215 | .clksel_mask = OMAP24XX_CLKSEL_USB_MASK, |
| 1216 | .clksel = usb_l4_ick_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1217 | .recalc = &omap2_clksel_recalc, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1218 | .round_rate = &omap2_clksel_round_rate, |
| 1219 | .set_rate = &omap2_clksel_set_rate |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1220 | }; |
| 1221 | |
| 1222 | /* |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1223 | * L4 clock management domain |
| 1224 | * |
| 1225 | * This domain contains lots of interface clocks from the L4 interface, some |
| 1226 | * functional clocks. Fixed APLL functional source clocks are managed in |
| 1227 | * this domain. |
| 1228 | */ |
| 1229 | static const struct clksel_rate l4_core_l3_rates[] = { |
| 1230 | { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 1231 | { .div = 2, .val = 2, .flags = RATE_IN_24XX }, |
| 1232 | { .div = 0 } |
| 1233 | }; |
| 1234 | |
| 1235 | static const struct clksel l4_clksel[] = { |
| 1236 | { .parent = &core_l3_ck, .rates = l4_core_l3_rates }, |
| 1237 | { .parent = NULL } |
| 1238 | }; |
| 1239 | |
| 1240 | static struct clk l4_ck = { /* used both as an ick and fck */ |
| 1241 | .name = "l4_ck", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 1242 | .ops = &clkops_null, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1243 | .parent = &core_l3_ck, |
| 1244 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 1245 | DELAYED_APP | RATE_PROPAGATES, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1246 | .clkdm_name = "core_l4_clkdm", |
| 1247 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1), |
| 1248 | .clksel_mask = OMAP24XX_CLKSEL_L4_MASK, |
| 1249 | .clksel = l4_clksel, |
| 1250 | .recalc = &omap2_clksel_recalc, |
| 1251 | .round_rate = &omap2_clksel_round_rate, |
| 1252 | .set_rate = &omap2_clksel_set_rate |
| 1253 | }; |
| 1254 | |
| 1255 | /* |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1256 | * SSI is in L3 management domain, its direct parent is core not l3, |
| 1257 | * many core power domain entities are grouped into the L3 clock |
| 1258 | * domain. |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1259 | * SSI_SSR_FCLK, SSI_SST_FCLK, SSI_L4_ICLK |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1260 | * |
| 1261 | * ssr = core/1/2/3/4/5, sst = 1/2 ssr. |
| 1262 | */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1263 | static const struct clksel_rate ssi_ssr_sst_fck_core_rates[] = { |
| 1264 | { .div = 1, .val = 1, .flags = RATE_IN_24XX }, |
| 1265 | { .div = 2, .val = 2, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 1266 | { .div = 3, .val = 3, .flags = RATE_IN_24XX }, |
| 1267 | { .div = 4, .val = 4, .flags = RATE_IN_24XX }, |
| 1268 | { .div = 5, .val = 5, .flags = RATE_IN_243X }, |
| 1269 | { .div = 6, .val = 6, .flags = RATE_IN_242X }, |
| 1270 | { .div = 8, .val = 8, .flags = RATE_IN_242X }, |
| 1271 | { .div = 0 } |
| 1272 | }; |
| 1273 | |
| 1274 | static const struct clksel ssi_ssr_sst_fck_clksel[] = { |
| 1275 | { .parent = &core_ck, .rates = ssi_ssr_sst_fck_core_rates }, |
| 1276 | { .parent = NULL } |
| 1277 | }; |
| 1278 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1279 | static struct clk ssi_ssr_sst_fck = { |
| 1280 | .name = "ssi_fck", |
| 1281 | .parent = &core_ck, |
| 1282 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1283 | DELAYED_APP, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1284 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1285 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 1286 | .enable_bit = OMAP24XX_EN_SSI_SHIFT, |
| 1287 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1), |
| 1288 | .clksel_mask = OMAP24XX_CLKSEL_SSI_MASK, |
| 1289 | .clksel = ssi_ssr_sst_fck_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1290 | .recalc = &omap2_clksel_recalc, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1291 | .round_rate = &omap2_clksel_round_rate, |
| 1292 | .set_rate = &omap2_clksel_set_rate |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1293 | }; |
| 1294 | |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1295 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1296 | /* |
| 1297 | * GFX clock domain |
| 1298 | * Clocks: |
| 1299 | * GFX_FCLK, GFX_ICLK |
| 1300 | * GFX_CG1(2d), GFX_CG2(3d) |
| 1301 | * |
| 1302 | * GFX_FCLK runs from L3, and is divided by (1,2,3,4) |
| 1303 | * The 2d and 3d clocks run at a hardware determined |
| 1304 | * divided value of fclk. |
| 1305 | * |
| 1306 | */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1307 | /* XXX REVISIT: GFX clock is part of CONFIG_PARTICIPANT, no? doublecheck. */ |
| 1308 | |
| 1309 | /* This clksel struct is shared between gfx_3d_fck and gfx_2d_fck */ |
| 1310 | static const struct clksel gfx_fck_clksel[] = { |
| 1311 | { .parent = &core_l3_ck, .rates = gfx_l3_rates }, |
| 1312 | { .parent = NULL }, |
| 1313 | }; |
| 1314 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1315 | static struct clk gfx_3d_fck = { |
| 1316 | .name = "gfx_3d_fck", |
| 1317 | .parent = &core_l3_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1318 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1319 | .clkdm_name = "gfx_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1320 | .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN), |
| 1321 | .enable_bit = OMAP24XX_EN_3D_SHIFT, |
| 1322 | .clksel_reg = OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL), |
| 1323 | .clksel_mask = OMAP_CLKSEL_GFX_MASK, |
| 1324 | .clksel = gfx_fck_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1325 | .recalc = &omap2_clksel_recalc, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1326 | .round_rate = &omap2_clksel_round_rate, |
| 1327 | .set_rate = &omap2_clksel_set_rate |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1328 | }; |
| 1329 | |
| 1330 | static struct clk gfx_2d_fck = { |
| 1331 | .name = "gfx_2d_fck", |
| 1332 | .parent = &core_l3_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1333 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1334 | .clkdm_name = "gfx_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1335 | .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN), |
| 1336 | .enable_bit = OMAP24XX_EN_2D_SHIFT, |
| 1337 | .clksel_reg = OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL), |
| 1338 | .clksel_mask = OMAP_CLKSEL_GFX_MASK, |
| 1339 | .clksel = gfx_fck_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1340 | .recalc = &omap2_clksel_recalc, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1341 | .round_rate = &omap2_clksel_round_rate, |
| 1342 | .set_rate = &omap2_clksel_set_rate |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1343 | }; |
| 1344 | |
| 1345 | static struct clk gfx_ick = { |
| 1346 | .name = "gfx_ick", /* From l3 */ |
| 1347 | .parent = &core_l3_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1348 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1349 | .clkdm_name = "gfx_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1350 | .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_ICLKEN), |
| 1351 | .enable_bit = OMAP_EN_GFX_SHIFT, |
| 1352 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1353 | }; |
| 1354 | |
| 1355 | /* |
| 1356 | * Modem clock domain (2430) |
| 1357 | * CLOCKS: |
| 1358 | * MDM_OSC_CLK |
| 1359 | * MDM_ICLK |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1360 | * These clocks are usable in chassis mode only. |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1361 | */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1362 | static const struct clksel_rate mdm_ick_core_rates[] = { |
| 1363 | { .div = 1, .val = 1, .flags = RATE_IN_243X }, |
| 1364 | { .div = 4, .val = 4, .flags = RATE_IN_243X | DEFAULT_RATE }, |
| 1365 | { .div = 6, .val = 6, .flags = RATE_IN_243X }, |
| 1366 | { .div = 9, .val = 9, .flags = RATE_IN_243X }, |
| 1367 | { .div = 0 } |
| 1368 | }; |
| 1369 | |
| 1370 | static const struct clksel mdm_ick_clksel[] = { |
| 1371 | { .parent = &core_ck, .rates = mdm_ick_core_rates }, |
| 1372 | { .parent = NULL } |
| 1373 | }; |
| 1374 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1375 | static struct clk mdm_ick = { /* used both as a ick and fck */ |
| 1376 | .name = "mdm_ick", |
| 1377 | .parent = &core_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1378 | .flags = CLOCK_IN_OMAP243X | DELAYED_APP | CONFIG_PARTICIPANT, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1379 | .clkdm_name = "mdm_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1380 | .enable_reg = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_ICLKEN), |
| 1381 | .enable_bit = OMAP2430_CM_ICLKEN_MDM_EN_MDM_SHIFT, |
| 1382 | .clksel_reg = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_CLKSEL), |
| 1383 | .clksel_mask = OMAP2430_CLKSEL_MDM_MASK, |
| 1384 | .clksel = mdm_ick_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1385 | .recalc = &omap2_clksel_recalc, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1386 | .round_rate = &omap2_clksel_round_rate, |
| 1387 | .set_rate = &omap2_clksel_set_rate |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1388 | }; |
| 1389 | |
| 1390 | static struct clk mdm_osc_ck = { |
| 1391 | .name = "mdm_osc_ck", |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1392 | .parent = &osc_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1393 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1394 | .clkdm_name = "mdm_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1395 | .enable_reg = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_FCLKEN), |
| 1396 | .enable_bit = OMAP2430_EN_OSC_SHIFT, |
| 1397 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1398 | }; |
| 1399 | |
| 1400 | /* |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1401 | * DSS clock domain |
| 1402 | * CLOCKs: |
| 1403 | * DSS_L4_ICLK, DSS_L3_ICLK, |
| 1404 | * DSS_CLK1, DSS_CLK2, DSS_54MHz_CLK |
| 1405 | * |
| 1406 | * DSS is both initiator and target. |
| 1407 | */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1408 | /* XXX Add RATE_NOT_VALIDATED */ |
| 1409 | |
| 1410 | static const struct clksel_rate dss1_fck_sys_rates[] = { |
| 1411 | { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 1412 | { .div = 0 } |
| 1413 | }; |
| 1414 | |
| 1415 | static const struct clksel_rate dss1_fck_core_rates[] = { |
| 1416 | { .div = 1, .val = 1, .flags = RATE_IN_24XX }, |
| 1417 | { .div = 2, .val = 2, .flags = RATE_IN_24XX }, |
| 1418 | { .div = 3, .val = 3, .flags = RATE_IN_24XX }, |
| 1419 | { .div = 4, .val = 4, .flags = RATE_IN_24XX }, |
| 1420 | { .div = 5, .val = 5, .flags = RATE_IN_24XX }, |
| 1421 | { .div = 6, .val = 6, .flags = RATE_IN_24XX }, |
| 1422 | { .div = 8, .val = 8, .flags = RATE_IN_24XX }, |
| 1423 | { .div = 9, .val = 9, .flags = RATE_IN_24XX }, |
| 1424 | { .div = 12, .val = 12, .flags = RATE_IN_24XX }, |
| 1425 | { .div = 16, .val = 16, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 1426 | { .div = 0 } |
| 1427 | }; |
| 1428 | |
| 1429 | static const struct clksel dss1_fck_clksel[] = { |
| 1430 | { .parent = &sys_ck, .rates = dss1_fck_sys_rates }, |
| 1431 | { .parent = &core_ck, .rates = dss1_fck_core_rates }, |
| 1432 | { .parent = NULL }, |
| 1433 | }; |
| 1434 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1435 | static struct clk dss_ick = { /* Enables both L3,L4 ICLK's */ |
| 1436 | .name = "dss_ick", |
| 1437 | .parent = &l4_ck, /* really both l3 and l4 */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1438 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1439 | .clkdm_name = "dss_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1440 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1441 | .enable_bit = OMAP24XX_EN_DSS1_SHIFT, |
| 1442 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1443 | }; |
| 1444 | |
| 1445 | static struct clk dss1_fck = { |
| 1446 | .name = "dss1_fck", |
| 1447 | .parent = &core_ck, /* Core or sys */ |
| 1448 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1449 | DELAYED_APP, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1450 | .clkdm_name = "dss_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1451 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1452 | .enable_bit = OMAP24XX_EN_DSS1_SHIFT, |
| 1453 | .init = &omap2_init_clksel_parent, |
| 1454 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1), |
| 1455 | .clksel_mask = OMAP24XX_CLKSEL_DSS1_MASK, |
| 1456 | .clksel = dss1_fck_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1457 | .recalc = &omap2_clksel_recalc, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1458 | .round_rate = &omap2_clksel_round_rate, |
| 1459 | .set_rate = &omap2_clksel_set_rate |
| 1460 | }; |
| 1461 | |
| 1462 | static const struct clksel_rate dss2_fck_sys_rates[] = { |
| 1463 | { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 1464 | { .div = 0 } |
| 1465 | }; |
| 1466 | |
| 1467 | static const struct clksel_rate dss2_fck_48m_rates[] = { |
| 1468 | { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 1469 | { .div = 0 } |
| 1470 | }; |
| 1471 | |
| 1472 | static const struct clksel dss2_fck_clksel[] = { |
| 1473 | { .parent = &sys_ck, .rates = dss2_fck_sys_rates }, |
| 1474 | { .parent = &func_48m_ck, .rates = dss2_fck_48m_rates }, |
| 1475 | { .parent = NULL } |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1476 | }; |
| 1477 | |
| 1478 | static struct clk dss2_fck = { /* Alt clk used in power management */ |
| 1479 | .name = "dss2_fck", |
| 1480 | .parent = &sys_ck, /* fixed at sys_ck or 48MHz */ |
| 1481 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
Richard Woodruff | 474844f | 2007-01-26 12:08:51 -0800 | [diff] [blame] | 1482 | DELAYED_APP, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1483 | .clkdm_name = "dss_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1484 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1485 | .enable_bit = OMAP24XX_EN_DSS2_SHIFT, |
| 1486 | .init = &omap2_init_clksel_parent, |
| 1487 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1), |
| 1488 | .clksel_mask = OMAP24XX_CLKSEL_DSS2_MASK, |
| 1489 | .clksel = dss2_fck_clksel, |
| 1490 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1491 | }; |
| 1492 | |
| 1493 | static struct clk dss_54m_fck = { /* Alt clk used in power management */ |
| 1494 | .name = "dss_54m_fck", /* 54m tv clk */ |
| 1495 | .parent = &func_54m_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1496 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1497 | .clkdm_name = "dss_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1498 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1499 | .enable_bit = OMAP24XX_EN_TV_SHIFT, |
| 1500 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1501 | }; |
| 1502 | |
| 1503 | /* |
| 1504 | * CORE power domain ICLK & FCLK defines. |
| 1505 | * Many of the these can have more than one possible parent. Entries |
| 1506 | * here will likely have an L4 interface parent, and may have multiple |
| 1507 | * functional clock parents. |
| 1508 | */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1509 | static const struct clksel_rate gpt_alt_rates[] = { |
| 1510 | { .div = 1, .val = 2, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 1511 | { .div = 0 } |
| 1512 | }; |
| 1513 | |
| 1514 | static const struct clksel omap24xx_gpt_clksel[] = { |
| 1515 | { .parent = &func_32k_ck, .rates = gpt_32k_rates }, |
| 1516 | { .parent = &sys_ck, .rates = gpt_sys_rates }, |
| 1517 | { .parent = &alt_ck, .rates = gpt_alt_rates }, |
| 1518 | { .parent = NULL }, |
| 1519 | }; |
| 1520 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1521 | static struct clk gpt1_ick = { |
| 1522 | .name = "gpt1_ick", |
| 1523 | .parent = &l4_ck, |
| 1524 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1525 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1526 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 1527 | .enable_bit = OMAP24XX_EN_GPT1_SHIFT, |
| 1528 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1529 | }; |
| 1530 | |
| 1531 | static struct clk gpt1_fck = { |
| 1532 | .name = "gpt1_fck", |
| 1533 | .parent = &func_32k_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1534 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1535 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1536 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN), |
| 1537 | .enable_bit = OMAP24XX_EN_GPT1_SHIFT, |
| 1538 | .init = &omap2_init_clksel_parent, |
| 1539 | .clksel_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL1), |
| 1540 | .clksel_mask = OMAP24XX_CLKSEL_GPT1_MASK, |
| 1541 | .clksel = omap24xx_gpt_clksel, |
| 1542 | .recalc = &omap2_clksel_recalc, |
| 1543 | .round_rate = &omap2_clksel_round_rate, |
| 1544 | .set_rate = &omap2_clksel_set_rate |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1545 | }; |
| 1546 | |
| 1547 | static struct clk gpt2_ick = { |
| 1548 | .name = "gpt2_ick", |
| 1549 | .parent = &l4_ck, |
| 1550 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1551 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1552 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1553 | .enable_bit = OMAP24XX_EN_GPT2_SHIFT, |
| 1554 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1555 | }; |
| 1556 | |
| 1557 | static struct clk gpt2_fck = { |
| 1558 | .name = "gpt2_fck", |
| 1559 | .parent = &func_32k_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1560 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1561 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1562 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1563 | .enable_bit = OMAP24XX_EN_GPT2_SHIFT, |
| 1564 | .init = &omap2_init_clksel_parent, |
| 1565 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1566 | .clksel_mask = OMAP24XX_CLKSEL_GPT2_MASK, |
| 1567 | .clksel = omap24xx_gpt_clksel, |
| 1568 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1569 | }; |
| 1570 | |
| 1571 | static struct clk gpt3_ick = { |
| 1572 | .name = "gpt3_ick", |
| 1573 | .parent = &l4_ck, |
| 1574 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1575 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1576 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1577 | .enable_bit = OMAP24XX_EN_GPT3_SHIFT, |
| 1578 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1579 | }; |
| 1580 | |
| 1581 | static struct clk gpt3_fck = { |
| 1582 | .name = "gpt3_fck", |
| 1583 | .parent = &func_32k_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1584 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1585 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1586 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1587 | .enable_bit = OMAP24XX_EN_GPT3_SHIFT, |
| 1588 | .init = &omap2_init_clksel_parent, |
| 1589 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1590 | .clksel_mask = OMAP24XX_CLKSEL_GPT3_MASK, |
| 1591 | .clksel = omap24xx_gpt_clksel, |
| 1592 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1593 | }; |
| 1594 | |
| 1595 | static struct clk gpt4_ick = { |
| 1596 | .name = "gpt4_ick", |
| 1597 | .parent = &l4_ck, |
| 1598 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1599 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1600 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1601 | .enable_bit = OMAP24XX_EN_GPT4_SHIFT, |
| 1602 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1603 | }; |
| 1604 | |
| 1605 | static struct clk gpt4_fck = { |
| 1606 | .name = "gpt4_fck", |
| 1607 | .parent = &func_32k_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1608 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1609 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1610 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1611 | .enable_bit = OMAP24XX_EN_GPT4_SHIFT, |
| 1612 | .init = &omap2_init_clksel_parent, |
| 1613 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1614 | .clksel_mask = OMAP24XX_CLKSEL_GPT4_MASK, |
| 1615 | .clksel = omap24xx_gpt_clksel, |
| 1616 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1617 | }; |
| 1618 | |
| 1619 | static struct clk gpt5_ick = { |
| 1620 | .name = "gpt5_ick", |
| 1621 | .parent = &l4_ck, |
| 1622 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1623 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1624 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1625 | .enable_bit = OMAP24XX_EN_GPT5_SHIFT, |
| 1626 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1627 | }; |
| 1628 | |
| 1629 | static struct clk gpt5_fck = { |
| 1630 | .name = "gpt5_fck", |
| 1631 | .parent = &func_32k_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1632 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1633 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1634 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1635 | .enable_bit = OMAP24XX_EN_GPT5_SHIFT, |
| 1636 | .init = &omap2_init_clksel_parent, |
| 1637 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1638 | .clksel_mask = OMAP24XX_CLKSEL_GPT5_MASK, |
| 1639 | .clksel = omap24xx_gpt_clksel, |
| 1640 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1641 | }; |
| 1642 | |
| 1643 | static struct clk gpt6_ick = { |
| 1644 | .name = "gpt6_ick", |
| 1645 | .parent = &l4_ck, |
| 1646 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1647 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1648 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1649 | .enable_bit = OMAP24XX_EN_GPT6_SHIFT, |
| 1650 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1651 | }; |
| 1652 | |
| 1653 | static struct clk gpt6_fck = { |
| 1654 | .name = "gpt6_fck", |
| 1655 | .parent = &func_32k_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1656 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1657 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1658 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1659 | .enable_bit = OMAP24XX_EN_GPT6_SHIFT, |
| 1660 | .init = &omap2_init_clksel_parent, |
| 1661 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1662 | .clksel_mask = OMAP24XX_CLKSEL_GPT6_MASK, |
| 1663 | .clksel = omap24xx_gpt_clksel, |
| 1664 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1665 | }; |
| 1666 | |
| 1667 | static struct clk gpt7_ick = { |
| 1668 | .name = "gpt7_ick", |
| 1669 | .parent = &l4_ck, |
| 1670 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1671 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1672 | .enable_bit = OMAP24XX_EN_GPT7_SHIFT, |
| 1673 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1674 | }; |
| 1675 | |
| 1676 | static struct clk gpt7_fck = { |
| 1677 | .name = "gpt7_fck", |
| 1678 | .parent = &func_32k_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1679 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1680 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1681 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1682 | .enable_bit = OMAP24XX_EN_GPT7_SHIFT, |
| 1683 | .init = &omap2_init_clksel_parent, |
| 1684 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1685 | .clksel_mask = OMAP24XX_CLKSEL_GPT7_MASK, |
| 1686 | .clksel = omap24xx_gpt_clksel, |
| 1687 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1688 | }; |
| 1689 | |
| 1690 | static struct clk gpt8_ick = { |
| 1691 | .name = "gpt8_ick", |
| 1692 | .parent = &l4_ck, |
| 1693 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1694 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1695 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1696 | .enable_bit = OMAP24XX_EN_GPT8_SHIFT, |
| 1697 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1698 | }; |
| 1699 | |
| 1700 | static struct clk gpt8_fck = { |
| 1701 | .name = "gpt8_fck", |
| 1702 | .parent = &func_32k_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1703 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1704 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1705 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1706 | .enable_bit = OMAP24XX_EN_GPT8_SHIFT, |
| 1707 | .init = &omap2_init_clksel_parent, |
| 1708 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1709 | .clksel_mask = OMAP24XX_CLKSEL_GPT8_MASK, |
| 1710 | .clksel = omap24xx_gpt_clksel, |
| 1711 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1712 | }; |
| 1713 | |
| 1714 | static struct clk gpt9_ick = { |
| 1715 | .name = "gpt9_ick", |
| 1716 | .parent = &l4_ck, |
| 1717 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1718 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1719 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1720 | .enable_bit = OMAP24XX_EN_GPT9_SHIFT, |
| 1721 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1722 | }; |
| 1723 | |
| 1724 | static struct clk gpt9_fck = { |
| 1725 | .name = "gpt9_fck", |
| 1726 | .parent = &func_32k_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1727 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1728 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1729 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1730 | .enable_bit = OMAP24XX_EN_GPT9_SHIFT, |
| 1731 | .init = &omap2_init_clksel_parent, |
| 1732 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1733 | .clksel_mask = OMAP24XX_CLKSEL_GPT9_MASK, |
| 1734 | .clksel = omap24xx_gpt_clksel, |
| 1735 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1736 | }; |
| 1737 | |
| 1738 | static struct clk gpt10_ick = { |
| 1739 | .name = "gpt10_ick", |
| 1740 | .parent = &l4_ck, |
| 1741 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1742 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1743 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1744 | .enable_bit = OMAP24XX_EN_GPT10_SHIFT, |
| 1745 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1746 | }; |
| 1747 | |
| 1748 | static struct clk gpt10_fck = { |
| 1749 | .name = "gpt10_fck", |
| 1750 | .parent = &func_32k_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1751 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1752 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1753 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1754 | .enable_bit = OMAP24XX_EN_GPT10_SHIFT, |
| 1755 | .init = &omap2_init_clksel_parent, |
| 1756 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1757 | .clksel_mask = OMAP24XX_CLKSEL_GPT10_MASK, |
| 1758 | .clksel = omap24xx_gpt_clksel, |
| 1759 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1760 | }; |
| 1761 | |
| 1762 | static struct clk gpt11_ick = { |
| 1763 | .name = "gpt11_ick", |
| 1764 | .parent = &l4_ck, |
| 1765 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1766 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1767 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1768 | .enable_bit = OMAP24XX_EN_GPT11_SHIFT, |
| 1769 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1770 | }; |
| 1771 | |
| 1772 | static struct clk gpt11_fck = { |
| 1773 | .name = "gpt11_fck", |
| 1774 | .parent = &func_32k_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1775 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1776 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1777 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1778 | .enable_bit = OMAP24XX_EN_GPT11_SHIFT, |
| 1779 | .init = &omap2_init_clksel_parent, |
| 1780 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1781 | .clksel_mask = OMAP24XX_CLKSEL_GPT11_MASK, |
| 1782 | .clksel = omap24xx_gpt_clksel, |
| 1783 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1784 | }; |
| 1785 | |
| 1786 | static struct clk gpt12_ick = { |
| 1787 | .name = "gpt12_ick", |
| 1788 | .parent = &l4_ck, |
| 1789 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1790 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1791 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1792 | .enable_bit = OMAP24XX_EN_GPT12_SHIFT, |
| 1793 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1794 | }; |
| 1795 | |
| 1796 | static struct clk gpt12_fck = { |
| 1797 | .name = "gpt12_fck", |
| 1798 | .parent = &func_32k_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1799 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1800 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1801 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1802 | .enable_bit = OMAP24XX_EN_GPT12_SHIFT, |
| 1803 | .init = &omap2_init_clksel_parent, |
| 1804 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1805 | .clksel_mask = OMAP24XX_CLKSEL_GPT12_MASK, |
| 1806 | .clksel = omap24xx_gpt_clksel, |
| 1807 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1808 | }; |
| 1809 | |
| 1810 | static struct clk mcbsp1_ick = { |
Eduardo Valentin | 44ec9a3 | 2008-07-03 12:24:40 +0300 | [diff] [blame] | 1811 | .name = "mcbsp_ick", |
| 1812 | .id = 1, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1813 | .parent = &l4_ck, |
| 1814 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1815 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1816 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1817 | .enable_bit = OMAP24XX_EN_MCBSP1_SHIFT, |
| 1818 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1819 | }; |
| 1820 | |
| 1821 | static struct clk mcbsp1_fck = { |
Eduardo Valentin | 44ec9a3 | 2008-07-03 12:24:40 +0300 | [diff] [blame] | 1822 | .name = "mcbsp_fck", |
| 1823 | .id = 1, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1824 | .parent = &func_96m_ck, |
| 1825 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1826 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1827 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1828 | .enable_bit = OMAP24XX_EN_MCBSP1_SHIFT, |
| 1829 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1830 | }; |
| 1831 | |
| 1832 | static struct clk mcbsp2_ick = { |
Eduardo Valentin | 44ec9a3 | 2008-07-03 12:24:40 +0300 | [diff] [blame] | 1833 | .name = "mcbsp_ick", |
| 1834 | .id = 2, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1835 | .parent = &l4_ck, |
| 1836 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1837 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1838 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1839 | .enable_bit = OMAP24XX_EN_MCBSP2_SHIFT, |
| 1840 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1841 | }; |
| 1842 | |
| 1843 | static struct clk mcbsp2_fck = { |
Eduardo Valentin | 44ec9a3 | 2008-07-03 12:24:40 +0300 | [diff] [blame] | 1844 | .name = "mcbsp_fck", |
| 1845 | .id = 2, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1846 | .parent = &func_96m_ck, |
| 1847 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1848 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1849 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1850 | .enable_bit = OMAP24XX_EN_MCBSP2_SHIFT, |
| 1851 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1852 | }; |
| 1853 | |
| 1854 | static struct clk mcbsp3_ick = { |
Eduardo Valentin | 44ec9a3 | 2008-07-03 12:24:40 +0300 | [diff] [blame] | 1855 | .name = "mcbsp_ick", |
| 1856 | .id = 3, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1857 | .parent = &l4_ck, |
| 1858 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1859 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1860 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 1861 | .enable_bit = OMAP2430_EN_MCBSP3_SHIFT, |
| 1862 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1863 | }; |
| 1864 | |
| 1865 | static struct clk mcbsp3_fck = { |
Eduardo Valentin | 44ec9a3 | 2008-07-03 12:24:40 +0300 | [diff] [blame] | 1866 | .name = "mcbsp_fck", |
| 1867 | .id = 3, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1868 | .parent = &func_96m_ck, |
| 1869 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1870 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1871 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 1872 | .enable_bit = OMAP2430_EN_MCBSP3_SHIFT, |
| 1873 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1874 | }; |
| 1875 | |
| 1876 | static struct clk mcbsp4_ick = { |
Eduardo Valentin | 44ec9a3 | 2008-07-03 12:24:40 +0300 | [diff] [blame] | 1877 | .name = "mcbsp_ick", |
| 1878 | .id = 4, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1879 | .parent = &l4_ck, |
| 1880 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1881 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1882 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 1883 | .enable_bit = OMAP2430_EN_MCBSP4_SHIFT, |
| 1884 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1885 | }; |
| 1886 | |
| 1887 | static struct clk mcbsp4_fck = { |
Eduardo Valentin | 44ec9a3 | 2008-07-03 12:24:40 +0300 | [diff] [blame] | 1888 | .name = "mcbsp_fck", |
| 1889 | .id = 4, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1890 | .parent = &func_96m_ck, |
| 1891 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1892 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1893 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 1894 | .enable_bit = OMAP2430_EN_MCBSP4_SHIFT, |
| 1895 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1896 | }; |
| 1897 | |
| 1898 | static struct clk mcbsp5_ick = { |
Eduardo Valentin | 44ec9a3 | 2008-07-03 12:24:40 +0300 | [diff] [blame] | 1899 | .name = "mcbsp_ick", |
| 1900 | .id = 5, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1901 | .parent = &l4_ck, |
| 1902 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1903 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1904 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 1905 | .enable_bit = OMAP2430_EN_MCBSP5_SHIFT, |
| 1906 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1907 | }; |
| 1908 | |
| 1909 | static struct clk mcbsp5_fck = { |
Eduardo Valentin | 44ec9a3 | 2008-07-03 12:24:40 +0300 | [diff] [blame] | 1910 | .name = "mcbsp_fck", |
| 1911 | .id = 5, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1912 | .parent = &func_96m_ck, |
| 1913 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1914 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1915 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 1916 | .enable_bit = OMAP2430_EN_MCBSP5_SHIFT, |
| 1917 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1918 | }; |
| 1919 | |
| 1920 | static struct clk mcspi1_ick = { |
Tony Lindgren | 90afd5c | 2006-09-25 13:27:20 +0300 | [diff] [blame] | 1921 | .name = "mcspi_ick", |
| 1922 | .id = 1, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1923 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1924 | .clkdm_name = "core_l4_clkdm", |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1925 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1926 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1927 | .enable_bit = OMAP24XX_EN_MCSPI1_SHIFT, |
| 1928 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1929 | }; |
| 1930 | |
| 1931 | static struct clk mcspi1_fck = { |
Tony Lindgren | 90afd5c | 2006-09-25 13:27:20 +0300 | [diff] [blame] | 1932 | .name = "mcspi_fck", |
| 1933 | .id = 1, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1934 | .parent = &func_48m_ck, |
| 1935 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1936 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1937 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1938 | .enable_bit = OMAP24XX_EN_MCSPI1_SHIFT, |
| 1939 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1940 | }; |
| 1941 | |
| 1942 | static struct clk mcspi2_ick = { |
Tony Lindgren | 90afd5c | 2006-09-25 13:27:20 +0300 | [diff] [blame] | 1943 | .name = "mcspi_ick", |
| 1944 | .id = 2, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1945 | .parent = &l4_ck, |
| 1946 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1947 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1948 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1949 | .enable_bit = OMAP24XX_EN_MCSPI2_SHIFT, |
| 1950 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1951 | }; |
| 1952 | |
| 1953 | static struct clk mcspi2_fck = { |
Tony Lindgren | 90afd5c | 2006-09-25 13:27:20 +0300 | [diff] [blame] | 1954 | .name = "mcspi_fck", |
| 1955 | .id = 2, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1956 | .parent = &func_48m_ck, |
| 1957 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1958 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1959 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1960 | .enable_bit = OMAP24XX_EN_MCSPI2_SHIFT, |
| 1961 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1962 | }; |
| 1963 | |
| 1964 | static struct clk mcspi3_ick = { |
Tony Lindgren | 90afd5c | 2006-09-25 13:27:20 +0300 | [diff] [blame] | 1965 | .name = "mcspi_ick", |
| 1966 | .id = 3, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1967 | .parent = &l4_ck, |
| 1968 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1969 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1970 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 1971 | .enable_bit = OMAP2430_EN_MCSPI3_SHIFT, |
| 1972 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1973 | }; |
| 1974 | |
| 1975 | static struct clk mcspi3_fck = { |
Tony Lindgren | 90afd5c | 2006-09-25 13:27:20 +0300 | [diff] [blame] | 1976 | .name = "mcspi_fck", |
| 1977 | .id = 3, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1978 | .parent = &func_48m_ck, |
| 1979 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1980 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1981 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 1982 | .enable_bit = OMAP2430_EN_MCSPI3_SHIFT, |
| 1983 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1984 | }; |
| 1985 | |
| 1986 | static struct clk uart1_ick = { |
| 1987 | .name = "uart1_ick", |
| 1988 | .parent = &l4_ck, |
| 1989 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1990 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1991 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1992 | .enable_bit = OMAP24XX_EN_UART1_SHIFT, |
| 1993 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1994 | }; |
| 1995 | |
| 1996 | static struct clk uart1_fck = { |
| 1997 | .name = "uart1_fck", |
| 1998 | .parent = &func_48m_ck, |
| 1999 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2000 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2001 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 2002 | .enable_bit = OMAP24XX_EN_UART1_SHIFT, |
| 2003 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2004 | }; |
| 2005 | |
| 2006 | static struct clk uart2_ick = { |
| 2007 | .name = "uart2_ick", |
| 2008 | .parent = &l4_ck, |
| 2009 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2010 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2011 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 2012 | .enable_bit = OMAP24XX_EN_UART2_SHIFT, |
| 2013 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2014 | }; |
| 2015 | |
| 2016 | static struct clk uart2_fck = { |
| 2017 | .name = "uart2_fck", |
| 2018 | .parent = &func_48m_ck, |
| 2019 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2020 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2021 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 2022 | .enable_bit = OMAP24XX_EN_UART2_SHIFT, |
| 2023 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2024 | }; |
| 2025 | |
| 2026 | static struct clk uart3_ick = { |
| 2027 | .name = "uart3_ick", |
| 2028 | .parent = &l4_ck, |
| 2029 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2030 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2031 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 2032 | .enable_bit = OMAP24XX_EN_UART3_SHIFT, |
| 2033 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2034 | }; |
| 2035 | |
| 2036 | static struct clk uart3_fck = { |
| 2037 | .name = "uart3_fck", |
| 2038 | .parent = &func_48m_ck, |
| 2039 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2040 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2041 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 2042 | .enable_bit = OMAP24XX_EN_UART3_SHIFT, |
| 2043 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2044 | }; |
| 2045 | |
| 2046 | static struct clk gpios_ick = { |
| 2047 | .name = "gpios_ick", |
| 2048 | .parent = &l4_ck, |
| 2049 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2050 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2051 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 2052 | .enable_bit = OMAP24XX_EN_GPIOS_SHIFT, |
| 2053 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2054 | }; |
| 2055 | |
| 2056 | static struct clk gpios_fck = { |
| 2057 | .name = "gpios_fck", |
| 2058 | .parent = &func_32k_ck, |
| 2059 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2060 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2061 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN), |
| 2062 | .enable_bit = OMAP24XX_EN_GPIOS_SHIFT, |
| 2063 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2064 | }; |
| 2065 | |
| 2066 | static struct clk mpu_wdt_ick = { |
| 2067 | .name = "mpu_wdt_ick", |
| 2068 | .parent = &l4_ck, |
| 2069 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2070 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2071 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 2072 | .enable_bit = OMAP24XX_EN_MPU_WDT_SHIFT, |
| 2073 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2074 | }; |
| 2075 | |
| 2076 | static struct clk mpu_wdt_fck = { |
| 2077 | .name = "mpu_wdt_fck", |
| 2078 | .parent = &func_32k_ck, |
| 2079 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2080 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2081 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN), |
| 2082 | .enable_bit = OMAP24XX_EN_MPU_WDT_SHIFT, |
| 2083 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2084 | }; |
| 2085 | |
| 2086 | static struct clk sync_32k_ick = { |
| 2087 | .name = "sync_32k_ick", |
| 2088 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2089 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
| 2090 | ENABLE_ON_INIT, |
| 2091 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2092 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 2093 | .enable_bit = OMAP24XX_EN_32KSYNC_SHIFT, |
| 2094 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2095 | }; |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2096 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2097 | static struct clk wdt1_ick = { |
| 2098 | .name = "wdt1_ick", |
| 2099 | .parent = &l4_ck, |
| 2100 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2101 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2102 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 2103 | .enable_bit = OMAP24XX_EN_WDT1_SHIFT, |
| 2104 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2105 | }; |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2106 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2107 | static struct clk omapctrl_ick = { |
| 2108 | .name = "omapctrl_ick", |
| 2109 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2110 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
| 2111 | ENABLE_ON_INIT, |
| 2112 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2113 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 2114 | .enable_bit = OMAP24XX_EN_OMAPCTRL_SHIFT, |
| 2115 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2116 | }; |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2117 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2118 | static struct clk icr_ick = { |
| 2119 | .name = "icr_ick", |
| 2120 | .parent = &l4_ck, |
| 2121 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2122 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2123 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 2124 | .enable_bit = OMAP2430_EN_ICR_SHIFT, |
| 2125 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2126 | }; |
| 2127 | |
| 2128 | static struct clk cam_ick = { |
| 2129 | .name = "cam_ick", |
| 2130 | .parent = &l4_ck, |
| 2131 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2132 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2133 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 2134 | .enable_bit = OMAP24XX_EN_CAM_SHIFT, |
| 2135 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2136 | }; |
| 2137 | |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2138 | /* |
| 2139 | * cam_fck controls both CAM_MCLK and CAM_FCLK. It should probably be |
| 2140 | * split into two separate clocks, since the parent clocks are different |
| 2141 | * and the clockdomains are also different. |
| 2142 | */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2143 | static struct clk cam_fck = { |
| 2144 | .name = "cam_fck", |
| 2145 | .parent = &func_96m_ck, |
| 2146 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2147 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2148 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 2149 | .enable_bit = OMAP24XX_EN_CAM_SHIFT, |
| 2150 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2151 | }; |
| 2152 | |
| 2153 | static struct clk mailboxes_ick = { |
| 2154 | .name = "mailboxes_ick", |
| 2155 | .parent = &l4_ck, |
| 2156 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2157 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2158 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 2159 | .enable_bit = OMAP24XX_EN_MAILBOXES_SHIFT, |
| 2160 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2161 | }; |
| 2162 | |
| 2163 | static struct clk wdt4_ick = { |
| 2164 | .name = "wdt4_ick", |
| 2165 | .parent = &l4_ck, |
| 2166 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2167 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2168 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 2169 | .enable_bit = OMAP24XX_EN_WDT4_SHIFT, |
| 2170 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2171 | }; |
| 2172 | |
| 2173 | static struct clk wdt4_fck = { |
| 2174 | .name = "wdt4_fck", |
| 2175 | .parent = &func_32k_ck, |
| 2176 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2177 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2178 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 2179 | .enable_bit = OMAP24XX_EN_WDT4_SHIFT, |
| 2180 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2181 | }; |
| 2182 | |
| 2183 | static struct clk wdt3_ick = { |
| 2184 | .name = "wdt3_ick", |
| 2185 | .parent = &l4_ck, |
| 2186 | .flags = CLOCK_IN_OMAP242X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2187 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2188 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 2189 | .enable_bit = OMAP2420_EN_WDT3_SHIFT, |
| 2190 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2191 | }; |
| 2192 | |
| 2193 | static struct clk wdt3_fck = { |
| 2194 | .name = "wdt3_fck", |
| 2195 | .parent = &func_32k_ck, |
| 2196 | .flags = CLOCK_IN_OMAP242X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2197 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2198 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 2199 | .enable_bit = OMAP2420_EN_WDT3_SHIFT, |
| 2200 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2201 | }; |
| 2202 | |
| 2203 | static struct clk mspro_ick = { |
| 2204 | .name = "mspro_ick", |
| 2205 | .parent = &l4_ck, |
| 2206 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2207 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2208 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 2209 | .enable_bit = OMAP24XX_EN_MSPRO_SHIFT, |
| 2210 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2211 | }; |
| 2212 | |
| 2213 | static struct clk mspro_fck = { |
| 2214 | .name = "mspro_fck", |
| 2215 | .parent = &func_96m_ck, |
| 2216 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2217 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2218 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 2219 | .enable_bit = OMAP24XX_EN_MSPRO_SHIFT, |
| 2220 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2221 | }; |
| 2222 | |
| 2223 | static struct clk mmc_ick = { |
| 2224 | .name = "mmc_ick", |
| 2225 | .parent = &l4_ck, |
| 2226 | .flags = CLOCK_IN_OMAP242X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2227 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2228 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 2229 | .enable_bit = OMAP2420_EN_MMC_SHIFT, |
| 2230 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2231 | }; |
| 2232 | |
| 2233 | static struct clk mmc_fck = { |
| 2234 | .name = "mmc_fck", |
| 2235 | .parent = &func_96m_ck, |
| 2236 | .flags = CLOCK_IN_OMAP242X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2237 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2238 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 2239 | .enable_bit = OMAP2420_EN_MMC_SHIFT, |
| 2240 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2241 | }; |
| 2242 | |
| 2243 | static struct clk fac_ick = { |
| 2244 | .name = "fac_ick", |
| 2245 | .parent = &l4_ck, |
| 2246 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2247 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2248 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 2249 | .enable_bit = OMAP24XX_EN_FAC_SHIFT, |
| 2250 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2251 | }; |
| 2252 | |
| 2253 | static struct clk fac_fck = { |
| 2254 | .name = "fac_fck", |
| 2255 | .parent = &func_12m_ck, |
| 2256 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2257 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2258 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 2259 | .enable_bit = OMAP24XX_EN_FAC_SHIFT, |
| 2260 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2261 | }; |
| 2262 | |
| 2263 | static struct clk eac_ick = { |
| 2264 | .name = "eac_ick", |
| 2265 | .parent = &l4_ck, |
| 2266 | .flags = CLOCK_IN_OMAP242X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2267 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2268 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 2269 | .enable_bit = OMAP2420_EN_EAC_SHIFT, |
| 2270 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2271 | }; |
| 2272 | |
| 2273 | static struct clk eac_fck = { |
| 2274 | .name = "eac_fck", |
| 2275 | .parent = &func_96m_ck, |
| 2276 | .flags = CLOCK_IN_OMAP242X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2277 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2278 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 2279 | .enable_bit = OMAP2420_EN_EAC_SHIFT, |
| 2280 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2281 | }; |
| 2282 | |
| 2283 | static struct clk hdq_ick = { |
| 2284 | .name = "hdq_ick", |
| 2285 | .parent = &l4_ck, |
| 2286 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2287 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2288 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 2289 | .enable_bit = OMAP24XX_EN_HDQ_SHIFT, |
| 2290 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2291 | }; |
| 2292 | |
| 2293 | static struct clk hdq_fck = { |
| 2294 | .name = "hdq_fck", |
| 2295 | .parent = &func_12m_ck, |
| 2296 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2297 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2298 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 2299 | .enable_bit = OMAP24XX_EN_HDQ_SHIFT, |
| 2300 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2301 | }; |
| 2302 | |
| 2303 | static struct clk i2c2_ick = { |
Tony Lindgren | b824efa | 2006-04-02 17:46:20 +0100 | [diff] [blame] | 2304 | .name = "i2c_ick", |
| 2305 | .id = 2, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2306 | .parent = &l4_ck, |
| 2307 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2308 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2309 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 2310 | .enable_bit = OMAP2420_EN_I2C2_SHIFT, |
| 2311 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2312 | }; |
| 2313 | |
| 2314 | static struct clk i2c2_fck = { |
Tony Lindgren | b824efa | 2006-04-02 17:46:20 +0100 | [diff] [blame] | 2315 | .name = "i2c_fck", |
| 2316 | .id = 2, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2317 | .parent = &func_12m_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2318 | .flags = CLOCK_IN_OMAP242X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2319 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2320 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 2321 | .enable_bit = OMAP2420_EN_I2C2_SHIFT, |
| 2322 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2323 | }; |
| 2324 | |
| 2325 | static struct clk i2chs2_fck = { |
Syed Mohammed Khasim | 4574eb6 | 2008-11-21 13:39:45 -0800 | [diff] [blame] | 2326 | .name = "i2c_fck", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2327 | .id = 2, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2328 | .parent = &func_96m_ck, |
| 2329 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2330 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2331 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 2332 | .enable_bit = OMAP2430_EN_I2CHS2_SHIFT, |
| 2333 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2334 | }; |
| 2335 | |
| 2336 | static struct clk i2c1_ick = { |
Tony Lindgren | b824efa | 2006-04-02 17:46:20 +0100 | [diff] [blame] | 2337 | .name = "i2c_ick", |
| 2338 | .id = 1, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2339 | .parent = &l4_ck, |
| 2340 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2341 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2342 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 2343 | .enable_bit = OMAP2420_EN_I2C1_SHIFT, |
| 2344 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2345 | }; |
| 2346 | |
| 2347 | static struct clk i2c1_fck = { |
Tony Lindgren | b824efa | 2006-04-02 17:46:20 +0100 | [diff] [blame] | 2348 | .name = "i2c_fck", |
| 2349 | .id = 1, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2350 | .parent = &func_12m_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2351 | .flags = CLOCK_IN_OMAP242X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2352 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2353 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 2354 | .enable_bit = OMAP2420_EN_I2C1_SHIFT, |
| 2355 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2356 | }; |
| 2357 | |
| 2358 | static struct clk i2chs1_fck = { |
Syed Mohammed Khasim | 4574eb6 | 2008-11-21 13:39:45 -0800 | [diff] [blame] | 2359 | .name = "i2c_fck", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2360 | .id = 1, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2361 | .parent = &func_96m_ck, |
| 2362 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2363 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2364 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 2365 | .enable_bit = OMAP2430_EN_I2CHS1_SHIFT, |
| 2366 | .recalc = &followparent_recalc, |
| 2367 | }; |
| 2368 | |
| 2369 | static struct clk gpmc_fck = { |
| 2370 | .name = "gpmc_fck", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 2371 | .ops = &clkops_null, /* RMK: missing? */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2372 | .parent = &core_l3_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2373 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
| 2374 | ENABLE_ON_INIT, |
| 2375 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2376 | .recalc = &followparent_recalc, |
| 2377 | }; |
| 2378 | |
| 2379 | static struct clk sdma_fck = { |
| 2380 | .name = "sdma_fck", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 2381 | .ops = &clkops_null, /* RMK: missing? */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2382 | .parent = &core_l3_ck, |
| 2383 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2384 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2385 | .recalc = &followparent_recalc, |
| 2386 | }; |
| 2387 | |
| 2388 | static struct clk sdma_ick = { |
| 2389 | .name = "sdma_ick", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 2390 | .ops = &clkops_null, /* RMK: missing? */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2391 | .parent = &l4_ck, |
| 2392 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2393 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2394 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2395 | }; |
| 2396 | |
| 2397 | static struct clk vlynq_ick = { |
| 2398 | .name = "vlynq_ick", |
| 2399 | .parent = &core_l3_ck, |
| 2400 | .flags = CLOCK_IN_OMAP242X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2401 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2402 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 2403 | .enable_bit = OMAP2420_EN_VLYNQ_SHIFT, |
| 2404 | .recalc = &followparent_recalc, |
| 2405 | }; |
| 2406 | |
| 2407 | static const struct clksel_rate vlynq_fck_96m_rates[] = { |
| 2408 | { .div = 1, .val = 0, .flags = RATE_IN_242X | DEFAULT_RATE }, |
| 2409 | { .div = 0 } |
| 2410 | }; |
| 2411 | |
| 2412 | static const struct clksel_rate vlynq_fck_core_rates[] = { |
| 2413 | { .div = 1, .val = 1, .flags = RATE_IN_242X }, |
| 2414 | { .div = 2, .val = 2, .flags = RATE_IN_242X }, |
| 2415 | { .div = 3, .val = 3, .flags = RATE_IN_242X }, |
| 2416 | { .div = 4, .val = 4, .flags = RATE_IN_242X }, |
| 2417 | { .div = 6, .val = 6, .flags = RATE_IN_242X }, |
| 2418 | { .div = 8, .val = 8, .flags = RATE_IN_242X }, |
| 2419 | { .div = 9, .val = 9, .flags = RATE_IN_242X }, |
| 2420 | { .div = 12, .val = 12, .flags = RATE_IN_242X }, |
| 2421 | { .div = 16, .val = 16, .flags = RATE_IN_242X | DEFAULT_RATE }, |
| 2422 | { .div = 18, .val = 18, .flags = RATE_IN_242X }, |
| 2423 | { .div = 0 } |
| 2424 | }; |
| 2425 | |
| 2426 | static const struct clksel vlynq_fck_clksel[] = { |
| 2427 | { .parent = &func_96m_ck, .rates = vlynq_fck_96m_rates }, |
| 2428 | { .parent = &core_ck, .rates = vlynq_fck_core_rates }, |
| 2429 | { .parent = NULL } |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2430 | }; |
| 2431 | |
| 2432 | static struct clk vlynq_fck = { |
| 2433 | .name = "vlynq_fck", |
| 2434 | .parent = &func_96m_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2435 | .flags = CLOCK_IN_OMAP242X | DELAYED_APP, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2436 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2437 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 2438 | .enable_bit = OMAP2420_EN_VLYNQ_SHIFT, |
| 2439 | .init = &omap2_init_clksel_parent, |
| 2440 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1), |
| 2441 | .clksel_mask = OMAP2420_CLKSEL_VLYNQ_MASK, |
| 2442 | .clksel = vlynq_fck_clksel, |
| 2443 | .recalc = &omap2_clksel_recalc, |
| 2444 | .round_rate = &omap2_clksel_round_rate, |
| 2445 | .set_rate = &omap2_clksel_set_rate |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2446 | }; |
| 2447 | |
| 2448 | static struct clk sdrc_ick = { |
| 2449 | .name = "sdrc_ick", |
| 2450 | .parent = &l4_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2451 | .flags = CLOCK_IN_OMAP243X | ENABLE_ON_INIT, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2452 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2453 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3), |
| 2454 | .enable_bit = OMAP2430_EN_SDRC_SHIFT, |
| 2455 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2456 | }; |
| 2457 | |
| 2458 | static struct clk des_ick = { |
| 2459 | .name = "des_ick", |
| 2460 | .parent = &l4_ck, |
| 2461 | .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2462 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2463 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), |
| 2464 | .enable_bit = OMAP24XX_EN_DES_SHIFT, |
| 2465 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2466 | }; |
| 2467 | |
| 2468 | static struct clk sha_ick = { |
| 2469 | .name = "sha_ick", |
| 2470 | .parent = &l4_ck, |
| 2471 | .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2472 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2473 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), |
| 2474 | .enable_bit = OMAP24XX_EN_SHA_SHIFT, |
| 2475 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2476 | }; |
| 2477 | |
| 2478 | static struct clk rng_ick = { |
| 2479 | .name = "rng_ick", |
| 2480 | .parent = &l4_ck, |
| 2481 | .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2482 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2483 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), |
| 2484 | .enable_bit = OMAP24XX_EN_RNG_SHIFT, |
| 2485 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2486 | }; |
| 2487 | |
| 2488 | static struct clk aes_ick = { |
| 2489 | .name = "aes_ick", |
| 2490 | .parent = &l4_ck, |
| 2491 | .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2492 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2493 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), |
| 2494 | .enable_bit = OMAP24XX_EN_AES_SHIFT, |
| 2495 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2496 | }; |
| 2497 | |
| 2498 | static struct clk pka_ick = { |
| 2499 | .name = "pka_ick", |
| 2500 | .parent = &l4_ck, |
| 2501 | .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2502 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2503 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), |
| 2504 | .enable_bit = OMAP24XX_EN_PKA_SHIFT, |
| 2505 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2506 | }; |
| 2507 | |
| 2508 | static struct clk usb_fck = { |
| 2509 | .name = "usb_fck", |
| 2510 | .parent = &func_48m_ck, |
| 2511 | .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2512 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2513 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 2514 | .enable_bit = OMAP24XX_EN_USB_SHIFT, |
| 2515 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2516 | }; |
| 2517 | |
| 2518 | static struct clk usbhs_ick = { |
| 2519 | .name = "usbhs_ick", |
Tony Lindgren | fde0fd4 | 2006-01-17 15:31:18 -0800 | [diff] [blame] | 2520 | .parent = &core_l3_ck, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2521 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2522 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2523 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 2524 | .enable_bit = OMAP2430_EN_USBHS_SHIFT, |
| 2525 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2526 | }; |
| 2527 | |
| 2528 | static struct clk mmchs1_ick = { |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2529 | .name = "mmchs_ick", |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2530 | .parent = &l4_ck, |
| 2531 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2532 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2533 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 2534 | .enable_bit = OMAP2430_EN_MMCHS1_SHIFT, |
| 2535 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2536 | }; |
| 2537 | |
| 2538 | static struct clk mmchs1_fck = { |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2539 | .name = "mmchs_fck", |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2540 | .parent = &func_96m_ck, |
| 2541 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2542 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2543 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 2544 | .enable_bit = OMAP2430_EN_MMCHS1_SHIFT, |
| 2545 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2546 | }; |
| 2547 | |
| 2548 | static struct clk mmchs2_ick = { |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2549 | .name = "mmchs_ick", |
Tony Lindgren | d887466 | 2008-12-10 17:37:16 -0800 | [diff] [blame] | 2550 | .id = 1, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2551 | .parent = &l4_ck, |
| 2552 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2553 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2554 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 2555 | .enable_bit = OMAP2430_EN_MMCHS2_SHIFT, |
| 2556 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2557 | }; |
| 2558 | |
| 2559 | static struct clk mmchs2_fck = { |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2560 | .name = "mmchs_fck", |
Tony Lindgren | d887466 | 2008-12-10 17:37:16 -0800 | [diff] [blame] | 2561 | .id = 1, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2562 | .parent = &func_96m_ck, |
| 2563 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2564 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 2565 | .enable_bit = OMAP2430_EN_MMCHS2_SHIFT, |
| 2566 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2567 | }; |
| 2568 | |
| 2569 | static struct clk gpio5_ick = { |
| 2570 | .name = "gpio5_ick", |
| 2571 | .parent = &l4_ck, |
| 2572 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2573 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2574 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 2575 | .enable_bit = OMAP2430_EN_GPIO5_SHIFT, |
| 2576 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2577 | }; |
| 2578 | |
| 2579 | static struct clk gpio5_fck = { |
| 2580 | .name = "gpio5_fck", |
| 2581 | .parent = &func_32k_ck, |
| 2582 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2583 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2584 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 2585 | .enable_bit = OMAP2430_EN_GPIO5_SHIFT, |
| 2586 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2587 | }; |
| 2588 | |
| 2589 | static struct clk mdm_intc_ick = { |
| 2590 | .name = "mdm_intc_ick", |
| 2591 | .parent = &l4_ck, |
| 2592 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2593 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2594 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 2595 | .enable_bit = OMAP2430_EN_MDM_INTC_SHIFT, |
| 2596 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2597 | }; |
| 2598 | |
| 2599 | static struct clk mmchsdb1_fck = { |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2600 | .name = "mmchsdb_fck", |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2601 | .parent = &func_32k_ck, |
| 2602 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2603 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2604 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 2605 | .enable_bit = OMAP2430_EN_MMCHSDB1_SHIFT, |
| 2606 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2607 | }; |
| 2608 | |
| 2609 | static struct clk mmchsdb2_fck = { |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2610 | .name = "mmchsdb_fck", |
Tony Lindgren | d887466 | 2008-12-10 17:37:16 -0800 | [diff] [blame] | 2611 | .id = 1, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2612 | .parent = &func_32k_ck, |
| 2613 | .flags = CLOCK_IN_OMAP243X, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2614 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2615 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 2616 | .enable_bit = OMAP2430_EN_MMCHSDB2_SHIFT, |
| 2617 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2618 | }; |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2619 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2620 | /* |
| 2621 | * This clock is a composite clock which does entire set changes then |
| 2622 | * forces a rebalance. It keys on the MPU speed, but it really could |
| 2623 | * be any key speed part of a set in the rate table. |
| 2624 | * |
| 2625 | * to really change a set, you need memory table sets which get changed |
| 2626 | * in sram, pre-notifiers & post notifiers, changing the top set, without |
| 2627 | * having low level display recalc's won't work... this is why dpm notifiers |
| 2628 | * work, isr's off, walk a list of clocks already _off_ and not messing with |
| 2629 | * the bus. |
| 2630 | * |
| 2631 | * This clock should have no parent. It embodies the entire upper level |
| 2632 | * active set. A parent will mess up some of the init also. |
| 2633 | */ |
| 2634 | static struct clk virt_prcm_set = { |
| 2635 | .name = "virt_prcm_set", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 2636 | .ops = &clkops_null, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2637 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame^] | 2638 | DELAYED_APP, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2639 | .parent = &mpu_ck, /* Indexed by mpu speed, no parent */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2640 | .recalc = &omap2_table_mpu_recalc, /* sets are keyed on mpu rate */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2641 | .set_rate = &omap2_select_table_rate, |
| 2642 | .round_rate = &omap2_round_to_table_rate, |
| 2643 | }; |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2644 | |
| 2645 | static struct clk *onchip_24xx_clks[] __initdata = { |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2646 | /* external root sources */ |
| 2647 | &func_32k_ck, |
| 2648 | &osc_ck, |
| 2649 | &sys_ck, |
| 2650 | &alt_ck, |
| 2651 | /* internal analog sources */ |
| 2652 | &dpll_ck, |
| 2653 | &apll96_ck, |
| 2654 | &apll54_ck, |
| 2655 | /* internal prcm root sources */ |
| 2656 | &func_54m_ck, |
| 2657 | &core_ck, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2658 | &func_96m_ck, |
| 2659 | &func_48m_ck, |
| 2660 | &func_12m_ck, |
| 2661 | &wdt1_osc_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2662 | &sys_clkout_src, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2663 | &sys_clkout, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2664 | &sys_clkout2_src, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2665 | &sys_clkout2, |
Tony Lindgren | b824efa | 2006-04-02 17:46:20 +0100 | [diff] [blame] | 2666 | &emul_ck, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2667 | /* mpu domain clocks */ |
| 2668 | &mpu_ck, |
| 2669 | /* dsp domain clocks */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2670 | &dsp_fck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2671 | &dsp_irate_ick, |
| 2672 | &dsp_ick, /* 242x */ |
| 2673 | &iva2_1_ick, /* 243x */ |
| 2674 | &iva1_ifck, /* 242x */ |
| 2675 | &iva1_mpu_int_ifck, /* 242x */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2676 | /* GFX domain clocks */ |
| 2677 | &gfx_3d_fck, |
| 2678 | &gfx_2d_fck, |
| 2679 | &gfx_ick, |
| 2680 | /* Modem domain clocks */ |
| 2681 | &mdm_ick, |
| 2682 | &mdm_osc_ck, |
| 2683 | /* DSS domain clocks */ |
| 2684 | &dss_ick, |
| 2685 | &dss1_fck, |
| 2686 | &dss2_fck, |
| 2687 | &dss_54m_fck, |
| 2688 | /* L3 domain clocks */ |
| 2689 | &core_l3_ck, |
| 2690 | &ssi_ssr_sst_fck, |
| 2691 | &usb_l4_ick, |
| 2692 | /* L4 domain clocks */ |
| 2693 | &l4_ck, /* used as both core_l4 and wu_l4 */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2694 | /* virtual meta-group clock */ |
| 2695 | &virt_prcm_set, |
| 2696 | /* general l4 interface ck, multi-parent functional clk */ |
| 2697 | &gpt1_ick, |
| 2698 | &gpt1_fck, |
| 2699 | &gpt2_ick, |
| 2700 | &gpt2_fck, |
| 2701 | &gpt3_ick, |
| 2702 | &gpt3_fck, |
| 2703 | &gpt4_ick, |
| 2704 | &gpt4_fck, |
| 2705 | &gpt5_ick, |
| 2706 | &gpt5_fck, |
| 2707 | &gpt6_ick, |
| 2708 | &gpt6_fck, |
| 2709 | &gpt7_ick, |
| 2710 | &gpt7_fck, |
| 2711 | &gpt8_ick, |
| 2712 | &gpt8_fck, |
| 2713 | &gpt9_ick, |
| 2714 | &gpt9_fck, |
| 2715 | &gpt10_ick, |
| 2716 | &gpt10_fck, |
| 2717 | &gpt11_ick, |
| 2718 | &gpt11_fck, |
| 2719 | &gpt12_ick, |
| 2720 | &gpt12_fck, |
| 2721 | &mcbsp1_ick, |
| 2722 | &mcbsp1_fck, |
| 2723 | &mcbsp2_ick, |
| 2724 | &mcbsp2_fck, |
| 2725 | &mcbsp3_ick, |
| 2726 | &mcbsp3_fck, |
| 2727 | &mcbsp4_ick, |
| 2728 | &mcbsp4_fck, |
| 2729 | &mcbsp5_ick, |
| 2730 | &mcbsp5_fck, |
| 2731 | &mcspi1_ick, |
| 2732 | &mcspi1_fck, |
| 2733 | &mcspi2_ick, |
| 2734 | &mcspi2_fck, |
| 2735 | &mcspi3_ick, |
| 2736 | &mcspi3_fck, |
| 2737 | &uart1_ick, |
| 2738 | &uart1_fck, |
| 2739 | &uart2_ick, |
| 2740 | &uart2_fck, |
| 2741 | &uart3_ick, |
| 2742 | &uart3_fck, |
| 2743 | &gpios_ick, |
| 2744 | &gpios_fck, |
| 2745 | &mpu_wdt_ick, |
| 2746 | &mpu_wdt_fck, |
| 2747 | &sync_32k_ick, |
| 2748 | &wdt1_ick, |
| 2749 | &omapctrl_ick, |
| 2750 | &icr_ick, |
| 2751 | &cam_fck, |
| 2752 | &cam_ick, |
| 2753 | &mailboxes_ick, |
| 2754 | &wdt4_ick, |
| 2755 | &wdt4_fck, |
| 2756 | &wdt3_ick, |
| 2757 | &wdt3_fck, |
| 2758 | &mspro_ick, |
| 2759 | &mspro_fck, |
| 2760 | &mmc_ick, |
| 2761 | &mmc_fck, |
| 2762 | &fac_ick, |
| 2763 | &fac_fck, |
| 2764 | &eac_ick, |
| 2765 | &eac_fck, |
| 2766 | &hdq_ick, |
| 2767 | &hdq_fck, |
| 2768 | &i2c1_ick, |
| 2769 | &i2c1_fck, |
| 2770 | &i2chs1_fck, |
| 2771 | &i2c2_ick, |
| 2772 | &i2c2_fck, |
| 2773 | &i2chs2_fck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2774 | &gpmc_fck, |
| 2775 | &sdma_fck, |
| 2776 | &sdma_ick, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2777 | &vlynq_ick, |
| 2778 | &vlynq_fck, |
| 2779 | &sdrc_ick, |
| 2780 | &des_ick, |
| 2781 | &sha_ick, |
| 2782 | &rng_ick, |
| 2783 | &aes_ick, |
| 2784 | &pka_ick, |
| 2785 | &usb_fck, |
| 2786 | &usbhs_ick, |
| 2787 | &mmchs1_ick, |
| 2788 | &mmchs1_fck, |
| 2789 | &mmchs2_ick, |
| 2790 | &mmchs2_fck, |
| 2791 | &gpio5_ick, |
| 2792 | &gpio5_fck, |
| 2793 | &mdm_intc_ick, |
| 2794 | &mmchsdb1_fck, |
| 2795 | &mmchsdb2_fck, |
| 2796 | }; |
| 2797 | |
| 2798 | #endif |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 2799 | |