Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1 | /* |
| 2 | * OMAP4 Clock data |
| 3 | * |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 4 | * Copyright (C) 2009-2010 Texas Instruments, Inc. |
| 5 | * Copyright (C) 2009-2010 Nokia Corporation |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 6 | * |
| 7 | * Paul Walmsley (paul@pwsan.com) |
| 8 | * Rajendra Nayak (rnayak@ti.com) |
| 9 | * Benoit Cousson (b-cousson@ti.com) |
| 10 | * |
| 11 | * This file is automatically generated from the OMAP hardware databases. |
| 12 | * We respectfully ask that any modifications to this file be coordinated |
| 13 | * with the public linux-omap@vger.kernel.org mailing list and the |
| 14 | * authors above to ensure that the autogeneration scripts are kept |
| 15 | * up-to-date with the file contents. |
| 16 | * |
| 17 | * This program is free software; you can redistribute it and/or modify |
| 18 | * it under the terms of the GNU General Public License version 2 as |
| 19 | * published by the Free Software Foundation. |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 20 | * |
| 21 | * XXX Some of the ES1 clocks have been removed/changed; once support |
| 22 | * is added for discriminating clocks by ES level, these should be added back |
| 23 | * in. |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 24 | */ |
| 25 | |
| 26 | #include <linux/kernel.h> |
Paul Walmsley | 93340a2 | 2010-02-22 22:09:12 -0700 | [diff] [blame] | 27 | #include <linux/list.h> |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 28 | #include <linux/clk.h> |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 29 | #include <plat/clkdev_omap.h> |
| 30 | |
| 31 | #include "clock.h" |
| 32 | #include "clock44xx.h" |
Paul Walmsley | d198b51 | 2010-12-21 15:30:54 -0700 | [diff] [blame] | 33 | #include "cm1_44xx.h" |
| 34 | #include "cm2_44xx.h" |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 35 | #include "cm-regbits-44xx.h" |
Paul Walmsley | 59fb659 | 2010-12-21 15:30:55 -0700 | [diff] [blame] | 36 | #include "prm44xx.h" |
Paul Walmsley | d198b51 | 2010-12-21 15:30:54 -0700 | [diff] [blame] | 37 | #include "prm44xx.h" |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 38 | #include "prm-regbits-44xx.h" |
Paul Walmsley | 4814ced | 2010-10-08 11:40:20 -0600 | [diff] [blame] | 39 | #include "control.h" |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 40 | |
Paul Walmsley | 59fb659 | 2010-12-21 15:30:55 -0700 | [diff] [blame] | 41 | /* OMAP4 modulemode control */ |
| 42 | #define OMAP4430_MODULEMODE_HWCTRL 0 |
| 43 | #define OMAP4430_MODULEMODE_SWCTRL 1 |
| 44 | |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 45 | /* Root clocks */ |
| 46 | |
| 47 | static struct clk extalt_clkin_ck = { |
| 48 | .name = "extalt_clkin_ck", |
| 49 | .rate = 59000000, |
| 50 | .ops = &clkops_null, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 51 | }; |
| 52 | |
| 53 | static struct clk pad_clks_ck = { |
| 54 | .name = "pad_clks_ck", |
| 55 | .rate = 12000000, |
Benoit Cousson | d9b98f5 | 2010-12-21 21:08:13 -0700 | [diff] [blame^] | 56 | .ops = &clkops_omap2_dflt, |
| 57 | .enable_reg = OMAP4430_CM_CLKSEL_ABE, |
| 58 | .enable_bit = OMAP4430_PAD_CLKS_GATE_SHIFT, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 59 | }; |
| 60 | |
| 61 | static struct clk pad_slimbus_core_clks_ck = { |
| 62 | .name = "pad_slimbus_core_clks_ck", |
| 63 | .rate = 12000000, |
| 64 | .ops = &clkops_null, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 65 | }; |
| 66 | |
| 67 | static struct clk secure_32k_clk_src_ck = { |
| 68 | .name = "secure_32k_clk_src_ck", |
| 69 | .rate = 32768, |
| 70 | .ops = &clkops_null, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 71 | }; |
| 72 | |
| 73 | static struct clk slimbus_clk = { |
| 74 | .name = "slimbus_clk", |
| 75 | .rate = 12000000, |
Benoit Cousson | d9b98f5 | 2010-12-21 21:08:13 -0700 | [diff] [blame^] | 76 | .ops = &clkops_omap2_dflt, |
| 77 | .enable_reg = OMAP4430_CM_CLKSEL_ABE, |
| 78 | .enable_bit = OMAP4430_SLIMBUS_CLK_GATE_SHIFT, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 79 | }; |
| 80 | |
| 81 | static struct clk sys_32k_ck = { |
| 82 | .name = "sys_32k_ck", |
| 83 | .rate = 32768, |
| 84 | .ops = &clkops_null, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 85 | }; |
| 86 | |
| 87 | static struct clk virt_12000000_ck = { |
| 88 | .name = "virt_12000000_ck", |
| 89 | .ops = &clkops_null, |
| 90 | .rate = 12000000, |
| 91 | }; |
| 92 | |
| 93 | static struct clk virt_13000000_ck = { |
| 94 | .name = "virt_13000000_ck", |
| 95 | .ops = &clkops_null, |
| 96 | .rate = 13000000, |
| 97 | }; |
| 98 | |
| 99 | static struct clk virt_16800000_ck = { |
| 100 | .name = "virt_16800000_ck", |
| 101 | .ops = &clkops_null, |
| 102 | .rate = 16800000, |
| 103 | }; |
| 104 | |
| 105 | static struct clk virt_19200000_ck = { |
| 106 | .name = "virt_19200000_ck", |
| 107 | .ops = &clkops_null, |
| 108 | .rate = 19200000, |
| 109 | }; |
| 110 | |
| 111 | static struct clk virt_26000000_ck = { |
| 112 | .name = "virt_26000000_ck", |
| 113 | .ops = &clkops_null, |
| 114 | .rate = 26000000, |
| 115 | }; |
| 116 | |
| 117 | static struct clk virt_27000000_ck = { |
| 118 | .name = "virt_27000000_ck", |
| 119 | .ops = &clkops_null, |
| 120 | .rate = 27000000, |
| 121 | }; |
| 122 | |
| 123 | static struct clk virt_38400000_ck = { |
| 124 | .name = "virt_38400000_ck", |
| 125 | .ops = &clkops_null, |
| 126 | .rate = 38400000, |
| 127 | }; |
| 128 | |
| 129 | static const struct clksel_rate div_1_0_rates[] = { |
| 130 | { .div = 1, .val = 0, .flags = RATE_IN_4430 }, |
| 131 | { .div = 0 }, |
| 132 | }; |
| 133 | |
| 134 | static const struct clksel_rate div_1_1_rates[] = { |
| 135 | { .div = 1, .val = 1, .flags = RATE_IN_4430 }, |
| 136 | { .div = 0 }, |
| 137 | }; |
| 138 | |
| 139 | static const struct clksel_rate div_1_2_rates[] = { |
| 140 | { .div = 1, .val = 2, .flags = RATE_IN_4430 }, |
| 141 | { .div = 0 }, |
| 142 | }; |
| 143 | |
| 144 | static const struct clksel_rate div_1_3_rates[] = { |
| 145 | { .div = 1, .val = 3, .flags = RATE_IN_4430 }, |
| 146 | { .div = 0 }, |
| 147 | }; |
| 148 | |
| 149 | static const struct clksel_rate div_1_4_rates[] = { |
| 150 | { .div = 1, .val = 4, .flags = RATE_IN_4430 }, |
| 151 | { .div = 0 }, |
| 152 | }; |
| 153 | |
| 154 | static const struct clksel_rate div_1_5_rates[] = { |
| 155 | { .div = 1, .val = 5, .flags = RATE_IN_4430 }, |
| 156 | { .div = 0 }, |
| 157 | }; |
| 158 | |
| 159 | static const struct clksel_rate div_1_6_rates[] = { |
| 160 | { .div = 1, .val = 6, .flags = RATE_IN_4430 }, |
| 161 | { .div = 0 }, |
| 162 | }; |
| 163 | |
| 164 | static const struct clksel_rate div_1_7_rates[] = { |
| 165 | { .div = 1, .val = 7, .flags = RATE_IN_4430 }, |
| 166 | { .div = 0 }, |
| 167 | }; |
| 168 | |
| 169 | static const struct clksel sys_clkin_sel[] = { |
| 170 | { .parent = &virt_12000000_ck, .rates = div_1_1_rates }, |
| 171 | { .parent = &virt_13000000_ck, .rates = div_1_2_rates }, |
| 172 | { .parent = &virt_16800000_ck, .rates = div_1_3_rates }, |
| 173 | { .parent = &virt_19200000_ck, .rates = div_1_4_rates }, |
| 174 | { .parent = &virt_26000000_ck, .rates = div_1_5_rates }, |
| 175 | { .parent = &virt_27000000_ck, .rates = div_1_6_rates }, |
| 176 | { .parent = &virt_38400000_ck, .rates = div_1_7_rates }, |
| 177 | { .parent = NULL }, |
| 178 | }; |
| 179 | |
| 180 | static struct clk sys_clkin_ck = { |
| 181 | .name = "sys_clkin_ck", |
| 182 | .rate = 38400000, |
| 183 | .clksel = sys_clkin_sel, |
| 184 | .init = &omap2_init_clksel_parent, |
| 185 | .clksel_reg = OMAP4430_CM_SYS_CLKSEL, |
| 186 | .clksel_mask = OMAP4430_SYS_CLKSEL_MASK, |
| 187 | .ops = &clkops_null, |
| 188 | .recalc = &omap2_clksel_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 189 | }; |
| 190 | |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 191 | static struct clk tie_low_clock_ck = { |
| 192 | .name = "tie_low_clock_ck", |
| 193 | .rate = 0, |
| 194 | .ops = &clkops_null, |
| 195 | }; |
| 196 | |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 197 | static struct clk utmi_phy_clkout_ck = { |
| 198 | .name = "utmi_phy_clkout_ck", |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 199 | .rate = 60000000, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 200 | .ops = &clkops_null, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 201 | }; |
| 202 | |
| 203 | static struct clk xclk60mhsp1_ck = { |
| 204 | .name = "xclk60mhsp1_ck", |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 205 | .rate = 60000000, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 206 | .ops = &clkops_null, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 207 | }; |
| 208 | |
| 209 | static struct clk xclk60mhsp2_ck = { |
| 210 | .name = "xclk60mhsp2_ck", |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 211 | .rate = 60000000, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 212 | .ops = &clkops_null, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 213 | }; |
| 214 | |
| 215 | static struct clk xclk60motg_ck = { |
| 216 | .name = "xclk60motg_ck", |
| 217 | .rate = 60000000, |
| 218 | .ops = &clkops_null, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 219 | }; |
| 220 | |
| 221 | /* Module clocks and DPLL outputs */ |
| 222 | |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 223 | static const struct clksel abe_dpll_bypass_clk_mux_sel[] = { |
| 224 | { .parent = &sys_clkin_ck, .rates = div_1_0_rates }, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 225 | { .parent = &sys_32k_ck, .rates = div_1_1_rates }, |
| 226 | { .parent = NULL }, |
| 227 | }; |
| 228 | |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 229 | static struct clk abe_dpll_bypass_clk_mux_ck = { |
| 230 | .name = "abe_dpll_bypass_clk_mux_ck", |
| 231 | .parent = &sys_clkin_ck, |
| 232 | .ops = &clkops_null, |
| 233 | .recalc = &followparent_recalc, |
| 234 | }; |
| 235 | |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 236 | static struct clk abe_dpll_refclk_mux_ck = { |
| 237 | .name = "abe_dpll_refclk_mux_ck", |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 238 | .parent = &sys_clkin_ck, |
| 239 | .clksel = abe_dpll_bypass_clk_mux_sel, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 240 | .init = &omap2_init_clksel_parent, |
| 241 | .clksel_reg = OMAP4430_CM_ABE_PLL_REF_CLKSEL, |
| 242 | .clksel_mask = OMAP4430_CLKSEL_0_0_MASK, |
| 243 | .ops = &clkops_null, |
| 244 | .recalc = &omap2_clksel_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 245 | }; |
| 246 | |
| 247 | /* DPLL_ABE */ |
| 248 | static struct dpll_data dpll_abe_dd = { |
| 249 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_ABE, |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 250 | .clk_bypass = &abe_dpll_bypass_clk_mux_ck, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 251 | .clk_ref = &abe_dpll_refclk_mux_ck, |
| 252 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_ABE, |
| 253 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), |
| 254 | .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_ABE, |
| 255 | .idlest_reg = OMAP4430_CM_IDLEST_DPLL_ABE, |
| 256 | .mult_mask = OMAP4430_DPLL_MULT_MASK, |
| 257 | .div1_mask = OMAP4430_DPLL_DIV_MASK, |
| 258 | .enable_mask = OMAP4430_DPLL_EN_MASK, |
| 259 | .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, |
| 260 | .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, |
| 261 | .max_multiplier = OMAP4430_MAX_DPLL_MULT, |
| 262 | .max_divider = OMAP4430_MAX_DPLL_DIV, |
| 263 | .min_divider = 1, |
| 264 | }; |
| 265 | |
| 266 | |
| 267 | static struct clk dpll_abe_ck = { |
| 268 | .name = "dpll_abe_ck", |
| 269 | .parent = &abe_dpll_refclk_mux_ck, |
| 270 | .dpll_data = &dpll_abe_dd, |
Rajendra Nayak | 911bd73 | 2009-12-08 18:47:17 -0700 | [diff] [blame] | 271 | .init = &omap2_init_dpll_parent, |
Paul Walmsley | 657ebfa | 2010-02-22 22:09:20 -0700 | [diff] [blame] | 272 | .ops = &clkops_omap3_noncore_dpll_ops, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 273 | .recalc = &omap3_dpll_recalc, |
| 274 | .round_rate = &omap2_dpll_round_rate, |
| 275 | .set_rate = &omap3_noncore_dpll_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 276 | }; |
| 277 | |
| 278 | static struct clk dpll_abe_m2x2_ck = { |
| 279 | .name = "dpll_abe_m2x2_ck", |
| 280 | .parent = &dpll_abe_ck, |
| 281 | .ops = &clkops_null, |
| 282 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 283 | }; |
| 284 | |
| 285 | static struct clk abe_24m_fclk = { |
| 286 | .name = "abe_24m_fclk", |
| 287 | .parent = &dpll_abe_m2x2_ck, |
| 288 | .ops = &clkops_null, |
| 289 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 290 | }; |
| 291 | |
| 292 | static const struct clksel_rate div3_1to4_rates[] = { |
| 293 | { .div = 1, .val = 0, .flags = RATE_IN_4430 }, |
| 294 | { .div = 2, .val = 1, .flags = RATE_IN_4430 }, |
| 295 | { .div = 4, .val = 2, .flags = RATE_IN_4430 }, |
| 296 | { .div = 0 }, |
| 297 | }; |
| 298 | |
| 299 | static const struct clksel abe_clk_div[] = { |
| 300 | { .parent = &dpll_abe_m2x2_ck, .rates = div3_1to4_rates }, |
| 301 | { .parent = NULL }, |
| 302 | }; |
| 303 | |
| 304 | static struct clk abe_clk = { |
| 305 | .name = "abe_clk", |
| 306 | .parent = &dpll_abe_m2x2_ck, |
| 307 | .clksel = abe_clk_div, |
| 308 | .clksel_reg = OMAP4430_CM_CLKSEL_ABE, |
| 309 | .clksel_mask = OMAP4430_CLKSEL_OPP_MASK, |
| 310 | .ops = &clkops_null, |
| 311 | .recalc = &omap2_clksel_recalc, |
| 312 | .round_rate = &omap2_clksel_round_rate, |
| 313 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 314 | }; |
| 315 | |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 316 | static const struct clksel_rate div2_1to2_rates[] = { |
| 317 | { .div = 1, .val = 0, .flags = RATE_IN_4430 }, |
| 318 | { .div = 2, .val = 1, .flags = RATE_IN_4430 }, |
| 319 | { .div = 0 }, |
| 320 | }; |
| 321 | |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 322 | static const struct clksel aess_fclk_div[] = { |
| 323 | { .parent = &abe_clk, .rates = div2_1to2_rates }, |
| 324 | { .parent = NULL }, |
| 325 | }; |
| 326 | |
| 327 | static struct clk aess_fclk = { |
| 328 | .name = "aess_fclk", |
| 329 | .parent = &abe_clk, |
| 330 | .clksel = aess_fclk_div, |
| 331 | .clksel_reg = OMAP4430_CM1_ABE_AESS_CLKCTRL, |
| 332 | .clksel_mask = OMAP4430_CLKSEL_AESS_FCLK_MASK, |
| 333 | .ops = &clkops_null, |
| 334 | .recalc = &omap2_clksel_recalc, |
| 335 | .round_rate = &omap2_clksel_round_rate, |
| 336 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 337 | }; |
| 338 | |
| 339 | static const struct clksel_rate div31_1to31_rates[] = { |
Rajendra Nayak | ecbb065 | 2010-01-19 17:30:55 -0700 | [diff] [blame] | 340 | { .div = 1, .val = 1, .flags = RATE_IN_4430 }, |
| 341 | { .div = 2, .val = 2, .flags = RATE_IN_4430 }, |
| 342 | { .div = 3, .val = 3, .flags = RATE_IN_4430 }, |
| 343 | { .div = 4, .val = 4, .flags = RATE_IN_4430 }, |
| 344 | { .div = 5, .val = 5, .flags = RATE_IN_4430 }, |
| 345 | { .div = 6, .val = 6, .flags = RATE_IN_4430 }, |
| 346 | { .div = 7, .val = 7, .flags = RATE_IN_4430 }, |
| 347 | { .div = 8, .val = 8, .flags = RATE_IN_4430 }, |
| 348 | { .div = 9, .val = 9, .flags = RATE_IN_4430 }, |
| 349 | { .div = 10, .val = 10, .flags = RATE_IN_4430 }, |
| 350 | { .div = 11, .val = 11, .flags = RATE_IN_4430 }, |
| 351 | { .div = 12, .val = 12, .flags = RATE_IN_4430 }, |
| 352 | { .div = 13, .val = 13, .flags = RATE_IN_4430 }, |
| 353 | { .div = 14, .val = 14, .flags = RATE_IN_4430 }, |
| 354 | { .div = 15, .val = 15, .flags = RATE_IN_4430 }, |
| 355 | { .div = 16, .val = 16, .flags = RATE_IN_4430 }, |
| 356 | { .div = 17, .val = 17, .flags = RATE_IN_4430 }, |
| 357 | { .div = 18, .val = 18, .flags = RATE_IN_4430 }, |
| 358 | { .div = 19, .val = 19, .flags = RATE_IN_4430 }, |
| 359 | { .div = 20, .val = 20, .flags = RATE_IN_4430 }, |
| 360 | { .div = 21, .val = 21, .flags = RATE_IN_4430 }, |
| 361 | { .div = 22, .val = 22, .flags = RATE_IN_4430 }, |
| 362 | { .div = 23, .val = 23, .flags = RATE_IN_4430 }, |
| 363 | { .div = 24, .val = 24, .flags = RATE_IN_4430 }, |
| 364 | { .div = 25, .val = 25, .flags = RATE_IN_4430 }, |
| 365 | { .div = 26, .val = 26, .flags = RATE_IN_4430 }, |
| 366 | { .div = 27, .val = 27, .flags = RATE_IN_4430 }, |
| 367 | { .div = 28, .val = 28, .flags = RATE_IN_4430 }, |
| 368 | { .div = 29, .val = 29, .flags = RATE_IN_4430 }, |
| 369 | { .div = 30, .val = 30, .flags = RATE_IN_4430 }, |
| 370 | { .div = 31, .val = 31, .flags = RATE_IN_4430 }, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 371 | { .div = 0 }, |
| 372 | }; |
| 373 | |
| 374 | static const struct clksel dpll_abe_m3_div[] = { |
| 375 | { .parent = &dpll_abe_ck, .rates = div31_1to31_rates }, |
| 376 | { .parent = NULL }, |
| 377 | }; |
| 378 | |
| 379 | static struct clk dpll_abe_m3_ck = { |
| 380 | .name = "dpll_abe_m3_ck", |
| 381 | .parent = &dpll_abe_ck, |
| 382 | .clksel = dpll_abe_m3_div, |
| 383 | .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_ABE, |
| 384 | .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK, |
| 385 | .ops = &clkops_null, |
| 386 | .recalc = &omap2_clksel_recalc, |
| 387 | .round_rate = &omap2_clksel_round_rate, |
| 388 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 389 | }; |
| 390 | |
| 391 | static const struct clksel core_hsd_byp_clk_mux_sel[] = { |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 392 | { .parent = &sys_clkin_ck, .rates = div_1_0_rates }, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 393 | { .parent = &dpll_abe_m3_ck, .rates = div_1_1_rates }, |
| 394 | { .parent = NULL }, |
| 395 | }; |
| 396 | |
| 397 | static struct clk core_hsd_byp_clk_mux_ck = { |
| 398 | .name = "core_hsd_byp_clk_mux_ck", |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 399 | .parent = &sys_clkin_ck, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 400 | .clksel = core_hsd_byp_clk_mux_sel, |
| 401 | .init = &omap2_init_clksel_parent, |
| 402 | .clksel_reg = OMAP4430_CM_CLKSEL_DPLL_CORE, |
| 403 | .clksel_mask = OMAP4430_DPLL_BYP_CLKSEL_MASK, |
| 404 | .ops = &clkops_null, |
| 405 | .recalc = &omap2_clksel_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 406 | }; |
| 407 | |
| 408 | /* DPLL_CORE */ |
| 409 | static struct dpll_data dpll_core_dd = { |
| 410 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_CORE, |
| 411 | .clk_bypass = &core_hsd_byp_clk_mux_ck, |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 412 | .clk_ref = &sys_clkin_ck, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 413 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_CORE, |
| 414 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), |
| 415 | .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_CORE, |
| 416 | .idlest_reg = OMAP4430_CM_IDLEST_DPLL_CORE, |
| 417 | .mult_mask = OMAP4430_DPLL_MULT_MASK, |
| 418 | .div1_mask = OMAP4430_DPLL_DIV_MASK, |
| 419 | .enable_mask = OMAP4430_DPLL_EN_MASK, |
| 420 | .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, |
| 421 | .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, |
| 422 | .max_multiplier = OMAP4430_MAX_DPLL_MULT, |
| 423 | .max_divider = OMAP4430_MAX_DPLL_DIV, |
| 424 | .min_divider = 1, |
| 425 | }; |
| 426 | |
| 427 | |
| 428 | static struct clk dpll_core_ck = { |
| 429 | .name = "dpll_core_ck", |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 430 | .parent = &sys_clkin_ck, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 431 | .dpll_data = &dpll_core_dd, |
Rajendra Nayak | 911bd73 | 2009-12-08 18:47:17 -0700 | [diff] [blame] | 432 | .init = &omap2_init_dpll_parent, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 433 | .ops = &clkops_null, |
| 434 | .recalc = &omap3_dpll_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 435 | }; |
| 436 | |
| 437 | static const struct clksel dpll_core_m6_div[] = { |
| 438 | { .parent = &dpll_core_ck, .rates = div31_1to31_rates }, |
| 439 | { .parent = NULL }, |
| 440 | }; |
| 441 | |
| 442 | static struct clk dpll_core_m6_ck = { |
| 443 | .name = "dpll_core_m6_ck", |
| 444 | .parent = &dpll_core_ck, |
| 445 | .clksel = dpll_core_m6_div, |
| 446 | .clksel_reg = OMAP4430_CM_DIV_M6_DPLL_CORE, |
| 447 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK, |
| 448 | .ops = &clkops_null, |
| 449 | .recalc = &omap2_clksel_recalc, |
| 450 | .round_rate = &omap2_clksel_round_rate, |
| 451 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 452 | }; |
| 453 | |
| 454 | static const struct clksel dbgclk_mux_sel[] = { |
| 455 | { .parent = &sys_clkin_ck, .rates = div_1_0_rates }, |
| 456 | { .parent = &dpll_core_m6_ck, .rates = div_1_1_rates }, |
| 457 | { .parent = NULL }, |
| 458 | }; |
| 459 | |
| 460 | static struct clk dbgclk_mux_ck = { |
| 461 | .name = "dbgclk_mux_ck", |
| 462 | .parent = &sys_clkin_ck, |
| 463 | .ops = &clkops_null, |
| 464 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 465 | }; |
| 466 | |
| 467 | static struct clk dpll_core_m2_ck = { |
| 468 | .name = "dpll_core_m2_ck", |
| 469 | .parent = &dpll_core_ck, |
| 470 | .clksel = dpll_core_m6_div, |
| 471 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_CORE, |
| 472 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, |
| 473 | .ops = &clkops_null, |
| 474 | .recalc = &omap2_clksel_recalc, |
| 475 | .round_rate = &omap2_clksel_round_rate, |
| 476 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 477 | }; |
| 478 | |
| 479 | static struct clk ddrphy_ck = { |
| 480 | .name = "ddrphy_ck", |
| 481 | .parent = &dpll_core_m2_ck, |
| 482 | .ops = &clkops_null, |
| 483 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 484 | }; |
| 485 | |
| 486 | static struct clk dpll_core_m5_ck = { |
| 487 | .name = "dpll_core_m5_ck", |
| 488 | .parent = &dpll_core_ck, |
| 489 | .clksel = dpll_core_m6_div, |
| 490 | .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_CORE, |
| 491 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK, |
| 492 | .ops = &clkops_null, |
| 493 | .recalc = &omap2_clksel_recalc, |
| 494 | .round_rate = &omap2_clksel_round_rate, |
| 495 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 496 | }; |
| 497 | |
| 498 | static const struct clksel div_core_div[] = { |
| 499 | { .parent = &dpll_core_m5_ck, .rates = div2_1to2_rates }, |
| 500 | { .parent = NULL }, |
| 501 | }; |
| 502 | |
| 503 | static struct clk div_core_ck = { |
| 504 | .name = "div_core_ck", |
| 505 | .parent = &dpll_core_m5_ck, |
| 506 | .clksel = div_core_div, |
| 507 | .clksel_reg = OMAP4430_CM_CLKSEL_CORE, |
| 508 | .clksel_mask = OMAP4430_CLKSEL_CORE_MASK, |
| 509 | .ops = &clkops_null, |
| 510 | .recalc = &omap2_clksel_recalc, |
| 511 | .round_rate = &omap2_clksel_round_rate, |
| 512 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 513 | }; |
| 514 | |
| 515 | static const struct clksel_rate div4_1to8_rates[] = { |
| 516 | { .div = 1, .val = 0, .flags = RATE_IN_4430 }, |
| 517 | { .div = 2, .val = 1, .flags = RATE_IN_4430 }, |
| 518 | { .div = 4, .val = 2, .flags = RATE_IN_4430 }, |
| 519 | { .div = 8, .val = 3, .flags = RATE_IN_4430 }, |
| 520 | { .div = 0 }, |
| 521 | }; |
| 522 | |
| 523 | static const struct clksel div_iva_hs_clk_div[] = { |
| 524 | { .parent = &dpll_core_m5_ck, .rates = div4_1to8_rates }, |
| 525 | { .parent = NULL }, |
| 526 | }; |
| 527 | |
| 528 | static struct clk div_iva_hs_clk = { |
| 529 | .name = "div_iva_hs_clk", |
| 530 | .parent = &dpll_core_m5_ck, |
| 531 | .clksel = div_iva_hs_clk_div, |
| 532 | .clksel_reg = OMAP4430_CM_BYPCLK_DPLL_IVA, |
| 533 | .clksel_mask = OMAP4430_CLKSEL_0_1_MASK, |
| 534 | .ops = &clkops_null, |
| 535 | .recalc = &omap2_clksel_recalc, |
| 536 | .round_rate = &omap2_clksel_round_rate, |
| 537 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 538 | }; |
| 539 | |
| 540 | static struct clk div_mpu_hs_clk = { |
| 541 | .name = "div_mpu_hs_clk", |
| 542 | .parent = &dpll_core_m5_ck, |
| 543 | .clksel = div_iva_hs_clk_div, |
| 544 | .clksel_reg = OMAP4430_CM_BYPCLK_DPLL_MPU, |
| 545 | .clksel_mask = OMAP4430_CLKSEL_0_1_MASK, |
| 546 | .ops = &clkops_null, |
| 547 | .recalc = &omap2_clksel_recalc, |
| 548 | .round_rate = &omap2_clksel_round_rate, |
| 549 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 550 | }; |
| 551 | |
| 552 | static struct clk dpll_core_m4_ck = { |
| 553 | .name = "dpll_core_m4_ck", |
| 554 | .parent = &dpll_core_ck, |
| 555 | .clksel = dpll_core_m6_div, |
| 556 | .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_CORE, |
| 557 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK, |
| 558 | .ops = &clkops_null, |
| 559 | .recalc = &omap2_clksel_recalc, |
| 560 | .round_rate = &omap2_clksel_round_rate, |
| 561 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 562 | }; |
| 563 | |
| 564 | static struct clk dll_clk_div_ck = { |
| 565 | .name = "dll_clk_div_ck", |
| 566 | .parent = &dpll_core_m4_ck, |
| 567 | .ops = &clkops_null, |
| 568 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 569 | }; |
| 570 | |
| 571 | static struct clk dpll_abe_m2_ck = { |
| 572 | .name = "dpll_abe_m2_ck", |
| 573 | .parent = &dpll_abe_ck, |
| 574 | .clksel = dpll_abe_m3_div, |
| 575 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE, |
| 576 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, |
| 577 | .ops = &clkops_null, |
| 578 | .recalc = &omap2_clksel_recalc, |
| 579 | .round_rate = &omap2_clksel_round_rate, |
| 580 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 581 | }; |
| 582 | |
| 583 | static struct clk dpll_core_m3_ck = { |
| 584 | .name = "dpll_core_m3_ck", |
| 585 | .parent = &dpll_core_ck, |
| 586 | .clksel = dpll_core_m6_div, |
| 587 | .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_CORE, |
| 588 | .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK, |
| 589 | .ops = &clkops_null, |
| 590 | .recalc = &omap2_clksel_recalc, |
| 591 | .round_rate = &omap2_clksel_round_rate, |
| 592 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 593 | }; |
| 594 | |
| 595 | static struct clk dpll_core_m7_ck = { |
| 596 | .name = "dpll_core_m7_ck", |
| 597 | .parent = &dpll_core_ck, |
| 598 | .clksel = dpll_core_m6_div, |
| 599 | .clksel_reg = OMAP4430_CM_DIV_M7_DPLL_CORE, |
| 600 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK, |
| 601 | .ops = &clkops_null, |
| 602 | .recalc = &omap2_clksel_recalc, |
| 603 | .round_rate = &omap2_clksel_round_rate, |
| 604 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 605 | }; |
| 606 | |
| 607 | static const struct clksel iva_hsd_byp_clk_mux_sel[] = { |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 608 | { .parent = &sys_clkin_ck, .rates = div_1_0_rates }, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 609 | { .parent = &div_iva_hs_clk, .rates = div_1_1_rates }, |
| 610 | { .parent = NULL }, |
| 611 | }; |
| 612 | |
| 613 | static struct clk iva_hsd_byp_clk_mux_ck = { |
| 614 | .name = "iva_hsd_byp_clk_mux_ck", |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 615 | .parent = &sys_clkin_ck, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 616 | .ops = &clkops_null, |
| 617 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 618 | }; |
| 619 | |
| 620 | /* DPLL_IVA */ |
| 621 | static struct dpll_data dpll_iva_dd = { |
| 622 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_IVA, |
| 623 | .clk_bypass = &iva_hsd_byp_clk_mux_ck, |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 624 | .clk_ref = &sys_clkin_ck, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 625 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_IVA, |
| 626 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), |
| 627 | .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_IVA, |
| 628 | .idlest_reg = OMAP4430_CM_IDLEST_DPLL_IVA, |
| 629 | .mult_mask = OMAP4430_DPLL_MULT_MASK, |
| 630 | .div1_mask = OMAP4430_DPLL_DIV_MASK, |
| 631 | .enable_mask = OMAP4430_DPLL_EN_MASK, |
| 632 | .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, |
| 633 | .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, |
| 634 | .max_multiplier = OMAP4430_MAX_DPLL_MULT, |
| 635 | .max_divider = OMAP4430_MAX_DPLL_DIV, |
| 636 | .min_divider = 1, |
| 637 | }; |
| 638 | |
| 639 | |
| 640 | static struct clk dpll_iva_ck = { |
| 641 | .name = "dpll_iva_ck", |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 642 | .parent = &sys_clkin_ck, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 643 | .dpll_data = &dpll_iva_dd, |
Rajendra Nayak | 911bd73 | 2009-12-08 18:47:17 -0700 | [diff] [blame] | 644 | .init = &omap2_init_dpll_parent, |
Paul Walmsley | 657ebfa | 2010-02-22 22:09:20 -0700 | [diff] [blame] | 645 | .ops = &clkops_omap3_noncore_dpll_ops, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 646 | .recalc = &omap3_dpll_recalc, |
| 647 | .round_rate = &omap2_dpll_round_rate, |
| 648 | .set_rate = &omap3_noncore_dpll_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 649 | }; |
| 650 | |
| 651 | static const struct clksel dpll_iva_m4_div[] = { |
| 652 | { .parent = &dpll_iva_ck, .rates = div31_1to31_rates }, |
| 653 | { .parent = NULL }, |
| 654 | }; |
| 655 | |
| 656 | static struct clk dpll_iva_m4_ck = { |
| 657 | .name = "dpll_iva_m4_ck", |
| 658 | .parent = &dpll_iva_ck, |
| 659 | .clksel = dpll_iva_m4_div, |
| 660 | .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_IVA, |
| 661 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK, |
| 662 | .ops = &clkops_null, |
| 663 | .recalc = &omap2_clksel_recalc, |
| 664 | .round_rate = &omap2_clksel_round_rate, |
| 665 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 666 | }; |
| 667 | |
| 668 | static struct clk dpll_iva_m5_ck = { |
| 669 | .name = "dpll_iva_m5_ck", |
| 670 | .parent = &dpll_iva_ck, |
| 671 | .clksel = dpll_iva_m4_div, |
| 672 | .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_IVA, |
| 673 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK, |
| 674 | .ops = &clkops_null, |
| 675 | .recalc = &omap2_clksel_recalc, |
| 676 | .round_rate = &omap2_clksel_round_rate, |
| 677 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 678 | }; |
| 679 | |
| 680 | /* DPLL_MPU */ |
| 681 | static struct dpll_data dpll_mpu_dd = { |
| 682 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_MPU, |
| 683 | .clk_bypass = &div_mpu_hs_clk, |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 684 | .clk_ref = &sys_clkin_ck, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 685 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_MPU, |
| 686 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), |
| 687 | .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_MPU, |
| 688 | .idlest_reg = OMAP4430_CM_IDLEST_DPLL_MPU, |
| 689 | .mult_mask = OMAP4430_DPLL_MULT_MASK, |
| 690 | .div1_mask = OMAP4430_DPLL_DIV_MASK, |
| 691 | .enable_mask = OMAP4430_DPLL_EN_MASK, |
| 692 | .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, |
| 693 | .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, |
| 694 | .max_multiplier = OMAP4430_MAX_DPLL_MULT, |
| 695 | .max_divider = OMAP4430_MAX_DPLL_DIV, |
| 696 | .min_divider = 1, |
| 697 | }; |
| 698 | |
| 699 | |
| 700 | static struct clk dpll_mpu_ck = { |
| 701 | .name = "dpll_mpu_ck", |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 702 | .parent = &sys_clkin_ck, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 703 | .dpll_data = &dpll_mpu_dd, |
Rajendra Nayak | 911bd73 | 2009-12-08 18:47:17 -0700 | [diff] [blame] | 704 | .init = &omap2_init_dpll_parent, |
Paul Walmsley | 657ebfa | 2010-02-22 22:09:20 -0700 | [diff] [blame] | 705 | .ops = &clkops_omap3_noncore_dpll_ops, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 706 | .recalc = &omap3_dpll_recalc, |
| 707 | .round_rate = &omap2_dpll_round_rate, |
| 708 | .set_rate = &omap3_noncore_dpll_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 709 | }; |
| 710 | |
| 711 | static const struct clksel dpll_mpu_m2_div[] = { |
| 712 | { .parent = &dpll_mpu_ck, .rates = div31_1to31_rates }, |
| 713 | { .parent = NULL }, |
| 714 | }; |
| 715 | |
| 716 | static struct clk dpll_mpu_m2_ck = { |
| 717 | .name = "dpll_mpu_m2_ck", |
| 718 | .parent = &dpll_mpu_ck, |
| 719 | .clksel = dpll_mpu_m2_div, |
| 720 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_MPU, |
| 721 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, |
| 722 | .ops = &clkops_null, |
| 723 | .recalc = &omap2_clksel_recalc, |
| 724 | .round_rate = &omap2_clksel_round_rate, |
| 725 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 726 | }; |
| 727 | |
| 728 | static struct clk per_hs_clk_div_ck = { |
| 729 | .name = "per_hs_clk_div_ck", |
| 730 | .parent = &dpll_abe_m3_ck, |
| 731 | .ops = &clkops_null, |
| 732 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 733 | }; |
| 734 | |
| 735 | static const struct clksel per_hsd_byp_clk_mux_sel[] = { |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 736 | { .parent = &sys_clkin_ck, .rates = div_1_0_rates }, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 737 | { .parent = &per_hs_clk_div_ck, .rates = div_1_1_rates }, |
| 738 | { .parent = NULL }, |
| 739 | }; |
| 740 | |
| 741 | static struct clk per_hsd_byp_clk_mux_ck = { |
| 742 | .name = "per_hsd_byp_clk_mux_ck", |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 743 | .parent = &sys_clkin_ck, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 744 | .clksel = per_hsd_byp_clk_mux_sel, |
| 745 | .init = &omap2_init_clksel_parent, |
| 746 | .clksel_reg = OMAP4430_CM_CLKSEL_DPLL_PER, |
| 747 | .clksel_mask = OMAP4430_DPLL_BYP_CLKSEL_MASK, |
| 748 | .ops = &clkops_null, |
| 749 | .recalc = &omap2_clksel_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 750 | }; |
| 751 | |
| 752 | /* DPLL_PER */ |
| 753 | static struct dpll_data dpll_per_dd = { |
| 754 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_PER, |
| 755 | .clk_bypass = &per_hsd_byp_clk_mux_ck, |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 756 | .clk_ref = &sys_clkin_ck, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 757 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_PER, |
| 758 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), |
| 759 | .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_PER, |
| 760 | .idlest_reg = OMAP4430_CM_IDLEST_DPLL_PER, |
| 761 | .mult_mask = OMAP4430_DPLL_MULT_MASK, |
| 762 | .div1_mask = OMAP4430_DPLL_DIV_MASK, |
| 763 | .enable_mask = OMAP4430_DPLL_EN_MASK, |
| 764 | .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, |
| 765 | .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, |
| 766 | .max_multiplier = OMAP4430_MAX_DPLL_MULT, |
| 767 | .max_divider = OMAP4430_MAX_DPLL_DIV, |
| 768 | .min_divider = 1, |
| 769 | }; |
| 770 | |
| 771 | |
| 772 | static struct clk dpll_per_ck = { |
| 773 | .name = "dpll_per_ck", |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 774 | .parent = &sys_clkin_ck, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 775 | .dpll_data = &dpll_per_dd, |
Rajendra Nayak | 911bd73 | 2009-12-08 18:47:17 -0700 | [diff] [blame] | 776 | .init = &omap2_init_dpll_parent, |
Paul Walmsley | 657ebfa | 2010-02-22 22:09:20 -0700 | [diff] [blame] | 777 | .ops = &clkops_omap3_noncore_dpll_ops, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 778 | .recalc = &omap3_dpll_recalc, |
| 779 | .round_rate = &omap2_dpll_round_rate, |
| 780 | .set_rate = &omap3_noncore_dpll_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 781 | }; |
| 782 | |
| 783 | static const struct clksel dpll_per_m2_div[] = { |
| 784 | { .parent = &dpll_per_ck, .rates = div31_1to31_rates }, |
| 785 | { .parent = NULL }, |
| 786 | }; |
| 787 | |
| 788 | static struct clk dpll_per_m2_ck = { |
| 789 | .name = "dpll_per_m2_ck", |
| 790 | .parent = &dpll_per_ck, |
| 791 | .clksel = dpll_per_m2_div, |
| 792 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER, |
| 793 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, |
| 794 | .ops = &clkops_null, |
| 795 | .recalc = &omap2_clksel_recalc, |
| 796 | .round_rate = &omap2_clksel_round_rate, |
| 797 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 798 | }; |
| 799 | |
| 800 | static struct clk dpll_per_m2x2_ck = { |
| 801 | .name = "dpll_per_m2x2_ck", |
| 802 | .parent = &dpll_per_ck, |
| 803 | .ops = &clkops_null, |
| 804 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 805 | }; |
| 806 | |
| 807 | static struct clk dpll_per_m3_ck = { |
| 808 | .name = "dpll_per_m3_ck", |
| 809 | .parent = &dpll_per_ck, |
| 810 | .clksel = dpll_per_m2_div, |
| 811 | .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_PER, |
| 812 | .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK, |
| 813 | .ops = &clkops_null, |
| 814 | .recalc = &omap2_clksel_recalc, |
| 815 | .round_rate = &omap2_clksel_round_rate, |
| 816 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 817 | }; |
| 818 | |
| 819 | static struct clk dpll_per_m4_ck = { |
| 820 | .name = "dpll_per_m4_ck", |
| 821 | .parent = &dpll_per_ck, |
| 822 | .clksel = dpll_per_m2_div, |
| 823 | .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_PER, |
| 824 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK, |
| 825 | .ops = &clkops_null, |
| 826 | .recalc = &omap2_clksel_recalc, |
| 827 | .round_rate = &omap2_clksel_round_rate, |
| 828 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 829 | }; |
| 830 | |
| 831 | static struct clk dpll_per_m5_ck = { |
| 832 | .name = "dpll_per_m5_ck", |
| 833 | .parent = &dpll_per_ck, |
| 834 | .clksel = dpll_per_m2_div, |
| 835 | .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_PER, |
| 836 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK, |
| 837 | .ops = &clkops_null, |
| 838 | .recalc = &omap2_clksel_recalc, |
| 839 | .round_rate = &omap2_clksel_round_rate, |
| 840 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 841 | }; |
| 842 | |
| 843 | static struct clk dpll_per_m6_ck = { |
| 844 | .name = "dpll_per_m6_ck", |
| 845 | .parent = &dpll_per_ck, |
| 846 | .clksel = dpll_per_m2_div, |
| 847 | .clksel_reg = OMAP4430_CM_DIV_M6_DPLL_PER, |
| 848 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK, |
| 849 | .ops = &clkops_null, |
| 850 | .recalc = &omap2_clksel_recalc, |
| 851 | .round_rate = &omap2_clksel_round_rate, |
| 852 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 853 | }; |
| 854 | |
| 855 | static struct clk dpll_per_m7_ck = { |
| 856 | .name = "dpll_per_m7_ck", |
| 857 | .parent = &dpll_per_ck, |
| 858 | .clksel = dpll_per_m2_div, |
| 859 | .clksel_reg = OMAP4430_CM_DIV_M7_DPLL_PER, |
| 860 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK, |
| 861 | .ops = &clkops_null, |
| 862 | .recalc = &omap2_clksel_recalc, |
| 863 | .round_rate = &omap2_clksel_round_rate, |
| 864 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 865 | }; |
| 866 | |
| 867 | /* DPLL_UNIPRO */ |
| 868 | static struct dpll_data dpll_unipro_dd = { |
| 869 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_UNIPRO, |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 870 | .clk_bypass = &sys_clkin_ck, |
| 871 | .clk_ref = &sys_clkin_ck, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 872 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_UNIPRO, |
| 873 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), |
| 874 | .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_UNIPRO, |
| 875 | .idlest_reg = OMAP4430_CM_IDLEST_DPLL_UNIPRO, |
| 876 | .mult_mask = OMAP4430_DPLL_MULT_MASK, |
| 877 | .div1_mask = OMAP4430_DPLL_DIV_MASK, |
| 878 | .enable_mask = OMAP4430_DPLL_EN_MASK, |
| 879 | .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, |
| 880 | .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, |
| 881 | .max_multiplier = OMAP4430_MAX_DPLL_MULT, |
| 882 | .max_divider = OMAP4430_MAX_DPLL_DIV, |
| 883 | .min_divider = 1, |
| 884 | }; |
| 885 | |
| 886 | |
| 887 | static struct clk dpll_unipro_ck = { |
| 888 | .name = "dpll_unipro_ck", |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 889 | .parent = &sys_clkin_ck, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 890 | .dpll_data = &dpll_unipro_dd, |
Rajendra Nayak | 911bd73 | 2009-12-08 18:47:17 -0700 | [diff] [blame] | 891 | .init = &omap2_init_dpll_parent, |
Paul Walmsley | 657ebfa | 2010-02-22 22:09:20 -0700 | [diff] [blame] | 892 | .ops = &clkops_omap3_noncore_dpll_ops, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 893 | .recalc = &omap3_dpll_recalc, |
| 894 | .round_rate = &omap2_dpll_round_rate, |
| 895 | .set_rate = &omap3_noncore_dpll_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 896 | }; |
| 897 | |
| 898 | static const struct clksel dpll_unipro_m2x2_div[] = { |
| 899 | { .parent = &dpll_unipro_ck, .rates = div31_1to31_rates }, |
| 900 | { .parent = NULL }, |
| 901 | }; |
| 902 | |
| 903 | static struct clk dpll_unipro_m2x2_ck = { |
| 904 | .name = "dpll_unipro_m2x2_ck", |
| 905 | .parent = &dpll_unipro_ck, |
| 906 | .clksel = dpll_unipro_m2x2_div, |
| 907 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_UNIPRO, |
| 908 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, |
| 909 | .ops = &clkops_null, |
| 910 | .recalc = &omap2_clksel_recalc, |
| 911 | .round_rate = &omap2_clksel_round_rate, |
| 912 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 913 | }; |
| 914 | |
| 915 | static struct clk usb_hs_clk_div_ck = { |
| 916 | .name = "usb_hs_clk_div_ck", |
| 917 | .parent = &dpll_abe_m3_ck, |
| 918 | .ops = &clkops_null, |
| 919 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 920 | }; |
| 921 | |
| 922 | /* DPLL_USB */ |
| 923 | static struct dpll_data dpll_usb_dd = { |
| 924 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_USB, |
| 925 | .clk_bypass = &usb_hs_clk_div_ck, |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 926 | .flags = DPLL_J_TYPE | DPLL_NO_DCO_SEL, |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 927 | .clk_ref = &sys_clkin_ck, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 928 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_USB, |
| 929 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), |
| 930 | .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_USB, |
| 931 | .idlest_reg = OMAP4430_CM_IDLEST_DPLL_USB, |
| 932 | .mult_mask = OMAP4430_DPLL_MULT_MASK, |
| 933 | .div1_mask = OMAP4430_DPLL_DIV_MASK, |
| 934 | .enable_mask = OMAP4430_DPLL_EN_MASK, |
| 935 | .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, |
| 936 | .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, |
| 937 | .max_multiplier = OMAP4430_MAX_DPLL_MULT, |
| 938 | .max_divider = OMAP4430_MAX_DPLL_DIV, |
| 939 | .min_divider = 1, |
| 940 | }; |
| 941 | |
| 942 | |
| 943 | static struct clk dpll_usb_ck = { |
| 944 | .name = "dpll_usb_ck", |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 945 | .parent = &sys_clkin_ck, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 946 | .dpll_data = &dpll_usb_dd, |
Rajendra Nayak | 911bd73 | 2009-12-08 18:47:17 -0700 | [diff] [blame] | 947 | .init = &omap2_init_dpll_parent, |
Paul Walmsley | 657ebfa | 2010-02-22 22:09:20 -0700 | [diff] [blame] | 948 | .ops = &clkops_omap3_noncore_dpll_ops, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 949 | .recalc = &omap3_dpll_recalc, |
| 950 | .round_rate = &omap2_dpll_round_rate, |
| 951 | .set_rate = &omap3_noncore_dpll_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 952 | }; |
| 953 | |
| 954 | static struct clk dpll_usb_clkdcoldo_ck = { |
| 955 | .name = "dpll_usb_clkdcoldo_ck", |
| 956 | .parent = &dpll_usb_ck, |
| 957 | .ops = &clkops_null, |
| 958 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 959 | }; |
| 960 | |
| 961 | static const struct clksel dpll_usb_m2_div[] = { |
| 962 | { .parent = &dpll_usb_ck, .rates = div31_1to31_rates }, |
| 963 | { .parent = NULL }, |
| 964 | }; |
| 965 | |
| 966 | static struct clk dpll_usb_m2_ck = { |
| 967 | .name = "dpll_usb_m2_ck", |
| 968 | .parent = &dpll_usb_ck, |
| 969 | .clksel = dpll_usb_m2_div, |
| 970 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_USB, |
| 971 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK, |
| 972 | .ops = &clkops_null, |
| 973 | .recalc = &omap2_clksel_recalc, |
| 974 | .round_rate = &omap2_clksel_round_rate, |
| 975 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 976 | }; |
| 977 | |
| 978 | static const struct clksel ducati_clk_mux_sel[] = { |
| 979 | { .parent = &div_core_ck, .rates = div_1_0_rates }, |
| 980 | { .parent = &dpll_per_m6_ck, .rates = div_1_1_rates }, |
| 981 | { .parent = NULL }, |
| 982 | }; |
| 983 | |
| 984 | static struct clk ducati_clk_mux_ck = { |
| 985 | .name = "ducati_clk_mux_ck", |
| 986 | .parent = &div_core_ck, |
| 987 | .clksel = ducati_clk_mux_sel, |
| 988 | .init = &omap2_init_clksel_parent, |
| 989 | .clksel_reg = OMAP4430_CM_CLKSEL_DUCATI_ISS_ROOT, |
| 990 | .clksel_mask = OMAP4430_CLKSEL_0_0_MASK, |
| 991 | .ops = &clkops_null, |
| 992 | .recalc = &omap2_clksel_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 993 | }; |
| 994 | |
| 995 | static struct clk func_12m_fclk = { |
| 996 | .name = "func_12m_fclk", |
| 997 | .parent = &dpll_per_m2x2_ck, |
| 998 | .ops = &clkops_null, |
| 999 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1000 | }; |
| 1001 | |
| 1002 | static struct clk func_24m_clk = { |
| 1003 | .name = "func_24m_clk", |
| 1004 | .parent = &dpll_per_m2_ck, |
| 1005 | .ops = &clkops_null, |
| 1006 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1007 | }; |
| 1008 | |
| 1009 | static struct clk func_24mc_fclk = { |
| 1010 | .name = "func_24mc_fclk", |
| 1011 | .parent = &dpll_per_m2x2_ck, |
| 1012 | .ops = &clkops_null, |
| 1013 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1014 | }; |
| 1015 | |
| 1016 | static const struct clksel_rate div2_4to8_rates[] = { |
| 1017 | { .div = 4, .val = 0, .flags = RATE_IN_4430 }, |
| 1018 | { .div = 8, .val = 1, .flags = RATE_IN_4430 }, |
| 1019 | { .div = 0 }, |
| 1020 | }; |
| 1021 | |
| 1022 | static const struct clksel func_48m_fclk_div[] = { |
| 1023 | { .parent = &dpll_per_m2x2_ck, .rates = div2_4to8_rates }, |
| 1024 | { .parent = NULL }, |
| 1025 | }; |
| 1026 | |
| 1027 | static struct clk func_48m_fclk = { |
| 1028 | .name = "func_48m_fclk", |
| 1029 | .parent = &dpll_per_m2x2_ck, |
| 1030 | .clksel = func_48m_fclk_div, |
| 1031 | .clksel_reg = OMAP4430_CM_SCALE_FCLK, |
| 1032 | .clksel_mask = OMAP4430_SCALE_FCLK_MASK, |
| 1033 | .ops = &clkops_null, |
| 1034 | .recalc = &omap2_clksel_recalc, |
| 1035 | .round_rate = &omap2_clksel_round_rate, |
| 1036 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1037 | }; |
| 1038 | |
| 1039 | static struct clk func_48mc_fclk = { |
| 1040 | .name = "func_48mc_fclk", |
| 1041 | .parent = &dpll_per_m2x2_ck, |
| 1042 | .ops = &clkops_null, |
| 1043 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1044 | }; |
| 1045 | |
| 1046 | static const struct clksel_rate div2_2to4_rates[] = { |
| 1047 | { .div = 2, .val = 0, .flags = RATE_IN_4430 }, |
| 1048 | { .div = 4, .val = 1, .flags = RATE_IN_4430 }, |
| 1049 | { .div = 0 }, |
| 1050 | }; |
| 1051 | |
| 1052 | static const struct clksel func_64m_fclk_div[] = { |
| 1053 | { .parent = &dpll_per_m4_ck, .rates = div2_2to4_rates }, |
| 1054 | { .parent = NULL }, |
| 1055 | }; |
| 1056 | |
| 1057 | static struct clk func_64m_fclk = { |
| 1058 | .name = "func_64m_fclk", |
| 1059 | .parent = &dpll_per_m4_ck, |
| 1060 | .clksel = func_64m_fclk_div, |
| 1061 | .clksel_reg = OMAP4430_CM_SCALE_FCLK, |
| 1062 | .clksel_mask = OMAP4430_SCALE_FCLK_MASK, |
| 1063 | .ops = &clkops_null, |
| 1064 | .recalc = &omap2_clksel_recalc, |
| 1065 | .round_rate = &omap2_clksel_round_rate, |
| 1066 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1067 | }; |
| 1068 | |
| 1069 | static const struct clksel func_96m_fclk_div[] = { |
| 1070 | { .parent = &dpll_per_m2x2_ck, .rates = div2_2to4_rates }, |
| 1071 | { .parent = NULL }, |
| 1072 | }; |
| 1073 | |
| 1074 | static struct clk func_96m_fclk = { |
| 1075 | .name = "func_96m_fclk", |
| 1076 | .parent = &dpll_per_m2x2_ck, |
| 1077 | .clksel = func_96m_fclk_div, |
| 1078 | .clksel_reg = OMAP4430_CM_SCALE_FCLK, |
| 1079 | .clksel_mask = OMAP4430_SCALE_FCLK_MASK, |
| 1080 | .ops = &clkops_null, |
| 1081 | .recalc = &omap2_clksel_recalc, |
| 1082 | .round_rate = &omap2_clksel_round_rate, |
| 1083 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1084 | }; |
| 1085 | |
| 1086 | static const struct clksel hsmmc6_fclk_sel[] = { |
| 1087 | { .parent = &func_64m_fclk, .rates = div_1_0_rates }, |
| 1088 | { .parent = &func_96m_fclk, .rates = div_1_1_rates }, |
| 1089 | { .parent = NULL }, |
| 1090 | }; |
| 1091 | |
| 1092 | static struct clk hsmmc6_fclk = { |
| 1093 | .name = "hsmmc6_fclk", |
| 1094 | .parent = &func_64m_fclk, |
| 1095 | .ops = &clkops_null, |
| 1096 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1097 | }; |
| 1098 | |
| 1099 | static const struct clksel_rate div2_1to8_rates[] = { |
| 1100 | { .div = 1, .val = 0, .flags = RATE_IN_4430 }, |
| 1101 | { .div = 8, .val = 1, .flags = RATE_IN_4430 }, |
| 1102 | { .div = 0 }, |
| 1103 | }; |
| 1104 | |
| 1105 | static const struct clksel init_60m_fclk_div[] = { |
| 1106 | { .parent = &dpll_usb_m2_ck, .rates = div2_1to8_rates }, |
| 1107 | { .parent = NULL }, |
| 1108 | }; |
| 1109 | |
| 1110 | static struct clk init_60m_fclk = { |
| 1111 | .name = "init_60m_fclk", |
| 1112 | .parent = &dpll_usb_m2_ck, |
| 1113 | .clksel = init_60m_fclk_div, |
| 1114 | .clksel_reg = OMAP4430_CM_CLKSEL_USB_60MHZ, |
| 1115 | .clksel_mask = OMAP4430_CLKSEL_0_0_MASK, |
| 1116 | .ops = &clkops_null, |
| 1117 | .recalc = &omap2_clksel_recalc, |
| 1118 | .round_rate = &omap2_clksel_round_rate, |
| 1119 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1120 | }; |
| 1121 | |
| 1122 | static const struct clksel l3_div_div[] = { |
| 1123 | { .parent = &div_core_ck, .rates = div2_1to2_rates }, |
| 1124 | { .parent = NULL }, |
| 1125 | }; |
| 1126 | |
| 1127 | static struct clk l3_div_ck = { |
| 1128 | .name = "l3_div_ck", |
| 1129 | .parent = &div_core_ck, |
| 1130 | .clksel = l3_div_div, |
| 1131 | .clksel_reg = OMAP4430_CM_CLKSEL_CORE, |
| 1132 | .clksel_mask = OMAP4430_CLKSEL_L3_MASK, |
| 1133 | .ops = &clkops_null, |
| 1134 | .recalc = &omap2_clksel_recalc, |
| 1135 | .round_rate = &omap2_clksel_round_rate, |
| 1136 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1137 | }; |
| 1138 | |
| 1139 | static const struct clksel l4_div_div[] = { |
| 1140 | { .parent = &l3_div_ck, .rates = div2_1to2_rates }, |
| 1141 | { .parent = NULL }, |
| 1142 | }; |
| 1143 | |
| 1144 | static struct clk l4_div_ck = { |
| 1145 | .name = "l4_div_ck", |
| 1146 | .parent = &l3_div_ck, |
| 1147 | .clksel = l4_div_div, |
| 1148 | .clksel_reg = OMAP4430_CM_CLKSEL_CORE, |
| 1149 | .clksel_mask = OMAP4430_CLKSEL_L4_MASK, |
| 1150 | .ops = &clkops_null, |
| 1151 | .recalc = &omap2_clksel_recalc, |
| 1152 | .round_rate = &omap2_clksel_round_rate, |
| 1153 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1154 | }; |
| 1155 | |
| 1156 | static struct clk lp_clk_div_ck = { |
| 1157 | .name = "lp_clk_div_ck", |
| 1158 | .parent = &dpll_abe_m2x2_ck, |
| 1159 | .ops = &clkops_null, |
| 1160 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1161 | }; |
| 1162 | |
| 1163 | static const struct clksel l4_wkup_clk_mux_sel[] = { |
| 1164 | { .parent = &sys_clkin_ck, .rates = div_1_0_rates }, |
| 1165 | { .parent = &lp_clk_div_ck, .rates = div_1_1_rates }, |
| 1166 | { .parent = NULL }, |
| 1167 | }; |
| 1168 | |
| 1169 | static struct clk l4_wkup_clk_mux_ck = { |
| 1170 | .name = "l4_wkup_clk_mux_ck", |
| 1171 | .parent = &sys_clkin_ck, |
| 1172 | .clksel = l4_wkup_clk_mux_sel, |
| 1173 | .init = &omap2_init_clksel_parent, |
| 1174 | .clksel_reg = OMAP4430_CM_L4_WKUP_CLKSEL, |
| 1175 | .clksel_mask = OMAP4430_CLKSEL_0_0_MASK, |
| 1176 | .ops = &clkops_null, |
| 1177 | .recalc = &omap2_clksel_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1178 | }; |
| 1179 | |
| 1180 | static const struct clksel per_abe_nc_fclk_div[] = { |
| 1181 | { .parent = &dpll_abe_m2_ck, .rates = div2_1to2_rates }, |
| 1182 | { .parent = NULL }, |
| 1183 | }; |
| 1184 | |
| 1185 | static struct clk per_abe_nc_fclk = { |
| 1186 | .name = "per_abe_nc_fclk", |
| 1187 | .parent = &dpll_abe_m2_ck, |
| 1188 | .clksel = per_abe_nc_fclk_div, |
| 1189 | .clksel_reg = OMAP4430_CM_SCALE_FCLK, |
| 1190 | .clksel_mask = OMAP4430_SCALE_FCLK_MASK, |
| 1191 | .ops = &clkops_null, |
| 1192 | .recalc = &omap2_clksel_recalc, |
| 1193 | .round_rate = &omap2_clksel_round_rate, |
| 1194 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1195 | }; |
| 1196 | |
| 1197 | static const struct clksel mcasp2_fclk_sel[] = { |
| 1198 | { .parent = &func_96m_fclk, .rates = div_1_0_rates }, |
| 1199 | { .parent = &per_abe_nc_fclk, .rates = div_1_1_rates }, |
| 1200 | { .parent = NULL }, |
| 1201 | }; |
| 1202 | |
| 1203 | static struct clk mcasp2_fclk = { |
| 1204 | .name = "mcasp2_fclk", |
| 1205 | .parent = &func_96m_fclk, |
| 1206 | .ops = &clkops_null, |
| 1207 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1208 | }; |
| 1209 | |
| 1210 | static struct clk mcasp3_fclk = { |
| 1211 | .name = "mcasp3_fclk", |
| 1212 | .parent = &func_96m_fclk, |
| 1213 | .ops = &clkops_null, |
| 1214 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1215 | }; |
| 1216 | |
| 1217 | static struct clk ocp_abe_iclk = { |
| 1218 | .name = "ocp_abe_iclk", |
| 1219 | .parent = &aess_fclk, |
| 1220 | .ops = &clkops_null, |
| 1221 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1222 | }; |
| 1223 | |
| 1224 | static struct clk per_abe_24m_fclk = { |
| 1225 | .name = "per_abe_24m_fclk", |
| 1226 | .parent = &dpll_abe_m2_ck, |
| 1227 | .ops = &clkops_null, |
| 1228 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1229 | }; |
| 1230 | |
| 1231 | static const struct clksel pmd_stm_clock_mux_sel[] = { |
| 1232 | { .parent = &sys_clkin_ck, .rates = div_1_0_rates }, |
| 1233 | { .parent = &dpll_core_m6_ck, .rates = div_1_1_rates }, |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1234 | { .parent = &tie_low_clock_ck, .rates = div_1_2_rates }, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1235 | { .parent = NULL }, |
| 1236 | }; |
| 1237 | |
| 1238 | static struct clk pmd_stm_clock_mux_ck = { |
| 1239 | .name = "pmd_stm_clock_mux_ck", |
| 1240 | .parent = &sys_clkin_ck, |
| 1241 | .ops = &clkops_null, |
| 1242 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1243 | }; |
| 1244 | |
| 1245 | static struct clk pmd_trace_clk_mux_ck = { |
| 1246 | .name = "pmd_trace_clk_mux_ck", |
| 1247 | .parent = &sys_clkin_ck, |
| 1248 | .ops = &clkops_null, |
| 1249 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1250 | }; |
| 1251 | |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1252 | static const struct clksel syc_clk_div_div[] = { |
| 1253 | { .parent = &sys_clkin_ck, .rates = div2_1to2_rates }, |
| 1254 | { .parent = NULL }, |
| 1255 | }; |
| 1256 | |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1257 | static struct clk syc_clk_div_ck = { |
| 1258 | .name = "syc_clk_div_ck", |
| 1259 | .parent = &sys_clkin_ck, |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1260 | .clksel = syc_clk_div_div, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1261 | .clksel_reg = OMAP4430_CM_ABE_DSS_SYS_CLKSEL, |
| 1262 | .clksel_mask = OMAP4430_CLKSEL_0_0_MASK, |
| 1263 | .ops = &clkops_null, |
| 1264 | .recalc = &omap2_clksel_recalc, |
| 1265 | .round_rate = &omap2_clksel_round_rate, |
| 1266 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1267 | }; |
| 1268 | |
| 1269 | /* Leaf clocks controlled by modules */ |
| 1270 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1271 | static struct clk aes1_fck = { |
| 1272 | .name = "aes1_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1273 | .ops = &clkops_omap2_dflt, |
| 1274 | .enable_reg = OMAP4430_CM_L4SEC_AES1_CLKCTRL, |
| 1275 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1276 | .clkdm_name = "l4_secure_clkdm", |
| 1277 | .parent = &l3_div_ck, |
| 1278 | .recalc = &followparent_recalc, |
| 1279 | }; |
| 1280 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1281 | static struct clk aes2_fck = { |
| 1282 | .name = "aes2_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1283 | .ops = &clkops_omap2_dflt, |
| 1284 | .enable_reg = OMAP4430_CM_L4SEC_AES2_CLKCTRL, |
| 1285 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1286 | .clkdm_name = "l4_secure_clkdm", |
| 1287 | .parent = &l3_div_ck, |
| 1288 | .recalc = &followparent_recalc, |
| 1289 | }; |
| 1290 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1291 | static struct clk aess_fck = { |
| 1292 | .name = "aess_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1293 | .ops = &clkops_omap2_dflt, |
| 1294 | .enable_reg = OMAP4430_CM1_ABE_AESS_CLKCTRL, |
| 1295 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1296 | .clkdm_name = "abe_clkdm", |
| 1297 | .parent = &aess_fclk, |
| 1298 | .recalc = &followparent_recalc, |
| 1299 | }; |
| 1300 | |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 1301 | static struct clk bandgap_fclk = { |
| 1302 | .name = "bandgap_fclk", |
| 1303 | .ops = &clkops_omap2_dflt, |
| 1304 | .enable_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL, |
| 1305 | .enable_bit = OMAP4430_OPTFCLKEN_BGAP_32K_SHIFT, |
| 1306 | .clkdm_name = "l4_wkup_clkdm", |
| 1307 | .parent = &sys_32k_ck, |
| 1308 | .recalc = &followparent_recalc, |
| 1309 | }; |
| 1310 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1311 | static struct clk des3des_fck = { |
| 1312 | .name = "des3des_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1313 | .ops = &clkops_omap2_dflt, |
| 1314 | .enable_reg = OMAP4430_CM_L4SEC_DES3DES_CLKCTRL, |
| 1315 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1316 | .clkdm_name = "l4_secure_clkdm", |
| 1317 | .parent = &l4_div_ck, |
| 1318 | .recalc = &followparent_recalc, |
| 1319 | }; |
| 1320 | |
| 1321 | static const struct clksel dmic_sync_mux_sel[] = { |
| 1322 | { .parent = &abe_24m_fclk, .rates = div_1_0_rates }, |
| 1323 | { .parent = &syc_clk_div_ck, .rates = div_1_1_rates }, |
| 1324 | { .parent = &func_24m_clk, .rates = div_1_2_rates }, |
| 1325 | { .parent = NULL }, |
| 1326 | }; |
| 1327 | |
| 1328 | static struct clk dmic_sync_mux_ck = { |
| 1329 | .name = "dmic_sync_mux_ck", |
| 1330 | .parent = &abe_24m_fclk, |
| 1331 | .clksel = dmic_sync_mux_sel, |
| 1332 | .init = &omap2_init_clksel_parent, |
| 1333 | .clksel_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL, |
| 1334 | .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK, |
| 1335 | .ops = &clkops_null, |
| 1336 | .recalc = &omap2_clksel_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1337 | }; |
| 1338 | |
| 1339 | static const struct clksel func_dmic_abe_gfclk_sel[] = { |
| 1340 | { .parent = &dmic_sync_mux_ck, .rates = div_1_0_rates }, |
| 1341 | { .parent = &pad_clks_ck, .rates = div_1_1_rates }, |
| 1342 | { .parent = &slimbus_clk, .rates = div_1_2_rates }, |
| 1343 | { .parent = NULL }, |
| 1344 | }; |
| 1345 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1346 | /* Merged func_dmic_abe_gfclk into dmic */ |
| 1347 | static struct clk dmic_fck = { |
| 1348 | .name = "dmic_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1349 | .parent = &dmic_sync_mux_ck, |
| 1350 | .clksel = func_dmic_abe_gfclk_sel, |
| 1351 | .init = &omap2_init_clksel_parent, |
| 1352 | .clksel_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL, |
| 1353 | .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK, |
| 1354 | .ops = &clkops_omap2_dflt, |
| 1355 | .recalc = &omap2_clksel_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1356 | .enable_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL, |
| 1357 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1358 | .clkdm_name = "abe_clkdm", |
| 1359 | }; |
| 1360 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1361 | static struct clk dsp_fck = { |
| 1362 | .name = "dsp_fck", |
| 1363 | .ops = &clkops_omap2_dflt, |
| 1364 | .enable_reg = OMAP4430_CM_TESLA_TESLA_CLKCTRL, |
| 1365 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
| 1366 | .clkdm_name = "tesla_clkdm", |
| 1367 | .parent = &dpll_iva_m4_ck, |
| 1368 | .recalc = &followparent_recalc, |
| 1369 | }; |
| 1370 | |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 1371 | static struct clk dss_sys_clk = { |
| 1372 | .name = "dss_sys_clk", |
| 1373 | .ops = &clkops_omap2_dflt, |
| 1374 | .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, |
| 1375 | .enable_bit = OMAP4430_OPTFCLKEN_SYS_CLK_SHIFT, |
| 1376 | .clkdm_name = "l3_dss_clkdm", |
| 1377 | .parent = &syc_clk_div_ck, |
| 1378 | .recalc = &followparent_recalc, |
| 1379 | }; |
| 1380 | |
| 1381 | static struct clk dss_tv_clk = { |
| 1382 | .name = "dss_tv_clk", |
| 1383 | .ops = &clkops_omap2_dflt, |
| 1384 | .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, |
| 1385 | .enable_bit = OMAP4430_OPTFCLKEN_TV_CLK_SHIFT, |
| 1386 | .clkdm_name = "l3_dss_clkdm", |
| 1387 | .parent = &extalt_clkin_ck, |
| 1388 | .recalc = &followparent_recalc, |
| 1389 | }; |
| 1390 | |
| 1391 | static struct clk dss_dss_clk = { |
| 1392 | .name = "dss_dss_clk", |
| 1393 | .ops = &clkops_omap2_dflt, |
| 1394 | .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, |
| 1395 | .enable_bit = OMAP4430_OPTFCLKEN_DSSCLK_SHIFT, |
| 1396 | .clkdm_name = "l3_dss_clkdm", |
| 1397 | .parent = &dpll_per_m5_ck, |
| 1398 | .recalc = &followparent_recalc, |
| 1399 | }; |
| 1400 | |
| 1401 | static struct clk dss_48mhz_clk = { |
| 1402 | .name = "dss_48mhz_clk", |
| 1403 | .ops = &clkops_omap2_dflt, |
| 1404 | .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, |
| 1405 | .enable_bit = OMAP4430_OPTFCLKEN_48MHZ_CLK_SHIFT, |
| 1406 | .clkdm_name = "l3_dss_clkdm", |
| 1407 | .parent = &func_48mc_fclk, |
| 1408 | .recalc = &followparent_recalc, |
| 1409 | }; |
| 1410 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1411 | static struct clk dss_fck = { |
| 1412 | .name = "dss_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1413 | .ops = &clkops_omap2_dflt, |
| 1414 | .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, |
| 1415 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1416 | .clkdm_name = "l3_dss_clkdm", |
| 1417 | .parent = &l3_div_ck, |
| 1418 | .recalc = &followparent_recalc, |
| 1419 | }; |
| 1420 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1421 | static struct clk efuse_ctrl_cust_fck = { |
| 1422 | .name = "efuse_ctrl_cust_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1423 | .ops = &clkops_omap2_dflt, |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1424 | .enable_reg = OMAP4430_CM_CEFUSE_CEFUSE_CLKCTRL, |
| 1425 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1426 | .clkdm_name = "l4_cefuse_clkdm", |
| 1427 | .parent = &sys_clkin_ck, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1428 | .recalc = &followparent_recalc, |
| 1429 | }; |
| 1430 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1431 | static struct clk emif1_fck = { |
| 1432 | .name = "emif1_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1433 | .ops = &clkops_omap2_dflt, |
| 1434 | .enable_reg = OMAP4430_CM_MEMIF_EMIF_1_CLKCTRL, |
| 1435 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
Santosh Shilimkar | 090830b | 2010-06-16 19:01:33 +0300 | [diff] [blame] | 1436 | .flags = ENABLE_ON_INIT, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1437 | .clkdm_name = "l3_emif_clkdm", |
| 1438 | .parent = &ddrphy_ck, |
| 1439 | .recalc = &followparent_recalc, |
| 1440 | }; |
| 1441 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1442 | static struct clk emif2_fck = { |
| 1443 | .name = "emif2_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1444 | .ops = &clkops_omap2_dflt, |
| 1445 | .enable_reg = OMAP4430_CM_MEMIF_EMIF_2_CLKCTRL, |
| 1446 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
Santosh Shilimkar | 090830b | 2010-06-16 19:01:33 +0300 | [diff] [blame] | 1447 | .flags = ENABLE_ON_INIT, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1448 | .clkdm_name = "l3_emif_clkdm", |
| 1449 | .parent = &ddrphy_ck, |
| 1450 | .recalc = &followparent_recalc, |
| 1451 | }; |
| 1452 | |
| 1453 | static const struct clksel fdif_fclk_div[] = { |
| 1454 | { .parent = &dpll_per_m4_ck, .rates = div3_1to4_rates }, |
| 1455 | { .parent = NULL }, |
| 1456 | }; |
| 1457 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1458 | /* Merged fdif_fclk into fdif */ |
| 1459 | static struct clk fdif_fck = { |
| 1460 | .name = "fdif_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1461 | .parent = &dpll_per_m4_ck, |
| 1462 | .clksel = fdif_fclk_div, |
| 1463 | .clksel_reg = OMAP4430_CM_CAM_FDIF_CLKCTRL, |
| 1464 | .clksel_mask = OMAP4430_CLKSEL_FCLK_MASK, |
| 1465 | .ops = &clkops_omap2_dflt, |
| 1466 | .recalc = &omap2_clksel_recalc, |
| 1467 | .round_rate = &omap2_clksel_round_rate, |
| 1468 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1469 | .enable_reg = OMAP4430_CM_CAM_FDIF_CLKCTRL, |
| 1470 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1471 | .clkdm_name = "iss_clkdm", |
| 1472 | }; |
| 1473 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1474 | static struct clk fpka_fck = { |
| 1475 | .name = "fpka_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1476 | .ops = &clkops_omap2_dflt, |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1477 | .enable_reg = OMAP4430_CM_L4SEC_PKAEIP29_CLKCTRL, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1478 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1479 | .clkdm_name = "l4_secure_clkdm", |
| 1480 | .parent = &l4_div_ck, |
| 1481 | .recalc = &followparent_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1482 | }; |
| 1483 | |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 1484 | static struct clk gpio1_dbclk = { |
| 1485 | .name = "gpio1_dbclk", |
| 1486 | .ops = &clkops_omap2_dflt, |
| 1487 | .enable_reg = OMAP4430_CM_WKUP_GPIO1_CLKCTRL, |
| 1488 | .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT, |
| 1489 | .clkdm_name = "l4_wkup_clkdm", |
| 1490 | .parent = &sys_32k_ck, |
| 1491 | .recalc = &followparent_recalc, |
| 1492 | }; |
| 1493 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1494 | static struct clk gpio1_ick = { |
| 1495 | .name = "gpio1_ick", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1496 | .ops = &clkops_omap2_dflt, |
| 1497 | .enable_reg = OMAP4430_CM_WKUP_GPIO1_CLKCTRL, |
| 1498 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
| 1499 | .clkdm_name = "l4_wkup_clkdm", |
| 1500 | .parent = &l4_wkup_clk_mux_ck, |
| 1501 | .recalc = &followparent_recalc, |
| 1502 | }; |
| 1503 | |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 1504 | static struct clk gpio2_dbclk = { |
| 1505 | .name = "gpio2_dbclk", |
| 1506 | .ops = &clkops_omap2_dflt, |
| 1507 | .enable_reg = OMAP4430_CM_L4PER_GPIO2_CLKCTRL, |
| 1508 | .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT, |
| 1509 | .clkdm_name = "l4_per_clkdm", |
| 1510 | .parent = &sys_32k_ck, |
| 1511 | .recalc = &followparent_recalc, |
| 1512 | }; |
| 1513 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1514 | static struct clk gpio2_ick = { |
| 1515 | .name = "gpio2_ick", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1516 | .ops = &clkops_omap2_dflt, |
| 1517 | .enable_reg = OMAP4430_CM_L4PER_GPIO2_CLKCTRL, |
| 1518 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
| 1519 | .clkdm_name = "l4_per_clkdm", |
| 1520 | .parent = &l4_div_ck, |
| 1521 | .recalc = &followparent_recalc, |
| 1522 | }; |
| 1523 | |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 1524 | static struct clk gpio3_dbclk = { |
| 1525 | .name = "gpio3_dbclk", |
| 1526 | .ops = &clkops_omap2_dflt, |
| 1527 | .enable_reg = OMAP4430_CM_L4PER_GPIO3_CLKCTRL, |
| 1528 | .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT, |
| 1529 | .clkdm_name = "l4_per_clkdm", |
| 1530 | .parent = &sys_32k_ck, |
| 1531 | .recalc = &followparent_recalc, |
| 1532 | }; |
| 1533 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1534 | static struct clk gpio3_ick = { |
| 1535 | .name = "gpio3_ick", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1536 | .ops = &clkops_omap2_dflt, |
| 1537 | .enable_reg = OMAP4430_CM_L4PER_GPIO3_CLKCTRL, |
| 1538 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
| 1539 | .clkdm_name = "l4_per_clkdm", |
| 1540 | .parent = &l4_div_ck, |
| 1541 | .recalc = &followparent_recalc, |
| 1542 | }; |
| 1543 | |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 1544 | static struct clk gpio4_dbclk = { |
| 1545 | .name = "gpio4_dbclk", |
| 1546 | .ops = &clkops_omap2_dflt, |
| 1547 | .enable_reg = OMAP4430_CM_L4PER_GPIO4_CLKCTRL, |
| 1548 | .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT, |
| 1549 | .clkdm_name = "l4_per_clkdm", |
| 1550 | .parent = &sys_32k_ck, |
| 1551 | .recalc = &followparent_recalc, |
| 1552 | }; |
| 1553 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1554 | static struct clk gpio4_ick = { |
| 1555 | .name = "gpio4_ick", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1556 | .ops = &clkops_omap2_dflt, |
| 1557 | .enable_reg = OMAP4430_CM_L4PER_GPIO4_CLKCTRL, |
| 1558 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
| 1559 | .clkdm_name = "l4_per_clkdm", |
| 1560 | .parent = &l4_div_ck, |
| 1561 | .recalc = &followparent_recalc, |
| 1562 | }; |
| 1563 | |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 1564 | static struct clk gpio5_dbclk = { |
| 1565 | .name = "gpio5_dbclk", |
| 1566 | .ops = &clkops_omap2_dflt, |
| 1567 | .enable_reg = OMAP4430_CM_L4PER_GPIO5_CLKCTRL, |
| 1568 | .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT, |
| 1569 | .clkdm_name = "l4_per_clkdm", |
| 1570 | .parent = &sys_32k_ck, |
| 1571 | .recalc = &followparent_recalc, |
| 1572 | }; |
| 1573 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1574 | static struct clk gpio5_ick = { |
| 1575 | .name = "gpio5_ick", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1576 | .ops = &clkops_omap2_dflt, |
| 1577 | .enable_reg = OMAP4430_CM_L4PER_GPIO5_CLKCTRL, |
| 1578 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
| 1579 | .clkdm_name = "l4_per_clkdm", |
| 1580 | .parent = &l4_div_ck, |
| 1581 | .recalc = &followparent_recalc, |
| 1582 | }; |
| 1583 | |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 1584 | static struct clk gpio6_dbclk = { |
| 1585 | .name = "gpio6_dbclk", |
| 1586 | .ops = &clkops_omap2_dflt, |
| 1587 | .enable_reg = OMAP4430_CM_L4PER_GPIO6_CLKCTRL, |
| 1588 | .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT, |
| 1589 | .clkdm_name = "l4_per_clkdm", |
| 1590 | .parent = &sys_32k_ck, |
| 1591 | .recalc = &followparent_recalc, |
| 1592 | }; |
| 1593 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1594 | static struct clk gpio6_ick = { |
| 1595 | .name = "gpio6_ick", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1596 | .ops = &clkops_omap2_dflt, |
| 1597 | .enable_reg = OMAP4430_CM_L4PER_GPIO6_CLKCTRL, |
| 1598 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
| 1599 | .clkdm_name = "l4_per_clkdm", |
| 1600 | .parent = &l4_div_ck, |
| 1601 | .recalc = &followparent_recalc, |
| 1602 | }; |
| 1603 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1604 | static struct clk gpmc_ick = { |
| 1605 | .name = "gpmc_ick", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1606 | .ops = &clkops_omap2_dflt, |
| 1607 | .enable_reg = OMAP4430_CM_L3_2_GPMC_CLKCTRL, |
| 1608 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
| 1609 | .clkdm_name = "l3_2_clkdm", |
| 1610 | .parent = &l3_div_ck, |
| 1611 | .recalc = &followparent_recalc, |
| 1612 | }; |
| 1613 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1614 | static const struct clksel sgx_clk_mux_sel[] = { |
| 1615 | { .parent = &dpll_core_m7_ck, .rates = div_1_0_rates }, |
| 1616 | { .parent = &dpll_per_m7_ck, .rates = div_1_1_rates }, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1617 | { .parent = NULL }, |
| 1618 | }; |
| 1619 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1620 | /* Merged sgx_clk_mux into gpu */ |
| 1621 | static struct clk gpu_fck = { |
| 1622 | .name = "gpu_fck", |
| 1623 | .parent = &dpll_core_m7_ck, |
| 1624 | .clksel = sgx_clk_mux_sel, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1625 | .init = &omap2_init_clksel_parent, |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1626 | .clksel_reg = OMAP4430_CM_GFX_GFX_CLKCTRL, |
| 1627 | .clksel_mask = OMAP4430_CLKSEL_SGX_FCLK_MASK, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1628 | .ops = &clkops_omap2_dflt, |
| 1629 | .recalc = &omap2_clksel_recalc, |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1630 | .enable_reg = OMAP4430_CM_GFX_GFX_CLKCTRL, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1631 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1632 | .clkdm_name = "l3_gfx_clkdm", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1633 | }; |
| 1634 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1635 | static struct clk hdq1w_fck = { |
| 1636 | .name = "hdq1w_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1637 | .ops = &clkops_omap2_dflt, |
| 1638 | .enable_reg = OMAP4430_CM_L4PER_HDQ1W_CLKCTRL, |
| 1639 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1640 | .clkdm_name = "l4_per_clkdm", |
| 1641 | .parent = &func_12m_fclk, |
| 1642 | .recalc = &followparent_recalc, |
| 1643 | }; |
| 1644 | |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1645 | static const struct clksel hsi_fclk_div[] = { |
| 1646 | { .parent = &dpll_per_m2x2_ck, .rates = div3_1to4_rates }, |
| 1647 | { .parent = NULL }, |
| 1648 | }; |
| 1649 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1650 | /* Merged hsi_fclk into hsi */ |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1651 | static struct clk hsi_fck = { |
| 1652 | .name = "hsi_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1653 | .parent = &dpll_per_m2x2_ck, |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1654 | .clksel = hsi_fclk_div, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1655 | .clksel_reg = OMAP4430_CM_L3INIT_HSI_CLKCTRL, |
| 1656 | .clksel_mask = OMAP4430_CLKSEL_24_25_MASK, |
| 1657 | .ops = &clkops_omap2_dflt, |
| 1658 | .recalc = &omap2_clksel_recalc, |
| 1659 | .round_rate = &omap2_clksel_round_rate, |
| 1660 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1661 | .enable_reg = OMAP4430_CM_L3INIT_HSI_CLKCTRL, |
| 1662 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
| 1663 | .clkdm_name = "l3_init_clkdm", |
| 1664 | }; |
| 1665 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1666 | static struct clk i2c1_fck = { |
| 1667 | .name = "i2c1_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1668 | .ops = &clkops_omap2_dflt, |
| 1669 | .enable_reg = OMAP4430_CM_L4PER_I2C1_CLKCTRL, |
| 1670 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1671 | .clkdm_name = "l4_per_clkdm", |
| 1672 | .parent = &func_96m_fclk, |
| 1673 | .recalc = &followparent_recalc, |
| 1674 | }; |
| 1675 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1676 | static struct clk i2c2_fck = { |
| 1677 | .name = "i2c2_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1678 | .ops = &clkops_omap2_dflt, |
| 1679 | .enable_reg = OMAP4430_CM_L4PER_I2C2_CLKCTRL, |
| 1680 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1681 | .clkdm_name = "l4_per_clkdm", |
| 1682 | .parent = &func_96m_fclk, |
| 1683 | .recalc = &followparent_recalc, |
| 1684 | }; |
| 1685 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1686 | static struct clk i2c3_fck = { |
| 1687 | .name = "i2c3_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1688 | .ops = &clkops_omap2_dflt, |
| 1689 | .enable_reg = OMAP4430_CM_L4PER_I2C3_CLKCTRL, |
| 1690 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1691 | .clkdm_name = "l4_per_clkdm", |
| 1692 | .parent = &func_96m_fclk, |
| 1693 | .recalc = &followparent_recalc, |
| 1694 | }; |
| 1695 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1696 | static struct clk i2c4_fck = { |
| 1697 | .name = "i2c4_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1698 | .ops = &clkops_omap2_dflt, |
| 1699 | .enable_reg = OMAP4430_CM_L4PER_I2C4_CLKCTRL, |
| 1700 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1701 | .clkdm_name = "l4_per_clkdm", |
| 1702 | .parent = &func_96m_fclk, |
| 1703 | .recalc = &followparent_recalc, |
| 1704 | }; |
| 1705 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1706 | static struct clk ipu_fck = { |
| 1707 | .name = "ipu_fck", |
| 1708 | .ops = &clkops_omap2_dflt, |
| 1709 | .enable_reg = OMAP4430_CM_DUCATI_DUCATI_CLKCTRL, |
| 1710 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
| 1711 | .clkdm_name = "ducati_clkdm", |
| 1712 | .parent = &ducati_clk_mux_ck, |
| 1713 | .recalc = &followparent_recalc, |
| 1714 | }; |
| 1715 | |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 1716 | static struct clk iss_ctrlclk = { |
| 1717 | .name = "iss_ctrlclk", |
| 1718 | .ops = &clkops_omap2_dflt, |
| 1719 | .enable_reg = OMAP4430_CM_CAM_ISS_CLKCTRL, |
| 1720 | .enable_bit = OMAP4430_OPTFCLKEN_CTRLCLK_SHIFT, |
| 1721 | .clkdm_name = "iss_clkdm", |
| 1722 | .parent = &func_96m_fclk, |
| 1723 | .recalc = &followparent_recalc, |
| 1724 | }; |
| 1725 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1726 | static struct clk iss_fck = { |
| 1727 | .name = "iss_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1728 | .ops = &clkops_omap2_dflt, |
| 1729 | .enable_reg = OMAP4430_CM_CAM_ISS_CLKCTRL, |
| 1730 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1731 | .clkdm_name = "iss_clkdm", |
| 1732 | .parent = &ducati_clk_mux_ck, |
| 1733 | .recalc = &followparent_recalc, |
| 1734 | }; |
| 1735 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1736 | static struct clk iva_fck = { |
| 1737 | .name = "iva_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1738 | .ops = &clkops_omap2_dflt, |
| 1739 | .enable_reg = OMAP4430_CM_IVAHD_IVAHD_CLKCTRL, |
| 1740 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
| 1741 | .clkdm_name = "ivahd_clkdm", |
| 1742 | .parent = &dpll_iva_m5_ck, |
| 1743 | .recalc = &followparent_recalc, |
| 1744 | }; |
| 1745 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1746 | static struct clk kbd_fck = { |
| 1747 | .name = "kbd_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1748 | .ops = &clkops_omap2_dflt, |
| 1749 | .enable_reg = OMAP4430_CM_WKUP_KEYBOARD_CLKCTRL, |
| 1750 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1751 | .clkdm_name = "l4_wkup_clkdm", |
| 1752 | .parent = &sys_32k_ck, |
| 1753 | .recalc = &followparent_recalc, |
| 1754 | }; |
| 1755 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1756 | static struct clk l3_instr_ick = { |
| 1757 | .name = "l3_instr_ick", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1758 | .ops = &clkops_omap2_dflt, |
| 1759 | .enable_reg = OMAP4430_CM_L3INSTR_L3_INSTR_CLKCTRL, |
| 1760 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
| 1761 | .clkdm_name = "l3_instr_clkdm", |
| 1762 | .parent = &l3_div_ck, |
| 1763 | .recalc = &followparent_recalc, |
| 1764 | }; |
| 1765 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1766 | static struct clk l3_main_3_ick = { |
| 1767 | .name = "l3_main_3_ick", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1768 | .ops = &clkops_omap2_dflt, |
| 1769 | .enable_reg = OMAP4430_CM_L3INSTR_L3_3_CLKCTRL, |
| 1770 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
| 1771 | .clkdm_name = "l3_instr_clkdm", |
| 1772 | .parent = &l3_div_ck, |
| 1773 | .recalc = &followparent_recalc, |
| 1774 | }; |
| 1775 | |
| 1776 | static struct clk mcasp_sync_mux_ck = { |
| 1777 | .name = "mcasp_sync_mux_ck", |
| 1778 | .parent = &abe_24m_fclk, |
| 1779 | .clksel = dmic_sync_mux_sel, |
| 1780 | .init = &omap2_init_clksel_parent, |
| 1781 | .clksel_reg = OMAP4430_CM1_ABE_MCASP_CLKCTRL, |
| 1782 | .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK, |
| 1783 | .ops = &clkops_null, |
| 1784 | .recalc = &omap2_clksel_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1785 | }; |
| 1786 | |
| 1787 | static const struct clksel func_mcasp_abe_gfclk_sel[] = { |
| 1788 | { .parent = &mcasp_sync_mux_ck, .rates = div_1_0_rates }, |
| 1789 | { .parent = &pad_clks_ck, .rates = div_1_1_rates }, |
| 1790 | { .parent = &slimbus_clk, .rates = div_1_2_rates }, |
| 1791 | { .parent = NULL }, |
| 1792 | }; |
| 1793 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1794 | /* Merged func_mcasp_abe_gfclk into mcasp */ |
| 1795 | static struct clk mcasp_fck = { |
| 1796 | .name = "mcasp_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1797 | .parent = &mcasp_sync_mux_ck, |
| 1798 | .clksel = func_mcasp_abe_gfclk_sel, |
| 1799 | .init = &omap2_init_clksel_parent, |
| 1800 | .clksel_reg = OMAP4430_CM1_ABE_MCASP_CLKCTRL, |
| 1801 | .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK, |
| 1802 | .ops = &clkops_omap2_dflt, |
| 1803 | .recalc = &omap2_clksel_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1804 | .enable_reg = OMAP4430_CM1_ABE_MCASP_CLKCTRL, |
| 1805 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1806 | .clkdm_name = "abe_clkdm", |
| 1807 | }; |
| 1808 | |
| 1809 | static struct clk mcbsp1_sync_mux_ck = { |
| 1810 | .name = "mcbsp1_sync_mux_ck", |
| 1811 | .parent = &abe_24m_fclk, |
| 1812 | .clksel = dmic_sync_mux_sel, |
| 1813 | .init = &omap2_init_clksel_parent, |
| 1814 | .clksel_reg = OMAP4430_CM1_ABE_MCBSP1_CLKCTRL, |
| 1815 | .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK, |
| 1816 | .ops = &clkops_null, |
| 1817 | .recalc = &omap2_clksel_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1818 | }; |
| 1819 | |
| 1820 | static const struct clksel func_mcbsp1_gfclk_sel[] = { |
| 1821 | { .parent = &mcbsp1_sync_mux_ck, .rates = div_1_0_rates }, |
| 1822 | { .parent = &pad_clks_ck, .rates = div_1_1_rates }, |
| 1823 | { .parent = &slimbus_clk, .rates = div_1_2_rates }, |
| 1824 | { .parent = NULL }, |
| 1825 | }; |
| 1826 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1827 | /* Merged func_mcbsp1_gfclk into mcbsp1 */ |
| 1828 | static struct clk mcbsp1_fck = { |
| 1829 | .name = "mcbsp1_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1830 | .parent = &mcbsp1_sync_mux_ck, |
| 1831 | .clksel = func_mcbsp1_gfclk_sel, |
| 1832 | .init = &omap2_init_clksel_parent, |
| 1833 | .clksel_reg = OMAP4430_CM1_ABE_MCBSP1_CLKCTRL, |
| 1834 | .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK, |
| 1835 | .ops = &clkops_omap2_dflt, |
| 1836 | .recalc = &omap2_clksel_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1837 | .enable_reg = OMAP4430_CM1_ABE_MCBSP1_CLKCTRL, |
| 1838 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1839 | .clkdm_name = "abe_clkdm", |
| 1840 | }; |
| 1841 | |
| 1842 | static struct clk mcbsp2_sync_mux_ck = { |
| 1843 | .name = "mcbsp2_sync_mux_ck", |
| 1844 | .parent = &abe_24m_fclk, |
| 1845 | .clksel = dmic_sync_mux_sel, |
| 1846 | .init = &omap2_init_clksel_parent, |
| 1847 | .clksel_reg = OMAP4430_CM1_ABE_MCBSP2_CLKCTRL, |
| 1848 | .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK, |
| 1849 | .ops = &clkops_null, |
| 1850 | .recalc = &omap2_clksel_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1851 | }; |
| 1852 | |
| 1853 | static const struct clksel func_mcbsp2_gfclk_sel[] = { |
| 1854 | { .parent = &mcbsp2_sync_mux_ck, .rates = div_1_0_rates }, |
| 1855 | { .parent = &pad_clks_ck, .rates = div_1_1_rates }, |
| 1856 | { .parent = &slimbus_clk, .rates = div_1_2_rates }, |
| 1857 | { .parent = NULL }, |
| 1858 | }; |
| 1859 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1860 | /* Merged func_mcbsp2_gfclk into mcbsp2 */ |
| 1861 | static struct clk mcbsp2_fck = { |
| 1862 | .name = "mcbsp2_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1863 | .parent = &mcbsp2_sync_mux_ck, |
| 1864 | .clksel = func_mcbsp2_gfclk_sel, |
| 1865 | .init = &omap2_init_clksel_parent, |
| 1866 | .clksel_reg = OMAP4430_CM1_ABE_MCBSP2_CLKCTRL, |
| 1867 | .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK, |
| 1868 | .ops = &clkops_omap2_dflt, |
| 1869 | .recalc = &omap2_clksel_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1870 | .enable_reg = OMAP4430_CM1_ABE_MCBSP2_CLKCTRL, |
| 1871 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1872 | .clkdm_name = "abe_clkdm", |
| 1873 | }; |
| 1874 | |
| 1875 | static struct clk mcbsp3_sync_mux_ck = { |
| 1876 | .name = "mcbsp3_sync_mux_ck", |
| 1877 | .parent = &abe_24m_fclk, |
| 1878 | .clksel = dmic_sync_mux_sel, |
| 1879 | .init = &omap2_init_clksel_parent, |
| 1880 | .clksel_reg = OMAP4430_CM1_ABE_MCBSP3_CLKCTRL, |
| 1881 | .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK, |
| 1882 | .ops = &clkops_null, |
| 1883 | .recalc = &omap2_clksel_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1884 | }; |
| 1885 | |
| 1886 | static const struct clksel func_mcbsp3_gfclk_sel[] = { |
| 1887 | { .parent = &mcbsp3_sync_mux_ck, .rates = div_1_0_rates }, |
| 1888 | { .parent = &pad_clks_ck, .rates = div_1_1_rates }, |
| 1889 | { .parent = &slimbus_clk, .rates = div_1_2_rates }, |
| 1890 | { .parent = NULL }, |
| 1891 | }; |
| 1892 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1893 | /* Merged func_mcbsp3_gfclk into mcbsp3 */ |
| 1894 | static struct clk mcbsp3_fck = { |
| 1895 | .name = "mcbsp3_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1896 | .parent = &mcbsp3_sync_mux_ck, |
| 1897 | .clksel = func_mcbsp3_gfclk_sel, |
| 1898 | .init = &omap2_init_clksel_parent, |
| 1899 | .clksel_reg = OMAP4430_CM1_ABE_MCBSP3_CLKCTRL, |
| 1900 | .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK, |
| 1901 | .ops = &clkops_omap2_dflt, |
| 1902 | .recalc = &omap2_clksel_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1903 | .enable_reg = OMAP4430_CM1_ABE_MCBSP3_CLKCTRL, |
| 1904 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1905 | .clkdm_name = "abe_clkdm", |
| 1906 | }; |
| 1907 | |
| 1908 | static struct clk mcbsp4_sync_mux_ck = { |
| 1909 | .name = "mcbsp4_sync_mux_ck", |
| 1910 | .parent = &func_96m_fclk, |
| 1911 | .clksel = mcasp2_fclk_sel, |
| 1912 | .init = &omap2_init_clksel_parent, |
| 1913 | .clksel_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL, |
| 1914 | .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK, |
| 1915 | .ops = &clkops_null, |
| 1916 | .recalc = &omap2_clksel_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1917 | }; |
| 1918 | |
| 1919 | static const struct clksel per_mcbsp4_gfclk_sel[] = { |
| 1920 | { .parent = &mcbsp4_sync_mux_ck, .rates = div_1_0_rates }, |
| 1921 | { .parent = &pad_clks_ck, .rates = div_1_1_rates }, |
| 1922 | { .parent = NULL }, |
| 1923 | }; |
| 1924 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1925 | /* Merged per_mcbsp4_gfclk into mcbsp4 */ |
| 1926 | static struct clk mcbsp4_fck = { |
| 1927 | .name = "mcbsp4_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1928 | .parent = &mcbsp4_sync_mux_ck, |
| 1929 | .clksel = per_mcbsp4_gfclk_sel, |
| 1930 | .init = &omap2_init_clksel_parent, |
| 1931 | .clksel_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL, |
| 1932 | .clksel_mask = OMAP4430_CLKSEL_SOURCE_24_24_MASK, |
| 1933 | .ops = &clkops_omap2_dflt, |
| 1934 | .recalc = &omap2_clksel_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1935 | .enable_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL, |
| 1936 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1937 | .clkdm_name = "l4_per_clkdm", |
| 1938 | }; |
| 1939 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 1940 | static struct clk mcpdm_fck = { |
| 1941 | .name = "mcpdm_fck", |
| 1942 | .ops = &clkops_omap2_dflt, |
| 1943 | .enable_reg = OMAP4430_CM1_ABE_PDM_CLKCTRL, |
| 1944 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1945 | .clkdm_name = "abe_clkdm", |
| 1946 | .parent = &pad_clks_ck, |
| 1947 | .recalc = &followparent_recalc, |
| 1948 | }; |
| 1949 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1950 | static struct clk mcspi1_fck = { |
| 1951 | .name = "mcspi1_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1952 | .ops = &clkops_omap2_dflt, |
| 1953 | .enable_reg = OMAP4430_CM_L4PER_MCSPI1_CLKCTRL, |
| 1954 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1955 | .clkdm_name = "l4_per_clkdm", |
| 1956 | .parent = &func_48m_fclk, |
| 1957 | .recalc = &followparent_recalc, |
| 1958 | }; |
| 1959 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1960 | static struct clk mcspi2_fck = { |
| 1961 | .name = "mcspi2_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1962 | .ops = &clkops_omap2_dflt, |
| 1963 | .enable_reg = OMAP4430_CM_L4PER_MCSPI2_CLKCTRL, |
| 1964 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1965 | .clkdm_name = "l4_per_clkdm", |
| 1966 | .parent = &func_48m_fclk, |
| 1967 | .recalc = &followparent_recalc, |
| 1968 | }; |
| 1969 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1970 | static struct clk mcspi3_fck = { |
| 1971 | .name = "mcspi3_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1972 | .ops = &clkops_omap2_dflt, |
| 1973 | .enable_reg = OMAP4430_CM_L4PER_MCSPI3_CLKCTRL, |
| 1974 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1975 | .clkdm_name = "l4_per_clkdm", |
| 1976 | .parent = &func_48m_fclk, |
| 1977 | .recalc = &followparent_recalc, |
| 1978 | }; |
| 1979 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1980 | static struct clk mcspi4_fck = { |
| 1981 | .name = "mcspi4_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1982 | .ops = &clkops_omap2_dflt, |
| 1983 | .enable_reg = OMAP4430_CM_L4PER_MCSPI4_CLKCTRL, |
| 1984 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 1985 | .clkdm_name = "l4_per_clkdm", |
| 1986 | .parent = &func_48m_fclk, |
| 1987 | .recalc = &followparent_recalc, |
| 1988 | }; |
| 1989 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 1990 | /* Merged hsmmc1_fclk into mmc1 */ |
| 1991 | static struct clk mmc1_fck = { |
| 1992 | .name = "mmc1_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 1993 | .parent = &func_64m_fclk, |
| 1994 | .clksel = hsmmc6_fclk_sel, |
| 1995 | .init = &omap2_init_clksel_parent, |
| 1996 | .clksel_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL, |
| 1997 | .clksel_mask = OMAP4430_CLKSEL_MASK, |
| 1998 | .ops = &clkops_omap2_dflt, |
| 1999 | .recalc = &omap2_clksel_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2000 | .enable_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL, |
| 2001 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2002 | .clkdm_name = "l3_init_clkdm", |
| 2003 | }; |
| 2004 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2005 | /* Merged hsmmc2_fclk into mmc2 */ |
| 2006 | static struct clk mmc2_fck = { |
| 2007 | .name = "mmc2_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2008 | .parent = &func_64m_fclk, |
| 2009 | .clksel = hsmmc6_fclk_sel, |
| 2010 | .init = &omap2_init_clksel_parent, |
| 2011 | .clksel_reg = OMAP4430_CM_L3INIT_MMC2_CLKCTRL, |
| 2012 | .clksel_mask = OMAP4430_CLKSEL_MASK, |
| 2013 | .ops = &clkops_omap2_dflt, |
| 2014 | .recalc = &omap2_clksel_recalc, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2015 | .enable_reg = OMAP4430_CM_L3INIT_MMC2_CLKCTRL, |
| 2016 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2017 | .clkdm_name = "l3_init_clkdm", |
| 2018 | }; |
| 2019 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2020 | static struct clk mmc3_fck = { |
| 2021 | .name = "mmc3_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2022 | .ops = &clkops_omap2_dflt, |
| 2023 | .enable_reg = OMAP4430_CM_L4PER_MMCSD3_CLKCTRL, |
| 2024 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2025 | .clkdm_name = "l4_per_clkdm", |
| 2026 | .parent = &func_48m_fclk, |
| 2027 | .recalc = &followparent_recalc, |
| 2028 | }; |
| 2029 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2030 | static struct clk mmc4_fck = { |
| 2031 | .name = "mmc4_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2032 | .ops = &clkops_omap2_dflt, |
| 2033 | .enable_reg = OMAP4430_CM_L4PER_MMCSD4_CLKCTRL, |
| 2034 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2035 | .clkdm_name = "l4_per_clkdm", |
| 2036 | .parent = &func_48m_fclk, |
| 2037 | .recalc = &followparent_recalc, |
| 2038 | }; |
| 2039 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2040 | static struct clk mmc5_fck = { |
| 2041 | .name = "mmc5_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2042 | .ops = &clkops_omap2_dflt, |
| 2043 | .enable_reg = OMAP4430_CM_L4PER_MMCSD5_CLKCTRL, |
| 2044 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2045 | .clkdm_name = "l4_per_clkdm", |
| 2046 | .parent = &func_48m_fclk, |
| 2047 | .recalc = &followparent_recalc, |
| 2048 | }; |
| 2049 | |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2050 | static struct clk ocp2scp_usb_phy_phy_48m = { |
| 2051 | .name = "ocp2scp_usb_phy_phy_48m", |
| 2052 | .ops = &clkops_omap2_dflt, |
| 2053 | .enable_reg = OMAP4430_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, |
| 2054 | .enable_bit = OMAP4430_OPTFCLKEN_PHY_48M_SHIFT, |
| 2055 | .clkdm_name = "l3_init_clkdm", |
| 2056 | .parent = &func_48m_fclk, |
| 2057 | .recalc = &followparent_recalc, |
| 2058 | }; |
| 2059 | |
Benoit Cousson | 0edc9e8 | 2010-09-27 14:02:56 -0600 | [diff] [blame] | 2060 | static struct clk ocp2scp_usb_phy_ick = { |
| 2061 | .name = "ocp2scp_usb_phy_ick", |
| 2062 | .ops = &clkops_omap2_dflt, |
| 2063 | .enable_reg = OMAP4430_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, |
| 2064 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
| 2065 | .clkdm_name = "l3_init_clkdm", |
| 2066 | .parent = &l4_div_ck, |
| 2067 | .recalc = &followparent_recalc, |
| 2068 | }; |
| 2069 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2070 | static struct clk ocp_wp_noc_ick = { |
| 2071 | .name = "ocp_wp_noc_ick", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2072 | .ops = &clkops_omap2_dflt, |
| 2073 | .enable_reg = OMAP4430_CM_L3INSTR_OCP_WP1_CLKCTRL, |
| 2074 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
| 2075 | .clkdm_name = "l3_instr_clkdm", |
| 2076 | .parent = &l3_div_ck, |
| 2077 | .recalc = &followparent_recalc, |
| 2078 | }; |
| 2079 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2080 | static struct clk rng_ick = { |
| 2081 | .name = "rng_ick", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2082 | .ops = &clkops_omap2_dflt, |
| 2083 | .enable_reg = OMAP4430_CM_L4SEC_RNG_CLKCTRL, |
| 2084 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
| 2085 | .clkdm_name = "l4_secure_clkdm", |
| 2086 | .parent = &l4_div_ck, |
| 2087 | .recalc = &followparent_recalc, |
| 2088 | }; |
| 2089 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2090 | static struct clk sha2md5_fck = { |
| 2091 | .name = "sha2md5_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2092 | .ops = &clkops_omap2_dflt, |
| 2093 | .enable_reg = OMAP4430_CM_L4SEC_SHA2MD51_CLKCTRL, |
| 2094 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2095 | .clkdm_name = "l4_secure_clkdm", |
| 2096 | .parent = &l3_div_ck, |
| 2097 | .recalc = &followparent_recalc, |
| 2098 | }; |
| 2099 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2100 | static struct clk sl2if_ick = { |
| 2101 | .name = "sl2if_ick", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2102 | .ops = &clkops_omap2_dflt, |
| 2103 | .enable_reg = OMAP4430_CM_IVAHD_SL2_CLKCTRL, |
| 2104 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
| 2105 | .clkdm_name = "ivahd_clkdm", |
| 2106 | .parent = &dpll_iva_m5_ck, |
| 2107 | .recalc = &followparent_recalc, |
| 2108 | }; |
| 2109 | |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2110 | static struct clk slimbus1_fclk_1 = { |
| 2111 | .name = "slimbus1_fclk_1", |
| 2112 | .ops = &clkops_omap2_dflt, |
| 2113 | .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL, |
| 2114 | .enable_bit = OMAP4430_OPTFCLKEN_FCLK1_SHIFT, |
| 2115 | .clkdm_name = "abe_clkdm", |
| 2116 | .parent = &func_24m_clk, |
| 2117 | .recalc = &followparent_recalc, |
| 2118 | }; |
| 2119 | |
| 2120 | static struct clk slimbus1_fclk_0 = { |
| 2121 | .name = "slimbus1_fclk_0", |
| 2122 | .ops = &clkops_omap2_dflt, |
| 2123 | .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL, |
| 2124 | .enable_bit = OMAP4430_OPTFCLKEN_FCLK0_SHIFT, |
| 2125 | .clkdm_name = "abe_clkdm", |
| 2126 | .parent = &abe_24m_fclk, |
| 2127 | .recalc = &followparent_recalc, |
| 2128 | }; |
| 2129 | |
| 2130 | static struct clk slimbus1_fclk_2 = { |
| 2131 | .name = "slimbus1_fclk_2", |
| 2132 | .ops = &clkops_omap2_dflt, |
| 2133 | .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL, |
| 2134 | .enable_bit = OMAP4430_OPTFCLKEN_FCLK2_SHIFT, |
| 2135 | .clkdm_name = "abe_clkdm", |
| 2136 | .parent = &pad_clks_ck, |
| 2137 | .recalc = &followparent_recalc, |
| 2138 | }; |
| 2139 | |
| 2140 | static struct clk slimbus1_slimbus_clk = { |
| 2141 | .name = "slimbus1_slimbus_clk", |
| 2142 | .ops = &clkops_omap2_dflt, |
| 2143 | .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL, |
| 2144 | .enable_bit = OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_SHIFT, |
| 2145 | .clkdm_name = "abe_clkdm", |
| 2146 | .parent = &slimbus_clk, |
| 2147 | .recalc = &followparent_recalc, |
| 2148 | }; |
| 2149 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2150 | static struct clk slimbus1_fck = { |
| 2151 | .name = "slimbus1_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2152 | .ops = &clkops_omap2_dflt, |
| 2153 | .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL, |
| 2154 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2155 | .clkdm_name = "abe_clkdm", |
| 2156 | .parent = &ocp_abe_iclk, |
| 2157 | .recalc = &followparent_recalc, |
| 2158 | }; |
| 2159 | |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2160 | static struct clk slimbus2_fclk_1 = { |
| 2161 | .name = "slimbus2_fclk_1", |
| 2162 | .ops = &clkops_omap2_dflt, |
| 2163 | .enable_reg = OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL, |
| 2164 | .enable_bit = OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_SHIFT, |
| 2165 | .clkdm_name = "l4_per_clkdm", |
| 2166 | .parent = &per_abe_24m_fclk, |
| 2167 | .recalc = &followparent_recalc, |
| 2168 | }; |
| 2169 | |
| 2170 | static struct clk slimbus2_fclk_0 = { |
| 2171 | .name = "slimbus2_fclk_0", |
| 2172 | .ops = &clkops_omap2_dflt, |
| 2173 | .enable_reg = OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL, |
| 2174 | .enable_bit = OMAP4430_OPTFCLKEN_PER24MC_GFCLK_SHIFT, |
| 2175 | .clkdm_name = "l4_per_clkdm", |
| 2176 | .parent = &func_24mc_fclk, |
| 2177 | .recalc = &followparent_recalc, |
| 2178 | }; |
| 2179 | |
| 2180 | static struct clk slimbus2_slimbus_clk = { |
| 2181 | .name = "slimbus2_slimbus_clk", |
| 2182 | .ops = &clkops_omap2_dflt, |
| 2183 | .enable_reg = OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL, |
| 2184 | .enable_bit = OMAP4430_OPTFCLKEN_SLIMBUS_CLK_SHIFT, |
| 2185 | .clkdm_name = "l4_per_clkdm", |
| 2186 | .parent = &pad_slimbus_core_clks_ck, |
| 2187 | .recalc = &followparent_recalc, |
| 2188 | }; |
| 2189 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2190 | static struct clk slimbus2_fck = { |
| 2191 | .name = "slimbus2_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2192 | .ops = &clkops_omap2_dflt, |
| 2193 | .enable_reg = OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL, |
| 2194 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2195 | .clkdm_name = "l4_per_clkdm", |
| 2196 | .parent = &l4_div_ck, |
| 2197 | .recalc = &followparent_recalc, |
| 2198 | }; |
| 2199 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2200 | static struct clk smartreflex_core_fck = { |
| 2201 | .name = "smartreflex_core_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2202 | .ops = &clkops_omap2_dflt, |
| 2203 | .enable_reg = OMAP4430_CM_ALWON_SR_CORE_CLKCTRL, |
| 2204 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2205 | .clkdm_name = "l4_ao_clkdm", |
| 2206 | .parent = &l4_wkup_clk_mux_ck, |
| 2207 | .recalc = &followparent_recalc, |
| 2208 | }; |
| 2209 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2210 | static struct clk smartreflex_iva_fck = { |
| 2211 | .name = "smartreflex_iva_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2212 | .ops = &clkops_omap2_dflt, |
| 2213 | .enable_reg = OMAP4430_CM_ALWON_SR_IVA_CLKCTRL, |
| 2214 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2215 | .clkdm_name = "l4_ao_clkdm", |
| 2216 | .parent = &l4_wkup_clk_mux_ck, |
| 2217 | .recalc = &followparent_recalc, |
| 2218 | }; |
| 2219 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2220 | static struct clk smartreflex_mpu_fck = { |
| 2221 | .name = "smartreflex_mpu_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2222 | .ops = &clkops_omap2_dflt, |
| 2223 | .enable_reg = OMAP4430_CM_ALWON_SR_MPU_CLKCTRL, |
| 2224 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2225 | .clkdm_name = "l4_ao_clkdm", |
| 2226 | .parent = &l4_wkup_clk_mux_ck, |
| 2227 | .recalc = &followparent_recalc, |
| 2228 | }; |
| 2229 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2230 | /* Merged dmt1_clk_mux into timer1 */ |
| 2231 | static struct clk timer1_fck = { |
| 2232 | .name = "timer1_fck", |
| 2233 | .parent = &sys_clkin_ck, |
| 2234 | .clksel = abe_dpll_bypass_clk_mux_sel, |
| 2235 | .init = &omap2_init_clksel_parent, |
| 2236 | .clksel_reg = OMAP4430_CM_WKUP_TIMER1_CLKCTRL, |
| 2237 | .clksel_mask = OMAP4430_CLKSEL_MASK, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2238 | .ops = &clkops_omap2_dflt, |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2239 | .recalc = &omap2_clksel_recalc, |
| 2240 | .enable_reg = OMAP4430_CM_WKUP_TIMER1_CLKCTRL, |
| 2241 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2242 | .clkdm_name = "l4_wkup_clkdm", |
| 2243 | }; |
| 2244 | |
| 2245 | /* Merged cm2_dm10_mux into timer10 */ |
| 2246 | static struct clk timer10_fck = { |
| 2247 | .name = "timer10_fck", |
| 2248 | .parent = &sys_clkin_ck, |
| 2249 | .clksel = abe_dpll_bypass_clk_mux_sel, |
| 2250 | .init = &omap2_init_clksel_parent, |
| 2251 | .clksel_reg = OMAP4430_CM_L4PER_DMTIMER10_CLKCTRL, |
| 2252 | .clksel_mask = OMAP4430_CLKSEL_MASK, |
| 2253 | .ops = &clkops_omap2_dflt, |
| 2254 | .recalc = &omap2_clksel_recalc, |
| 2255 | .enable_reg = OMAP4430_CM_L4PER_DMTIMER10_CLKCTRL, |
| 2256 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2257 | .clkdm_name = "l4_per_clkdm", |
| 2258 | }; |
| 2259 | |
| 2260 | /* Merged cm2_dm11_mux into timer11 */ |
| 2261 | static struct clk timer11_fck = { |
| 2262 | .name = "timer11_fck", |
| 2263 | .parent = &sys_clkin_ck, |
| 2264 | .clksel = abe_dpll_bypass_clk_mux_sel, |
| 2265 | .init = &omap2_init_clksel_parent, |
| 2266 | .clksel_reg = OMAP4430_CM_L4PER_DMTIMER11_CLKCTRL, |
| 2267 | .clksel_mask = OMAP4430_CLKSEL_MASK, |
| 2268 | .ops = &clkops_omap2_dflt, |
| 2269 | .recalc = &omap2_clksel_recalc, |
| 2270 | .enable_reg = OMAP4430_CM_L4PER_DMTIMER11_CLKCTRL, |
| 2271 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2272 | .clkdm_name = "l4_per_clkdm", |
| 2273 | }; |
| 2274 | |
| 2275 | /* Merged cm2_dm2_mux into timer2 */ |
| 2276 | static struct clk timer2_fck = { |
| 2277 | .name = "timer2_fck", |
| 2278 | .parent = &sys_clkin_ck, |
| 2279 | .clksel = abe_dpll_bypass_clk_mux_sel, |
| 2280 | .init = &omap2_init_clksel_parent, |
| 2281 | .clksel_reg = OMAP4430_CM_L4PER_DMTIMER2_CLKCTRL, |
| 2282 | .clksel_mask = OMAP4430_CLKSEL_MASK, |
| 2283 | .ops = &clkops_omap2_dflt, |
| 2284 | .recalc = &omap2_clksel_recalc, |
| 2285 | .enable_reg = OMAP4430_CM_L4PER_DMTIMER2_CLKCTRL, |
| 2286 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2287 | .clkdm_name = "l4_per_clkdm", |
| 2288 | }; |
| 2289 | |
| 2290 | /* Merged cm2_dm3_mux into timer3 */ |
| 2291 | static struct clk timer3_fck = { |
| 2292 | .name = "timer3_fck", |
| 2293 | .parent = &sys_clkin_ck, |
| 2294 | .clksel = abe_dpll_bypass_clk_mux_sel, |
| 2295 | .init = &omap2_init_clksel_parent, |
| 2296 | .clksel_reg = OMAP4430_CM_L4PER_DMTIMER3_CLKCTRL, |
| 2297 | .clksel_mask = OMAP4430_CLKSEL_MASK, |
| 2298 | .ops = &clkops_omap2_dflt, |
| 2299 | .recalc = &omap2_clksel_recalc, |
| 2300 | .enable_reg = OMAP4430_CM_L4PER_DMTIMER3_CLKCTRL, |
| 2301 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2302 | .clkdm_name = "l4_per_clkdm", |
| 2303 | }; |
| 2304 | |
| 2305 | /* Merged cm2_dm4_mux into timer4 */ |
| 2306 | static struct clk timer4_fck = { |
| 2307 | .name = "timer4_fck", |
| 2308 | .parent = &sys_clkin_ck, |
| 2309 | .clksel = abe_dpll_bypass_clk_mux_sel, |
| 2310 | .init = &omap2_init_clksel_parent, |
| 2311 | .clksel_reg = OMAP4430_CM_L4PER_DMTIMER4_CLKCTRL, |
| 2312 | .clksel_mask = OMAP4430_CLKSEL_MASK, |
| 2313 | .ops = &clkops_omap2_dflt, |
| 2314 | .recalc = &omap2_clksel_recalc, |
| 2315 | .enable_reg = OMAP4430_CM_L4PER_DMTIMER4_CLKCTRL, |
| 2316 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2317 | .clkdm_name = "l4_per_clkdm", |
| 2318 | }; |
| 2319 | |
| 2320 | static const struct clksel timer5_sync_mux_sel[] = { |
| 2321 | { .parent = &syc_clk_div_ck, .rates = div_1_0_rates }, |
| 2322 | { .parent = &sys_32k_ck, .rates = div_1_1_rates }, |
| 2323 | { .parent = NULL }, |
| 2324 | }; |
| 2325 | |
| 2326 | /* Merged timer5_sync_mux into timer5 */ |
| 2327 | static struct clk timer5_fck = { |
| 2328 | .name = "timer5_fck", |
| 2329 | .parent = &syc_clk_div_ck, |
| 2330 | .clksel = timer5_sync_mux_sel, |
| 2331 | .init = &omap2_init_clksel_parent, |
| 2332 | .clksel_reg = OMAP4430_CM1_ABE_TIMER5_CLKCTRL, |
| 2333 | .clksel_mask = OMAP4430_CLKSEL_MASK, |
| 2334 | .ops = &clkops_omap2_dflt, |
| 2335 | .recalc = &omap2_clksel_recalc, |
| 2336 | .enable_reg = OMAP4430_CM1_ABE_TIMER5_CLKCTRL, |
| 2337 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2338 | .clkdm_name = "abe_clkdm", |
| 2339 | }; |
| 2340 | |
| 2341 | /* Merged timer6_sync_mux into timer6 */ |
| 2342 | static struct clk timer6_fck = { |
| 2343 | .name = "timer6_fck", |
| 2344 | .parent = &syc_clk_div_ck, |
| 2345 | .clksel = timer5_sync_mux_sel, |
| 2346 | .init = &omap2_init_clksel_parent, |
| 2347 | .clksel_reg = OMAP4430_CM1_ABE_TIMER6_CLKCTRL, |
| 2348 | .clksel_mask = OMAP4430_CLKSEL_MASK, |
| 2349 | .ops = &clkops_omap2_dflt, |
| 2350 | .recalc = &omap2_clksel_recalc, |
| 2351 | .enable_reg = OMAP4430_CM1_ABE_TIMER6_CLKCTRL, |
| 2352 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2353 | .clkdm_name = "abe_clkdm", |
| 2354 | }; |
| 2355 | |
| 2356 | /* Merged timer7_sync_mux into timer7 */ |
| 2357 | static struct clk timer7_fck = { |
| 2358 | .name = "timer7_fck", |
| 2359 | .parent = &syc_clk_div_ck, |
| 2360 | .clksel = timer5_sync_mux_sel, |
| 2361 | .init = &omap2_init_clksel_parent, |
| 2362 | .clksel_reg = OMAP4430_CM1_ABE_TIMER7_CLKCTRL, |
| 2363 | .clksel_mask = OMAP4430_CLKSEL_MASK, |
| 2364 | .ops = &clkops_omap2_dflt, |
| 2365 | .recalc = &omap2_clksel_recalc, |
| 2366 | .enable_reg = OMAP4430_CM1_ABE_TIMER7_CLKCTRL, |
| 2367 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2368 | .clkdm_name = "abe_clkdm", |
| 2369 | }; |
| 2370 | |
| 2371 | /* Merged timer8_sync_mux into timer8 */ |
| 2372 | static struct clk timer8_fck = { |
| 2373 | .name = "timer8_fck", |
| 2374 | .parent = &syc_clk_div_ck, |
| 2375 | .clksel = timer5_sync_mux_sel, |
| 2376 | .init = &omap2_init_clksel_parent, |
| 2377 | .clksel_reg = OMAP4430_CM1_ABE_TIMER8_CLKCTRL, |
| 2378 | .clksel_mask = OMAP4430_CLKSEL_MASK, |
| 2379 | .ops = &clkops_omap2_dflt, |
| 2380 | .recalc = &omap2_clksel_recalc, |
| 2381 | .enable_reg = OMAP4430_CM1_ABE_TIMER8_CLKCTRL, |
| 2382 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2383 | .clkdm_name = "abe_clkdm", |
| 2384 | }; |
| 2385 | |
| 2386 | /* Merged cm2_dm9_mux into timer9 */ |
| 2387 | static struct clk timer9_fck = { |
| 2388 | .name = "timer9_fck", |
| 2389 | .parent = &sys_clkin_ck, |
| 2390 | .clksel = abe_dpll_bypass_clk_mux_sel, |
| 2391 | .init = &omap2_init_clksel_parent, |
| 2392 | .clksel_reg = OMAP4430_CM_L4PER_DMTIMER9_CLKCTRL, |
| 2393 | .clksel_mask = OMAP4430_CLKSEL_MASK, |
| 2394 | .ops = &clkops_omap2_dflt, |
| 2395 | .recalc = &omap2_clksel_recalc, |
| 2396 | .enable_reg = OMAP4430_CM_L4PER_DMTIMER9_CLKCTRL, |
| 2397 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2398 | .clkdm_name = "l4_per_clkdm", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2399 | }; |
| 2400 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2401 | static struct clk uart1_fck = { |
| 2402 | .name = "uart1_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2403 | .ops = &clkops_omap2_dflt, |
| 2404 | .enable_reg = OMAP4430_CM_L4PER_UART1_CLKCTRL, |
| 2405 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2406 | .clkdm_name = "l4_per_clkdm", |
| 2407 | .parent = &func_48m_fclk, |
| 2408 | .recalc = &followparent_recalc, |
| 2409 | }; |
| 2410 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2411 | static struct clk uart2_fck = { |
| 2412 | .name = "uart2_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2413 | .ops = &clkops_omap2_dflt, |
| 2414 | .enable_reg = OMAP4430_CM_L4PER_UART2_CLKCTRL, |
| 2415 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2416 | .clkdm_name = "l4_per_clkdm", |
| 2417 | .parent = &func_48m_fclk, |
| 2418 | .recalc = &followparent_recalc, |
| 2419 | }; |
| 2420 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2421 | static struct clk uart3_fck = { |
| 2422 | .name = "uart3_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2423 | .ops = &clkops_omap2_dflt, |
| 2424 | .enable_reg = OMAP4430_CM_L4PER_UART3_CLKCTRL, |
| 2425 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2426 | .clkdm_name = "l4_per_clkdm", |
| 2427 | .parent = &func_48m_fclk, |
| 2428 | .recalc = &followparent_recalc, |
| 2429 | }; |
| 2430 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2431 | static struct clk uart4_fck = { |
| 2432 | .name = "uart4_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2433 | .ops = &clkops_omap2_dflt, |
| 2434 | .enable_reg = OMAP4430_CM_L4PER_UART4_CLKCTRL, |
| 2435 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2436 | .clkdm_name = "l4_per_clkdm", |
| 2437 | .parent = &func_48m_fclk, |
| 2438 | .recalc = &followparent_recalc, |
| 2439 | }; |
| 2440 | |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2441 | static struct clk usb_host_fs_fck = { |
| 2442 | .name = "usb_host_fs_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2443 | .ops = &clkops_omap2_dflt, |
| 2444 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_FS_CLKCTRL, |
| 2445 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2446 | .clkdm_name = "l3_init_clkdm", |
| 2447 | .parent = &func_48mc_fclk, |
| 2448 | .recalc = &followparent_recalc, |
| 2449 | }; |
| 2450 | |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2451 | static struct clk usb_host_hs_utmi_p3_clk = { |
| 2452 | .name = "usb_host_hs_utmi_p3_clk", |
| 2453 | .ops = &clkops_omap2_dflt, |
| 2454 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, |
| 2455 | .enable_bit = OMAP4430_OPTFCLKEN_UTMI_P3_CLK_SHIFT, |
| 2456 | .clkdm_name = "l3_init_clkdm", |
| 2457 | .parent = &init_60m_fclk, |
| 2458 | .recalc = &followparent_recalc, |
| 2459 | }; |
| 2460 | |
| 2461 | static struct clk usb_host_hs_hsic60m_p1_clk = { |
| 2462 | .name = "usb_host_hs_hsic60m_p1_clk", |
| 2463 | .ops = &clkops_omap2_dflt, |
| 2464 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, |
| 2465 | .enable_bit = OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT, |
| 2466 | .clkdm_name = "l3_init_clkdm", |
| 2467 | .parent = &init_60m_fclk, |
| 2468 | .recalc = &followparent_recalc, |
| 2469 | }; |
| 2470 | |
| 2471 | static struct clk usb_host_hs_hsic60m_p2_clk = { |
| 2472 | .name = "usb_host_hs_hsic60m_p2_clk", |
| 2473 | .ops = &clkops_omap2_dflt, |
| 2474 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, |
| 2475 | .enable_bit = OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT, |
| 2476 | .clkdm_name = "l3_init_clkdm", |
| 2477 | .parent = &init_60m_fclk, |
| 2478 | .recalc = &followparent_recalc, |
| 2479 | }; |
| 2480 | |
| 2481 | static const struct clksel utmi_p1_gfclk_sel[] = { |
| 2482 | { .parent = &init_60m_fclk, .rates = div_1_0_rates }, |
| 2483 | { .parent = &xclk60mhsp1_ck, .rates = div_1_1_rates }, |
| 2484 | { .parent = NULL }, |
| 2485 | }; |
| 2486 | |
| 2487 | static struct clk utmi_p1_gfclk = { |
| 2488 | .name = "utmi_p1_gfclk", |
| 2489 | .parent = &init_60m_fclk, |
| 2490 | .clksel = utmi_p1_gfclk_sel, |
| 2491 | .init = &omap2_init_clksel_parent, |
| 2492 | .clksel_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, |
| 2493 | .clksel_mask = OMAP4430_CLKSEL_UTMI_P1_MASK, |
| 2494 | .ops = &clkops_null, |
| 2495 | .recalc = &omap2_clksel_recalc, |
| 2496 | }; |
| 2497 | |
| 2498 | static struct clk usb_host_hs_utmi_p1_clk = { |
| 2499 | .name = "usb_host_hs_utmi_p1_clk", |
| 2500 | .ops = &clkops_omap2_dflt, |
| 2501 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, |
| 2502 | .enable_bit = OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT, |
| 2503 | .clkdm_name = "l3_init_clkdm", |
| 2504 | .parent = &utmi_p1_gfclk, |
| 2505 | .recalc = &followparent_recalc, |
| 2506 | }; |
| 2507 | |
| 2508 | static const struct clksel utmi_p2_gfclk_sel[] = { |
| 2509 | { .parent = &init_60m_fclk, .rates = div_1_0_rates }, |
| 2510 | { .parent = &xclk60mhsp2_ck, .rates = div_1_1_rates }, |
| 2511 | { .parent = NULL }, |
| 2512 | }; |
| 2513 | |
| 2514 | static struct clk utmi_p2_gfclk = { |
| 2515 | .name = "utmi_p2_gfclk", |
| 2516 | .parent = &init_60m_fclk, |
| 2517 | .clksel = utmi_p2_gfclk_sel, |
| 2518 | .init = &omap2_init_clksel_parent, |
| 2519 | .clksel_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, |
| 2520 | .clksel_mask = OMAP4430_CLKSEL_UTMI_P2_MASK, |
| 2521 | .ops = &clkops_null, |
| 2522 | .recalc = &omap2_clksel_recalc, |
| 2523 | }; |
| 2524 | |
| 2525 | static struct clk usb_host_hs_utmi_p2_clk = { |
| 2526 | .name = "usb_host_hs_utmi_p2_clk", |
| 2527 | .ops = &clkops_omap2_dflt, |
| 2528 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, |
| 2529 | .enable_bit = OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT, |
| 2530 | .clkdm_name = "l3_init_clkdm", |
| 2531 | .parent = &utmi_p2_gfclk, |
| 2532 | .recalc = &followparent_recalc, |
| 2533 | }; |
| 2534 | |
| 2535 | static struct clk usb_host_hs_hsic480m_p1_clk = { |
| 2536 | .name = "usb_host_hs_hsic480m_p1_clk", |
| 2537 | .ops = &clkops_omap2_dflt, |
| 2538 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, |
| 2539 | .enable_bit = OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT, |
| 2540 | .clkdm_name = "l3_init_clkdm", |
| 2541 | .parent = &dpll_usb_m2_ck, |
| 2542 | .recalc = &followparent_recalc, |
| 2543 | }; |
| 2544 | |
| 2545 | static struct clk usb_host_hs_hsic480m_p2_clk = { |
| 2546 | .name = "usb_host_hs_hsic480m_p2_clk", |
| 2547 | .ops = &clkops_omap2_dflt, |
| 2548 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, |
| 2549 | .enable_bit = OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT, |
| 2550 | .clkdm_name = "l3_init_clkdm", |
| 2551 | .parent = &dpll_usb_m2_ck, |
| 2552 | .recalc = &followparent_recalc, |
| 2553 | }; |
| 2554 | |
| 2555 | static struct clk usb_host_hs_func48mclk = { |
| 2556 | .name = "usb_host_hs_func48mclk", |
| 2557 | .ops = &clkops_omap2_dflt, |
| 2558 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, |
| 2559 | .enable_bit = OMAP4430_OPTFCLKEN_FUNC48MCLK_SHIFT, |
| 2560 | .clkdm_name = "l3_init_clkdm", |
| 2561 | .parent = &func_48mc_fclk, |
| 2562 | .recalc = &followparent_recalc, |
| 2563 | }; |
| 2564 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2565 | static struct clk usb_host_hs_fck = { |
| 2566 | .name = "usb_host_hs_fck", |
| 2567 | .ops = &clkops_omap2_dflt, |
| 2568 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, |
| 2569 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2570 | .clkdm_name = "l3_init_clkdm", |
| 2571 | .parent = &init_60m_fclk, |
| 2572 | .recalc = &followparent_recalc, |
| 2573 | }; |
| 2574 | |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2575 | static const struct clksel otg_60m_gfclk_sel[] = { |
| 2576 | { .parent = &utmi_phy_clkout_ck, .rates = div_1_0_rates }, |
| 2577 | { .parent = &xclk60motg_ck, .rates = div_1_1_rates }, |
| 2578 | { .parent = NULL }, |
| 2579 | }; |
| 2580 | |
| 2581 | static struct clk otg_60m_gfclk = { |
| 2582 | .name = "otg_60m_gfclk", |
| 2583 | .parent = &utmi_phy_clkout_ck, |
| 2584 | .clksel = otg_60m_gfclk_sel, |
| 2585 | .init = &omap2_init_clksel_parent, |
| 2586 | .clksel_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL, |
| 2587 | .clksel_mask = OMAP4430_CLKSEL_60M_MASK, |
| 2588 | .ops = &clkops_null, |
| 2589 | .recalc = &omap2_clksel_recalc, |
| 2590 | }; |
| 2591 | |
| 2592 | static struct clk usb_otg_hs_xclk = { |
| 2593 | .name = "usb_otg_hs_xclk", |
| 2594 | .ops = &clkops_omap2_dflt, |
| 2595 | .enable_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL, |
| 2596 | .enable_bit = OMAP4430_OPTFCLKEN_XCLK_SHIFT, |
| 2597 | .clkdm_name = "l3_init_clkdm", |
| 2598 | .parent = &otg_60m_gfclk, |
| 2599 | .recalc = &followparent_recalc, |
| 2600 | }; |
| 2601 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2602 | static struct clk usb_otg_hs_ick = { |
| 2603 | .name = "usb_otg_hs_ick", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2604 | .ops = &clkops_omap2_dflt, |
| 2605 | .enable_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL, |
| 2606 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
| 2607 | .clkdm_name = "l3_init_clkdm", |
| 2608 | .parent = &l3_div_ck, |
| 2609 | .recalc = &followparent_recalc, |
| 2610 | }; |
| 2611 | |
Benoit Cousson | 0edc9e8 | 2010-09-27 14:02:56 -0600 | [diff] [blame] | 2612 | static struct clk usb_phy_cm_clk32k = { |
| 2613 | .name = "usb_phy_cm_clk32k", |
| 2614 | .ops = &clkops_omap2_dflt, |
| 2615 | .enable_reg = OMAP4430_CM_ALWON_USBPHY_CLKCTRL, |
| 2616 | .enable_bit = OMAP4430_OPTFCLKEN_CLK32K_SHIFT, |
| 2617 | .clkdm_name = "l4_ao_clkdm", |
| 2618 | .parent = &sys_32k_ck, |
| 2619 | .recalc = &followparent_recalc, |
| 2620 | }; |
| 2621 | |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2622 | static struct clk usb_tll_hs_usb_ch2_clk = { |
| 2623 | .name = "usb_tll_hs_usb_ch2_clk", |
| 2624 | .ops = &clkops_omap2_dflt, |
| 2625 | .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL, |
| 2626 | .enable_bit = OMAP4430_OPTFCLKEN_USB_CH2_CLK_SHIFT, |
| 2627 | .clkdm_name = "l3_init_clkdm", |
| 2628 | .parent = &init_60m_fclk, |
| 2629 | .recalc = &followparent_recalc, |
| 2630 | }; |
| 2631 | |
| 2632 | static struct clk usb_tll_hs_usb_ch0_clk = { |
| 2633 | .name = "usb_tll_hs_usb_ch0_clk", |
| 2634 | .ops = &clkops_omap2_dflt, |
| 2635 | .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL, |
| 2636 | .enable_bit = OMAP4430_OPTFCLKEN_USB_CH0_CLK_SHIFT, |
| 2637 | .clkdm_name = "l3_init_clkdm", |
| 2638 | .parent = &init_60m_fclk, |
| 2639 | .recalc = &followparent_recalc, |
| 2640 | }; |
| 2641 | |
| 2642 | static struct clk usb_tll_hs_usb_ch1_clk = { |
| 2643 | .name = "usb_tll_hs_usb_ch1_clk", |
| 2644 | .ops = &clkops_omap2_dflt, |
| 2645 | .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL, |
| 2646 | .enable_bit = OMAP4430_OPTFCLKEN_USB_CH1_CLK_SHIFT, |
| 2647 | .clkdm_name = "l3_init_clkdm", |
| 2648 | .parent = &init_60m_fclk, |
| 2649 | .recalc = &followparent_recalc, |
| 2650 | }; |
| 2651 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2652 | static struct clk usb_tll_hs_ick = { |
| 2653 | .name = "usb_tll_hs_ick", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2654 | .ops = &clkops_omap2_dflt, |
| 2655 | .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL, |
| 2656 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
| 2657 | .clkdm_name = "l3_init_clkdm", |
| 2658 | .parent = &l4_div_ck, |
| 2659 | .recalc = &followparent_recalc, |
| 2660 | }; |
| 2661 | |
Benoit Cousson | 0edc9e8 | 2010-09-27 14:02:56 -0600 | [diff] [blame] | 2662 | static const struct clksel_rate div2_14to18_rates[] = { |
| 2663 | { .div = 14, .val = 0, .flags = RATE_IN_4430 }, |
| 2664 | { .div = 18, .val = 1, .flags = RATE_IN_4430 }, |
| 2665 | { .div = 0 }, |
| 2666 | }; |
| 2667 | |
| 2668 | static const struct clksel usim_fclk_div[] = { |
| 2669 | { .parent = &dpll_per_m4_ck, .rates = div2_14to18_rates }, |
| 2670 | { .parent = NULL }, |
| 2671 | }; |
| 2672 | |
| 2673 | static struct clk usim_ck = { |
| 2674 | .name = "usim_ck", |
| 2675 | .parent = &dpll_per_m4_ck, |
| 2676 | .clksel = usim_fclk_div, |
| 2677 | .clksel_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL, |
| 2678 | .clksel_mask = OMAP4430_CLKSEL_DIV_MASK, |
| 2679 | .ops = &clkops_null, |
| 2680 | .recalc = &omap2_clksel_recalc, |
| 2681 | .round_rate = &omap2_clksel_round_rate, |
| 2682 | .set_rate = &omap2_clksel_set_rate, |
| 2683 | }; |
| 2684 | |
| 2685 | static struct clk usim_fclk = { |
| 2686 | .name = "usim_fclk", |
| 2687 | .ops = &clkops_omap2_dflt, |
| 2688 | .enable_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL, |
| 2689 | .enable_bit = OMAP4430_OPTFCLKEN_FCLK_SHIFT, |
| 2690 | .clkdm_name = "l4_wkup_clkdm", |
| 2691 | .parent = &usim_ck, |
| 2692 | .recalc = &followparent_recalc, |
| 2693 | }; |
| 2694 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2695 | static struct clk usim_fck = { |
| 2696 | .name = "usim_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2697 | .ops = &clkops_omap2_dflt, |
| 2698 | .enable_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL, |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2699 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2700 | .clkdm_name = "l4_wkup_clkdm", |
| 2701 | .parent = &sys_32k_ck, |
| 2702 | .recalc = &followparent_recalc, |
| 2703 | }; |
| 2704 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2705 | static struct clk wd_timer2_fck = { |
| 2706 | .name = "wd_timer2_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2707 | .ops = &clkops_omap2_dflt, |
| 2708 | .enable_reg = OMAP4430_CM_WKUP_WDT2_CLKCTRL, |
| 2709 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2710 | .clkdm_name = "l4_wkup_clkdm", |
| 2711 | .parent = &sys_32k_ck, |
| 2712 | .recalc = &followparent_recalc, |
| 2713 | }; |
| 2714 | |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2715 | static struct clk wd_timer3_fck = { |
| 2716 | .name = "wd_timer3_fck", |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2717 | .ops = &clkops_omap2_dflt, |
| 2718 | .enable_reg = OMAP4430_CM1_ABE_WDT3_CLKCTRL, |
| 2719 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
| 2720 | .clkdm_name = "abe_clkdm", |
| 2721 | .parent = &sys_32k_ck, |
| 2722 | .recalc = &followparent_recalc, |
| 2723 | }; |
| 2724 | |
| 2725 | /* Remaining optional clocks */ |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2726 | static const struct clksel stm_clk_div_div[] = { |
| 2727 | { .parent = &pmd_stm_clock_mux_ck, .rates = div3_1to4_rates }, |
| 2728 | { .parent = NULL }, |
| 2729 | }; |
| 2730 | |
| 2731 | static struct clk stm_clk_div_ck = { |
| 2732 | .name = "stm_clk_div_ck", |
| 2733 | .parent = &pmd_stm_clock_mux_ck, |
| 2734 | .clksel = stm_clk_div_div, |
| 2735 | .clksel_reg = OMAP4430_CM_EMU_DEBUGSS_CLKCTRL, |
| 2736 | .clksel_mask = OMAP4430_CLKSEL_PMD_STM_CLK_MASK, |
| 2737 | .ops = &clkops_null, |
| 2738 | .recalc = &omap2_clksel_recalc, |
| 2739 | .round_rate = &omap2_clksel_round_rate, |
| 2740 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2741 | }; |
| 2742 | |
| 2743 | static const struct clksel trace_clk_div_div[] = { |
| 2744 | { .parent = &pmd_trace_clk_mux_ck, .rates = div3_1to4_rates }, |
| 2745 | { .parent = NULL }, |
| 2746 | }; |
| 2747 | |
| 2748 | static struct clk trace_clk_div_ck = { |
| 2749 | .name = "trace_clk_div_ck", |
| 2750 | .parent = &pmd_trace_clk_mux_ck, |
| 2751 | .clksel = trace_clk_div_div, |
| 2752 | .clksel_reg = OMAP4430_CM_EMU_DEBUGSS_CLKCTRL, |
| 2753 | .clksel_mask = OMAP4430_CLKSEL_PMD_TRACE_CLK_MASK, |
| 2754 | .ops = &clkops_null, |
| 2755 | .recalc = &omap2_clksel_recalc, |
| 2756 | .round_rate = &omap2_clksel_round_rate, |
| 2757 | .set_rate = &omap2_clksel_set_rate, |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2758 | }; |
| 2759 | |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2760 | /* |
| 2761 | * clkdev |
| 2762 | */ |
| 2763 | |
| 2764 | static struct omap_clk omap44xx_clks[] = { |
| 2765 | CLK(NULL, "extalt_clkin_ck", &extalt_clkin_ck, CK_443X), |
| 2766 | CLK(NULL, "pad_clks_ck", &pad_clks_ck, CK_443X), |
| 2767 | CLK(NULL, "pad_slimbus_core_clks_ck", &pad_slimbus_core_clks_ck, CK_443X), |
| 2768 | CLK(NULL, "secure_32k_clk_src_ck", &secure_32k_clk_src_ck, CK_443X), |
| 2769 | CLK(NULL, "slimbus_clk", &slimbus_clk, CK_443X), |
| 2770 | CLK(NULL, "sys_32k_ck", &sys_32k_ck, CK_443X), |
| 2771 | CLK(NULL, "virt_12000000_ck", &virt_12000000_ck, CK_443X), |
| 2772 | CLK(NULL, "virt_13000000_ck", &virt_13000000_ck, CK_443X), |
| 2773 | CLK(NULL, "virt_16800000_ck", &virt_16800000_ck, CK_443X), |
| 2774 | CLK(NULL, "virt_19200000_ck", &virt_19200000_ck, CK_443X), |
| 2775 | CLK(NULL, "virt_26000000_ck", &virt_26000000_ck, CK_443X), |
| 2776 | CLK(NULL, "virt_27000000_ck", &virt_27000000_ck, CK_443X), |
| 2777 | CLK(NULL, "virt_38400000_ck", &virt_38400000_ck, CK_443X), |
| 2778 | CLK(NULL, "sys_clkin_ck", &sys_clkin_ck, CK_443X), |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2779 | CLK(NULL, "tie_low_clock_ck", &tie_low_clock_ck, CK_443X), |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2780 | CLK(NULL, "utmi_phy_clkout_ck", &utmi_phy_clkout_ck, CK_443X), |
| 2781 | CLK(NULL, "xclk60mhsp1_ck", &xclk60mhsp1_ck, CK_443X), |
| 2782 | CLK(NULL, "xclk60mhsp2_ck", &xclk60mhsp2_ck, CK_443X), |
| 2783 | CLK(NULL, "xclk60motg_ck", &xclk60motg_ck, CK_443X), |
Rajendra Nayak | 76cf529 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2784 | CLK(NULL, "abe_dpll_bypass_clk_mux_ck", &abe_dpll_bypass_clk_mux_ck, CK_443X), |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2785 | CLK(NULL, "abe_dpll_refclk_mux_ck", &abe_dpll_refclk_mux_ck, CK_443X), |
| 2786 | CLK(NULL, "dpll_abe_ck", &dpll_abe_ck, CK_443X), |
| 2787 | CLK(NULL, "dpll_abe_m2x2_ck", &dpll_abe_m2x2_ck, CK_443X), |
| 2788 | CLK(NULL, "abe_24m_fclk", &abe_24m_fclk, CK_443X), |
| 2789 | CLK(NULL, "abe_clk", &abe_clk, CK_443X), |
| 2790 | CLK(NULL, "aess_fclk", &aess_fclk, CK_443X), |
| 2791 | CLK(NULL, "dpll_abe_m3_ck", &dpll_abe_m3_ck, CK_443X), |
| 2792 | CLK(NULL, "core_hsd_byp_clk_mux_ck", &core_hsd_byp_clk_mux_ck, CK_443X), |
| 2793 | CLK(NULL, "dpll_core_ck", &dpll_core_ck, CK_443X), |
| 2794 | CLK(NULL, "dpll_core_m6_ck", &dpll_core_m6_ck, CK_443X), |
| 2795 | CLK(NULL, "dbgclk_mux_ck", &dbgclk_mux_ck, CK_443X), |
| 2796 | CLK(NULL, "dpll_core_m2_ck", &dpll_core_m2_ck, CK_443X), |
| 2797 | CLK(NULL, "ddrphy_ck", &ddrphy_ck, CK_443X), |
| 2798 | CLK(NULL, "dpll_core_m5_ck", &dpll_core_m5_ck, CK_443X), |
| 2799 | CLK(NULL, "div_core_ck", &div_core_ck, CK_443X), |
| 2800 | CLK(NULL, "div_iva_hs_clk", &div_iva_hs_clk, CK_443X), |
| 2801 | CLK(NULL, "div_mpu_hs_clk", &div_mpu_hs_clk, CK_443X), |
| 2802 | CLK(NULL, "dpll_core_m4_ck", &dpll_core_m4_ck, CK_443X), |
| 2803 | CLK(NULL, "dll_clk_div_ck", &dll_clk_div_ck, CK_443X), |
| 2804 | CLK(NULL, "dpll_abe_m2_ck", &dpll_abe_m2_ck, CK_443X), |
| 2805 | CLK(NULL, "dpll_core_m3_ck", &dpll_core_m3_ck, CK_443X), |
| 2806 | CLK(NULL, "dpll_core_m7_ck", &dpll_core_m7_ck, CK_443X), |
| 2807 | CLK(NULL, "iva_hsd_byp_clk_mux_ck", &iva_hsd_byp_clk_mux_ck, CK_443X), |
| 2808 | CLK(NULL, "dpll_iva_ck", &dpll_iva_ck, CK_443X), |
| 2809 | CLK(NULL, "dpll_iva_m4_ck", &dpll_iva_m4_ck, CK_443X), |
| 2810 | CLK(NULL, "dpll_iva_m5_ck", &dpll_iva_m5_ck, CK_443X), |
| 2811 | CLK(NULL, "dpll_mpu_ck", &dpll_mpu_ck, CK_443X), |
| 2812 | CLK(NULL, "dpll_mpu_m2_ck", &dpll_mpu_m2_ck, CK_443X), |
| 2813 | CLK(NULL, "per_hs_clk_div_ck", &per_hs_clk_div_ck, CK_443X), |
| 2814 | CLK(NULL, "per_hsd_byp_clk_mux_ck", &per_hsd_byp_clk_mux_ck, CK_443X), |
| 2815 | CLK(NULL, "dpll_per_ck", &dpll_per_ck, CK_443X), |
| 2816 | CLK(NULL, "dpll_per_m2_ck", &dpll_per_m2_ck, CK_443X), |
| 2817 | CLK(NULL, "dpll_per_m2x2_ck", &dpll_per_m2x2_ck, CK_443X), |
| 2818 | CLK(NULL, "dpll_per_m3_ck", &dpll_per_m3_ck, CK_443X), |
| 2819 | CLK(NULL, "dpll_per_m4_ck", &dpll_per_m4_ck, CK_443X), |
| 2820 | CLK(NULL, "dpll_per_m5_ck", &dpll_per_m5_ck, CK_443X), |
| 2821 | CLK(NULL, "dpll_per_m6_ck", &dpll_per_m6_ck, CK_443X), |
| 2822 | CLK(NULL, "dpll_per_m7_ck", &dpll_per_m7_ck, CK_443X), |
| 2823 | CLK(NULL, "dpll_unipro_ck", &dpll_unipro_ck, CK_443X), |
| 2824 | CLK(NULL, "dpll_unipro_m2x2_ck", &dpll_unipro_m2x2_ck, CK_443X), |
| 2825 | CLK(NULL, "usb_hs_clk_div_ck", &usb_hs_clk_div_ck, CK_443X), |
| 2826 | CLK(NULL, "dpll_usb_ck", &dpll_usb_ck, CK_443X), |
| 2827 | CLK(NULL, "dpll_usb_clkdcoldo_ck", &dpll_usb_clkdcoldo_ck, CK_443X), |
| 2828 | CLK(NULL, "dpll_usb_m2_ck", &dpll_usb_m2_ck, CK_443X), |
| 2829 | CLK(NULL, "ducati_clk_mux_ck", &ducati_clk_mux_ck, CK_443X), |
| 2830 | CLK(NULL, "func_12m_fclk", &func_12m_fclk, CK_443X), |
| 2831 | CLK(NULL, "func_24m_clk", &func_24m_clk, CK_443X), |
| 2832 | CLK(NULL, "func_24mc_fclk", &func_24mc_fclk, CK_443X), |
| 2833 | CLK(NULL, "func_48m_fclk", &func_48m_fclk, CK_443X), |
| 2834 | CLK(NULL, "func_48mc_fclk", &func_48mc_fclk, CK_443X), |
| 2835 | CLK(NULL, "func_64m_fclk", &func_64m_fclk, CK_443X), |
| 2836 | CLK(NULL, "func_96m_fclk", &func_96m_fclk, CK_443X), |
| 2837 | CLK(NULL, "hsmmc6_fclk", &hsmmc6_fclk, CK_443X), |
| 2838 | CLK(NULL, "init_60m_fclk", &init_60m_fclk, CK_443X), |
| 2839 | CLK(NULL, "l3_div_ck", &l3_div_ck, CK_443X), |
| 2840 | CLK(NULL, "l4_div_ck", &l4_div_ck, CK_443X), |
| 2841 | CLK(NULL, "lp_clk_div_ck", &lp_clk_div_ck, CK_443X), |
| 2842 | CLK(NULL, "l4_wkup_clk_mux_ck", &l4_wkup_clk_mux_ck, CK_443X), |
| 2843 | CLK(NULL, "per_abe_nc_fclk", &per_abe_nc_fclk, CK_443X), |
| 2844 | CLK(NULL, "mcasp2_fclk", &mcasp2_fclk, CK_443X), |
| 2845 | CLK(NULL, "mcasp3_fclk", &mcasp3_fclk, CK_443X), |
| 2846 | CLK(NULL, "ocp_abe_iclk", &ocp_abe_iclk, CK_443X), |
| 2847 | CLK(NULL, "per_abe_24m_fclk", &per_abe_24m_fclk, CK_443X), |
| 2848 | CLK(NULL, "pmd_stm_clock_mux_ck", &pmd_stm_clock_mux_ck, CK_443X), |
| 2849 | CLK(NULL, "pmd_trace_clk_mux_ck", &pmd_trace_clk_mux_ck, CK_443X), |
| 2850 | CLK(NULL, "syc_clk_div_ck", &syc_clk_div_ck, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2851 | CLK(NULL, "aes1_fck", &aes1_fck, CK_443X), |
| 2852 | CLK(NULL, "aes2_fck", &aes2_fck, CK_443X), |
| 2853 | CLK(NULL, "aess_fck", &aess_fck, CK_443X), |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2854 | CLK(NULL, "bandgap_fclk", &bandgap_fclk, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2855 | CLK(NULL, "des3des_fck", &des3des_fck, CK_443X), |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2856 | CLK(NULL, "dmic_sync_mux_ck", &dmic_sync_mux_ck, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2857 | CLK(NULL, "dmic_fck", &dmic_fck, CK_443X), |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2858 | CLK(NULL, "dsp_fck", &dsp_fck, CK_443X), |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2859 | CLK(NULL, "dss_sys_clk", &dss_sys_clk, CK_443X), |
| 2860 | CLK(NULL, "dss_tv_clk", &dss_tv_clk, CK_443X), |
| 2861 | CLK(NULL, "dss_dss_clk", &dss_dss_clk, CK_443X), |
| 2862 | CLK(NULL, "dss_48mhz_clk", &dss_48mhz_clk, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2863 | CLK(NULL, "dss_fck", &dss_fck, CK_443X), |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2864 | CLK(NULL, "efuse_ctrl_cust_fck", &efuse_ctrl_cust_fck, CK_443X), |
| 2865 | CLK(NULL, "emif1_fck", &emif1_fck, CK_443X), |
| 2866 | CLK(NULL, "emif2_fck", &emif2_fck, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2867 | CLK(NULL, "fdif_fck", &fdif_fck, CK_443X), |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2868 | CLK(NULL, "fpka_fck", &fpka_fck, CK_443X), |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2869 | CLK(NULL, "gpio1_dbck", &gpio1_dbclk, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2870 | CLK(NULL, "gpio1_ick", &gpio1_ick, CK_443X), |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2871 | CLK(NULL, "gpio2_dbck", &gpio2_dbclk, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2872 | CLK(NULL, "gpio2_ick", &gpio2_ick, CK_443X), |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2873 | CLK(NULL, "gpio3_dbck", &gpio3_dbclk, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2874 | CLK(NULL, "gpio3_ick", &gpio3_ick, CK_443X), |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2875 | CLK(NULL, "gpio4_dbck", &gpio4_dbclk, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2876 | CLK(NULL, "gpio4_ick", &gpio4_ick, CK_443X), |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2877 | CLK(NULL, "gpio5_dbck", &gpio5_dbclk, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2878 | CLK(NULL, "gpio5_ick", &gpio5_ick, CK_443X), |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2879 | CLK(NULL, "gpio6_dbck", &gpio6_dbclk, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2880 | CLK(NULL, "gpio6_ick", &gpio6_ick, CK_443X), |
| 2881 | CLK(NULL, "gpmc_ick", &gpmc_ick, CK_443X), |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2882 | CLK(NULL, "gpu_fck", &gpu_fck, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2883 | CLK("omap2_hdq.0", "fck", &hdq1w_fck, CK_443X), |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2884 | CLK(NULL, "hsi_fck", &hsi_fck, CK_443X), |
Benoit Cousson | f7bb0d9 | 2010-12-09 14:24:16 +0000 | [diff] [blame] | 2885 | CLK("omap_i2c.1", "fck", &i2c1_fck, CK_443X), |
| 2886 | CLK("omap_i2c.2", "fck", &i2c2_fck, CK_443X), |
| 2887 | CLK("omap_i2c.3", "fck", &i2c3_fck, CK_443X), |
| 2888 | CLK("omap_i2c.4", "fck", &i2c4_fck, CK_443X), |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2889 | CLK(NULL, "ipu_fck", &ipu_fck, CK_443X), |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2890 | CLK(NULL, "iss_ctrlclk", &iss_ctrlclk, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2891 | CLK(NULL, "iss_fck", &iss_fck, CK_443X), |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2892 | CLK(NULL, "iva_fck", &iva_fck, CK_443X), |
| 2893 | CLK(NULL, "kbd_fck", &kbd_fck, CK_443X), |
| 2894 | CLK(NULL, "l3_instr_ick", &l3_instr_ick, CK_443X), |
| 2895 | CLK(NULL, "l3_main_3_ick", &l3_main_3_ick, CK_443X), |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2896 | CLK(NULL, "mcasp_sync_mux_ck", &mcasp_sync_mux_ck, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2897 | CLK(NULL, "mcasp_fck", &mcasp_fck, CK_443X), |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2898 | CLK(NULL, "mcbsp1_sync_mux_ck", &mcbsp1_sync_mux_ck, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2899 | CLK("omap-mcbsp.1", "fck", &mcbsp1_fck, CK_443X), |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2900 | CLK(NULL, "mcbsp2_sync_mux_ck", &mcbsp2_sync_mux_ck, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2901 | CLK("omap-mcbsp.2", "fck", &mcbsp2_fck, CK_443X), |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2902 | CLK(NULL, "mcbsp3_sync_mux_ck", &mcbsp3_sync_mux_ck, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2903 | CLK("omap-mcbsp.3", "fck", &mcbsp3_fck, CK_443X), |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2904 | CLK(NULL, "mcbsp4_sync_mux_ck", &mcbsp4_sync_mux_ck, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2905 | CLK("omap-mcbsp.4", "fck", &mcbsp4_fck, CK_443X), |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2906 | CLK(NULL, "mcpdm_fck", &mcpdm_fck, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2907 | CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_443X), |
| 2908 | CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_443X), |
| 2909 | CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_443X), |
| 2910 | CLK("omap2_mcspi.4", "fck", &mcspi4_fck, CK_443X), |
| 2911 | CLK("mmci-omap-hs.0", "fck", &mmc1_fck, CK_443X), |
| 2912 | CLK("mmci-omap-hs.1", "fck", &mmc2_fck, CK_443X), |
| 2913 | CLK("mmci-omap-hs.2", "fck", &mmc3_fck, CK_443X), |
| 2914 | CLK("mmci-omap-hs.3", "fck", &mmc4_fck, CK_443X), |
| 2915 | CLK("mmci-omap-hs.4", "fck", &mmc5_fck, CK_443X), |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2916 | CLK(NULL, "ocp2scp_usb_phy_phy_48m", &ocp2scp_usb_phy_phy_48m, CK_443X), |
Benoit Cousson | 0edc9e8 | 2010-09-27 14:02:56 -0600 | [diff] [blame] | 2917 | CLK(NULL, "ocp2scp_usb_phy_ick", &ocp2scp_usb_phy_ick, CK_443X), |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2918 | CLK(NULL, "ocp_wp_noc_ick", &ocp_wp_noc_ick, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2919 | CLK("omap_rng", "ick", &rng_ick, CK_443X), |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2920 | CLK(NULL, "sha2md5_fck", &sha2md5_fck, CK_443X), |
| 2921 | CLK(NULL, "sl2if_ick", &sl2if_ick, CK_443X), |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2922 | CLK(NULL, "slimbus1_fclk_1", &slimbus1_fclk_1, CK_443X), |
| 2923 | CLK(NULL, "slimbus1_fclk_0", &slimbus1_fclk_0, CK_443X), |
| 2924 | CLK(NULL, "slimbus1_fclk_2", &slimbus1_fclk_2, CK_443X), |
| 2925 | CLK(NULL, "slimbus1_slimbus_clk", &slimbus1_slimbus_clk, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2926 | CLK(NULL, "slimbus1_fck", &slimbus1_fck, CK_443X), |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2927 | CLK(NULL, "slimbus2_fclk_1", &slimbus2_fclk_1, CK_443X), |
| 2928 | CLK(NULL, "slimbus2_fclk_0", &slimbus2_fclk_0, CK_443X), |
| 2929 | CLK(NULL, "slimbus2_slimbus_clk", &slimbus2_slimbus_clk, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2930 | CLK(NULL, "slimbus2_fck", &slimbus2_fck, CK_443X), |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2931 | CLK(NULL, "smartreflex_core_fck", &smartreflex_core_fck, CK_443X), |
| 2932 | CLK(NULL, "smartreflex_iva_fck", &smartreflex_iva_fck, CK_443X), |
| 2933 | CLK(NULL, "smartreflex_mpu_fck", &smartreflex_mpu_fck, CK_443X), |
| 2934 | CLK(NULL, "gpt1_fck", &timer1_fck, CK_443X), |
| 2935 | CLK(NULL, "gpt10_fck", &timer10_fck, CK_443X), |
| 2936 | CLK(NULL, "gpt11_fck", &timer11_fck, CK_443X), |
| 2937 | CLK(NULL, "gpt2_fck", &timer2_fck, CK_443X), |
| 2938 | CLK(NULL, "gpt3_fck", &timer3_fck, CK_443X), |
| 2939 | CLK(NULL, "gpt4_fck", &timer4_fck, CK_443X), |
| 2940 | CLK(NULL, "gpt5_fck", &timer5_fck, CK_443X), |
| 2941 | CLK(NULL, "gpt6_fck", &timer6_fck, CK_443X), |
| 2942 | CLK(NULL, "gpt7_fck", &timer7_fck, CK_443X), |
| 2943 | CLK(NULL, "gpt8_fck", &timer8_fck, CK_443X), |
| 2944 | CLK(NULL, "gpt9_fck", &timer9_fck, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2945 | CLK(NULL, "uart1_fck", &uart1_fck, CK_443X), |
| 2946 | CLK(NULL, "uart2_fck", &uart2_fck, CK_443X), |
| 2947 | CLK(NULL, "uart3_fck", &uart3_fck, CK_443X), |
| 2948 | CLK(NULL, "uart4_fck", &uart4_fck, CK_443X), |
Rajendra Nayak | 5477605 | 2010-02-22 22:09:39 -0700 | [diff] [blame] | 2949 | CLK(NULL, "usb_host_fs_fck", &usb_host_fs_fck, CK_443X), |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2950 | CLK(NULL, "usb_host_hs_utmi_p3_clk", &usb_host_hs_utmi_p3_clk, CK_443X), |
| 2951 | CLK(NULL, "usb_host_hs_hsic60m_p1_clk", &usb_host_hs_hsic60m_p1_clk, CK_443X), |
| 2952 | CLK(NULL, "usb_host_hs_hsic60m_p2_clk", &usb_host_hs_hsic60m_p2_clk, CK_443X), |
| 2953 | CLK(NULL, "utmi_p1_gfclk", &utmi_p1_gfclk, CK_443X), |
| 2954 | CLK(NULL, "usb_host_hs_utmi_p1_clk", &usb_host_hs_utmi_p1_clk, CK_443X), |
| 2955 | CLK(NULL, "utmi_p2_gfclk", &utmi_p2_gfclk, CK_443X), |
| 2956 | CLK(NULL, "usb_host_hs_utmi_p2_clk", &usb_host_hs_utmi_p2_clk, CK_443X), |
| 2957 | CLK(NULL, "usb_host_hs_hsic480m_p1_clk", &usb_host_hs_hsic480m_p1_clk, CK_443X), |
| 2958 | CLK(NULL, "usb_host_hs_hsic480m_p2_clk", &usb_host_hs_hsic480m_p2_clk, CK_443X), |
| 2959 | CLK(NULL, "usb_host_hs_func48mclk", &usb_host_hs_func48mclk, CK_443X), |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2960 | CLK(NULL, "usb_host_hs_fck", &usb_host_hs_fck, CK_443X), |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2961 | CLK(NULL, "otg_60m_gfclk", &otg_60m_gfclk, CK_443X), |
| 2962 | CLK(NULL, "usb_otg_hs_xclk", &usb_otg_hs_xclk, CK_443X), |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2963 | CLK("musb_hdrc", "ick", &usb_otg_hs_ick, CK_443X), |
Benoit Cousson | 0edc9e8 | 2010-09-27 14:02:56 -0600 | [diff] [blame] | 2964 | CLK(NULL, "usb_phy_cm_clk32k", &usb_phy_cm_clk32k, CK_443X), |
Benoit Cousson | 1c03f42 | 2010-09-27 14:02:55 -0600 | [diff] [blame] | 2965 | CLK(NULL, "usb_tll_hs_usb_ch2_clk", &usb_tll_hs_usb_ch2_clk, CK_443X), |
| 2966 | CLK(NULL, "usb_tll_hs_usb_ch0_clk", &usb_tll_hs_usb_ch0_clk, CK_443X), |
| 2967 | CLK(NULL, "usb_tll_hs_usb_ch1_clk", &usb_tll_hs_usb_ch1_clk, CK_443X), |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2968 | CLK(NULL, "usb_tll_hs_ick", &usb_tll_hs_ick, CK_443X), |
Benoit Cousson | 0edc9e8 | 2010-09-27 14:02:56 -0600 | [diff] [blame] | 2969 | CLK(NULL, "usim_ck", &usim_ck, CK_443X), |
| 2970 | CLK(NULL, "usim_fclk", &usim_fclk, CK_443X), |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2971 | CLK(NULL, "usim_fck", &usim_fck, CK_443X), |
| 2972 | CLK("omap_wdt", "fck", &wd_timer2_fck, CK_443X), |
| 2973 | CLK(NULL, "wd_timer3_fck", &wd_timer3_fck, CK_443X), |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 2974 | CLK(NULL, "stm_clk_div_ck", &stm_clk_div_ck, CK_443X), |
| 2975 | CLK(NULL, "trace_clk_div_ck", &trace_clk_div_ck, CK_443X), |
Santosh Shilimkar | 7c43d54 | 2010-02-22 22:09:40 -0700 | [diff] [blame] | 2976 | CLK(NULL, "gpmc_ck", &dummy_ck, CK_443X), |
| 2977 | CLK(NULL, "gpt1_ick", &dummy_ck, CK_443X), |
| 2978 | CLK(NULL, "gpt2_ick", &dummy_ck, CK_443X), |
| 2979 | CLK(NULL, "gpt3_ick", &dummy_ck, CK_443X), |
| 2980 | CLK(NULL, "gpt4_ick", &dummy_ck, CK_443X), |
| 2981 | CLK(NULL, "gpt5_ick", &dummy_ck, CK_443X), |
| 2982 | CLK(NULL, "gpt6_ick", &dummy_ck, CK_443X), |
| 2983 | CLK(NULL, "gpt7_ick", &dummy_ck, CK_443X), |
| 2984 | CLK(NULL, "gpt8_ick", &dummy_ck, CK_443X), |
| 2985 | CLK(NULL, "gpt9_ick", &dummy_ck, CK_443X), |
| 2986 | CLK(NULL, "gpt10_ick", &dummy_ck, CK_443X), |
| 2987 | CLK(NULL, "gpt11_ick", &dummy_ck, CK_443X), |
Benoit Cousson | f7bb0d9 | 2010-12-09 14:24:16 +0000 | [diff] [blame] | 2988 | CLK("omap_i2c.1", "ick", &dummy_ck, CK_443X), |
| 2989 | CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X), |
| 2990 | CLK("omap_i2c.3", "ick", &dummy_ck, CK_443X), |
| 2991 | CLK("omap_i2c.4", "ick", &dummy_ck, CK_443X), |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 2992 | CLK("mmci-omap-hs.0", "ick", &dummy_ck, CK_443X), |
| 2993 | CLK("mmci-omap-hs.1", "ick", &dummy_ck, CK_443X), |
| 2994 | CLK("mmci-omap-hs.2", "ick", &dummy_ck, CK_443X), |
| 2995 | CLK("mmci-omap-hs.3", "ick", &dummy_ck, CK_443X), |
| 2996 | CLK("mmci-omap-hs.4", "ick", &dummy_ck, CK_443X), |
Santosh Shilimkar | 7c43d54 | 2010-02-22 22:09:40 -0700 | [diff] [blame] | 2997 | CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_443X), |
| 2998 | CLK("omap-mcbsp.2", "ick", &dummy_ck, CK_443X), |
| 2999 | CLK("omap-mcbsp.3", "ick", &dummy_ck, CK_443X), |
| 3000 | CLK("omap-mcbsp.4", "ick", &dummy_ck, CK_443X), |
Benoit Cousson | 0e43327 | 2010-09-27 14:02:54 -0600 | [diff] [blame] | 3001 | CLK("omap2_mcspi.1", "ick", &dummy_ck, CK_443X), |
| 3002 | CLK("omap2_mcspi.2", "ick", &dummy_ck, CK_443X), |
| 3003 | CLK("omap2_mcspi.3", "ick", &dummy_ck, CK_443X), |
| 3004 | CLK("omap2_mcspi.4", "ick", &dummy_ck, CK_443X), |
Santosh Shilimkar | 7c43d54 | 2010-02-22 22:09:40 -0700 | [diff] [blame] | 3005 | CLK(NULL, "uart1_ick", &dummy_ck, CK_443X), |
| 3006 | CLK(NULL, "uart2_ick", &dummy_ck, CK_443X), |
| 3007 | CLK(NULL, "uart3_ick", &dummy_ck, CK_443X), |
| 3008 | CLK(NULL, "uart4_ick", &dummy_ck, CK_443X), |
| 3009 | CLK("omap_wdt", "ick", &dummy_ck, CK_443X), |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 3010 | }; |
| 3011 | |
Paul Walmsley | e80a972 | 2010-01-26 20:13:12 -0700 | [diff] [blame] | 3012 | int __init omap4xxx_clk_init(void) |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 3013 | { |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 3014 | struct omap_clk *c; |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 3015 | u32 cpu_clkflg; |
| 3016 | |
| 3017 | if (cpu_is_omap44xx()) { |
| 3018 | cpu_mask = RATE_IN_4430; |
| 3019 | cpu_clkflg = CK_443X; |
| 3020 | } |
| 3021 | |
| 3022 | clk_init(&omap2_clk_functions); |
| 3023 | |
| 3024 | for (c = omap44xx_clks; c < omap44xx_clks + ARRAY_SIZE(omap44xx_clks); |
| 3025 | c++) |
| 3026 | clk_preinit(c->lk.clk); |
| 3027 | |
| 3028 | for (c = omap44xx_clks; c < omap44xx_clks + ARRAY_SIZE(omap44xx_clks); |
| 3029 | c++) |
| 3030 | if (c->cpu & cpu_clkflg) { |
| 3031 | clkdev_add(&c->lk); |
| 3032 | clk_register(c->lk.clk); |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 3033 | omap2_init_clk_clkdm(c->lk.clk); |
Rajendra Nayak | 972c542 | 2009-12-08 18:46:28 -0700 | [diff] [blame] | 3034 | } |
| 3035 | |
| 3036 | recalculate_root_clocks(); |
| 3037 | |
| 3038 | /* |
| 3039 | * Only enable those clocks we will need, let the drivers |
| 3040 | * enable other clocks as necessary |
| 3041 | */ |
| 3042 | clk_enable_init_clocks(); |
| 3043 | |
| 3044 | return 0; |
| 3045 | } |