Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1 | /* |
Paul Walmsley | d8a9445 | 2009-12-08 16:21:29 -0700 | [diff] [blame] | 2 | * linux/arch/arm/mach-omap2/clock2xxx_data.c |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 3 | * |
Paul Walmsley | d8a9445 | 2009-12-08 16:21:29 -0700 | [diff] [blame] | 4 | * Copyright (C) 2005-2009 Texas Instruments, Inc. |
Paul Walmsley | 93340a2 | 2010-02-22 22:09:12 -0700 | [diff] [blame] | 5 | * Copyright (C) 2004-2010 Nokia Corporation |
Tony Lindgren | a16e970 | 2008-03-18 11:56:39 +0200 | [diff] [blame] | 6 | * |
| 7 | * Contacts: |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 8 | * Richard Woodruff <r-woodruff2@ti.com> |
Tony Lindgren | a16e970 | 2008-03-18 11:56:39 +0200 | [diff] [blame] | 9 | * Paul Walmsley |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License version 2 as |
| 13 | * published by the Free Software Foundation. |
| 14 | */ |
| 15 | |
Paul Walmsley | d8a9445 | 2009-12-08 16:21:29 -0700 | [diff] [blame] | 16 | #include <linux/kernel.h> |
| 17 | #include <linux/clk.h> |
Paul Walmsley | 93340a2 | 2010-02-22 22:09:12 -0700 | [diff] [blame] | 18 | #include <linux/list.h> |
Paul Walmsley | d8a9445 | 2009-12-08 16:21:29 -0700 | [diff] [blame] | 19 | |
| 20 | #include <plat/clkdev_omap.h> |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 21 | |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 22 | #include "clock.h" |
Paul Walmsley | d8a9445 | 2009-12-08 16:21:29 -0700 | [diff] [blame] | 23 | #include "clock2xxx.h" |
| 24 | #include "opp2xxx.h" |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 25 | #include "prm.h" |
| 26 | #include "cm.h" |
| 27 | #include "prm-regbits-24xx.h" |
| 28 | #include "cm-regbits-24xx.h" |
| 29 | #include "sdrc.h" |
| 30 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 31 | /*------------------------------------------------------------------------- |
| 32 | * 24xx clock tree. |
| 33 | * |
| 34 | * NOTE:In many cases here we are assigning a 'default' parent. In many |
| 35 | * cases the parent is selectable. The get/set parent calls will also |
| 36 | * switch sources. |
| 37 | * |
| 38 | * Many some clocks say always_enabled, but they can be auto idled for |
| 39 | * power savings. They will always be available upon clock request. |
| 40 | * |
| 41 | * Several sources are given initial rates which may be wrong, this will |
| 42 | * be fixed up in the init func. |
| 43 | * |
| 44 | * Things are broadly separated below by clock domains. It is |
| 45 | * noteworthy that most periferals have dependencies on multiple clock |
| 46 | * domains. Many get their interface clocks from the L4 domain, but get |
| 47 | * functional clocks from fixed sources or other core domain derived |
| 48 | * clocks. |
| 49 | *-------------------------------------------------------------------------*/ |
| 50 | |
| 51 | /* Base external input clocks */ |
| 52 | static struct clk func_32k_ck = { |
| 53 | .name = "func_32k_ck", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame] | 54 | .ops = &clkops_null, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 55 | .rate = 32000, |
Russell King | 3f0a820 | 2009-01-31 10:05:51 +0000 | [diff] [blame] | 56 | .flags = RATE_FIXED, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 57 | .clkdm_name = "wkup_clkdm", |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 58 | }; |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 59 | |
Paul Walmsley | f248076 | 2009-04-23 21:11:10 -0600 | [diff] [blame] | 60 | static struct clk secure_32k_ck = { |
| 61 | .name = "secure_32k_ck", |
| 62 | .ops = &clkops_null, |
| 63 | .rate = 32768, |
| 64 | .flags = RATE_FIXED, |
| 65 | .clkdm_name = "wkup_clkdm", |
| 66 | }; |
| 67 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 68 | /* Typical 12/13MHz in standalone mode, will be 26Mhz in chassis mode */ |
| 69 | static struct clk osc_ck = { /* (*12, *13, 19.2, *26, 38.4)MHz */ |
| 70 | .name = "osc_ck", |
Russell King | 548d849 | 2008-11-04 14:02:46 +0000 | [diff] [blame] | 71 | .ops = &clkops_oscck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 72 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 73 | .recalc = &omap2_osc_clk_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 74 | }; |
| 75 | |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 76 | /* Without modem likely 12MHz, with modem likely 13MHz */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 77 | static struct clk sys_ck = { /* (*12, *13, 19.2, 26, 38.4)MHz */ |
| 78 | .name = "sys_ck", /* ~ ref_clk also */ |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame] | 79 | .ops = &clkops_null, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 80 | .parent = &osc_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 81 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | 44da0a5 | 2010-01-26 20:13:08 -0700 | [diff] [blame] | 82 | .recalc = &omap2xxx_sys_clk_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 83 | }; |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 84 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 85 | static struct clk alt_ck = { /* Typical 54M or 48M, may not exist */ |
| 86 | .name = "alt_ck", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame] | 87 | .ops = &clkops_null, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 88 | .rate = 54000000, |
Russell King | 3f0a820 | 2009-01-31 10:05:51 +0000 | [diff] [blame] | 89 | .flags = RATE_FIXED, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 90 | .clkdm_name = "wkup_clkdm", |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 91 | }; |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 92 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 93 | /* |
| 94 | * Analog domain root source clocks |
| 95 | */ |
| 96 | |
| 97 | /* dpll_ck, is broken out in to special cases through clksel */ |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 98 | /* REVISIT: Rate changes on dpll_ck trigger a full set change. ... |
| 99 | * deal with this |
| 100 | */ |
| 101 | |
Paul Walmsley | 88b8ba9 | 2008-07-03 12:24:46 +0300 | [diff] [blame] | 102 | static struct dpll_data dpll_dd = { |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 103 | .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), |
| 104 | .mult_mask = OMAP24XX_DPLL_MULT_MASK, |
| 105 | .div1_mask = OMAP24XX_DPLL_DIV_MASK, |
Russell King | c0bf313 | 2009-02-19 13:29:22 +0000 | [diff] [blame] | 106 | .clk_bypass = &sys_ck, |
| 107 | .clk_ref = &sys_ck, |
| 108 | .control_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), |
| 109 | .enable_mask = OMAP24XX_EN_DPLL_MASK, |
Paul Walmsley | 93340a2 | 2010-02-22 22:09:12 -0700 | [diff] [blame] | 110 | .max_multiplier = 1023, |
Paul Walmsley | 95f538a | 2009-01-28 12:08:44 -0700 | [diff] [blame] | 111 | .min_divider = 1, |
Paul Walmsley | 88b8ba9 | 2008-07-03 12:24:46 +0300 | [diff] [blame] | 112 | .max_divider = 16, |
| 113 | .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 114 | }; |
| 115 | |
Paul Walmsley | 88b8ba9 | 2008-07-03 12:24:46 +0300 | [diff] [blame] | 116 | /* |
| 117 | * XXX Cannot add round_rate here yet, as this is still a composite clock, |
| 118 | * not just a DPLL |
| 119 | */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 120 | static struct clk dpll_ck = { |
| 121 | .name = "dpll_ck", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame] | 122 | .ops = &clkops_null, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 123 | .parent = &sys_ck, /* Can be func_32k also */ |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 124 | .dpll_data = &dpll_dd, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 125 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | 88b8ba9 | 2008-07-03 12:24:46 +0300 | [diff] [blame] | 126 | .recalc = &omap2_dpllcore_recalc, |
| 127 | .set_rate = &omap2_reprogram_dpllcore, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 128 | }; |
| 129 | |
| 130 | static struct clk apll96_ck = { |
| 131 | .name = "apll96_ck", |
Paul Walmsley | 06b1693 | 2009-12-08 16:18:46 -0700 | [diff] [blame] | 132 | .ops = &clkops_apll96, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 133 | .parent = &sys_ck, |
| 134 | .rate = 96000000, |
Russell King | 3f0a820 | 2009-01-31 10:05:51 +0000 | [diff] [blame] | 135 | .flags = RATE_FIXED | ENABLE_ON_INIT, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 136 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 137 | .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), |
| 138 | .enable_bit = OMAP24XX_EN_96M_PLL_SHIFT, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 139 | }; |
| 140 | |
| 141 | static struct clk apll54_ck = { |
| 142 | .name = "apll54_ck", |
Paul Walmsley | 06b1693 | 2009-12-08 16:18:46 -0700 | [diff] [blame] | 143 | .ops = &clkops_apll54, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 144 | .parent = &sys_ck, |
| 145 | .rate = 54000000, |
Russell King | 3f0a820 | 2009-01-31 10:05:51 +0000 | [diff] [blame] | 146 | .flags = RATE_FIXED | ENABLE_ON_INIT, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 147 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 148 | .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), |
| 149 | .enable_bit = OMAP24XX_EN_54M_PLL_SHIFT, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 150 | }; |
| 151 | |
| 152 | /* |
| 153 | * PRCM digital base sources |
| 154 | */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 155 | |
| 156 | /* func_54m_ck */ |
| 157 | |
| 158 | static const struct clksel_rate func_54m_apll54_rates[] = { |
| 159 | { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 160 | { .div = 0 }, |
| 161 | }; |
| 162 | |
| 163 | static const struct clksel_rate func_54m_alt_rates[] = { |
| 164 | { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 165 | { .div = 0 }, |
| 166 | }; |
| 167 | |
| 168 | static const struct clksel func_54m_clksel[] = { |
| 169 | { .parent = &apll54_ck, .rates = func_54m_apll54_rates, }, |
| 170 | { .parent = &alt_ck, .rates = func_54m_alt_rates, }, |
| 171 | { .parent = NULL }, |
| 172 | }; |
| 173 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 174 | static struct clk func_54m_ck = { |
| 175 | .name = "func_54m_ck", |
Russell King | 5713718 | 2008-11-04 16:48:35 +0000 | [diff] [blame] | 176 | .ops = &clkops_null, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 177 | .parent = &apll54_ck, /* can also be alt_clk */ |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 178 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 179 | .init = &omap2_init_clksel_parent, |
| 180 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), |
| 181 | .clksel_mask = OMAP24XX_54M_SOURCE, |
| 182 | .clksel = func_54m_clksel, |
| 183 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 184 | }; |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 185 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 186 | static struct clk core_ck = { |
| 187 | .name = "core_ck", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame] | 188 | .ops = &clkops_null, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 189 | .parent = &dpll_ck, /* can also be 32k */ |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 190 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 191 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 192 | }; |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 193 | |
| 194 | /* func_96m_ck */ |
| 195 | static const struct clksel_rate func_96m_apll96_rates[] = { |
| 196 | { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 197 | { .div = 0 }, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 198 | }; |
| 199 | |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 200 | static const struct clksel_rate func_96m_alt_rates[] = { |
| 201 | { .div = 1, .val = 1, .flags = RATE_IN_243X | DEFAULT_RATE }, |
| 202 | { .div = 0 }, |
| 203 | }; |
| 204 | |
| 205 | static const struct clksel func_96m_clksel[] = { |
| 206 | { .parent = &apll96_ck, .rates = func_96m_apll96_rates }, |
| 207 | { .parent = &alt_ck, .rates = func_96m_alt_rates }, |
| 208 | { .parent = NULL } |
| 209 | }; |
| 210 | |
| 211 | /* The parent of this clock is not selectable on 2420. */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 212 | static struct clk func_96m_ck = { |
| 213 | .name = "func_96m_ck", |
Russell King | 5713718 | 2008-11-04 16:48:35 +0000 | [diff] [blame] | 214 | .ops = &clkops_null, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 215 | .parent = &apll96_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 216 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 217 | .init = &omap2_init_clksel_parent, |
| 218 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), |
| 219 | .clksel_mask = OMAP2430_96M_SOURCE, |
| 220 | .clksel = func_96m_clksel, |
| 221 | .recalc = &omap2_clksel_recalc, |
| 222 | .round_rate = &omap2_clksel_round_rate, |
| 223 | .set_rate = &omap2_clksel_set_rate |
| 224 | }; |
| 225 | |
| 226 | /* func_48m_ck */ |
| 227 | |
| 228 | static const struct clksel_rate func_48m_apll96_rates[] = { |
| 229 | { .div = 2, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 230 | { .div = 0 }, |
| 231 | }; |
| 232 | |
| 233 | static const struct clksel_rate func_48m_alt_rates[] = { |
| 234 | { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 235 | { .div = 0 }, |
| 236 | }; |
| 237 | |
| 238 | static const struct clksel func_48m_clksel[] = { |
| 239 | { .parent = &apll96_ck, .rates = func_48m_apll96_rates }, |
| 240 | { .parent = &alt_ck, .rates = func_48m_alt_rates }, |
| 241 | { .parent = NULL } |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 242 | }; |
| 243 | |
| 244 | static struct clk func_48m_ck = { |
| 245 | .name = "func_48m_ck", |
Russell King | 5713718 | 2008-11-04 16:48:35 +0000 | [diff] [blame] | 246 | .ops = &clkops_null, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 247 | .parent = &apll96_ck, /* 96M or Alt */ |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 248 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 249 | .init = &omap2_init_clksel_parent, |
| 250 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), |
| 251 | .clksel_mask = OMAP24XX_48M_SOURCE, |
| 252 | .clksel = func_48m_clksel, |
| 253 | .recalc = &omap2_clksel_recalc, |
| 254 | .round_rate = &omap2_clksel_round_rate, |
| 255 | .set_rate = &omap2_clksel_set_rate |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 256 | }; |
| 257 | |
| 258 | static struct clk func_12m_ck = { |
| 259 | .name = "func_12m_ck", |
Russell King | 5713718 | 2008-11-04 16:48:35 +0000 | [diff] [blame] | 260 | .ops = &clkops_null, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 261 | .parent = &func_48m_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 262 | .fixed_div = 4, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 263 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e9b98f6 | 2010-01-26 20:12:57 -0700 | [diff] [blame] | 264 | .recalc = &omap_fixed_divisor_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 265 | }; |
| 266 | |
| 267 | /* Secure timer, only available in secure mode */ |
| 268 | static struct clk wdt1_osc_ck = { |
| 269 | .name = "ck_wdt1_osc", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame] | 270 | .ops = &clkops_null, /* RMK: missing? */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 271 | .parent = &osc_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 272 | .recalc = &followparent_recalc, |
| 273 | }; |
| 274 | |
| 275 | /* |
| 276 | * The common_clkout* clksel_rate structs are common to |
| 277 | * sys_clkout, sys_clkout_src, sys_clkout2, and sys_clkout2_src. |
| 278 | * sys_clkout2_* are 2420-only, so the |
| 279 | * clksel_rate flags fields are inaccurate for those clocks. This is |
| 280 | * harmless since access to those clocks are gated by the struct clk |
| 281 | * flags fields, which mark them as 2420-only. |
| 282 | */ |
| 283 | static const struct clksel_rate common_clkout_src_core_rates[] = { |
| 284 | { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 285 | { .div = 0 } |
| 286 | }; |
| 287 | |
| 288 | static const struct clksel_rate common_clkout_src_sys_rates[] = { |
| 289 | { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 290 | { .div = 0 } |
| 291 | }; |
| 292 | |
| 293 | static const struct clksel_rate common_clkout_src_96m_rates[] = { |
| 294 | { .div = 1, .val = 2, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 295 | { .div = 0 } |
| 296 | }; |
| 297 | |
| 298 | static const struct clksel_rate common_clkout_src_54m_rates[] = { |
| 299 | { .div = 1, .val = 3, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 300 | { .div = 0 } |
| 301 | }; |
| 302 | |
| 303 | static const struct clksel common_clkout_src_clksel[] = { |
| 304 | { .parent = &core_ck, .rates = common_clkout_src_core_rates }, |
| 305 | { .parent = &sys_ck, .rates = common_clkout_src_sys_rates }, |
| 306 | { .parent = &func_96m_ck, .rates = common_clkout_src_96m_rates }, |
| 307 | { .parent = &func_54m_ck, .rates = common_clkout_src_54m_rates }, |
| 308 | { .parent = NULL } |
| 309 | }; |
| 310 | |
| 311 | static struct clk sys_clkout_src = { |
| 312 | .name = "sys_clkout_src", |
Russell King | c1168dc | 2008-11-04 21:24:00 +0000 | [diff] [blame] | 313 | .ops = &clkops_omap2_dflt, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 314 | .parent = &func_54m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 315 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 316 | .enable_reg = OMAP24XX_PRCM_CLKOUT_CTRL, |
| 317 | .enable_bit = OMAP24XX_CLKOUT_EN_SHIFT, |
| 318 | .init = &omap2_init_clksel_parent, |
| 319 | .clksel_reg = OMAP24XX_PRCM_CLKOUT_CTRL, |
| 320 | .clksel_mask = OMAP24XX_CLKOUT_SOURCE_MASK, |
| 321 | .clksel = common_clkout_src_clksel, |
| 322 | .recalc = &omap2_clksel_recalc, |
| 323 | .round_rate = &omap2_clksel_round_rate, |
| 324 | .set_rate = &omap2_clksel_set_rate |
| 325 | }; |
| 326 | |
| 327 | static const struct clksel_rate common_clkout_rates[] = { |
| 328 | { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 329 | { .div = 2, .val = 1, .flags = RATE_IN_24XX }, |
| 330 | { .div = 4, .val = 2, .flags = RATE_IN_24XX }, |
| 331 | { .div = 8, .val = 3, .flags = RATE_IN_24XX }, |
| 332 | { .div = 16, .val = 4, .flags = RATE_IN_24XX }, |
| 333 | { .div = 0 }, |
| 334 | }; |
| 335 | |
| 336 | static const struct clksel sys_clkout_clksel[] = { |
| 337 | { .parent = &sys_clkout_src, .rates = common_clkout_rates }, |
| 338 | { .parent = NULL } |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 339 | }; |
| 340 | |
| 341 | static struct clk sys_clkout = { |
| 342 | .name = "sys_clkout", |
Russell King | 5713718 | 2008-11-04 16:48:35 +0000 | [diff] [blame] | 343 | .ops = &clkops_null, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 344 | .parent = &sys_clkout_src, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 345 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 346 | .clksel_reg = OMAP24XX_PRCM_CLKOUT_CTRL, |
| 347 | .clksel_mask = OMAP24XX_CLKOUT_DIV_MASK, |
| 348 | .clksel = sys_clkout_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 349 | .recalc = &omap2_clksel_recalc, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 350 | .round_rate = &omap2_clksel_round_rate, |
| 351 | .set_rate = &omap2_clksel_set_rate |
| 352 | }; |
| 353 | |
| 354 | /* In 2430, new in 2420 ES2 */ |
| 355 | static struct clk sys_clkout2_src = { |
| 356 | .name = "sys_clkout2_src", |
Russell King | c1168dc | 2008-11-04 21:24:00 +0000 | [diff] [blame] | 357 | .ops = &clkops_omap2_dflt, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 358 | .parent = &func_54m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 359 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 360 | .enable_reg = OMAP24XX_PRCM_CLKOUT_CTRL, |
| 361 | .enable_bit = OMAP2420_CLKOUT2_EN_SHIFT, |
| 362 | .init = &omap2_init_clksel_parent, |
| 363 | .clksel_reg = OMAP24XX_PRCM_CLKOUT_CTRL, |
| 364 | .clksel_mask = OMAP2420_CLKOUT2_SOURCE_MASK, |
| 365 | .clksel = common_clkout_src_clksel, |
| 366 | .recalc = &omap2_clksel_recalc, |
| 367 | .round_rate = &omap2_clksel_round_rate, |
| 368 | .set_rate = &omap2_clksel_set_rate |
| 369 | }; |
| 370 | |
| 371 | static const struct clksel sys_clkout2_clksel[] = { |
| 372 | { .parent = &sys_clkout2_src, .rates = common_clkout_rates }, |
| 373 | { .parent = NULL } |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 374 | }; |
| 375 | |
| 376 | /* In 2430, new in 2420 ES2 */ |
| 377 | static struct clk sys_clkout2 = { |
| 378 | .name = "sys_clkout2", |
Russell King | 5713718 | 2008-11-04 16:48:35 +0000 | [diff] [blame] | 379 | .ops = &clkops_null, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 380 | .parent = &sys_clkout2_src, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 381 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 382 | .clksel_reg = OMAP24XX_PRCM_CLKOUT_CTRL, |
| 383 | .clksel_mask = OMAP2420_CLKOUT2_DIV_MASK, |
| 384 | .clksel = sys_clkout2_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 385 | .recalc = &omap2_clksel_recalc, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 386 | .round_rate = &omap2_clksel_round_rate, |
| 387 | .set_rate = &omap2_clksel_set_rate |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 388 | }; |
| 389 | |
Tony Lindgren | b824efa | 2006-04-02 17:46:20 +0100 | [diff] [blame] | 390 | static struct clk emul_ck = { |
| 391 | .name = "emul_ck", |
Russell King | c1168dc | 2008-11-04 21:24:00 +0000 | [diff] [blame] | 392 | .ops = &clkops_omap2_dflt, |
Tony Lindgren | b824efa | 2006-04-02 17:46:20 +0100 | [diff] [blame] | 393 | .parent = &func_54m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 394 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 395 | .enable_reg = OMAP24XX_PRCM_CLKEMUL_CTRL, |
| 396 | .enable_bit = OMAP24XX_EMULATION_EN_SHIFT, |
| 397 | .recalc = &followparent_recalc, |
Tony Lindgren | b824efa | 2006-04-02 17:46:20 +0100 | [diff] [blame] | 398 | |
| 399 | }; |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 400 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 401 | /* |
| 402 | * MPU clock domain |
| 403 | * Clocks: |
| 404 | * MPU_FCLK, MPU_ICLK |
| 405 | * INT_M_FCLK, INT_M_I_CLK |
| 406 | * |
| 407 | * - Individual clocks are hardware managed. |
| 408 | * - Base divider comes from: CM_CLKSEL_MPU |
| 409 | * |
| 410 | */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 411 | static const struct clksel_rate mpu_core_rates[] = { |
| 412 | { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 413 | { .div = 2, .val = 2, .flags = RATE_IN_24XX }, |
| 414 | { .div = 4, .val = 4, .flags = RATE_IN_242X }, |
| 415 | { .div = 6, .val = 6, .flags = RATE_IN_242X }, |
| 416 | { .div = 8, .val = 8, .flags = RATE_IN_242X }, |
| 417 | { .div = 0 }, |
| 418 | }; |
| 419 | |
| 420 | static const struct clksel mpu_clksel[] = { |
| 421 | { .parent = &core_ck, .rates = mpu_core_rates }, |
| 422 | { .parent = NULL } |
| 423 | }; |
| 424 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 425 | static struct clk mpu_ck = { /* Control cpu */ |
| 426 | .name = "mpu_ck", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame] | 427 | .ops = &clkops_null, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 428 | .parent = &core_ck, |
Paul Walmsley | 1a33771 | 2010-02-22 22:09:16 -0700 | [diff] [blame] | 429 | .flags = DELAYED_APP, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 430 | .clkdm_name = "mpu_clkdm", |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 431 | .init = &omap2_init_clksel_parent, |
| 432 | .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, CM_CLKSEL), |
| 433 | .clksel_mask = OMAP24XX_CLKSEL_MPU_MASK, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 434 | .clksel = mpu_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 435 | .recalc = &omap2_clksel_recalc, |
| 436 | }; |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 437 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 438 | /* |
| 439 | * DSP (2430-IVA2.1) (2420-UMA+IVA1) clock domain |
| 440 | * Clocks: |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 441 | * 2430: IVA2.1_FCLK (really just DSP_FCLK), IVA2.1_ICLK |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 442 | * 2420: UMA_FCLK, UMA_ICLK, IVA_MPU, IVA_COP |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 443 | * |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 444 | * Won't be too specific here. The core clock comes into this block |
| 445 | * it is divided then tee'ed. One branch goes directly to xyz enable |
| 446 | * controls. The other branch gets further divided by 2 then possibly |
| 447 | * routed into a synchronizer and out of clocks abc. |
| 448 | */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 449 | static const struct clksel_rate dsp_fck_core_rates[] = { |
| 450 | { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 451 | { .div = 2, .val = 2, .flags = RATE_IN_24XX }, |
| 452 | { .div = 3, .val = 3, .flags = RATE_IN_24XX }, |
| 453 | { .div = 4, .val = 4, .flags = RATE_IN_24XX }, |
| 454 | { .div = 6, .val = 6, .flags = RATE_IN_242X }, |
| 455 | { .div = 8, .val = 8, .flags = RATE_IN_242X }, |
| 456 | { .div = 12, .val = 12, .flags = RATE_IN_242X }, |
| 457 | { .div = 0 }, |
| 458 | }; |
| 459 | |
| 460 | static const struct clksel dsp_fck_clksel[] = { |
| 461 | { .parent = &core_ck, .rates = dsp_fck_core_rates }, |
| 462 | { .parent = NULL } |
| 463 | }; |
| 464 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 465 | static struct clk dsp_fck = { |
| 466 | .name = "dsp_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 467 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 468 | .parent = &core_ck, |
Paul Walmsley | 1a33771 | 2010-02-22 22:09:16 -0700 | [diff] [blame] | 469 | .flags = DELAYED_APP, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 470 | .clkdm_name = "dsp_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 471 | .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN), |
| 472 | .enable_bit = OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT, |
| 473 | .clksel_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL), |
| 474 | .clksel_mask = OMAP24XX_CLKSEL_DSP_MASK, |
| 475 | .clksel = dsp_fck_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 476 | .recalc = &omap2_clksel_recalc, |
| 477 | }; |
| 478 | |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 479 | /* DSP interface clock */ |
| 480 | static const struct clksel_rate dsp_irate_ick_rates[] = { |
| 481 | { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 482 | { .div = 2, .val = 2, .flags = RATE_IN_24XX }, |
| 483 | { .div = 3, .val = 3, .flags = RATE_IN_243X }, |
| 484 | { .div = 0 }, |
| 485 | }; |
| 486 | |
| 487 | static const struct clksel dsp_irate_ick_clksel[] = { |
| 488 | { .parent = &dsp_fck, .rates = dsp_irate_ick_rates }, |
| 489 | { .parent = NULL } |
| 490 | }; |
| 491 | |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 492 | /* This clock does not exist as such in the TRM. */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 493 | static struct clk dsp_irate_ick = { |
| 494 | .name = "dsp_irate_ick", |
Russell King | 5713718 | 2008-11-04 16:48:35 +0000 | [diff] [blame] | 495 | .ops = &clkops_null, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 496 | .parent = &dsp_fck, |
Paul Walmsley | 1a33771 | 2010-02-22 22:09:16 -0700 | [diff] [blame] | 497 | .flags = DELAYED_APP, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 498 | .clksel_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL), |
| 499 | .clksel_mask = OMAP24XX_CLKSEL_DSP_IF_MASK, |
| 500 | .clksel = dsp_irate_ick_clksel, |
| 501 | .recalc = &omap2_clksel_recalc, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 502 | }; |
| 503 | |
| 504 | /* 2420 only */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 505 | static struct clk dsp_ick = { |
| 506 | .name = "dsp_ick", /* apparently ipi and isp */ |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 507 | .ops = &clkops_omap2_dflt_wait, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 508 | .parent = &dsp_irate_ick, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 509 | .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_ICLKEN), |
| 510 | .enable_bit = OMAP2420_EN_DSP_IPI_SHIFT, /* for ipi */ |
| 511 | }; |
| 512 | |
| 513 | /* 2430 only - EN_DSP controls both dsp fclk and iclk on 2430 */ |
| 514 | static struct clk iva2_1_ick = { |
| 515 | .name = "iva2_1_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 516 | .ops = &clkops_omap2_dflt_wait, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 517 | .parent = &dsp_irate_ick, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 518 | .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN), |
| 519 | .enable_bit = OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 520 | }; |
| 521 | |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 522 | /* |
| 523 | * The IVA1 is an ARM7 core on the 2420 that has nothing to do with |
| 524 | * the C54x, but which is contained in the DSP powerdomain. Does not |
| 525 | * exist on later OMAPs. |
| 526 | */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 527 | static struct clk iva1_ifck = { |
| 528 | .name = "iva1_ifck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 529 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 530 | .parent = &core_ck, |
Paul Walmsley | 1a33771 | 2010-02-22 22:09:16 -0700 | [diff] [blame] | 531 | .flags = DELAYED_APP, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 532 | .clkdm_name = "iva1_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 533 | .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN), |
| 534 | .enable_bit = OMAP2420_EN_IVA_COP_SHIFT, |
| 535 | .clksel_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL), |
| 536 | .clksel_mask = OMAP2420_CLKSEL_IVA_MASK, |
| 537 | .clksel = dsp_fck_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 538 | .recalc = &omap2_clksel_recalc, |
| 539 | }; |
| 540 | |
| 541 | /* IVA1 mpu/int/i/f clocks are /2 of parent */ |
| 542 | static struct clk iva1_mpu_int_ifck = { |
| 543 | .name = "iva1_mpu_int_ifck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 544 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 545 | .parent = &iva1_ifck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 546 | .clkdm_name = "iva1_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 547 | .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN), |
| 548 | .enable_bit = OMAP2420_EN_IVA_MPU_SHIFT, |
| 549 | .fixed_div = 2, |
Paul Walmsley | e9b98f6 | 2010-01-26 20:12:57 -0700 | [diff] [blame] | 550 | .recalc = &omap_fixed_divisor_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 551 | }; |
| 552 | |
| 553 | /* |
| 554 | * L3 clock domain |
| 555 | * L3 clocks are used for both interface and functional clocks to |
| 556 | * multiple entities. Some of these clocks are completely managed |
| 557 | * by hardware, and some others allow software control. Hardware |
| 558 | * managed ones general are based on directly CLK_REQ signals and |
| 559 | * various auto idle settings. The functional spec sets many of these |
| 560 | * as 'tie-high' for their enables. |
| 561 | * |
| 562 | * I-CLOCKS: |
| 563 | * L3-Interconnect, SMS, GPMC, SDRC, OCM_RAM, OCM_ROM, SDMA |
| 564 | * CAM, HS-USB. |
| 565 | * F-CLOCK |
| 566 | * SSI. |
| 567 | * |
| 568 | * GPMC memories and SDRC have timing and clock sensitive registers which |
| 569 | * may very well need notification when the clock changes. Currently for low |
| 570 | * operating points, these are taken care of in sleep.S. |
| 571 | */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 572 | static const struct clksel_rate core_l3_core_rates[] = { |
| 573 | { .div = 1, .val = 1, .flags = RATE_IN_24XX }, |
| 574 | { .div = 2, .val = 2, .flags = RATE_IN_242X }, |
| 575 | { .div = 4, .val = 4, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 576 | { .div = 6, .val = 6, .flags = RATE_IN_24XX }, |
| 577 | { .div = 8, .val = 8, .flags = RATE_IN_242X }, |
| 578 | { .div = 12, .val = 12, .flags = RATE_IN_242X }, |
| 579 | { .div = 16, .val = 16, .flags = RATE_IN_242X }, |
| 580 | { .div = 0 } |
| 581 | }; |
| 582 | |
| 583 | static const struct clksel core_l3_clksel[] = { |
| 584 | { .parent = &core_ck, .rates = core_l3_core_rates }, |
| 585 | { .parent = NULL } |
| 586 | }; |
| 587 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 588 | static struct clk core_l3_ck = { /* Used for ick and fck, interconnect */ |
| 589 | .name = "core_l3_ck", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame] | 590 | .ops = &clkops_null, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 591 | .parent = &core_ck, |
Paul Walmsley | 1a33771 | 2010-02-22 22:09:16 -0700 | [diff] [blame] | 592 | .flags = DELAYED_APP, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 593 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 594 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1), |
| 595 | .clksel_mask = OMAP24XX_CLKSEL_L3_MASK, |
| 596 | .clksel = core_l3_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 597 | .recalc = &omap2_clksel_recalc, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 598 | }; |
| 599 | |
| 600 | /* usb_l4_ick */ |
| 601 | static const struct clksel_rate usb_l4_ick_core_l3_rates[] = { |
| 602 | { .div = 1, .val = 1, .flags = RATE_IN_24XX }, |
| 603 | { .div = 2, .val = 2, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 604 | { .div = 4, .val = 4, .flags = RATE_IN_24XX }, |
| 605 | { .div = 0 } |
| 606 | }; |
| 607 | |
| 608 | static const struct clksel usb_l4_ick_clksel[] = { |
| 609 | { .parent = &core_l3_ck, .rates = usb_l4_ick_core_l3_rates }, |
| 610 | { .parent = NULL }, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 611 | }; |
| 612 | |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 613 | /* It is unclear from TRM whether usb_l4_ick is really in L3 or L4 clkdm */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 614 | static struct clk usb_l4_ick = { /* FS-USB interface clock */ |
| 615 | .name = "usb_l4_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 616 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | fde0fd4 | 2006-01-17 15:31:18 -0800 | [diff] [blame] | 617 | .parent = &core_l3_ck, |
Paul Walmsley | 1a33771 | 2010-02-22 22:09:16 -0700 | [diff] [blame] | 618 | .flags = DELAYED_APP, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 619 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 620 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 621 | .enable_bit = OMAP24XX_EN_USB_SHIFT, |
| 622 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1), |
| 623 | .clksel_mask = OMAP24XX_CLKSEL_USB_MASK, |
| 624 | .clksel = usb_l4_ick_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 625 | .recalc = &omap2_clksel_recalc, |
| 626 | }; |
| 627 | |
| 628 | /* |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 629 | * L4 clock management domain |
| 630 | * |
| 631 | * This domain contains lots of interface clocks from the L4 interface, some |
| 632 | * functional clocks. Fixed APLL functional source clocks are managed in |
| 633 | * this domain. |
| 634 | */ |
| 635 | static const struct clksel_rate l4_core_l3_rates[] = { |
| 636 | { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 637 | { .div = 2, .val = 2, .flags = RATE_IN_24XX }, |
| 638 | { .div = 0 } |
| 639 | }; |
| 640 | |
| 641 | static const struct clksel l4_clksel[] = { |
| 642 | { .parent = &core_l3_ck, .rates = l4_core_l3_rates }, |
| 643 | { .parent = NULL } |
| 644 | }; |
| 645 | |
| 646 | static struct clk l4_ck = { /* used both as an ick and fck */ |
| 647 | .name = "l4_ck", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame] | 648 | .ops = &clkops_null, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 649 | .parent = &core_l3_ck, |
Russell King | 3f0a820 | 2009-01-31 10:05:51 +0000 | [diff] [blame] | 650 | .flags = DELAYED_APP, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 651 | .clkdm_name = "core_l4_clkdm", |
| 652 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1), |
| 653 | .clksel_mask = OMAP24XX_CLKSEL_L4_MASK, |
| 654 | .clksel = l4_clksel, |
| 655 | .recalc = &omap2_clksel_recalc, |
| 656 | .round_rate = &omap2_clksel_round_rate, |
| 657 | .set_rate = &omap2_clksel_set_rate |
| 658 | }; |
| 659 | |
| 660 | /* |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 661 | * SSI is in L3 management domain, its direct parent is core not l3, |
| 662 | * many core power domain entities are grouped into the L3 clock |
| 663 | * domain. |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 664 | * SSI_SSR_FCLK, SSI_SST_FCLK, SSI_L4_ICLK |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 665 | * |
| 666 | * ssr = core/1/2/3/4/5, sst = 1/2 ssr. |
| 667 | */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 668 | static const struct clksel_rate ssi_ssr_sst_fck_core_rates[] = { |
| 669 | { .div = 1, .val = 1, .flags = RATE_IN_24XX }, |
| 670 | { .div = 2, .val = 2, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 671 | { .div = 3, .val = 3, .flags = RATE_IN_24XX }, |
| 672 | { .div = 4, .val = 4, .flags = RATE_IN_24XX }, |
| 673 | { .div = 5, .val = 5, .flags = RATE_IN_243X }, |
| 674 | { .div = 6, .val = 6, .flags = RATE_IN_242X }, |
| 675 | { .div = 8, .val = 8, .flags = RATE_IN_242X }, |
| 676 | { .div = 0 } |
| 677 | }; |
| 678 | |
| 679 | static const struct clksel ssi_ssr_sst_fck_clksel[] = { |
| 680 | { .parent = &core_ck, .rates = ssi_ssr_sst_fck_core_rates }, |
| 681 | { .parent = NULL } |
| 682 | }; |
| 683 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 684 | static struct clk ssi_ssr_sst_fck = { |
| 685 | .name = "ssi_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 686 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 687 | .parent = &core_ck, |
Russell King | 8ad8ff6 | 2009-01-19 15:27:29 +0000 | [diff] [blame] | 688 | .flags = DELAYED_APP, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 689 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 690 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 691 | .enable_bit = OMAP24XX_EN_SSI_SHIFT, |
| 692 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1), |
| 693 | .clksel_mask = OMAP24XX_CLKSEL_SSI_MASK, |
| 694 | .clksel = ssi_ssr_sst_fck_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 695 | .recalc = &omap2_clksel_recalc, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 696 | .round_rate = &omap2_clksel_round_rate, |
| 697 | .set_rate = &omap2_clksel_set_rate |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 698 | }; |
| 699 | |
Paul Walmsley | 9299fd8 | 2009-01-27 19:12:54 -0700 | [diff] [blame] | 700 | /* |
| 701 | * Presumably this is the same as SSI_ICLK. |
| 702 | * TRM contradicts itself on what clockdomain SSI_ICLK is in |
| 703 | */ |
| 704 | static struct clk ssi_l4_ick = { |
| 705 | .name = "ssi_l4_ick", |
| 706 | .ops = &clkops_omap2_dflt_wait, |
| 707 | .parent = &l4_ck, |
| 708 | .clkdm_name = "core_l4_clkdm", |
| 709 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 710 | .enable_bit = OMAP24XX_EN_SSI_SHIFT, |
| 711 | .recalc = &followparent_recalc, |
| 712 | }; |
| 713 | |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 714 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 715 | /* |
| 716 | * GFX clock domain |
| 717 | * Clocks: |
| 718 | * GFX_FCLK, GFX_ICLK |
| 719 | * GFX_CG1(2d), GFX_CG2(3d) |
| 720 | * |
| 721 | * GFX_FCLK runs from L3, and is divided by (1,2,3,4) |
| 722 | * The 2d and 3d clocks run at a hardware determined |
| 723 | * divided value of fclk. |
| 724 | * |
| 725 | */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 726 | |
| 727 | /* This clksel struct is shared between gfx_3d_fck and gfx_2d_fck */ |
| 728 | static const struct clksel gfx_fck_clksel[] = { |
| 729 | { .parent = &core_l3_ck, .rates = gfx_l3_rates }, |
| 730 | { .parent = NULL }, |
| 731 | }; |
| 732 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 733 | static struct clk gfx_3d_fck = { |
| 734 | .name = "gfx_3d_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 735 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 736 | .parent = &core_l3_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 737 | .clkdm_name = "gfx_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 738 | .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN), |
| 739 | .enable_bit = OMAP24XX_EN_3D_SHIFT, |
| 740 | .clksel_reg = OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL), |
| 741 | .clksel_mask = OMAP_CLKSEL_GFX_MASK, |
| 742 | .clksel = gfx_fck_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 743 | .recalc = &omap2_clksel_recalc, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 744 | .round_rate = &omap2_clksel_round_rate, |
| 745 | .set_rate = &omap2_clksel_set_rate |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 746 | }; |
| 747 | |
| 748 | static struct clk gfx_2d_fck = { |
| 749 | .name = "gfx_2d_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 750 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 751 | .parent = &core_l3_ck, |
Paul Walmsley | 1a33771 | 2010-02-22 22:09:16 -0700 | [diff] [blame] | 752 | .flags = DELAYED_APP, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 753 | .clkdm_name = "gfx_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 754 | .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN), |
| 755 | .enable_bit = OMAP24XX_EN_2D_SHIFT, |
| 756 | .clksel_reg = OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL), |
| 757 | .clksel_mask = OMAP_CLKSEL_GFX_MASK, |
| 758 | .clksel = gfx_fck_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 759 | .recalc = &omap2_clksel_recalc, |
| 760 | }; |
| 761 | |
| 762 | static struct clk gfx_ick = { |
| 763 | .name = "gfx_ick", /* From l3 */ |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 764 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 765 | .parent = &core_l3_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 766 | .clkdm_name = "gfx_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 767 | .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_ICLKEN), |
| 768 | .enable_bit = OMAP_EN_GFX_SHIFT, |
| 769 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 770 | }; |
| 771 | |
| 772 | /* |
| 773 | * Modem clock domain (2430) |
| 774 | * CLOCKS: |
| 775 | * MDM_OSC_CLK |
| 776 | * MDM_ICLK |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 777 | * These clocks are usable in chassis mode only. |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 778 | */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 779 | static const struct clksel_rate mdm_ick_core_rates[] = { |
| 780 | { .div = 1, .val = 1, .flags = RATE_IN_243X }, |
| 781 | { .div = 4, .val = 4, .flags = RATE_IN_243X | DEFAULT_RATE }, |
| 782 | { .div = 6, .val = 6, .flags = RATE_IN_243X }, |
| 783 | { .div = 9, .val = 9, .flags = RATE_IN_243X }, |
| 784 | { .div = 0 } |
| 785 | }; |
| 786 | |
| 787 | static const struct clksel mdm_ick_clksel[] = { |
| 788 | { .parent = &core_ck, .rates = mdm_ick_core_rates }, |
| 789 | { .parent = NULL } |
| 790 | }; |
| 791 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 792 | static struct clk mdm_ick = { /* used both as a ick and fck */ |
| 793 | .name = "mdm_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 794 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 795 | .parent = &core_ck, |
Paul Walmsley | 1a33771 | 2010-02-22 22:09:16 -0700 | [diff] [blame] | 796 | .flags = DELAYED_APP, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 797 | .clkdm_name = "mdm_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 798 | .enable_reg = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_ICLKEN), |
| 799 | .enable_bit = OMAP2430_CM_ICLKEN_MDM_EN_MDM_SHIFT, |
| 800 | .clksel_reg = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_CLKSEL), |
| 801 | .clksel_mask = OMAP2430_CLKSEL_MDM_MASK, |
| 802 | .clksel = mdm_ick_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 803 | .recalc = &omap2_clksel_recalc, |
| 804 | }; |
| 805 | |
| 806 | static struct clk mdm_osc_ck = { |
| 807 | .name = "mdm_osc_ck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 808 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 809 | .parent = &osc_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 810 | .clkdm_name = "mdm_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 811 | .enable_reg = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_FCLKEN), |
| 812 | .enable_bit = OMAP2430_EN_OSC_SHIFT, |
| 813 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 814 | }; |
| 815 | |
| 816 | /* |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 817 | * DSS clock domain |
| 818 | * CLOCKs: |
| 819 | * DSS_L4_ICLK, DSS_L3_ICLK, |
| 820 | * DSS_CLK1, DSS_CLK2, DSS_54MHz_CLK |
| 821 | * |
| 822 | * DSS is both initiator and target. |
| 823 | */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 824 | /* XXX Add RATE_NOT_VALIDATED */ |
| 825 | |
| 826 | static const struct clksel_rate dss1_fck_sys_rates[] = { |
| 827 | { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 828 | { .div = 0 } |
| 829 | }; |
| 830 | |
| 831 | static const struct clksel_rate dss1_fck_core_rates[] = { |
| 832 | { .div = 1, .val = 1, .flags = RATE_IN_24XX }, |
| 833 | { .div = 2, .val = 2, .flags = RATE_IN_24XX }, |
| 834 | { .div = 3, .val = 3, .flags = RATE_IN_24XX }, |
| 835 | { .div = 4, .val = 4, .flags = RATE_IN_24XX }, |
| 836 | { .div = 5, .val = 5, .flags = RATE_IN_24XX }, |
| 837 | { .div = 6, .val = 6, .flags = RATE_IN_24XX }, |
| 838 | { .div = 8, .val = 8, .flags = RATE_IN_24XX }, |
| 839 | { .div = 9, .val = 9, .flags = RATE_IN_24XX }, |
| 840 | { .div = 12, .val = 12, .flags = RATE_IN_24XX }, |
| 841 | { .div = 16, .val = 16, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 842 | { .div = 0 } |
| 843 | }; |
| 844 | |
| 845 | static const struct clksel dss1_fck_clksel[] = { |
| 846 | { .parent = &sys_ck, .rates = dss1_fck_sys_rates }, |
| 847 | { .parent = &core_ck, .rates = dss1_fck_core_rates }, |
| 848 | { .parent = NULL }, |
| 849 | }; |
| 850 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 851 | static struct clk dss_ick = { /* Enables both L3,L4 ICLK's */ |
| 852 | .name = "dss_ick", |
Russell King | bc51da4 | 2008-11-04 18:59:32 +0000 | [diff] [blame] | 853 | .ops = &clkops_omap2_dflt, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 854 | .parent = &l4_ck, /* really both l3 and l4 */ |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 855 | .clkdm_name = "dss_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 856 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 857 | .enable_bit = OMAP24XX_EN_DSS1_SHIFT, |
| 858 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 859 | }; |
| 860 | |
| 861 | static struct clk dss1_fck = { |
| 862 | .name = "dss1_fck", |
Russell King | bc51da4 | 2008-11-04 18:59:32 +0000 | [diff] [blame] | 863 | .ops = &clkops_omap2_dflt, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 864 | .parent = &core_ck, /* Core or sys */ |
Russell King | 8ad8ff6 | 2009-01-19 15:27:29 +0000 | [diff] [blame] | 865 | .flags = DELAYED_APP, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 866 | .clkdm_name = "dss_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 867 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 868 | .enable_bit = OMAP24XX_EN_DSS1_SHIFT, |
| 869 | .init = &omap2_init_clksel_parent, |
| 870 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1), |
| 871 | .clksel_mask = OMAP24XX_CLKSEL_DSS1_MASK, |
| 872 | .clksel = dss1_fck_clksel, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 873 | .recalc = &omap2_clksel_recalc, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 874 | .round_rate = &omap2_clksel_round_rate, |
| 875 | .set_rate = &omap2_clksel_set_rate |
| 876 | }; |
| 877 | |
| 878 | static const struct clksel_rate dss2_fck_sys_rates[] = { |
| 879 | { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 880 | { .div = 0 } |
| 881 | }; |
| 882 | |
| 883 | static const struct clksel_rate dss2_fck_48m_rates[] = { |
| 884 | { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 885 | { .div = 0 } |
| 886 | }; |
| 887 | |
| 888 | static const struct clksel dss2_fck_clksel[] = { |
| 889 | { .parent = &sys_ck, .rates = dss2_fck_sys_rates }, |
| 890 | { .parent = &func_48m_ck, .rates = dss2_fck_48m_rates }, |
| 891 | { .parent = NULL } |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 892 | }; |
| 893 | |
| 894 | static struct clk dss2_fck = { /* Alt clk used in power management */ |
| 895 | .name = "dss2_fck", |
Russell King | bc51da4 | 2008-11-04 18:59:32 +0000 | [diff] [blame] | 896 | .ops = &clkops_omap2_dflt, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 897 | .parent = &sys_ck, /* fixed at sys_ck or 48MHz */ |
Russell King | 8ad8ff6 | 2009-01-19 15:27:29 +0000 | [diff] [blame] | 898 | .flags = DELAYED_APP, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 899 | .clkdm_name = "dss_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 900 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 901 | .enable_bit = OMAP24XX_EN_DSS2_SHIFT, |
| 902 | .init = &omap2_init_clksel_parent, |
| 903 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1), |
| 904 | .clksel_mask = OMAP24XX_CLKSEL_DSS2_MASK, |
| 905 | .clksel = dss2_fck_clksel, |
| 906 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 907 | }; |
| 908 | |
| 909 | static struct clk dss_54m_fck = { /* Alt clk used in power management */ |
| 910 | .name = "dss_54m_fck", /* 54m tv clk */ |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 911 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 912 | .parent = &func_54m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 913 | .clkdm_name = "dss_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 914 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 915 | .enable_bit = OMAP24XX_EN_TV_SHIFT, |
| 916 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 917 | }; |
| 918 | |
| 919 | /* |
| 920 | * CORE power domain ICLK & FCLK defines. |
| 921 | * Many of the these can have more than one possible parent. Entries |
| 922 | * here will likely have an L4 interface parent, and may have multiple |
| 923 | * functional clock parents. |
| 924 | */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 925 | static const struct clksel_rate gpt_alt_rates[] = { |
| 926 | { .div = 1, .val = 2, .flags = RATE_IN_24XX | DEFAULT_RATE }, |
| 927 | { .div = 0 } |
| 928 | }; |
| 929 | |
| 930 | static const struct clksel omap24xx_gpt_clksel[] = { |
| 931 | { .parent = &func_32k_ck, .rates = gpt_32k_rates }, |
| 932 | { .parent = &sys_ck, .rates = gpt_sys_rates }, |
| 933 | { .parent = &alt_ck, .rates = gpt_alt_rates }, |
| 934 | { .parent = NULL }, |
| 935 | }; |
| 936 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 937 | static struct clk gpt1_ick = { |
| 938 | .name = "gpt1_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 939 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 940 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 941 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 942 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 943 | .enable_bit = OMAP24XX_EN_GPT1_SHIFT, |
| 944 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 945 | }; |
| 946 | |
| 947 | static struct clk gpt1_fck = { |
| 948 | .name = "gpt1_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 949 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 950 | .parent = &func_32k_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 951 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 952 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN), |
| 953 | .enable_bit = OMAP24XX_EN_GPT1_SHIFT, |
| 954 | .init = &omap2_init_clksel_parent, |
| 955 | .clksel_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL1), |
| 956 | .clksel_mask = OMAP24XX_CLKSEL_GPT1_MASK, |
| 957 | .clksel = omap24xx_gpt_clksel, |
| 958 | .recalc = &omap2_clksel_recalc, |
| 959 | .round_rate = &omap2_clksel_round_rate, |
| 960 | .set_rate = &omap2_clksel_set_rate |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 961 | }; |
| 962 | |
| 963 | static struct clk gpt2_ick = { |
| 964 | .name = "gpt2_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 965 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 966 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 967 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 968 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 969 | .enable_bit = OMAP24XX_EN_GPT2_SHIFT, |
| 970 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 971 | }; |
| 972 | |
| 973 | static struct clk gpt2_fck = { |
| 974 | .name = "gpt2_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 975 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 976 | .parent = &func_32k_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 977 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 978 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 979 | .enable_bit = OMAP24XX_EN_GPT2_SHIFT, |
| 980 | .init = &omap2_init_clksel_parent, |
| 981 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 982 | .clksel_mask = OMAP24XX_CLKSEL_GPT2_MASK, |
| 983 | .clksel = omap24xx_gpt_clksel, |
| 984 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 985 | }; |
| 986 | |
| 987 | static struct clk gpt3_ick = { |
| 988 | .name = "gpt3_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 989 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 990 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 991 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 992 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 993 | .enable_bit = OMAP24XX_EN_GPT3_SHIFT, |
| 994 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 995 | }; |
| 996 | |
| 997 | static struct clk gpt3_fck = { |
| 998 | .name = "gpt3_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 999 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1000 | .parent = &func_32k_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1001 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1002 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1003 | .enable_bit = OMAP24XX_EN_GPT3_SHIFT, |
| 1004 | .init = &omap2_init_clksel_parent, |
| 1005 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1006 | .clksel_mask = OMAP24XX_CLKSEL_GPT3_MASK, |
| 1007 | .clksel = omap24xx_gpt_clksel, |
| 1008 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1009 | }; |
| 1010 | |
| 1011 | static struct clk gpt4_ick = { |
| 1012 | .name = "gpt4_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1013 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1014 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1015 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1016 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1017 | .enable_bit = OMAP24XX_EN_GPT4_SHIFT, |
| 1018 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1019 | }; |
| 1020 | |
| 1021 | static struct clk gpt4_fck = { |
| 1022 | .name = "gpt4_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1023 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1024 | .parent = &func_32k_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1025 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1026 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1027 | .enable_bit = OMAP24XX_EN_GPT4_SHIFT, |
| 1028 | .init = &omap2_init_clksel_parent, |
| 1029 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1030 | .clksel_mask = OMAP24XX_CLKSEL_GPT4_MASK, |
| 1031 | .clksel = omap24xx_gpt_clksel, |
| 1032 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1033 | }; |
| 1034 | |
| 1035 | static struct clk gpt5_ick = { |
| 1036 | .name = "gpt5_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1037 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1038 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1039 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1040 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1041 | .enable_bit = OMAP24XX_EN_GPT5_SHIFT, |
| 1042 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1043 | }; |
| 1044 | |
| 1045 | static struct clk gpt5_fck = { |
| 1046 | .name = "gpt5_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1047 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1048 | .parent = &func_32k_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1049 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1050 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1051 | .enable_bit = OMAP24XX_EN_GPT5_SHIFT, |
| 1052 | .init = &omap2_init_clksel_parent, |
| 1053 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1054 | .clksel_mask = OMAP24XX_CLKSEL_GPT5_MASK, |
| 1055 | .clksel = omap24xx_gpt_clksel, |
| 1056 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1057 | }; |
| 1058 | |
| 1059 | static struct clk gpt6_ick = { |
| 1060 | .name = "gpt6_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1061 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1062 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1063 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1064 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1065 | .enable_bit = OMAP24XX_EN_GPT6_SHIFT, |
| 1066 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1067 | }; |
| 1068 | |
| 1069 | static struct clk gpt6_fck = { |
| 1070 | .name = "gpt6_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1071 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1072 | .parent = &func_32k_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1073 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1074 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1075 | .enable_bit = OMAP24XX_EN_GPT6_SHIFT, |
| 1076 | .init = &omap2_init_clksel_parent, |
| 1077 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1078 | .clksel_mask = OMAP24XX_CLKSEL_GPT6_MASK, |
| 1079 | .clksel = omap24xx_gpt_clksel, |
| 1080 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1081 | }; |
| 1082 | |
| 1083 | static struct clk gpt7_ick = { |
| 1084 | .name = "gpt7_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1085 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1086 | .parent = &l4_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1087 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1088 | .enable_bit = OMAP24XX_EN_GPT7_SHIFT, |
| 1089 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1090 | }; |
| 1091 | |
| 1092 | static struct clk gpt7_fck = { |
| 1093 | .name = "gpt7_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1094 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1095 | .parent = &func_32k_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1096 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1097 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1098 | .enable_bit = OMAP24XX_EN_GPT7_SHIFT, |
| 1099 | .init = &omap2_init_clksel_parent, |
| 1100 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1101 | .clksel_mask = OMAP24XX_CLKSEL_GPT7_MASK, |
| 1102 | .clksel = omap24xx_gpt_clksel, |
| 1103 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1104 | }; |
| 1105 | |
| 1106 | static struct clk gpt8_ick = { |
| 1107 | .name = "gpt8_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1108 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1109 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1110 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1111 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1112 | .enable_bit = OMAP24XX_EN_GPT8_SHIFT, |
| 1113 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1114 | }; |
| 1115 | |
| 1116 | static struct clk gpt8_fck = { |
| 1117 | .name = "gpt8_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1118 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1119 | .parent = &func_32k_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1120 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1121 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1122 | .enable_bit = OMAP24XX_EN_GPT8_SHIFT, |
| 1123 | .init = &omap2_init_clksel_parent, |
| 1124 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1125 | .clksel_mask = OMAP24XX_CLKSEL_GPT8_MASK, |
| 1126 | .clksel = omap24xx_gpt_clksel, |
| 1127 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1128 | }; |
| 1129 | |
| 1130 | static struct clk gpt9_ick = { |
| 1131 | .name = "gpt9_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1132 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1133 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1134 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1135 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1136 | .enable_bit = OMAP24XX_EN_GPT9_SHIFT, |
| 1137 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1138 | }; |
| 1139 | |
| 1140 | static struct clk gpt9_fck = { |
| 1141 | .name = "gpt9_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1142 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1143 | .parent = &func_32k_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1144 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1145 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1146 | .enable_bit = OMAP24XX_EN_GPT9_SHIFT, |
| 1147 | .init = &omap2_init_clksel_parent, |
| 1148 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1149 | .clksel_mask = OMAP24XX_CLKSEL_GPT9_MASK, |
| 1150 | .clksel = omap24xx_gpt_clksel, |
| 1151 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1152 | }; |
| 1153 | |
| 1154 | static struct clk gpt10_ick = { |
| 1155 | .name = "gpt10_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1156 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1157 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1158 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1159 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1160 | .enable_bit = OMAP24XX_EN_GPT10_SHIFT, |
| 1161 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1162 | }; |
| 1163 | |
| 1164 | static struct clk gpt10_fck = { |
| 1165 | .name = "gpt10_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1166 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1167 | .parent = &func_32k_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1168 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1169 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1170 | .enable_bit = OMAP24XX_EN_GPT10_SHIFT, |
| 1171 | .init = &omap2_init_clksel_parent, |
| 1172 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1173 | .clksel_mask = OMAP24XX_CLKSEL_GPT10_MASK, |
| 1174 | .clksel = omap24xx_gpt_clksel, |
| 1175 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1176 | }; |
| 1177 | |
| 1178 | static struct clk gpt11_ick = { |
| 1179 | .name = "gpt11_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1180 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1181 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1182 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1183 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1184 | .enable_bit = OMAP24XX_EN_GPT11_SHIFT, |
| 1185 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1186 | }; |
| 1187 | |
| 1188 | static struct clk gpt11_fck = { |
| 1189 | .name = "gpt11_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1190 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1191 | .parent = &func_32k_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1192 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1193 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1194 | .enable_bit = OMAP24XX_EN_GPT11_SHIFT, |
| 1195 | .init = &omap2_init_clksel_parent, |
| 1196 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1197 | .clksel_mask = OMAP24XX_CLKSEL_GPT11_MASK, |
| 1198 | .clksel = omap24xx_gpt_clksel, |
| 1199 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1200 | }; |
| 1201 | |
| 1202 | static struct clk gpt12_ick = { |
| 1203 | .name = "gpt12_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1204 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1205 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1206 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1207 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1208 | .enable_bit = OMAP24XX_EN_GPT12_SHIFT, |
| 1209 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1210 | }; |
| 1211 | |
| 1212 | static struct clk gpt12_fck = { |
| 1213 | .name = "gpt12_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1214 | .ops = &clkops_omap2_dflt_wait, |
Paul Walmsley | f248076 | 2009-04-23 21:11:10 -0600 | [diff] [blame] | 1215 | .parent = &secure_32k_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1216 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1217 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1218 | .enable_bit = OMAP24XX_EN_GPT12_SHIFT, |
| 1219 | .init = &omap2_init_clksel_parent, |
| 1220 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2), |
| 1221 | .clksel_mask = OMAP24XX_CLKSEL_GPT12_MASK, |
| 1222 | .clksel = omap24xx_gpt_clksel, |
| 1223 | .recalc = &omap2_clksel_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1224 | }; |
| 1225 | |
| 1226 | static struct clk mcbsp1_ick = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1227 | .name = "mcbsp1_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1228 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1229 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1230 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1231 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1232 | .enable_bit = OMAP24XX_EN_MCBSP1_SHIFT, |
| 1233 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1234 | }; |
| 1235 | |
| 1236 | static struct clk mcbsp1_fck = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1237 | .name = "mcbsp1_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1238 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1239 | .parent = &func_96m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1240 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1241 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1242 | .enable_bit = OMAP24XX_EN_MCBSP1_SHIFT, |
| 1243 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1244 | }; |
| 1245 | |
| 1246 | static struct clk mcbsp2_ick = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1247 | .name = "mcbsp2_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1248 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1249 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1250 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1251 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1252 | .enable_bit = OMAP24XX_EN_MCBSP2_SHIFT, |
| 1253 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1254 | }; |
| 1255 | |
| 1256 | static struct clk mcbsp2_fck = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1257 | .name = "mcbsp2_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1258 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1259 | .parent = &func_96m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1260 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1261 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1262 | .enable_bit = OMAP24XX_EN_MCBSP2_SHIFT, |
| 1263 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1264 | }; |
| 1265 | |
| 1266 | static struct clk mcbsp3_ick = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1267 | .name = "mcbsp3_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1268 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1269 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1270 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1271 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 1272 | .enable_bit = OMAP2430_EN_MCBSP3_SHIFT, |
| 1273 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1274 | }; |
| 1275 | |
| 1276 | static struct clk mcbsp3_fck = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1277 | .name = "mcbsp3_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1278 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1279 | .parent = &func_96m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1280 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1281 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 1282 | .enable_bit = OMAP2430_EN_MCBSP3_SHIFT, |
| 1283 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1284 | }; |
| 1285 | |
| 1286 | static struct clk mcbsp4_ick = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1287 | .name = "mcbsp4_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1288 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1289 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1290 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1291 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 1292 | .enable_bit = OMAP2430_EN_MCBSP4_SHIFT, |
| 1293 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1294 | }; |
| 1295 | |
| 1296 | static struct clk mcbsp4_fck = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1297 | .name = "mcbsp4_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1298 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1299 | .parent = &func_96m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1300 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1301 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 1302 | .enable_bit = OMAP2430_EN_MCBSP4_SHIFT, |
| 1303 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1304 | }; |
| 1305 | |
| 1306 | static struct clk mcbsp5_ick = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1307 | .name = "mcbsp5_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1308 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1309 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1310 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1311 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 1312 | .enable_bit = OMAP2430_EN_MCBSP5_SHIFT, |
| 1313 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1314 | }; |
| 1315 | |
| 1316 | static struct clk mcbsp5_fck = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1317 | .name = "mcbsp5_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1318 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1319 | .parent = &func_96m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1320 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1321 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 1322 | .enable_bit = OMAP2430_EN_MCBSP5_SHIFT, |
| 1323 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1324 | }; |
| 1325 | |
| 1326 | static struct clk mcspi1_ick = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1327 | .name = "mcspi1_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1328 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1329 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1330 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1331 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1332 | .enable_bit = OMAP24XX_EN_MCSPI1_SHIFT, |
| 1333 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1334 | }; |
| 1335 | |
| 1336 | static struct clk mcspi1_fck = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1337 | .name = "mcspi1_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1338 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1339 | .parent = &func_48m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1340 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1341 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1342 | .enable_bit = OMAP24XX_EN_MCSPI1_SHIFT, |
| 1343 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1344 | }; |
| 1345 | |
| 1346 | static struct clk mcspi2_ick = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1347 | .name = "mcspi2_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1348 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1349 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1350 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1351 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1352 | .enable_bit = OMAP24XX_EN_MCSPI2_SHIFT, |
| 1353 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1354 | }; |
| 1355 | |
| 1356 | static struct clk mcspi2_fck = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1357 | .name = "mcspi2_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1358 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1359 | .parent = &func_48m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1360 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1361 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1362 | .enable_bit = OMAP24XX_EN_MCSPI2_SHIFT, |
| 1363 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1364 | }; |
| 1365 | |
| 1366 | static struct clk mcspi3_ick = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1367 | .name = "mcspi3_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1368 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1369 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1370 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1371 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 1372 | .enable_bit = OMAP2430_EN_MCSPI3_SHIFT, |
| 1373 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1374 | }; |
| 1375 | |
| 1376 | static struct clk mcspi3_fck = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1377 | .name = "mcspi3_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1378 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1379 | .parent = &func_48m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1380 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1381 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 1382 | .enable_bit = OMAP2430_EN_MCSPI3_SHIFT, |
| 1383 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1384 | }; |
| 1385 | |
| 1386 | static struct clk uart1_ick = { |
| 1387 | .name = "uart1_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1388 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1389 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1390 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1391 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1392 | .enable_bit = OMAP24XX_EN_UART1_SHIFT, |
| 1393 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1394 | }; |
| 1395 | |
| 1396 | static struct clk uart1_fck = { |
| 1397 | .name = "uart1_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1398 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1399 | .parent = &func_48m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1400 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1401 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1402 | .enable_bit = OMAP24XX_EN_UART1_SHIFT, |
| 1403 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1404 | }; |
| 1405 | |
| 1406 | static struct clk uart2_ick = { |
| 1407 | .name = "uart2_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1408 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1409 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1410 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1411 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1412 | .enable_bit = OMAP24XX_EN_UART2_SHIFT, |
| 1413 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1414 | }; |
| 1415 | |
| 1416 | static struct clk uart2_fck = { |
| 1417 | .name = "uart2_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1418 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1419 | .parent = &func_48m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1420 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1421 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1422 | .enable_bit = OMAP24XX_EN_UART2_SHIFT, |
| 1423 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1424 | }; |
| 1425 | |
| 1426 | static struct clk uart3_ick = { |
| 1427 | .name = "uart3_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1428 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1429 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1430 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1431 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 1432 | .enable_bit = OMAP24XX_EN_UART3_SHIFT, |
| 1433 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1434 | }; |
| 1435 | |
| 1436 | static struct clk uart3_fck = { |
| 1437 | .name = "uart3_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1438 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1439 | .parent = &func_48m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1440 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1441 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 1442 | .enable_bit = OMAP24XX_EN_UART3_SHIFT, |
| 1443 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1444 | }; |
| 1445 | |
| 1446 | static struct clk gpios_ick = { |
| 1447 | .name = "gpios_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1448 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1449 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1450 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1451 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 1452 | .enable_bit = OMAP24XX_EN_GPIOS_SHIFT, |
| 1453 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1454 | }; |
| 1455 | |
| 1456 | static struct clk gpios_fck = { |
| 1457 | .name = "gpios_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1458 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1459 | .parent = &func_32k_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1460 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1461 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN), |
| 1462 | .enable_bit = OMAP24XX_EN_GPIOS_SHIFT, |
| 1463 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1464 | }; |
| 1465 | |
| 1466 | static struct clk mpu_wdt_ick = { |
| 1467 | .name = "mpu_wdt_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1468 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1469 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1470 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1471 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 1472 | .enable_bit = OMAP24XX_EN_MPU_WDT_SHIFT, |
| 1473 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1474 | }; |
| 1475 | |
| 1476 | static struct clk mpu_wdt_fck = { |
| 1477 | .name = "mpu_wdt_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1478 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1479 | .parent = &func_32k_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1480 | .clkdm_name = "wkup_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1481 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN), |
| 1482 | .enable_bit = OMAP24XX_EN_MPU_WDT_SHIFT, |
| 1483 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1484 | }; |
| 1485 | |
| 1486 | static struct clk sync_32k_ick = { |
| 1487 | .name = "sync_32k_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1488 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1489 | .parent = &l4_ck, |
Russell King | 8ad8ff6 | 2009-01-19 15:27:29 +0000 | [diff] [blame] | 1490 | .flags = ENABLE_ON_INIT, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1491 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1492 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 1493 | .enable_bit = OMAP24XX_EN_32KSYNC_SHIFT, |
| 1494 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1495 | }; |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1496 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1497 | static struct clk wdt1_ick = { |
| 1498 | .name = "wdt1_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1499 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1500 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1501 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1502 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 1503 | .enable_bit = OMAP24XX_EN_WDT1_SHIFT, |
| 1504 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1505 | }; |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1506 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1507 | static struct clk omapctrl_ick = { |
| 1508 | .name = "omapctrl_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1509 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1510 | .parent = &l4_ck, |
Russell King | 8ad8ff6 | 2009-01-19 15:27:29 +0000 | [diff] [blame] | 1511 | .flags = ENABLE_ON_INIT, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1512 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1513 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 1514 | .enable_bit = OMAP24XX_EN_OMAPCTRL_SHIFT, |
| 1515 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1516 | }; |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1517 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1518 | static struct clk icr_ick = { |
| 1519 | .name = "icr_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1520 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1521 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1522 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1523 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 1524 | .enable_bit = OMAP2430_EN_ICR_SHIFT, |
| 1525 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1526 | }; |
| 1527 | |
| 1528 | static struct clk cam_ick = { |
| 1529 | .name = "cam_ick", |
Russell King | bc51da4 | 2008-11-04 18:59:32 +0000 | [diff] [blame] | 1530 | .ops = &clkops_omap2_dflt, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1531 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1532 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1533 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1534 | .enable_bit = OMAP24XX_EN_CAM_SHIFT, |
| 1535 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1536 | }; |
| 1537 | |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1538 | /* |
| 1539 | * cam_fck controls both CAM_MCLK and CAM_FCLK. It should probably be |
| 1540 | * split into two separate clocks, since the parent clocks are different |
| 1541 | * and the clockdomains are also different. |
| 1542 | */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1543 | static struct clk cam_fck = { |
| 1544 | .name = "cam_fck", |
Russell King | bc51da4 | 2008-11-04 18:59:32 +0000 | [diff] [blame] | 1545 | .ops = &clkops_omap2_dflt, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1546 | .parent = &func_96m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1547 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1548 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1549 | .enable_bit = OMAP24XX_EN_CAM_SHIFT, |
| 1550 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1551 | }; |
| 1552 | |
| 1553 | static struct clk mailboxes_ick = { |
| 1554 | .name = "mailboxes_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1555 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1556 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1557 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1558 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1559 | .enable_bit = OMAP24XX_EN_MAILBOXES_SHIFT, |
| 1560 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1561 | }; |
| 1562 | |
| 1563 | static struct clk wdt4_ick = { |
| 1564 | .name = "wdt4_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1565 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1566 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1567 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1568 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1569 | .enable_bit = OMAP24XX_EN_WDT4_SHIFT, |
| 1570 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1571 | }; |
| 1572 | |
| 1573 | static struct clk wdt4_fck = { |
| 1574 | .name = "wdt4_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1575 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1576 | .parent = &func_32k_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1577 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1578 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1579 | .enable_bit = OMAP24XX_EN_WDT4_SHIFT, |
| 1580 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1581 | }; |
| 1582 | |
| 1583 | static struct clk wdt3_ick = { |
| 1584 | .name = "wdt3_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1585 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1586 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1587 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1588 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1589 | .enable_bit = OMAP2420_EN_WDT3_SHIFT, |
| 1590 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1591 | }; |
| 1592 | |
| 1593 | static struct clk wdt3_fck = { |
| 1594 | .name = "wdt3_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1595 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1596 | .parent = &func_32k_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1597 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1598 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1599 | .enable_bit = OMAP2420_EN_WDT3_SHIFT, |
| 1600 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1601 | }; |
| 1602 | |
| 1603 | static struct clk mspro_ick = { |
| 1604 | .name = "mspro_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1605 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1606 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1607 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1608 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1609 | .enable_bit = OMAP24XX_EN_MSPRO_SHIFT, |
| 1610 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1611 | }; |
| 1612 | |
| 1613 | static struct clk mspro_fck = { |
| 1614 | .name = "mspro_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1615 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1616 | .parent = &func_96m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1617 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1618 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1619 | .enable_bit = OMAP24XX_EN_MSPRO_SHIFT, |
| 1620 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1621 | }; |
| 1622 | |
| 1623 | static struct clk mmc_ick = { |
| 1624 | .name = "mmc_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1625 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1626 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1627 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1628 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1629 | .enable_bit = OMAP2420_EN_MMC_SHIFT, |
| 1630 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1631 | }; |
| 1632 | |
| 1633 | static struct clk mmc_fck = { |
| 1634 | .name = "mmc_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1635 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1636 | .parent = &func_96m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1637 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1638 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1639 | .enable_bit = OMAP2420_EN_MMC_SHIFT, |
| 1640 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1641 | }; |
| 1642 | |
| 1643 | static struct clk fac_ick = { |
| 1644 | .name = "fac_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1645 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1646 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1647 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1648 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1649 | .enable_bit = OMAP24XX_EN_FAC_SHIFT, |
| 1650 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1651 | }; |
| 1652 | |
| 1653 | static struct clk fac_fck = { |
| 1654 | .name = "fac_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1655 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1656 | .parent = &func_12m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1657 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1658 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1659 | .enable_bit = OMAP24XX_EN_FAC_SHIFT, |
| 1660 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1661 | }; |
| 1662 | |
| 1663 | static struct clk eac_ick = { |
| 1664 | .name = "eac_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1665 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1666 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1667 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1668 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1669 | .enable_bit = OMAP2420_EN_EAC_SHIFT, |
| 1670 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1671 | }; |
| 1672 | |
| 1673 | static struct clk eac_fck = { |
| 1674 | .name = "eac_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1675 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1676 | .parent = &func_96m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1677 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1678 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1679 | .enable_bit = OMAP2420_EN_EAC_SHIFT, |
| 1680 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1681 | }; |
| 1682 | |
| 1683 | static struct clk hdq_ick = { |
| 1684 | .name = "hdq_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1685 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1686 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1687 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1688 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1689 | .enable_bit = OMAP24XX_EN_HDQ_SHIFT, |
| 1690 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1691 | }; |
| 1692 | |
| 1693 | static struct clk hdq_fck = { |
| 1694 | .name = "hdq_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1695 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1696 | .parent = &func_12m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1697 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1698 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1699 | .enable_bit = OMAP24XX_EN_HDQ_SHIFT, |
| 1700 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1701 | }; |
| 1702 | |
| 1703 | static struct clk i2c2_ick = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1704 | .name = "i2c2_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1705 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1706 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1707 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1708 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1709 | .enable_bit = OMAP2420_EN_I2C2_SHIFT, |
| 1710 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1711 | }; |
| 1712 | |
| 1713 | static struct clk i2c2_fck = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1714 | .name = "i2c2_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1715 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1716 | .parent = &func_12m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1717 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1718 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1719 | .enable_bit = OMAP2420_EN_I2C2_SHIFT, |
| 1720 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1721 | }; |
| 1722 | |
| 1723 | static struct clk i2chs2_fck = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1724 | .name = "i2chs2_fck", |
Paul Walmsley | 3dc2197 | 2009-07-24 19:44:04 -0600 | [diff] [blame] | 1725 | .ops = &clkops_omap2430_i2chs_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1726 | .parent = &func_96m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1727 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1728 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 1729 | .enable_bit = OMAP2430_EN_I2CHS2_SHIFT, |
| 1730 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1731 | }; |
| 1732 | |
| 1733 | static struct clk i2c1_ick = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1734 | .name = "i2c1_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1735 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1736 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1737 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1738 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1739 | .enable_bit = OMAP2420_EN_I2C1_SHIFT, |
| 1740 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1741 | }; |
| 1742 | |
| 1743 | static struct clk i2c1_fck = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1744 | .name = "i2c1_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1745 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1746 | .parent = &func_12m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1747 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1748 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1749 | .enable_bit = OMAP2420_EN_I2C1_SHIFT, |
| 1750 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1751 | }; |
| 1752 | |
| 1753 | static struct clk i2chs1_fck = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1754 | .name = "i2chs1_fck", |
Paul Walmsley | 3dc2197 | 2009-07-24 19:44:04 -0600 | [diff] [blame] | 1755 | .ops = &clkops_omap2430_i2chs_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1756 | .parent = &func_96m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1757 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1758 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 1759 | .enable_bit = OMAP2430_EN_I2CHS1_SHIFT, |
| 1760 | .recalc = &followparent_recalc, |
| 1761 | }; |
| 1762 | |
| 1763 | static struct clk gpmc_fck = { |
| 1764 | .name = "gpmc_fck", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame] | 1765 | .ops = &clkops_null, /* RMK: missing? */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1766 | .parent = &core_l3_ck, |
Russell King | 8ad8ff6 | 2009-01-19 15:27:29 +0000 | [diff] [blame] | 1767 | .flags = ENABLE_ON_INIT, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1768 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1769 | .recalc = &followparent_recalc, |
| 1770 | }; |
| 1771 | |
| 1772 | static struct clk sdma_fck = { |
| 1773 | .name = "sdma_fck", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame] | 1774 | .ops = &clkops_null, /* RMK: missing? */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1775 | .parent = &core_l3_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1776 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1777 | .recalc = &followparent_recalc, |
| 1778 | }; |
| 1779 | |
| 1780 | static struct clk sdma_ick = { |
| 1781 | .name = "sdma_ick", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame] | 1782 | .ops = &clkops_null, /* RMK: missing? */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1783 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1784 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1785 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1786 | }; |
| 1787 | |
| 1788 | static struct clk vlynq_ick = { |
| 1789 | .name = "vlynq_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1790 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1791 | .parent = &core_l3_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1792 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1793 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1794 | .enable_bit = OMAP2420_EN_VLYNQ_SHIFT, |
| 1795 | .recalc = &followparent_recalc, |
| 1796 | }; |
| 1797 | |
| 1798 | static const struct clksel_rate vlynq_fck_96m_rates[] = { |
| 1799 | { .div = 1, .val = 0, .flags = RATE_IN_242X | DEFAULT_RATE }, |
| 1800 | { .div = 0 } |
| 1801 | }; |
| 1802 | |
| 1803 | static const struct clksel_rate vlynq_fck_core_rates[] = { |
| 1804 | { .div = 1, .val = 1, .flags = RATE_IN_242X }, |
| 1805 | { .div = 2, .val = 2, .flags = RATE_IN_242X }, |
| 1806 | { .div = 3, .val = 3, .flags = RATE_IN_242X }, |
| 1807 | { .div = 4, .val = 4, .flags = RATE_IN_242X }, |
| 1808 | { .div = 6, .val = 6, .flags = RATE_IN_242X }, |
| 1809 | { .div = 8, .val = 8, .flags = RATE_IN_242X }, |
| 1810 | { .div = 9, .val = 9, .flags = RATE_IN_242X }, |
| 1811 | { .div = 12, .val = 12, .flags = RATE_IN_242X }, |
| 1812 | { .div = 16, .val = 16, .flags = RATE_IN_242X | DEFAULT_RATE }, |
| 1813 | { .div = 18, .val = 18, .flags = RATE_IN_242X }, |
| 1814 | { .div = 0 } |
| 1815 | }; |
| 1816 | |
| 1817 | static const struct clksel vlynq_fck_clksel[] = { |
| 1818 | { .parent = &func_96m_ck, .rates = vlynq_fck_96m_rates }, |
| 1819 | { .parent = &core_ck, .rates = vlynq_fck_core_rates }, |
| 1820 | { .parent = NULL } |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1821 | }; |
| 1822 | |
| 1823 | static struct clk vlynq_fck = { |
| 1824 | .name = "vlynq_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1825 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1826 | .parent = &func_96m_ck, |
Russell King | 8ad8ff6 | 2009-01-19 15:27:29 +0000 | [diff] [blame] | 1827 | .flags = DELAYED_APP, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1828 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1829 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1830 | .enable_bit = OMAP2420_EN_VLYNQ_SHIFT, |
| 1831 | .init = &omap2_init_clksel_parent, |
| 1832 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1), |
| 1833 | .clksel_mask = OMAP2420_CLKSEL_VLYNQ_MASK, |
| 1834 | .clksel = vlynq_fck_clksel, |
| 1835 | .recalc = &omap2_clksel_recalc, |
| 1836 | .round_rate = &omap2_clksel_round_rate, |
| 1837 | .set_rate = &omap2_clksel_set_rate |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1838 | }; |
| 1839 | |
| 1840 | static struct clk sdrc_ick = { |
| 1841 | .name = "sdrc_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1842 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1843 | .parent = &l4_ck, |
Russell King | 8ad8ff6 | 2009-01-19 15:27:29 +0000 | [diff] [blame] | 1844 | .flags = ENABLE_ON_INIT, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1845 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1846 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3), |
| 1847 | .enable_bit = OMAP2430_EN_SDRC_SHIFT, |
| 1848 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1849 | }; |
| 1850 | |
| 1851 | static struct clk des_ick = { |
| 1852 | .name = "des_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1853 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1854 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1855 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1856 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), |
| 1857 | .enable_bit = OMAP24XX_EN_DES_SHIFT, |
| 1858 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1859 | }; |
| 1860 | |
| 1861 | static struct clk sha_ick = { |
| 1862 | .name = "sha_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1863 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1864 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1865 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1866 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), |
| 1867 | .enable_bit = OMAP24XX_EN_SHA_SHIFT, |
| 1868 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1869 | }; |
| 1870 | |
| 1871 | static struct clk rng_ick = { |
| 1872 | .name = "rng_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1873 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1874 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1875 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1876 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), |
| 1877 | .enable_bit = OMAP24XX_EN_RNG_SHIFT, |
| 1878 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1879 | }; |
| 1880 | |
| 1881 | static struct clk aes_ick = { |
| 1882 | .name = "aes_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1883 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1884 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1885 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1886 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), |
| 1887 | .enable_bit = OMAP24XX_EN_AES_SHIFT, |
| 1888 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1889 | }; |
| 1890 | |
| 1891 | static struct clk pka_ick = { |
| 1892 | .name = "pka_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1893 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1894 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1895 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1896 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), |
| 1897 | .enable_bit = OMAP24XX_EN_PKA_SHIFT, |
| 1898 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1899 | }; |
| 1900 | |
| 1901 | static struct clk usb_fck = { |
| 1902 | .name = "usb_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1903 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1904 | .parent = &func_48m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1905 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1906 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 1907 | .enable_bit = OMAP24XX_EN_USB_SHIFT, |
| 1908 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1909 | }; |
| 1910 | |
| 1911 | static struct clk usbhs_ick = { |
| 1912 | .name = "usbhs_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1913 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | fde0fd4 | 2006-01-17 15:31:18 -0800 | [diff] [blame] | 1914 | .parent = &core_l3_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1915 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1916 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 1917 | .enable_bit = OMAP2430_EN_USBHS_SHIFT, |
| 1918 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1919 | }; |
| 1920 | |
| 1921 | static struct clk mmchs1_ick = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1922 | .name = "mmchs1_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1923 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1924 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1925 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1926 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 1927 | .enable_bit = OMAP2430_EN_MMCHS1_SHIFT, |
| 1928 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1929 | }; |
| 1930 | |
| 1931 | static struct clk mmchs1_fck = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1932 | .name = "mmchs1_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1933 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1934 | .parent = &func_96m_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1935 | .clkdm_name = "core_l3_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1936 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 1937 | .enable_bit = OMAP2430_EN_MMCHS1_SHIFT, |
| 1938 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1939 | }; |
| 1940 | |
| 1941 | static struct clk mmchs2_ick = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1942 | .name = "mmchs2_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1943 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1944 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1945 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1946 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 1947 | .enable_bit = OMAP2430_EN_MMCHS2_SHIFT, |
| 1948 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1949 | }; |
| 1950 | |
| 1951 | static struct clk mmchs2_fck = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1952 | .name = "mmchs2_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1953 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1954 | .parent = &func_96m_ck, |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1955 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 1956 | .enable_bit = OMAP2430_EN_MMCHS2_SHIFT, |
| 1957 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1958 | }; |
| 1959 | |
| 1960 | static struct clk gpio5_ick = { |
| 1961 | .name = "gpio5_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1962 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1963 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1964 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1965 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 1966 | .enable_bit = OMAP2430_EN_GPIO5_SHIFT, |
| 1967 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1968 | }; |
| 1969 | |
| 1970 | static struct clk gpio5_fck = { |
| 1971 | .name = "gpio5_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1972 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1973 | .parent = &func_32k_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1974 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1975 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 1976 | .enable_bit = OMAP2430_EN_GPIO5_SHIFT, |
| 1977 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1978 | }; |
| 1979 | |
| 1980 | static struct clk mdm_intc_ick = { |
| 1981 | .name = "mdm_intc_ick", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1982 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1983 | .parent = &l4_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1984 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1985 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 1986 | .enable_bit = OMAP2430_EN_MDM_INTC_SHIFT, |
| 1987 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1988 | }; |
| 1989 | |
| 1990 | static struct clk mmchsdb1_fck = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 1991 | .name = "mmchsdb1_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 1992 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1993 | .parent = &func_32k_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 1994 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 1995 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 1996 | .enable_bit = OMAP2430_EN_MMCHSDB1_SHIFT, |
| 1997 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 1998 | }; |
| 1999 | |
| 2000 | static struct clk mmchsdb2_fck = { |
Paul Walmsley | b92c170 | 2010-02-22 22:09:19 -0700 | [diff] [blame^] | 2001 | .name = "mmchsdb2_fck", |
Russell King | b36ee72 | 2008-11-04 17:59:52 +0000 | [diff] [blame] | 2002 | .ops = &clkops_omap2_dflt_wait, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2003 | .parent = &func_32k_ck, |
Paul Walmsley | d1b03f6 | 2008-08-19 11:08:44 +0300 | [diff] [blame] | 2004 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2005 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 2006 | .enable_bit = OMAP2430_EN_MMCHSDB2_SHIFT, |
| 2007 | .recalc = &followparent_recalc, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2008 | }; |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2009 | |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2010 | /* |
| 2011 | * This clock is a composite clock which does entire set changes then |
| 2012 | * forces a rebalance. It keys on the MPU speed, but it really could |
| 2013 | * be any key speed part of a set in the rate table. |
| 2014 | * |
| 2015 | * to really change a set, you need memory table sets which get changed |
| 2016 | * in sram, pre-notifiers & post notifiers, changing the top set, without |
| 2017 | * having low level display recalc's won't work... this is why dpm notifiers |
| 2018 | * work, isr's off, walk a list of clocks already _off_ and not messing with |
| 2019 | * the bus. |
| 2020 | * |
| 2021 | * This clock should have no parent. It embodies the entire upper level |
| 2022 | * active set. A parent will mess up some of the init also. |
| 2023 | */ |
| 2024 | static struct clk virt_prcm_set = { |
| 2025 | .name = "virt_prcm_set", |
Russell King | 897dcde | 2008-11-04 16:35:03 +0000 | [diff] [blame] | 2026 | .ops = &clkops_null, |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2027 | .parent = &mpu_ck, /* Indexed by mpu speed, no parent */ |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2028 | .recalc = &omap2_table_mpu_recalc, /* sets are keyed on mpu rate */ |
Tony Lindgren | 046d6b2 | 2005-11-10 14:26:52 +0000 | [diff] [blame] | 2029 | .set_rate = &omap2_select_table_rate, |
| 2030 | .round_rate = &omap2_round_to_table_rate, |
| 2031 | }; |
Paul Walmsley | e32744b | 2008-03-18 15:47:55 +0200 | [diff] [blame] | 2032 | |
Paul Walmsley | d8a9445 | 2009-12-08 16:21:29 -0700 | [diff] [blame] | 2033 | |
| 2034 | /* |
| 2035 | * clkdev integration |
| 2036 | */ |
| 2037 | |
| 2038 | static struct omap_clk omap24xx_clks[] = { |
| 2039 | /* external root sources */ |
| 2040 | CLK(NULL, "func_32k_ck", &func_32k_ck, CK_243X | CK_242X), |
| 2041 | CLK(NULL, "secure_32k_ck", &secure_32k_ck, CK_243X | CK_242X), |
| 2042 | CLK(NULL, "osc_ck", &osc_ck, CK_243X | CK_242X), |
| 2043 | CLK(NULL, "sys_ck", &sys_ck, CK_243X | CK_242X), |
| 2044 | CLK(NULL, "alt_ck", &alt_ck, CK_243X | CK_242X), |
| 2045 | /* internal analog sources */ |
| 2046 | CLK(NULL, "dpll_ck", &dpll_ck, CK_243X | CK_242X), |
| 2047 | CLK(NULL, "apll96_ck", &apll96_ck, CK_243X | CK_242X), |
| 2048 | CLK(NULL, "apll54_ck", &apll54_ck, CK_243X | CK_242X), |
| 2049 | /* internal prcm root sources */ |
| 2050 | CLK(NULL, "func_54m_ck", &func_54m_ck, CK_243X | CK_242X), |
| 2051 | CLK(NULL, "core_ck", &core_ck, CK_243X | CK_242X), |
| 2052 | CLK(NULL, "func_96m_ck", &func_96m_ck, CK_243X | CK_242X), |
| 2053 | CLK(NULL, "func_48m_ck", &func_48m_ck, CK_243X | CK_242X), |
| 2054 | CLK(NULL, "func_12m_ck", &func_12m_ck, CK_243X | CK_242X), |
| 2055 | CLK(NULL, "ck_wdt1_osc", &wdt1_osc_ck, CK_243X | CK_242X), |
| 2056 | CLK(NULL, "sys_clkout_src", &sys_clkout_src, CK_243X | CK_242X), |
| 2057 | CLK(NULL, "sys_clkout", &sys_clkout, CK_243X | CK_242X), |
| 2058 | CLK(NULL, "sys_clkout2_src", &sys_clkout2_src, CK_242X), |
| 2059 | CLK(NULL, "sys_clkout2", &sys_clkout2, CK_242X), |
| 2060 | CLK(NULL, "emul_ck", &emul_ck, CK_242X), |
| 2061 | /* mpu domain clocks */ |
| 2062 | CLK(NULL, "mpu_ck", &mpu_ck, CK_243X | CK_242X), |
| 2063 | /* dsp domain clocks */ |
| 2064 | CLK(NULL, "dsp_fck", &dsp_fck, CK_243X | CK_242X), |
| 2065 | CLK(NULL, "dsp_irate_ick", &dsp_irate_ick, CK_243X | CK_242X), |
| 2066 | CLK(NULL, "dsp_ick", &dsp_ick, CK_242X), |
| 2067 | CLK(NULL, "iva2_1_ick", &iva2_1_ick, CK_243X), |
| 2068 | CLK(NULL, "iva1_ifck", &iva1_ifck, CK_242X), |
| 2069 | CLK(NULL, "iva1_mpu_int_ifck", &iva1_mpu_int_ifck, CK_242X), |
| 2070 | /* GFX domain clocks */ |
| 2071 | CLK(NULL, "gfx_3d_fck", &gfx_3d_fck, CK_243X | CK_242X), |
| 2072 | CLK(NULL, "gfx_2d_fck", &gfx_2d_fck, CK_243X | CK_242X), |
| 2073 | CLK(NULL, "gfx_ick", &gfx_ick, CK_243X | CK_242X), |
| 2074 | /* Modem domain clocks */ |
| 2075 | CLK(NULL, "mdm_ick", &mdm_ick, CK_243X), |
| 2076 | CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X), |
| 2077 | /* DSS domain clocks */ |
| 2078 | CLK("omapdss", "ick", &dss_ick, CK_243X | CK_242X), |
| 2079 | CLK("omapdss", "dss1_fck", &dss1_fck, CK_243X | CK_242X), |
| 2080 | CLK("omapdss", "dss2_fck", &dss2_fck, CK_243X | CK_242X), |
| 2081 | CLK("omapdss", "tv_fck", &dss_54m_fck, CK_243X | CK_242X), |
| 2082 | /* L3 domain clocks */ |
| 2083 | CLK(NULL, "core_l3_ck", &core_l3_ck, CK_243X | CK_242X), |
| 2084 | CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_243X | CK_242X), |
| 2085 | CLK(NULL, "usb_l4_ick", &usb_l4_ick, CK_243X | CK_242X), |
| 2086 | /* L4 domain clocks */ |
| 2087 | CLK(NULL, "l4_ck", &l4_ck, CK_243X | CK_242X), |
| 2088 | CLK(NULL, "ssi_l4_ick", &ssi_l4_ick, CK_243X | CK_242X), |
| 2089 | /* virtual meta-group clock */ |
| 2090 | CLK(NULL, "virt_prcm_set", &virt_prcm_set, CK_243X | CK_242X), |
| 2091 | /* general l4 interface ck, multi-parent functional clk */ |
| 2092 | CLK(NULL, "gpt1_ick", &gpt1_ick, CK_243X | CK_242X), |
| 2093 | CLK(NULL, "gpt1_fck", &gpt1_fck, CK_243X | CK_242X), |
| 2094 | CLK(NULL, "gpt2_ick", &gpt2_ick, CK_243X | CK_242X), |
| 2095 | CLK(NULL, "gpt2_fck", &gpt2_fck, CK_243X | CK_242X), |
| 2096 | CLK(NULL, "gpt3_ick", &gpt3_ick, CK_243X | CK_242X), |
| 2097 | CLK(NULL, "gpt3_fck", &gpt3_fck, CK_243X | CK_242X), |
| 2098 | CLK(NULL, "gpt4_ick", &gpt4_ick, CK_243X | CK_242X), |
| 2099 | CLK(NULL, "gpt4_fck", &gpt4_fck, CK_243X | CK_242X), |
| 2100 | CLK(NULL, "gpt5_ick", &gpt5_ick, CK_243X | CK_242X), |
| 2101 | CLK(NULL, "gpt5_fck", &gpt5_fck, CK_243X | CK_242X), |
| 2102 | CLK(NULL, "gpt6_ick", &gpt6_ick, CK_243X | CK_242X), |
| 2103 | CLK(NULL, "gpt6_fck", &gpt6_fck, CK_243X | CK_242X), |
| 2104 | CLK(NULL, "gpt7_ick", &gpt7_ick, CK_243X | CK_242X), |
| 2105 | CLK(NULL, "gpt7_fck", &gpt7_fck, CK_243X | CK_242X), |
| 2106 | CLK(NULL, "gpt8_ick", &gpt8_ick, CK_243X | CK_242X), |
| 2107 | CLK(NULL, "gpt8_fck", &gpt8_fck, CK_243X | CK_242X), |
| 2108 | CLK(NULL, "gpt9_ick", &gpt9_ick, CK_243X | CK_242X), |
| 2109 | CLK(NULL, "gpt9_fck", &gpt9_fck, CK_243X | CK_242X), |
| 2110 | CLK(NULL, "gpt10_ick", &gpt10_ick, CK_243X | CK_242X), |
| 2111 | CLK(NULL, "gpt10_fck", &gpt10_fck, CK_243X | CK_242X), |
| 2112 | CLK(NULL, "gpt11_ick", &gpt11_ick, CK_243X | CK_242X), |
| 2113 | CLK(NULL, "gpt11_fck", &gpt11_fck, CK_243X | CK_242X), |
| 2114 | CLK(NULL, "gpt12_ick", &gpt12_ick, CK_243X | CK_242X), |
| 2115 | CLK(NULL, "gpt12_fck", &gpt12_fck, CK_243X | CK_242X), |
| 2116 | CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_243X | CK_242X), |
| 2117 | CLK("omap-mcbsp.1", "fck", &mcbsp1_fck, CK_243X | CK_242X), |
| 2118 | CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_243X | CK_242X), |
| 2119 | CLK("omap-mcbsp.2", "fck", &mcbsp2_fck, CK_243X | CK_242X), |
| 2120 | CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_243X), |
| 2121 | CLK("omap-mcbsp.3", "fck", &mcbsp3_fck, CK_243X), |
| 2122 | CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_243X), |
| 2123 | CLK("omap-mcbsp.4", "fck", &mcbsp4_fck, CK_243X), |
| 2124 | CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_243X), |
| 2125 | CLK("omap-mcbsp.5", "fck", &mcbsp5_fck, CK_243X), |
| 2126 | CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_243X | CK_242X), |
| 2127 | CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_243X | CK_242X), |
| 2128 | CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_243X | CK_242X), |
| 2129 | CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_243X | CK_242X), |
| 2130 | CLK("omap2_mcspi.3", "ick", &mcspi3_ick, CK_243X), |
| 2131 | CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_243X), |
| 2132 | CLK(NULL, "uart1_ick", &uart1_ick, CK_243X | CK_242X), |
| 2133 | CLK(NULL, "uart1_fck", &uart1_fck, CK_243X | CK_242X), |
| 2134 | CLK(NULL, "uart2_ick", &uart2_ick, CK_243X | CK_242X), |
| 2135 | CLK(NULL, "uart2_fck", &uart2_fck, CK_243X | CK_242X), |
| 2136 | CLK(NULL, "uart3_ick", &uart3_ick, CK_243X | CK_242X), |
| 2137 | CLK(NULL, "uart3_fck", &uart3_fck, CK_243X | CK_242X), |
| 2138 | CLK(NULL, "gpios_ick", &gpios_ick, CK_243X | CK_242X), |
| 2139 | CLK(NULL, "gpios_fck", &gpios_fck, CK_243X | CK_242X), |
| 2140 | CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_243X | CK_242X), |
| 2141 | CLK("omap_wdt", "fck", &mpu_wdt_fck, CK_243X | CK_242X), |
| 2142 | CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_243X | CK_242X), |
| 2143 | CLK(NULL, "wdt1_ick", &wdt1_ick, CK_243X | CK_242X), |
| 2144 | CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_243X | CK_242X), |
| 2145 | CLK(NULL, "icr_ick", &icr_ick, CK_243X), |
| 2146 | CLK("omap24xxcam", "fck", &cam_fck, CK_243X | CK_242X), |
| 2147 | CLK("omap24xxcam", "ick", &cam_ick, CK_243X | CK_242X), |
| 2148 | CLK(NULL, "mailboxes_ick", &mailboxes_ick, CK_243X | CK_242X), |
| 2149 | CLK(NULL, "wdt4_ick", &wdt4_ick, CK_243X | CK_242X), |
| 2150 | CLK(NULL, "wdt4_fck", &wdt4_fck, CK_243X | CK_242X), |
| 2151 | CLK(NULL, "wdt3_ick", &wdt3_ick, CK_242X), |
| 2152 | CLK(NULL, "wdt3_fck", &wdt3_fck, CK_242X), |
| 2153 | CLK(NULL, "mspro_ick", &mspro_ick, CK_243X | CK_242X), |
| 2154 | CLK(NULL, "mspro_fck", &mspro_fck, CK_243X | CK_242X), |
| 2155 | CLK("mmci-omap.0", "ick", &mmc_ick, CK_242X), |
| 2156 | CLK("mmci-omap.0", "fck", &mmc_fck, CK_242X), |
| 2157 | CLK(NULL, "fac_ick", &fac_ick, CK_243X | CK_242X), |
| 2158 | CLK(NULL, "fac_fck", &fac_fck, CK_243X | CK_242X), |
| 2159 | CLK(NULL, "eac_ick", &eac_ick, CK_242X), |
| 2160 | CLK(NULL, "eac_fck", &eac_fck, CK_242X), |
| 2161 | CLK("omap_hdq.0", "ick", &hdq_ick, CK_243X | CK_242X), |
| 2162 | CLK("omap_hdq.1", "fck", &hdq_fck, CK_243X | CK_242X), |
| 2163 | CLK("i2c_omap.1", "ick", &i2c1_ick, CK_243X | CK_242X), |
| 2164 | CLK("i2c_omap.1", "fck", &i2c1_fck, CK_242X), |
| 2165 | CLK("i2c_omap.1", "fck", &i2chs1_fck, CK_243X), |
| 2166 | CLK("i2c_omap.2", "ick", &i2c2_ick, CK_243X | CK_242X), |
| 2167 | CLK("i2c_omap.2", "fck", &i2c2_fck, CK_242X), |
| 2168 | CLK("i2c_omap.2", "fck", &i2chs2_fck, CK_243X), |
| 2169 | CLK(NULL, "gpmc_fck", &gpmc_fck, CK_243X | CK_242X), |
| 2170 | CLK(NULL, "sdma_fck", &sdma_fck, CK_243X | CK_242X), |
| 2171 | CLK(NULL, "sdma_ick", &sdma_ick, CK_243X | CK_242X), |
| 2172 | CLK(NULL, "vlynq_ick", &vlynq_ick, CK_242X), |
| 2173 | CLK(NULL, "vlynq_fck", &vlynq_fck, CK_242X), |
| 2174 | CLK(NULL, "sdrc_ick", &sdrc_ick, CK_243X), |
| 2175 | CLK(NULL, "des_ick", &des_ick, CK_243X | CK_242X), |
| 2176 | CLK(NULL, "sha_ick", &sha_ick, CK_243X | CK_242X), |
| 2177 | CLK("omap_rng", "ick", &rng_ick, CK_243X | CK_242X), |
| 2178 | CLK(NULL, "aes_ick", &aes_ick, CK_243X | CK_242X), |
| 2179 | CLK(NULL, "pka_ick", &pka_ick, CK_243X | CK_242X), |
| 2180 | CLK(NULL, "usb_fck", &usb_fck, CK_243X | CK_242X), |
| 2181 | CLK("musb_hdrc", "ick", &usbhs_ick, CK_243X), |
| 2182 | CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_243X), |
| 2183 | CLK("mmci-omap-hs.0", "fck", &mmchs1_fck, CK_243X), |
| 2184 | CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_243X), |
| 2185 | CLK("mmci-omap-hs.1", "fck", &mmchs2_fck, CK_243X), |
| 2186 | CLK(NULL, "gpio5_ick", &gpio5_ick, CK_243X), |
| 2187 | CLK(NULL, "gpio5_fck", &gpio5_fck, CK_243X), |
| 2188 | CLK(NULL, "mdm_intc_ick", &mdm_intc_ick, CK_243X), |
| 2189 | CLK("mmci-omap-hs.0", "mmchsdb_fck", &mmchsdb1_fck, CK_243X), |
| 2190 | CLK("mmci-omap-hs.1", "mmchsdb_fck", &mmchsdb2_fck, CK_243X), |
| 2191 | }; |
| 2192 | |
| 2193 | /* |
| 2194 | * init code |
| 2195 | */ |
| 2196 | |
Paul Walmsley | e80a972 | 2010-01-26 20:13:12 -0700 | [diff] [blame] | 2197 | int __init omap2xxx_clk_init(void) |
Paul Walmsley | d8a9445 | 2009-12-08 16:21:29 -0700 | [diff] [blame] | 2198 | { |
| 2199 | const struct prcm_config *prcm; |
| 2200 | struct omap_clk *c; |
| 2201 | u32 clkrate; |
| 2202 | u16 cpu_clkflg; |
| 2203 | |
| 2204 | if (cpu_is_omap242x()) { |
| 2205 | prcm_clksrc_ctrl = OMAP2420_PRCM_CLKSRC_CTRL; |
| 2206 | cpu_mask = RATE_IN_242X; |
| 2207 | cpu_clkflg = CK_242X; |
| 2208 | rate_table = omap2420_rate_table; |
| 2209 | } else if (cpu_is_omap2430()) { |
| 2210 | prcm_clksrc_ctrl = OMAP2430_PRCM_CLKSRC_CTRL; |
| 2211 | cpu_mask = RATE_IN_243X; |
| 2212 | cpu_clkflg = CK_243X; |
| 2213 | rate_table = omap2430_rate_table; |
| 2214 | } |
| 2215 | |
| 2216 | clk_init(&omap2_clk_functions); |
| 2217 | |
| 2218 | for (c = omap24xx_clks; c < omap24xx_clks + ARRAY_SIZE(omap24xx_clks); c++) |
| 2219 | clk_preinit(c->lk.clk); |
| 2220 | |
| 2221 | osc_ck.rate = omap2_osc_clk_recalc(&osc_ck); |
| 2222 | propagate_rate(&osc_ck); |
Paul Walmsley | 44da0a5 | 2010-01-26 20:13:08 -0700 | [diff] [blame] | 2223 | sys_ck.rate = omap2xxx_sys_clk_recalc(&sys_ck); |
Paul Walmsley | d8a9445 | 2009-12-08 16:21:29 -0700 | [diff] [blame] | 2224 | propagate_rate(&sys_ck); |
| 2225 | |
| 2226 | for (c = omap24xx_clks; c < omap24xx_clks + ARRAY_SIZE(omap24xx_clks); c++) |
| 2227 | if (c->cpu & cpu_clkflg) { |
| 2228 | clkdev_add(&c->lk); |
| 2229 | clk_register(c->lk.clk); |
| 2230 | omap2_init_clk_clkdm(c->lk.clk); |
| 2231 | } |
| 2232 | |
| 2233 | /* Check the MPU rate set by bootloader */ |
| 2234 | clkrate = omap2xxx_clk_get_core_rate(&dpll_ck); |
| 2235 | for (prcm = rate_table; prcm->mpu_speed; prcm++) { |
| 2236 | if (!(prcm->flags & cpu_mask)) |
| 2237 | continue; |
| 2238 | if (prcm->xtal_speed != sys_ck.rate) |
| 2239 | continue; |
| 2240 | if (prcm->dpll_speed <= clkrate) |
| 2241 | break; |
| 2242 | } |
| 2243 | curr_prcm_set = prcm; |
| 2244 | |
| 2245 | recalculate_root_clocks(); |
| 2246 | |
| 2247 | printk(KERN_INFO "Clocking rate (Crystal/DPLL/MPU): " |
| 2248 | "%ld.%01ld/%ld/%ld MHz\n", |
| 2249 | (sys_ck.rate / 1000000), (sys_ck.rate / 100000) % 10, |
| 2250 | (dpll_ck.rate / 1000000), (mpu_ck.rate / 1000000)) ; |
| 2251 | |
| 2252 | /* |
| 2253 | * Only enable those clocks we will need, let the drivers |
| 2254 | * enable other clocks as necessary |
| 2255 | */ |
| 2256 | clk_enable_init_clocks(); |
| 2257 | |
| 2258 | /* Avoid sleeping sleeping during omap2_clk_prepare_for_reboot() */ |
| 2259 | vclk = clk_get(NULL, "virt_prcm_set"); |
| 2260 | sclk = clk_get(NULL, "sys_ck"); |
| 2261 | dclk = clk_get(NULL, "dpll_ck"); |
| 2262 | |
| 2263 | return 0; |
| 2264 | } |
Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 2265 | |