aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/clock.h
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-11-04 09:02:46 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-02-02 09:52:18 -0500
commit548d849574847b788fe846fe21a41386063be161 (patch)
tree6c2ac7379c376793368affab03e5202abd0f1efa /arch/arm/mach-omap1/clock.h
parentdb8ac47cfccaafd3fa4c5c15320809d44f4fcef9 (diff)
[ARM] omap: introduce clock operations structure
Collect up all the common enable/disable clock operation functions into a separate operations structure. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-omap1/clock.h')
-rw-r--r--arch/arm/mach-omap1/clock.h152
1 files changed, 48 insertions, 104 deletions
diff --git a/arch/arm/mach-omap1/clock.h b/arch/arm/mach-omap1/clock.h
index d4ccba464b4c..5b93a2a897ad 100644
--- a/arch/arm/mach-omap1/clock.h
+++ b/arch/arm/mach-omap1/clock.h
@@ -13,27 +13,19 @@
13#ifndef __ARCH_ARM_MACH_OMAP1_CLOCK_H 13#ifndef __ARCH_ARM_MACH_OMAP1_CLOCK_H
14#define __ARCH_ARM_MACH_OMAP1_CLOCK_H 14#define __ARCH_ARM_MACH_OMAP1_CLOCK_H
15 15
16static int omap1_clk_enable_generic(struct clk * clk);
17static void omap1_clk_disable_generic(struct clk * clk);
18static void omap1_ckctl_recalc(struct clk * clk); 16static void omap1_ckctl_recalc(struct clk * clk);
19static void omap1_watchdog_recalc(struct clk * clk); 17static void omap1_watchdog_recalc(struct clk * clk);
20static int omap1_set_sossi_rate(struct clk *clk, unsigned long rate); 18static int omap1_set_sossi_rate(struct clk *clk, unsigned long rate);
21static void omap1_sossi_recalc(struct clk *clk); 19static void omap1_sossi_recalc(struct clk *clk);
22static void omap1_ckctl_recalc_dsp_domain(struct clk * clk); 20static void omap1_ckctl_recalc_dsp_domain(struct clk * clk);
23static int omap1_clk_enable_dsp_domain(struct clk * clk);
24static int omap1_clk_set_rate_dsp_domain(struct clk * clk, unsigned long rate); 21static int omap1_clk_set_rate_dsp_domain(struct clk * clk, unsigned long rate);
25static void omap1_clk_disable_dsp_domain(struct clk * clk);
26static int omap1_set_uart_rate(struct clk * clk, unsigned long rate); 22static int omap1_set_uart_rate(struct clk * clk, unsigned long rate);
27static void omap1_uart_recalc(struct clk * clk); 23static void omap1_uart_recalc(struct clk * clk);
28static int omap1_clk_enable_uart_functional(struct clk * clk);
29static void omap1_clk_disable_uart_functional(struct clk * clk);
30static int omap1_set_ext_clk_rate(struct clk * clk, unsigned long rate); 24static int omap1_set_ext_clk_rate(struct clk * clk, unsigned long rate);
31static long omap1_round_ext_clk_rate(struct clk * clk, unsigned long rate); 25static long omap1_round_ext_clk_rate(struct clk * clk, unsigned long rate);
32static void omap1_init_ext_clk(struct clk * clk); 26static void omap1_init_ext_clk(struct clk * clk);
33static int omap1_select_table_rate(struct clk * clk, unsigned long rate); 27static int omap1_select_table_rate(struct clk * clk, unsigned long rate);
34static long omap1_round_to_table_rate(struct clk * clk, unsigned long rate); 28static long omap1_round_to_table_rate(struct clk * clk, unsigned long rate);
35static int omap1_clk_enable(struct clk *clk);
36static void omap1_clk_disable(struct clk *clk);
37 29
38struct mpu_rate { 30struct mpu_rate {
39 unsigned long rate; 31 unsigned long rate;
@@ -152,39 +144,37 @@ static struct mpu_rate rate_table[] = {
152 144
153static struct clk ck_ref = { 145static struct clk ck_ref = {
154 .name = "ck_ref", 146 .name = "ck_ref",
147 .ops = &clkops_generic,
155 .rate = 12000000, 148 .rate = 12000000,
156 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 149 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
157 CLOCK_IN_OMAP310 | ALWAYS_ENABLED, 150 CLOCK_IN_OMAP310 | ALWAYS_ENABLED,
158 .enable = &omap1_clk_enable_generic,
159 .disable = &omap1_clk_disable_generic,
160}; 151};
161 152
162static struct clk ck_dpll1 = { 153static struct clk ck_dpll1 = {
163 .name = "ck_dpll1", 154 .name = "ck_dpll1",
155 .ops = &clkops_generic,
164 .parent = &ck_ref, 156 .parent = &ck_ref,
165 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 157 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
166 CLOCK_IN_OMAP310 | RATE_PROPAGATES | ALWAYS_ENABLED, 158 CLOCK_IN_OMAP310 | RATE_PROPAGATES | ALWAYS_ENABLED,
167 .enable = &omap1_clk_enable_generic,
168 .disable = &omap1_clk_disable_generic,
169}; 159};
170 160
171static struct arm_idlect1_clk ck_dpll1out = { 161static struct arm_idlect1_clk ck_dpll1out = {
172 .clk = { 162 .clk = {
173 .name = "ck_dpll1out", 163 .name = "ck_dpll1out",
164 .ops = &clkops_generic,
174 .parent = &ck_dpll1, 165 .parent = &ck_dpll1,
175 .flags = CLOCK_IN_OMAP16XX | CLOCK_IDLE_CONTROL | 166 .flags = CLOCK_IN_OMAP16XX | CLOCK_IDLE_CONTROL |
176 ENABLE_REG_32BIT | RATE_PROPAGATES, 167 ENABLE_REG_32BIT | RATE_PROPAGATES,
177 .enable_reg = (void __iomem *)ARM_IDLECT2, 168 .enable_reg = (void __iomem *)ARM_IDLECT2,
178 .enable_bit = EN_CKOUT_ARM, 169 .enable_bit = EN_CKOUT_ARM,
179 .recalc = &followparent_recalc, 170 .recalc = &followparent_recalc,
180 .enable = &omap1_clk_enable_generic,
181 .disable = &omap1_clk_disable_generic,
182 }, 171 },
183 .idlect_shift = 12, 172 .idlect_shift = 12,
184}; 173};
185 174
186static struct clk sossi_ck = { 175static struct clk sossi_ck = {
187 .name = "ck_sossi", 176 .name = "ck_sossi",
177 .ops = &clkops_generic,
188 .parent = &ck_dpll1out.clk, 178 .parent = &ck_dpll1out.clk,
189 .flags = CLOCK_IN_OMAP16XX | CLOCK_NO_IDLE_PARENT | 179 .flags = CLOCK_IN_OMAP16XX | CLOCK_NO_IDLE_PARENT |
190 ENABLE_REG_32BIT, 180 ENABLE_REG_32BIT,
@@ -192,25 +182,23 @@ static struct clk sossi_ck = {
192 .enable_bit = 16, 182 .enable_bit = 16,
193 .recalc = &omap1_sossi_recalc, 183 .recalc = &omap1_sossi_recalc,
194 .set_rate = &omap1_set_sossi_rate, 184 .set_rate = &omap1_set_sossi_rate,
195 .enable = &omap1_clk_enable_generic,
196 .disable = &omap1_clk_disable_generic,
197}; 185};
198 186
199static struct clk arm_ck = { 187static struct clk arm_ck = {
200 .name = "arm_ck", 188 .name = "arm_ck",
189 .ops = &clkops_generic,
201 .parent = &ck_dpll1, 190 .parent = &ck_dpll1,
202 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 191 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
203 CLOCK_IN_OMAP310 | RATE_CKCTL | RATE_PROPAGATES | 192 CLOCK_IN_OMAP310 | RATE_CKCTL | RATE_PROPAGATES |
204 ALWAYS_ENABLED, 193 ALWAYS_ENABLED,
205 .rate_offset = CKCTL_ARMDIV_OFFSET, 194 .rate_offset = CKCTL_ARMDIV_OFFSET,
206 .recalc = &omap1_ckctl_recalc, 195 .recalc = &omap1_ckctl_recalc,
207 .enable = &omap1_clk_enable_generic,
208 .disable = &omap1_clk_disable_generic,
209}; 196};
210 197
211static struct arm_idlect1_clk armper_ck = { 198static struct arm_idlect1_clk armper_ck = {
212 .clk = { 199 .clk = {
213 .name = "armper_ck", 200 .name = "armper_ck",
201 .ops = &clkops_generic,
214 .parent = &ck_dpll1, 202 .parent = &ck_dpll1,
215 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 203 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
216 CLOCK_IN_OMAP310 | RATE_CKCTL | 204 CLOCK_IN_OMAP310 | RATE_CKCTL |
@@ -219,34 +207,30 @@ static struct arm_idlect1_clk armper_ck = {
219 .enable_bit = EN_PERCK, 207 .enable_bit = EN_PERCK,
220 .rate_offset = CKCTL_PERDIV_OFFSET, 208 .rate_offset = CKCTL_PERDIV_OFFSET,
221 .recalc = &omap1_ckctl_recalc, 209 .recalc = &omap1_ckctl_recalc,
222 .enable = &omap1_clk_enable_generic,
223 .disable = &omap1_clk_disable_generic,
224 }, 210 },
225 .idlect_shift = 2, 211 .idlect_shift = 2,
226}; 212};
227 213
228static struct clk arm_gpio_ck = { 214static struct clk arm_gpio_ck = {
229 .name = "arm_gpio_ck", 215 .name = "arm_gpio_ck",
216 .ops = &clkops_generic,
230 .parent = &ck_dpll1, 217 .parent = &ck_dpll1,
231 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310, 218 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310,
232 .enable_reg = (void __iomem *)ARM_IDLECT2, 219 .enable_reg = (void __iomem *)ARM_IDLECT2,
233 .enable_bit = EN_GPIOCK, 220 .enable_bit = EN_GPIOCK,
234 .recalc = &followparent_recalc, 221 .recalc = &followparent_recalc,
235 .enable = &omap1_clk_enable_generic,
236 .disable = &omap1_clk_disable_generic,
237}; 222};
238 223
239static struct arm_idlect1_clk armxor_ck = { 224static struct arm_idlect1_clk armxor_ck = {
240 .clk = { 225 .clk = {
241 .name = "armxor_ck", 226 .name = "armxor_ck",
227 .ops = &clkops_generic,
242 .parent = &ck_ref, 228 .parent = &ck_ref,
243 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 229 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
244 CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL, 230 CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL,
245 .enable_reg = (void __iomem *)ARM_IDLECT2, 231 .enable_reg = (void __iomem *)ARM_IDLECT2,
246 .enable_bit = EN_XORPCK, 232 .enable_bit = EN_XORPCK,
247 .recalc = &followparent_recalc, 233 .recalc = &followparent_recalc,
248 .enable = &omap1_clk_enable_generic,
249 .disable = &omap1_clk_disable_generic,
250 }, 234 },
251 .idlect_shift = 1, 235 .idlect_shift = 1,
252}; 236};
@@ -254,14 +238,13 @@ static struct arm_idlect1_clk armxor_ck = {
254static struct arm_idlect1_clk armtim_ck = { 238static struct arm_idlect1_clk armtim_ck = {
255 .clk = { 239 .clk = {
256 .name = "armtim_ck", 240 .name = "armtim_ck",
241 .ops = &clkops_generic,
257 .parent = &ck_ref, 242 .parent = &ck_ref,
258 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 243 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
259 CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL, 244 CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL,
260 .enable_reg = (void __iomem *)ARM_IDLECT2, 245 .enable_reg = (void __iomem *)ARM_IDLECT2,
261 .enable_bit = EN_TIMCK, 246 .enable_bit = EN_TIMCK,
262 .recalc = &followparent_recalc, 247 .recalc = &followparent_recalc,
263 .enable = &omap1_clk_enable_generic,
264 .disable = &omap1_clk_disable_generic,
265 }, 248 },
266 .idlect_shift = 9, 249 .idlect_shift = 9,
267}; 250};
@@ -269,20 +252,20 @@ static struct arm_idlect1_clk armtim_ck = {
269static struct arm_idlect1_clk armwdt_ck = { 252static struct arm_idlect1_clk armwdt_ck = {
270 .clk = { 253 .clk = {
271 .name = "armwdt_ck", 254 .name = "armwdt_ck",
255 .ops = &clkops_generic,
272 .parent = &ck_ref, 256 .parent = &ck_ref,
273 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 257 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
274 CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL, 258 CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL,
275 .enable_reg = (void __iomem *)ARM_IDLECT2, 259 .enable_reg = (void __iomem *)ARM_IDLECT2,
276 .enable_bit = EN_WDTCK, 260 .enable_bit = EN_WDTCK,
277 .recalc = &omap1_watchdog_recalc, 261 .recalc = &omap1_watchdog_recalc,
278 .enable = &omap1_clk_enable_generic,
279 .disable = &omap1_clk_disable_generic,
280 }, 262 },
281 .idlect_shift = 0, 263 .idlect_shift = 0,
282}; 264};
283 265
284static struct clk arminth_ck16xx = { 266static struct clk arminth_ck16xx = {
285 .name = "arminth_ck", 267 .name = "arminth_ck",
268 .ops = &clkops_generic,
286 .parent = &arm_ck, 269 .parent = &arm_ck,
287 .flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED, 270 .flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
288 .recalc = &followparent_recalc, 271 .recalc = &followparent_recalc,
@@ -291,12 +274,11 @@ static struct clk arminth_ck16xx = {
291 * 274 *
292 * 1510 version is in TC clocks. 275 * 1510 version is in TC clocks.
293 */ 276 */
294 .enable = &omap1_clk_enable_generic,
295 .disable = &omap1_clk_disable_generic,
296}; 277};
297 278
298static struct clk dsp_ck = { 279static struct clk dsp_ck = {
299 .name = "dsp_ck", 280 .name = "dsp_ck",
281 .ops = &clkops_generic,
300 .parent = &ck_dpll1, 282 .parent = &ck_dpll1,
301 .flags = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 283 .flags = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
302 RATE_CKCTL, 284 RATE_CKCTL,
@@ -304,23 +286,21 @@ static struct clk dsp_ck = {
304 .enable_bit = EN_DSPCK, 286 .enable_bit = EN_DSPCK,
305 .rate_offset = CKCTL_DSPDIV_OFFSET, 287 .rate_offset = CKCTL_DSPDIV_OFFSET,
306 .recalc = &omap1_ckctl_recalc, 288 .recalc = &omap1_ckctl_recalc,
307 .enable = &omap1_clk_enable_generic,
308 .disable = &omap1_clk_disable_generic,
309}; 289};
310 290
311static struct clk dspmmu_ck = { 291static struct clk dspmmu_ck = {
312 .name = "dspmmu_ck", 292 .name = "dspmmu_ck",
293 .ops = &clkops_generic,
313 .parent = &ck_dpll1, 294 .parent = &ck_dpll1,
314 .flags = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 295 .flags = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
315 RATE_CKCTL | ALWAYS_ENABLED, 296 RATE_CKCTL | ALWAYS_ENABLED,
316 .rate_offset = CKCTL_DSPMMUDIV_OFFSET, 297 .rate_offset = CKCTL_DSPMMUDIV_OFFSET,
317 .recalc = &omap1_ckctl_recalc, 298 .recalc = &omap1_ckctl_recalc,
318 .enable = &omap1_clk_enable_generic,
319 .disable = &omap1_clk_disable_generic,
320}; 299};
321 300
322static struct clk dspper_ck = { 301static struct clk dspper_ck = {
323 .name = "dspper_ck", 302 .name = "dspper_ck",
303 .ops = &clkops_dspck,
324 .parent = &ck_dpll1, 304 .parent = &ck_dpll1,
325 .flags = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 305 .flags = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
326 RATE_CKCTL | VIRTUAL_IO_ADDRESS, 306 RATE_CKCTL | VIRTUAL_IO_ADDRESS,
@@ -329,38 +309,35 @@ static struct clk dspper_ck = {
329 .rate_offset = CKCTL_PERDIV_OFFSET, 309 .rate_offset = CKCTL_PERDIV_OFFSET,
330 .recalc = &omap1_ckctl_recalc_dsp_domain, 310 .recalc = &omap1_ckctl_recalc_dsp_domain,
331 .set_rate = &omap1_clk_set_rate_dsp_domain, 311 .set_rate = &omap1_clk_set_rate_dsp_domain,
332 .enable = &omap1_clk_enable_dsp_domain,
333 .disable = &omap1_clk_disable_dsp_domain,
334}; 312};
335 313
336static struct clk dspxor_ck = { 314static struct clk dspxor_ck = {
337 .name = "dspxor_ck", 315 .name = "dspxor_ck",
316 .ops = &clkops_dspck,
338 .parent = &ck_ref, 317 .parent = &ck_ref,
339 .flags = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 318 .flags = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
340 VIRTUAL_IO_ADDRESS, 319 VIRTUAL_IO_ADDRESS,
341 .enable_reg = DSP_IDLECT2, 320 .enable_reg = DSP_IDLECT2,
342 .enable_bit = EN_XORPCK, 321 .enable_bit = EN_XORPCK,
343 .recalc = &followparent_recalc, 322 .recalc = &followparent_recalc,
344 .enable = &omap1_clk_enable_dsp_domain,
345 .disable = &omap1_clk_disable_dsp_domain,
346}; 323};
347 324
348static struct clk dsptim_ck = { 325static struct clk dsptim_ck = {
349 .name = "dsptim_ck", 326 .name = "dsptim_ck",
327 .ops = &clkops_dspck,
350 .parent = &ck_ref, 328 .parent = &ck_ref,
351 .flags = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 329 .flags = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
352 VIRTUAL_IO_ADDRESS, 330 VIRTUAL_IO_ADDRESS,
353 .enable_reg = DSP_IDLECT2, 331 .enable_reg = DSP_IDLECT2,
354 .enable_bit = EN_DSPTIMCK, 332 .enable_bit = EN_DSPTIMCK,
355 .recalc = &followparent_recalc, 333 .recalc = &followparent_recalc,
356 .enable = &omap1_clk_enable_dsp_domain,
357 .disable = &omap1_clk_disable_dsp_domain,
358}; 334};
359 335
360/* Tie ARM_IDLECT1:IDLIF_ARM to this logical clock structure */ 336/* Tie ARM_IDLECT1:IDLIF_ARM to this logical clock structure */
361static struct arm_idlect1_clk tc_ck = { 337static struct arm_idlect1_clk tc_ck = {
362 .clk = { 338 .clk = {
363 .name = "tc_ck", 339 .name = "tc_ck",
340 .ops = &clkops_generic,
364 .parent = &ck_dpll1, 341 .parent = &ck_dpll1,
365 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 342 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
366 CLOCK_IN_OMAP730 | CLOCK_IN_OMAP310 | 343 CLOCK_IN_OMAP730 | CLOCK_IN_OMAP310 |
@@ -368,14 +345,13 @@ static struct arm_idlect1_clk tc_ck = {
368 ALWAYS_ENABLED | CLOCK_IDLE_CONTROL, 345 ALWAYS_ENABLED | CLOCK_IDLE_CONTROL,
369 .rate_offset = CKCTL_TCDIV_OFFSET, 346 .rate_offset = CKCTL_TCDIV_OFFSET,
370 .recalc = &omap1_ckctl_recalc, 347 .recalc = &omap1_ckctl_recalc,
371 .enable = &omap1_clk_enable_generic,
372 .disable = &omap1_clk_disable_generic,
373 }, 348 },
374 .idlect_shift = 6, 349 .idlect_shift = 6,
375}; 350};
376 351
377static struct clk arminth_ck1510 = { 352static struct clk arminth_ck1510 = {
378 .name = "arminth_ck", 353 .name = "arminth_ck",
354 .ops = &clkops_generic,
379 .parent = &tc_ck.clk, 355 .parent = &tc_ck.clk,
380 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | 356 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
381 ALWAYS_ENABLED, 357 ALWAYS_ENABLED,
@@ -384,86 +360,77 @@ static struct clk arminth_ck1510 = {
384 * 360 *
385 * 16xx version is in MPU clocks. 361 * 16xx version is in MPU clocks.
386 */ 362 */
387 .enable = &omap1_clk_enable_generic,
388 .disable = &omap1_clk_disable_generic,
389}; 363};
390 364
391static struct clk tipb_ck = { 365static struct clk tipb_ck = {
392 /* No-idle controlled by "tc_ck" */ 366 /* No-idle controlled by "tc_ck" */
393 .name = "tipb_ck", 367 .name = "tipb_ck",
368 .ops = &clkops_generic,
394 .parent = &tc_ck.clk, 369 .parent = &tc_ck.clk,
395 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | 370 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
396 ALWAYS_ENABLED, 371 ALWAYS_ENABLED,
397 .recalc = &followparent_recalc, 372 .recalc = &followparent_recalc,
398 .enable = &omap1_clk_enable_generic,
399 .disable = &omap1_clk_disable_generic,
400}; 373};
401 374
402static struct clk l3_ocpi_ck = { 375static struct clk l3_ocpi_ck = {
403 /* No-idle controlled by "tc_ck" */ 376 /* No-idle controlled by "tc_ck" */
404 .name = "l3_ocpi_ck", 377 .name = "l3_ocpi_ck",
378 .ops = &clkops_generic,
405 .parent = &tc_ck.clk, 379 .parent = &tc_ck.clk,
406 .flags = CLOCK_IN_OMAP16XX, 380 .flags = CLOCK_IN_OMAP16XX,
407 .enable_reg = (void __iomem *)ARM_IDLECT3, 381 .enable_reg = (void __iomem *)ARM_IDLECT3,
408 .enable_bit = EN_OCPI_CK, 382 .enable_bit = EN_OCPI_CK,
409 .recalc = &followparent_recalc, 383 .recalc = &followparent_recalc,
410 .enable = &omap1_clk_enable_generic,
411 .disable = &omap1_clk_disable_generic,
412}; 384};
413 385
414static struct clk tc1_ck = { 386static struct clk tc1_ck = {
415 .name = "tc1_ck", 387 .name = "tc1_ck",
388 .ops = &clkops_generic,
416 .parent = &tc_ck.clk, 389 .parent = &tc_ck.clk,
417 .flags = CLOCK_IN_OMAP16XX, 390 .flags = CLOCK_IN_OMAP16XX,
418 .enable_reg = (void __iomem *)ARM_IDLECT3, 391 .enable_reg = (void __iomem *)ARM_IDLECT3,
419 .enable_bit = EN_TC1_CK, 392 .enable_bit = EN_TC1_CK,
420 .recalc = &followparent_recalc, 393 .recalc = &followparent_recalc,
421 .enable = &omap1_clk_enable_generic,
422 .disable = &omap1_clk_disable_generic,
423}; 394};
424 395
425static struct clk tc2_ck = { 396static struct clk tc2_ck = {
426 .name = "tc2_ck", 397 .name = "tc2_ck",
398 .ops = &clkops_generic,
427 .parent = &tc_ck.clk, 399 .parent = &tc_ck.clk,
428 .flags = CLOCK_IN_OMAP16XX, 400 .flags = CLOCK_IN_OMAP16XX,
429 .enable_reg = (void __iomem *)ARM_IDLECT3, 401 .enable_reg = (void __iomem *)ARM_IDLECT3,
430 .enable_bit = EN_TC2_CK, 402 .enable_bit = EN_TC2_CK,
431 .recalc = &followparent_recalc, 403 .recalc = &followparent_recalc,
432 .enable = &omap1_clk_enable_generic,
433 .disable = &omap1_clk_disable_generic,
434}; 404};
435 405
436static struct clk dma_ck = { 406static struct clk dma_ck = {
437 /* No-idle controlled by "tc_ck" */ 407 /* No-idle controlled by "tc_ck" */
438 .name = "dma_ck", 408 .name = "dma_ck",
409 .ops = &clkops_generic,
439 .parent = &tc_ck.clk, 410 .parent = &tc_ck.clk,
440 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 411 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
441 CLOCK_IN_OMAP310 | ALWAYS_ENABLED, 412 CLOCK_IN_OMAP310 | ALWAYS_ENABLED,
442 .recalc = &followparent_recalc, 413 .recalc = &followparent_recalc,
443 .enable = &omap1_clk_enable_generic,
444 .disable = &omap1_clk_disable_generic,
445}; 414};
446 415
447static struct clk dma_lcdfree_ck = { 416static struct clk dma_lcdfree_ck = {
448 .name = "dma_lcdfree_ck", 417 .name = "dma_lcdfree_ck",
418 .ops = &clkops_generic,
449 .parent = &tc_ck.clk, 419 .parent = &tc_ck.clk,
450 .flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED, 420 .flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
451 .recalc = &followparent_recalc, 421 .recalc = &followparent_recalc,
452 .enable = &omap1_clk_enable_generic,
453 .disable = &omap1_clk_disable_generic,
454}; 422};
455 423
456static struct arm_idlect1_clk api_ck = { 424static struct arm_idlect1_clk api_ck = {
457 .clk = { 425 .clk = {
458 .name = "api_ck", 426 .name = "api_ck",
427 .ops = &clkops_generic,
459 .parent = &tc_ck.clk, 428 .parent = &tc_ck.clk,
460 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 429 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
461 CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL, 430 CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL,
462 .enable_reg = (void __iomem *)ARM_IDLECT2, 431 .enable_reg = (void __iomem *)ARM_IDLECT2,
463 .enable_bit = EN_APICK, 432 .enable_bit = EN_APICK,
464 .recalc = &followparent_recalc, 433 .recalc = &followparent_recalc,
465 .enable = &omap1_clk_enable_generic,
466 .disable = &omap1_clk_disable_generic,
467 }, 434 },
468 .idlect_shift = 8, 435 .idlect_shift = 8,
469}; 436};
@@ -471,51 +438,48 @@ static struct arm_idlect1_clk api_ck = {
471static struct arm_idlect1_clk lb_ck = { 438static struct arm_idlect1_clk lb_ck = {
472 .clk = { 439 .clk = {
473 .name = "lb_ck", 440 .name = "lb_ck",
441 .ops = &clkops_generic,
474 .parent = &tc_ck.clk, 442 .parent = &tc_ck.clk,
475 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | 443 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
476 CLOCK_IDLE_CONTROL, 444 CLOCK_IDLE_CONTROL,
477 .enable_reg = (void __iomem *)ARM_IDLECT2, 445 .enable_reg = (void __iomem *)ARM_IDLECT2,
478 .enable_bit = EN_LBCK, 446 .enable_bit = EN_LBCK,
479 .recalc = &followparent_recalc, 447 .recalc = &followparent_recalc,
480 .enable = &omap1_clk_enable_generic,
481 .disable = &omap1_clk_disable_generic,
482 }, 448 },
483 .idlect_shift = 4, 449 .idlect_shift = 4,
484}; 450};
485 451
486static struct clk rhea1_ck = { 452static struct clk rhea1_ck = {
487 .name = "rhea1_ck", 453 .name = "rhea1_ck",
454 .ops = &clkops_generic,
488 .parent = &tc_ck.clk, 455 .parent = &tc_ck.clk,
489 .flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED, 456 .flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
490 .recalc = &followparent_recalc, 457 .recalc = &followparent_recalc,
491 .enable = &omap1_clk_enable_generic,
492 .disable = &omap1_clk_disable_generic,
493}; 458};
494 459
495static struct clk rhea2_ck = { 460static struct clk rhea2_ck = {
496 .name = "rhea2_ck", 461 .name = "rhea2_ck",
462 .ops = &clkops_generic,
497 .parent = &tc_ck.clk, 463 .parent = &tc_ck.clk,
498 .flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED, 464 .flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
499 .recalc = &followparent_recalc, 465 .recalc = &followparent_recalc,
500 .enable = &omap1_clk_enable_generic,
501 .disable = &omap1_clk_disable_generic,
502}; 466};
503 467
504static struct clk lcd_ck_16xx = { 468static struct clk lcd_ck_16xx = {
505 .name = "lcd_ck", 469 .name = "lcd_ck",
470 .ops = &clkops_generic,
506 .parent = &ck_dpll1, 471 .parent = &ck_dpll1,
507 .flags = CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP730 | RATE_CKCTL, 472 .flags = CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP730 | RATE_CKCTL,
508 .enable_reg = (void __iomem *)ARM_IDLECT2, 473 .enable_reg = (void __iomem *)ARM_IDLECT2,
509 .enable_bit = EN_LCDCK, 474 .enable_bit = EN_LCDCK,
510 .rate_offset = CKCTL_LCDDIV_OFFSET, 475 .rate_offset = CKCTL_LCDDIV_OFFSET,
511 .recalc = &omap1_ckctl_recalc, 476 .recalc = &omap1_ckctl_recalc,
512 .enable = &omap1_clk_enable_generic,
513 .disable = &omap1_clk_disable_generic,
514}; 477};
515 478
516static struct arm_idlect1_clk lcd_ck_1510 = { 479static struct arm_idlect1_clk lcd_ck_1510 = {
517 .clk = { 480 .clk = {
518 .name = "lcd_ck", 481 .name = "lcd_ck",
482 .ops = &clkops_generic,
519 .parent = &ck_dpll1, 483 .parent = &ck_dpll1,
520 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | 484 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
521 RATE_CKCTL | CLOCK_IDLE_CONTROL, 485 RATE_CKCTL | CLOCK_IDLE_CONTROL,
@@ -523,14 +487,13 @@ static struct arm_idlect1_clk lcd_ck_1510 = {
523 .enable_bit = EN_LCDCK, 487 .enable_bit = EN_LCDCK,
524 .rate_offset = CKCTL_LCDDIV_OFFSET, 488 .rate_offset = CKCTL_LCDDIV_OFFSET,
525 .recalc = &omap1_ckctl_recalc, 489 .recalc = &omap1_ckctl_recalc,
526 .enable = &omap1_clk_enable_generic,
527 .disable = &omap1_clk_disable_generic,
528 }, 490 },
529 .idlect_shift = 3, 491 .idlect_shift = 3,
530}; 492};
531 493
532static struct clk uart1_1510 = { 494static struct clk uart1_1510 = {
533 .name = "uart1_ck", 495 .name = "uart1_ck",
496 .ops = &clkops_generic,
534 /* Direct from ULPD, no real parent */ 497 /* Direct from ULPD, no real parent */
535 .parent = &armper_ck.clk, 498 .parent = &armper_ck.clk,
536 .rate = 12000000, 499 .rate = 12000000,
@@ -541,13 +504,12 @@ static struct clk uart1_1510 = {
541 .enable_bit = 29, /* Chooses between 12MHz and 48MHz */ 504 .enable_bit = 29, /* Chooses between 12MHz and 48MHz */
542 .set_rate = &omap1_set_uart_rate, 505 .set_rate = &omap1_set_uart_rate,
543 .recalc = &omap1_uart_recalc, 506 .recalc = &omap1_uart_recalc,
544 .enable = &omap1_clk_enable_generic,
545 .disable = &omap1_clk_disable_generic,
546}; 507};
547 508
548static struct uart_clk uart1_16xx = { 509static struct uart_clk uart1_16xx = {
549 .clk = { 510 .clk = {
550 .name = "uart1_ck", 511 .name = "uart1_ck",
512 .ops = &clkops_uart,
551 /* Direct from ULPD, no real parent */ 513 /* Direct from ULPD, no real parent */
552 .parent = &armper_ck.clk, 514 .parent = &armper_ck.clk,
553 .rate = 48000000, 515 .rate = 48000000,
@@ -555,14 +517,13 @@ static struct uart_clk uart1_16xx = {
555 ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT, 517 ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
556 .enable_reg = (void __iomem *)MOD_CONF_CTRL_0, 518 .enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
557 .enable_bit = 29, 519 .enable_bit = 29,
558 .enable = &omap1_clk_enable_uart_functional,
559 .disable = &omap1_clk_disable_uart_functional,
560 }, 520 },
561 .sysc_addr = 0xfffb0054, 521 .sysc_addr = 0xfffb0054,
562}; 522};
563 523
564static struct clk uart2_ck = { 524static struct clk uart2_ck = {
565 .name = "uart2_ck", 525 .name = "uart2_ck",
526 .ops = &clkops_generic,
566 /* Direct from ULPD, no real parent */ 527 /* Direct from ULPD, no real parent */
567 .parent = &armper_ck.clk, 528 .parent = &armper_ck.clk,
568 .rate = 12000000, 529 .rate = 12000000,
@@ -573,12 +534,11 @@ static struct clk uart2_ck = {
573 .enable_bit = 30, /* Chooses between 12MHz and 48MHz */ 534 .enable_bit = 30, /* Chooses between 12MHz and 48MHz */
574 .set_rate = &omap1_set_uart_rate, 535 .set_rate = &omap1_set_uart_rate,
575 .recalc = &omap1_uart_recalc, 536 .recalc = &omap1_uart_recalc,
576 .enable = &omap1_clk_enable_generic,
577 .disable = &omap1_clk_disable_generic,
578}; 537};
579 538
580static struct clk uart3_1510 = { 539static struct clk uart3_1510 = {
581 .name = "uart3_ck", 540 .name = "uart3_ck",
541 .ops = &clkops_generic,
582 /* Direct from ULPD, no real parent */ 542 /* Direct from ULPD, no real parent */
583 .parent = &armper_ck.clk, 543 .parent = &armper_ck.clk,
584 .rate = 12000000, 544 .rate = 12000000,
@@ -589,13 +549,12 @@ static struct clk uart3_1510 = {
589 .enable_bit = 31, /* Chooses between 12MHz and 48MHz */ 549 .enable_bit = 31, /* Chooses between 12MHz and 48MHz */
590 .set_rate = &omap1_set_uart_rate, 550 .set_rate = &omap1_set_uart_rate,
591 .recalc = &omap1_uart_recalc, 551 .recalc = &omap1_uart_recalc,
592 .enable = &omap1_clk_enable_generic,
593 .disable = &omap1_clk_disable_generic,
594}; 552};
595 553
596static struct uart_clk uart3_16xx = { 554static struct uart_clk uart3_16xx = {
597 .clk = { 555 .clk = {
598 .name = "uart3_ck", 556 .name = "uart3_ck",
557 .ops = &clkops_uart,
599 /* Direct from ULPD, no real parent */ 558 /* Direct from ULPD, no real parent */
600 .parent = &armper_ck.clk, 559 .parent = &armper_ck.clk,
601 .rate = 48000000, 560 .rate = 48000000,
@@ -603,38 +562,35 @@ static struct uart_clk uart3_16xx = {
603 ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT, 562 ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
604 .enable_reg = (void __iomem *)MOD_CONF_CTRL_0, 563 .enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
605 .enable_bit = 31, 564 .enable_bit = 31,
606 .enable = &omap1_clk_enable_uart_functional,
607 .disable = &omap1_clk_disable_uart_functional,
608 }, 565 },
609 .sysc_addr = 0xfffb9854, 566 .sysc_addr = 0xfffb9854,
610}; 567};
611 568
612static struct clk usb_clko = { /* 6 MHz output on W4_USB_CLKO */ 569static struct clk usb_clko = { /* 6 MHz output on W4_USB_CLKO */
613 .name = "usb_clko", 570 .name = "usb_clko",
571 .ops = &clkops_generic,
614 /* Direct from ULPD, no parent */ 572 /* Direct from ULPD, no parent */
615 .rate = 6000000, 573 .rate = 6000000,
616 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 574 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
617 CLOCK_IN_OMAP310 | RATE_FIXED | ENABLE_REG_32BIT, 575 CLOCK_IN_OMAP310 | RATE_FIXED | ENABLE_REG_32BIT,
618 .enable_reg = (void __iomem *)ULPD_CLOCK_CTRL, 576 .enable_reg = (void __iomem *)ULPD_CLOCK_CTRL,
619 .enable_bit = USB_MCLK_EN_BIT, 577 .enable_bit = USB_MCLK_EN_BIT,
620 .enable = &omap1_clk_enable_generic,
621 .disable = &omap1_clk_disable_generic,
622}; 578};
623 579
624static struct clk usb_hhc_ck1510 = { 580static struct clk usb_hhc_ck1510 = {
625 .name = "usb_hhc_ck", 581 .name = "usb_hhc_ck",
582 .ops = &clkops_generic,
626 /* Direct from ULPD, no parent */ 583 /* Direct from ULPD, no parent */
627 .rate = 48000000, /* Actually 2 clocks, 12MHz and 48MHz */ 584 .rate = 48000000, /* Actually 2 clocks, 12MHz and 48MHz */
628 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | 585 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
629 RATE_FIXED | ENABLE_REG_32BIT, 586 RATE_FIXED | ENABLE_REG_32BIT,
630 .enable_reg = (void __iomem *)MOD_CONF_CTRL_0, 587 .enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
631 .enable_bit = USB_HOST_HHC_UHOST_EN, 588 .enable_bit = USB_HOST_HHC_UHOST_EN,
632 .enable = &omap1_clk_enable_generic,
633 .disable = &omap1_clk_disable_generic,
634}; 589};
635 590
636static struct clk usb_hhc_ck16xx = { 591static struct clk usb_hhc_ck16xx = {
637 .name = "usb_hhc_ck", 592 .name = "usb_hhc_ck",
593 .ops = &clkops_generic,
638 /* Direct from ULPD, no parent */ 594 /* Direct from ULPD, no parent */
639 .rate = 48000000, 595 .rate = 48000000,
640 /* OTG_SYSCON_2.OTG_PADEN == 0 (not 1510-compatible) */ 596 /* OTG_SYSCON_2.OTG_PADEN == 0 (not 1510-compatible) */
@@ -642,34 +598,31 @@ static struct clk usb_hhc_ck16xx = {
642 RATE_FIXED | ENABLE_REG_32BIT, 598 RATE_FIXED | ENABLE_REG_32BIT,
643 .enable_reg = (void __iomem *)OTG_BASE + 0x08 /* OTG_SYSCON_2 */, 599 .enable_reg = (void __iomem *)OTG_BASE + 0x08 /* OTG_SYSCON_2 */,
644 .enable_bit = 8 /* UHOST_EN */, 600 .enable_bit = 8 /* UHOST_EN */,
645 .enable = &omap1_clk_enable_generic,
646 .disable = &omap1_clk_disable_generic,
647}; 601};
648 602
649static struct clk usb_dc_ck = { 603static struct clk usb_dc_ck = {
650 .name = "usb_dc_ck", 604 .name = "usb_dc_ck",
605 .ops = &clkops_generic,
651 /* Direct from ULPD, no parent */ 606 /* Direct from ULPD, no parent */
652 .rate = 48000000, 607 .rate = 48000000,
653 .flags = CLOCK_IN_OMAP16XX | RATE_FIXED, 608 .flags = CLOCK_IN_OMAP16XX | RATE_FIXED,
654 .enable_reg = (void __iomem *)SOFT_REQ_REG, 609 .enable_reg = (void __iomem *)SOFT_REQ_REG,
655 .enable_bit = 4, 610 .enable_bit = 4,
656 .enable = &omap1_clk_enable_generic,
657 .disable = &omap1_clk_disable_generic,
658}; 611};
659 612
660static struct clk mclk_1510 = { 613static struct clk mclk_1510 = {
661 .name = "mclk", 614 .name = "mclk",
615 .ops = &clkops_generic,
662 /* Direct from ULPD, no parent. May be enabled by ext hardware. */ 616 /* Direct from ULPD, no parent. May be enabled by ext hardware. */
663 .rate = 12000000, 617 .rate = 12000000,
664 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | RATE_FIXED, 618 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | RATE_FIXED,
665 .enable_reg = (void __iomem *)SOFT_REQ_REG, 619 .enable_reg = (void __iomem *)SOFT_REQ_REG,
666 .enable_bit = 6, 620 .enable_bit = 6,
667 .enable = &omap1_clk_enable_generic,
668 .disable = &omap1_clk_disable_generic,
669}; 621};
670 622
671static struct clk mclk_16xx = { 623static struct clk mclk_16xx = {
672 .name = "mclk", 624 .name = "mclk",
625 .ops = &clkops_generic,
673 /* Direct from ULPD, no parent. May be enabled by ext hardware. */ 626 /* Direct from ULPD, no parent. May be enabled by ext hardware. */
674 .flags = CLOCK_IN_OMAP16XX, 627 .flags = CLOCK_IN_OMAP16XX,
675 .enable_reg = (void __iomem *)COM_CLK_DIV_CTRL_SEL, 628 .enable_reg = (void __iomem *)COM_CLK_DIV_CTRL_SEL,
@@ -677,21 +630,19 @@ static struct clk mclk_16xx = {
677 .set_rate = &omap1_set_ext_clk_rate, 630 .set_rate = &omap1_set_ext_clk_rate,
678 .round_rate = &omap1_round_ext_clk_rate, 631 .round_rate = &omap1_round_ext_clk_rate,
679 .init = &omap1_init_ext_clk, 632 .init = &omap1_init_ext_clk,
680 .enable = &omap1_clk_enable_generic,
681 .disable = &omap1_clk_disable_generic,
682}; 633};
683 634
684static struct clk bclk_1510 = { 635static struct clk bclk_1510 = {
685 .name = "bclk", 636 .name = "bclk",
637 .ops = &clkops_generic,
686 /* Direct from ULPD, no parent. May be enabled by ext hardware. */ 638 /* Direct from ULPD, no parent. May be enabled by ext hardware. */
687 .rate = 12000000, 639 .rate = 12000000,
688 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | RATE_FIXED, 640 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | RATE_FIXED,
689 .enable = &omap1_clk_enable_generic,
690 .disable = &omap1_clk_disable_generic,
691}; 641};
692 642
693static struct clk bclk_16xx = { 643static struct clk bclk_16xx = {
694 .name = "bclk", 644 .name = "bclk",
645 .ops = &clkops_generic,
695 /* Direct from ULPD, no parent. May be enabled by ext hardware. */ 646 /* Direct from ULPD, no parent. May be enabled by ext hardware. */
696 .flags = CLOCK_IN_OMAP16XX, 647 .flags = CLOCK_IN_OMAP16XX,
697 .enable_reg = (void __iomem *)SWD_CLK_DIV_CTRL_SEL, 648 .enable_reg = (void __iomem *)SWD_CLK_DIV_CTRL_SEL,
@@ -699,12 +650,11 @@ static struct clk bclk_16xx = {
699 .set_rate = &omap1_set_ext_clk_rate, 650 .set_rate = &omap1_set_ext_clk_rate,
700 .round_rate = &omap1_round_ext_clk_rate, 651 .round_rate = &omap1_round_ext_clk_rate,
701 .init = &omap1_init_ext_clk, 652 .init = &omap1_init_ext_clk,
702 .enable = &omap1_clk_enable_generic,
703 .disable = &omap1_clk_disable_generic,
704}; 653};
705 654
706static struct clk mmc1_ck = { 655static struct clk mmc1_ck = {
707 .name = "mmc_ck", 656 .name = "mmc_ck",
657 .ops = &clkops_generic,
708 /* Functional clock is direct from ULPD, interface clock is ARMPER */ 658 /* Functional clock is direct from ULPD, interface clock is ARMPER */
709 .parent = &armper_ck.clk, 659 .parent = &armper_ck.clk,
710 .rate = 48000000, 660 .rate = 48000000,
@@ -713,13 +663,12 @@ static struct clk mmc1_ck = {
713 CLOCK_NO_IDLE_PARENT, 663 CLOCK_NO_IDLE_PARENT,
714 .enable_reg = (void __iomem *)MOD_CONF_CTRL_0, 664 .enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
715 .enable_bit = 23, 665 .enable_bit = 23,
716 .enable = &omap1_clk_enable_generic,
717 .disable = &omap1_clk_disable_generic,
718}; 666};
719 667
720static struct clk mmc2_ck = { 668static struct clk mmc2_ck = {
721 .name = "mmc_ck", 669 .name = "mmc_ck",
722 .id = 1, 670 .id = 1,
671 .ops = &clkops_generic,
723 /* Functional clock is direct from ULPD, interface clock is ARMPER */ 672 /* Functional clock is direct from ULPD, interface clock is ARMPER */
724 .parent = &armper_ck.clk, 673 .parent = &armper_ck.clk,
725 .rate = 48000000, 674 .rate = 48000000,
@@ -727,20 +676,17 @@ static struct clk mmc2_ck = {
727 RATE_FIXED | ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT, 676 RATE_FIXED | ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
728 .enable_reg = (void __iomem *)MOD_CONF_CTRL_0, 677 .enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
729 .enable_bit = 20, 678 .enable_bit = 20,
730 .enable = &omap1_clk_enable_generic,
731 .disable = &omap1_clk_disable_generic,
732}; 679};
733 680
734static struct clk virtual_ck_mpu = { 681static struct clk virtual_ck_mpu = {
735 .name = "mpu", 682 .name = "mpu",
683 .ops = &clkops_generic,
736 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 684 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
737 CLOCK_IN_OMAP310 | ALWAYS_ENABLED, 685 CLOCK_IN_OMAP310 | ALWAYS_ENABLED,
738 .parent = &arm_ck, /* Is smarter alias for */ 686 .parent = &arm_ck, /* Is smarter alias for */
739 .recalc = &followparent_recalc, 687 .recalc = &followparent_recalc,
740 .set_rate = &omap1_select_table_rate, 688 .set_rate = &omap1_select_table_rate,
741 .round_rate = &omap1_round_to_table_rate, 689 .round_rate = &omap1_round_to_table_rate,
742 .enable = &omap1_clk_enable_generic,
743 .disable = &omap1_clk_disable_generic,
744}; 690};
745 691
746/* virtual functional clock domain for I2C. Just for making sure that ARMXOR_CK 692/* virtual functional clock domain for I2C. Just for making sure that ARMXOR_CK
@@ -748,23 +694,21 @@ remains active during MPU idle whenever this is enabled */
748static struct clk i2c_fck = { 694static struct clk i2c_fck = {
749 .name = "i2c_fck", 695 .name = "i2c_fck",
750 .id = 1, 696 .id = 1,
697 .ops = &clkops_generic,
751 .flags = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 698 .flags = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
752 CLOCK_NO_IDLE_PARENT | ALWAYS_ENABLED, 699 CLOCK_NO_IDLE_PARENT | ALWAYS_ENABLED,
753 .parent = &armxor_ck.clk, 700 .parent = &armxor_ck.clk,
754 .recalc = &followparent_recalc, 701 .recalc = &followparent_recalc,
755 .enable = &omap1_clk_enable_generic,
756 .disable = &omap1_clk_disable_generic,
757}; 702};
758 703
759static struct clk i2c_ick = { 704static struct clk i2c_ick = {
760 .name = "i2c_ick", 705 .name = "i2c_ick",
761 .id = 1, 706 .id = 1,
707 .ops = &clkops_generic,
762 .flags = CLOCK_IN_OMAP16XX | CLOCK_NO_IDLE_PARENT | 708 .flags = CLOCK_IN_OMAP16XX | CLOCK_NO_IDLE_PARENT |
763 ALWAYS_ENABLED, 709 ALWAYS_ENABLED,
764 .parent = &armper_ck.clk, 710 .parent = &armper_ck.clk,
765 .recalc = &followparent_recalc, 711 .recalc = &followparent_recalc,
766 .enable = &omap1_clk_enable_generic,
767 .disable = &omap1_clk_disable_generic,
768}; 712};
769 713
770static struct clk * onchip_clks[] = { 714static struct clk * onchip_clks[] = {