arm: ep93xx: Add basic interrupt info
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / arm / mach-spear6xx / clock.c
blob88b748b5be80fb09807eb0ebaf5d7cff8d8212f4
1 /*
2 * arch/arm/mach-spear6xx/clock.c
4 * SPEAr6xx machines clock framework source file
6 * Copyright (C) 2009 ST Microelectronics
7 * Viresh Kumar<viresh.kumar@st.com>
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
14 #include <linux/init.h>
15 #include <linux/kernel.h>
16 #include <plat/clock.h>
17 #include <mach/misc_regs.h>
19 /* root clks */
20 /* 32 KHz oscillator clock */
21 static struct clk osc_32k_clk = {
22 .flags = ALWAYS_ENABLED,
23 .rate = 32000,
26 /* 30 MHz oscillator clock */
27 static struct clk osc_30m_clk = {
28 .flags = ALWAYS_ENABLED,
29 .rate = 30000000,
32 /* clock derived from 32 KHz osc clk */
33 /* rtc clock */
34 static struct clk rtc_clk = {
35 .pclk = &osc_32k_clk,
36 .en_reg = PERIP1_CLK_ENB,
37 .en_reg_bit = RTC_CLK_ENB,
38 .recalc = &follow_parent,
41 /* clock derived from 30 MHz osc clk */
42 /* pll masks structure */
43 static struct pll_clk_masks pll1_masks = {
44 .mode_mask = PLL_MODE_MASK,
45 .mode_shift = PLL_MODE_SHIFT,
46 .norm_fdbk_m_mask = PLL_NORM_FDBK_M_MASK,
47 .norm_fdbk_m_shift = PLL_NORM_FDBK_M_SHIFT,
48 .dith_fdbk_m_mask = PLL_DITH_FDBK_M_MASK,
49 .dith_fdbk_m_shift = PLL_DITH_FDBK_M_SHIFT,
50 .div_p_mask = PLL_DIV_P_MASK,
51 .div_p_shift = PLL_DIV_P_SHIFT,
52 .div_n_mask = PLL_DIV_N_MASK,
53 .div_n_shift = PLL_DIV_N_SHIFT,
56 /* pll1 configuration structure */
57 static struct pll_clk_config pll1_config = {
58 .mode_reg = PLL1_CTR,
59 .cfg_reg = PLL1_FRQ,
60 .masks = &pll1_masks,
63 /* pll rate configuration table, in ascending order of rates */
64 struct pll_rate_tbl pll_rtbl[] = {
65 {.mode = 0, .m = 0x85, .n = 0x0C, .p = 0x1}, /* 266 MHz */
66 {.mode = 0, .m = 0xA6, .n = 0x0C, .p = 0x1}, /* 332 MHz */
69 /* PLL1 clock */
70 static struct clk pll1_clk = {
71 .flags = ENABLED_ON_INIT,
72 .pclk = &osc_30m_clk,
73 .en_reg = PLL1_CTR,
74 .en_reg_bit = PLL_ENABLE,
75 .calc_rate = &pll_calc_rate,
76 .recalc = &pll_clk_recalc,
77 .set_rate = &pll_clk_set_rate,
78 .rate_config = {pll_rtbl, ARRAY_SIZE(pll_rtbl), 1},
79 .private_data = &pll1_config,
82 /* PLL3 48 MHz clock */
83 static struct clk pll3_48m_clk = {
84 .flags = ALWAYS_ENABLED,
85 .pclk = &osc_30m_clk,
86 .rate = 48000000,
89 /* watch dog timer clock */
90 static struct clk wdt_clk = {
91 .flags = ALWAYS_ENABLED,
92 .pclk = &osc_30m_clk,
93 .recalc = &follow_parent,
96 /* clock derived from pll1 clk */
97 /* cpu clock */
98 static struct clk cpu_clk = {
99 .flags = ALWAYS_ENABLED,
100 .pclk = &pll1_clk,
101 .recalc = &follow_parent,
104 /* ahb masks structure */
105 static struct bus_clk_masks ahb_masks = {
106 .mask = PLL_HCLK_RATIO_MASK,
107 .shift = PLL_HCLK_RATIO_SHIFT,
110 /* ahb configuration structure */
111 static struct bus_clk_config ahb_config = {
112 .reg = CORE_CLK_CFG,
113 .masks = &ahb_masks,
116 /* ahb rate configuration table, in ascending order of rates */
117 struct bus_rate_tbl bus_rtbl[] = {
118 {.div = 3}, /* == parent divided by 4 */
119 {.div = 2}, /* == parent divided by 3 */
120 {.div = 1}, /* == parent divided by 2 */
121 {.div = 0}, /* == parent divided by 1 */
124 /* ahb clock */
125 static struct clk ahb_clk = {
126 .flags = ALWAYS_ENABLED,
127 .pclk = &pll1_clk,
128 .calc_rate = &bus_calc_rate,
129 .recalc = &bus_clk_recalc,
130 .set_rate = &bus_clk_set_rate,
131 .rate_config = {bus_rtbl, ARRAY_SIZE(bus_rtbl), 2},
132 .private_data = &ahb_config,
135 /* auxiliary synthesizers masks */
136 static struct aux_clk_masks aux_masks = {
137 .eq_sel_mask = AUX_EQ_SEL_MASK,
138 .eq_sel_shift = AUX_EQ_SEL_SHIFT,
139 .eq1_mask = AUX_EQ1_SEL,
140 .eq2_mask = AUX_EQ2_SEL,
141 .xscale_sel_mask = AUX_XSCALE_MASK,
142 .xscale_sel_shift = AUX_XSCALE_SHIFT,
143 .yscale_sel_mask = AUX_YSCALE_MASK,
144 .yscale_sel_shift = AUX_YSCALE_SHIFT,
147 /* uart configurations */
148 static struct aux_clk_config uart_synth_config = {
149 .synth_reg = UART_CLK_SYNT,
150 .masks = &aux_masks,
153 /* aux rate configuration table, in ascending order of rates */
154 struct aux_rate_tbl aux_rtbl[] = {
155 /* For PLL1 = 332 MHz */
156 {.xscale = 1, .yscale = 8, .eq = 1}, /* 41.5 MHz */
157 {.xscale = 1, .yscale = 4, .eq = 1}, /* 83 MHz */
158 {.xscale = 1, .yscale = 2, .eq = 1}, /* 166 MHz */
161 /* uart synth clock */
162 static struct clk uart_synth_clk = {
163 .en_reg = UART_CLK_SYNT,
164 .en_reg_bit = AUX_SYNT_ENB,
165 .pclk = &pll1_clk,
166 .calc_rate = &aux_calc_rate,
167 .recalc = &aux_clk_recalc,
168 .set_rate = &aux_clk_set_rate,
169 .rate_config = {aux_rtbl, ARRAY_SIZE(aux_rtbl), 2},
170 .private_data = &uart_synth_config,
173 /* uart parents */
174 static struct pclk_info uart_pclk_info[] = {
176 .pclk = &uart_synth_clk,
177 .pclk_val = AUX_CLK_PLL1_VAL,
178 }, {
179 .pclk = &pll3_48m_clk,
180 .pclk_val = AUX_CLK_PLL3_VAL,
184 /* uart parent select structure */
185 static struct pclk_sel uart_pclk_sel = {
186 .pclk_info = uart_pclk_info,
187 .pclk_count = ARRAY_SIZE(uart_pclk_info),
188 .pclk_sel_reg = PERIP_CLK_CFG,
189 .pclk_sel_mask = UART_CLK_MASK,
192 /* uart0 clock */
193 static struct clk uart0_clk = {
194 .en_reg = PERIP1_CLK_ENB,
195 .en_reg_bit = UART0_CLK_ENB,
196 .pclk_sel = &uart_pclk_sel,
197 .pclk_sel_shift = UART_CLK_SHIFT,
198 .recalc = &follow_parent,
201 /* uart1 clock */
202 static struct clk uart1_clk = {
203 .en_reg = PERIP1_CLK_ENB,
204 .en_reg_bit = UART1_CLK_ENB,
205 .pclk_sel = &uart_pclk_sel,
206 .pclk_sel_shift = UART_CLK_SHIFT,
207 .recalc = &follow_parent,
210 /* firda configurations */
211 static struct aux_clk_config firda_synth_config = {
212 .synth_reg = FIRDA_CLK_SYNT,
213 .masks = &aux_masks,
216 /* firda synth clock */
217 static struct clk firda_synth_clk = {
218 .en_reg = FIRDA_CLK_SYNT,
219 .en_reg_bit = AUX_SYNT_ENB,
220 .pclk = &pll1_clk,
221 .calc_rate = &aux_calc_rate,
222 .recalc = &aux_clk_recalc,
223 .set_rate = &aux_clk_set_rate,
224 .rate_config = {aux_rtbl, ARRAY_SIZE(aux_rtbl), 2},
225 .private_data = &firda_synth_config,
228 /* firda parents */
229 static struct pclk_info firda_pclk_info[] = {
231 .pclk = &firda_synth_clk,
232 .pclk_val = AUX_CLK_PLL1_VAL,
233 }, {
234 .pclk = &pll3_48m_clk,
235 .pclk_val = AUX_CLK_PLL3_VAL,
239 /* firda parent select structure */
240 static struct pclk_sel firda_pclk_sel = {
241 .pclk_info = firda_pclk_info,
242 .pclk_count = ARRAY_SIZE(firda_pclk_info),
243 .pclk_sel_reg = PERIP_CLK_CFG,
244 .pclk_sel_mask = FIRDA_CLK_MASK,
247 /* firda clock */
248 static struct clk firda_clk = {
249 .en_reg = PERIP1_CLK_ENB,
250 .en_reg_bit = FIRDA_CLK_ENB,
251 .pclk_sel = &firda_pclk_sel,
252 .pclk_sel_shift = FIRDA_CLK_SHIFT,
253 .recalc = &follow_parent,
256 /* clcd configurations */
257 static struct aux_clk_config clcd_synth_config = {
258 .synth_reg = CLCD_CLK_SYNT,
259 .masks = &aux_masks,
262 /* firda synth clock */
263 static struct clk clcd_synth_clk = {
264 .en_reg = CLCD_CLK_SYNT,
265 .en_reg_bit = AUX_SYNT_ENB,
266 .pclk = &pll1_clk,
267 .calc_rate = &aux_calc_rate,
268 .recalc = &aux_clk_recalc,
269 .set_rate = &aux_clk_set_rate,
270 .rate_config = {aux_rtbl, ARRAY_SIZE(aux_rtbl), 2},
271 .private_data = &clcd_synth_config,
274 /* clcd parents */
275 static struct pclk_info clcd_pclk_info[] = {
277 .pclk = &clcd_synth_clk,
278 .pclk_val = AUX_CLK_PLL1_VAL,
279 }, {
280 .pclk = &pll3_48m_clk,
281 .pclk_val = AUX_CLK_PLL3_VAL,
285 /* clcd parent select structure */
286 static struct pclk_sel clcd_pclk_sel = {
287 .pclk_info = clcd_pclk_info,
288 .pclk_count = ARRAY_SIZE(clcd_pclk_info),
289 .pclk_sel_reg = PERIP_CLK_CFG,
290 .pclk_sel_mask = CLCD_CLK_MASK,
293 /* clcd clock */
294 static struct clk clcd_clk = {
295 .en_reg = PERIP1_CLK_ENB,
296 .en_reg_bit = CLCD_CLK_ENB,
297 .pclk_sel = &clcd_pclk_sel,
298 .pclk_sel_shift = CLCD_CLK_SHIFT,
299 .recalc = &follow_parent,
302 /* gpt synthesizer masks */
303 static struct gpt_clk_masks gpt_masks = {
304 .mscale_sel_mask = GPT_MSCALE_MASK,
305 .mscale_sel_shift = GPT_MSCALE_SHIFT,
306 .nscale_sel_mask = GPT_NSCALE_MASK,
307 .nscale_sel_shift = GPT_NSCALE_SHIFT,
310 /* gpt rate configuration table, in ascending order of rates */
311 struct gpt_rate_tbl gpt_rtbl[] = {
312 /* For pll1 = 332 MHz */
313 {.mscale = 4, .nscale = 0}, /* 41.5 MHz */
314 {.mscale = 2, .nscale = 0}, /* 55.3 MHz */
315 {.mscale = 1, .nscale = 0}, /* 83 MHz */
318 /* gpt0 synth clk config*/
319 static struct gpt_clk_config gpt0_synth_config = {
320 .synth_reg = PRSC1_CLK_CFG,
321 .masks = &gpt_masks,
324 /* gpt synth clock */
325 static struct clk gpt0_synth_clk = {
326 .flags = ALWAYS_ENABLED,
327 .pclk = &pll1_clk,
328 .calc_rate = &gpt_calc_rate,
329 .recalc = &gpt_clk_recalc,
330 .set_rate = &gpt_clk_set_rate,
331 .rate_config = {gpt_rtbl, ARRAY_SIZE(gpt_rtbl), 2},
332 .private_data = &gpt0_synth_config,
335 /* gpt parents */
336 static struct pclk_info gpt0_pclk_info[] = {
338 .pclk = &gpt0_synth_clk,
339 .pclk_val = AUX_CLK_PLL1_VAL,
340 }, {
341 .pclk = &pll3_48m_clk,
342 .pclk_val = AUX_CLK_PLL3_VAL,
346 /* gpt parent select structure */
347 static struct pclk_sel gpt0_pclk_sel = {
348 .pclk_info = gpt0_pclk_info,
349 .pclk_count = ARRAY_SIZE(gpt0_pclk_info),
350 .pclk_sel_reg = PERIP_CLK_CFG,
351 .pclk_sel_mask = GPT_CLK_MASK,
354 /* gpt0 ARM1 subsystem timer clock */
355 static struct clk gpt0_clk = {
356 .flags = ALWAYS_ENABLED,
357 .pclk_sel = &gpt0_pclk_sel,
358 .pclk_sel_shift = GPT0_CLK_SHIFT,
359 .recalc = &follow_parent,
363 /* Note: gpt0 and gpt1 share same parent clocks */
364 /* gpt parent select structure */
365 static struct pclk_sel gpt1_pclk_sel = {
366 .pclk_info = gpt0_pclk_info,
367 .pclk_count = ARRAY_SIZE(gpt0_pclk_info),
368 .pclk_sel_reg = PERIP_CLK_CFG,
369 .pclk_sel_mask = GPT_CLK_MASK,
372 /* gpt1 timer clock */
373 static struct clk gpt1_clk = {
374 .flags = ALWAYS_ENABLED,
375 .pclk_sel = &gpt1_pclk_sel,
376 .pclk_sel_shift = GPT1_CLK_SHIFT,
377 .recalc = &follow_parent,
380 /* gpt2 synth clk config*/
381 static struct gpt_clk_config gpt2_synth_config = {
382 .synth_reg = PRSC2_CLK_CFG,
383 .masks = &gpt_masks,
386 /* gpt synth clock */
387 static struct clk gpt2_synth_clk = {
388 .flags = ALWAYS_ENABLED,
389 .pclk = &pll1_clk,
390 .calc_rate = &gpt_calc_rate,
391 .recalc = &gpt_clk_recalc,
392 .set_rate = &gpt_clk_set_rate,
393 .rate_config = {gpt_rtbl, ARRAY_SIZE(gpt_rtbl), 2},
394 .private_data = &gpt2_synth_config,
397 /* gpt parents */
398 static struct pclk_info gpt2_pclk_info[] = {
400 .pclk = &gpt2_synth_clk,
401 .pclk_val = AUX_CLK_PLL1_VAL,
402 }, {
403 .pclk = &pll3_48m_clk,
404 .pclk_val = AUX_CLK_PLL3_VAL,
408 /* gpt parent select structure */
409 static struct pclk_sel gpt2_pclk_sel = {
410 .pclk_info = gpt2_pclk_info,
411 .pclk_count = ARRAY_SIZE(gpt2_pclk_info),
412 .pclk_sel_reg = PERIP_CLK_CFG,
413 .pclk_sel_mask = GPT_CLK_MASK,
416 /* gpt2 timer clock */
417 static struct clk gpt2_clk = {
418 .flags = ALWAYS_ENABLED,
419 .pclk_sel = &gpt2_pclk_sel,
420 .pclk_sel_shift = GPT2_CLK_SHIFT,
421 .recalc = &follow_parent,
424 /* gpt3 synth clk config*/
425 static struct gpt_clk_config gpt3_synth_config = {
426 .synth_reg = PRSC3_CLK_CFG,
427 .masks = &gpt_masks,
430 /* gpt synth clock */
431 static struct clk gpt3_synth_clk = {
432 .flags = ALWAYS_ENABLED,
433 .pclk = &pll1_clk,
434 .calc_rate = &gpt_calc_rate,
435 .recalc = &gpt_clk_recalc,
436 .set_rate = &gpt_clk_set_rate,
437 .rate_config = {gpt_rtbl, ARRAY_SIZE(gpt_rtbl), 2},
438 .private_data = &gpt3_synth_config,
441 /* gpt parents */
442 static struct pclk_info gpt3_pclk_info[] = {
444 .pclk = &gpt3_synth_clk,
445 .pclk_val = AUX_CLK_PLL1_VAL,
446 }, {
447 .pclk = &pll3_48m_clk,
448 .pclk_val = AUX_CLK_PLL3_VAL,
452 /* gpt parent select structure */
453 static struct pclk_sel gpt3_pclk_sel = {
454 .pclk_info = gpt3_pclk_info,
455 .pclk_count = ARRAY_SIZE(gpt3_pclk_info),
456 .pclk_sel_reg = PERIP_CLK_CFG,
457 .pclk_sel_mask = GPT_CLK_MASK,
460 /* gpt3 timer clock */
461 static struct clk gpt3_clk = {
462 .flags = ALWAYS_ENABLED,
463 .pclk_sel = &gpt3_pclk_sel,
464 .pclk_sel_shift = GPT3_CLK_SHIFT,
465 .recalc = &follow_parent,
468 /* clock derived from pll3 clk */
469 /* usbh0 clock */
470 static struct clk usbh0_clk = {
471 .pclk = &pll3_48m_clk,
472 .en_reg = PERIP1_CLK_ENB,
473 .en_reg_bit = USBH0_CLK_ENB,
474 .recalc = &follow_parent,
477 /* usbh1 clock */
478 static struct clk usbh1_clk = {
479 .pclk = &pll3_48m_clk,
480 .en_reg = PERIP1_CLK_ENB,
481 .en_reg_bit = USBH1_CLK_ENB,
482 .recalc = &follow_parent,
485 /* usbd clock */
486 static struct clk usbd_clk = {
487 .pclk = &pll3_48m_clk,
488 .en_reg = PERIP1_CLK_ENB,
489 .en_reg_bit = USBD_CLK_ENB,
490 .recalc = &follow_parent,
493 /* clock derived from ahb clk */
494 /* apb masks structure */
495 static struct bus_clk_masks apb_masks = {
496 .mask = HCLK_PCLK_RATIO_MASK,
497 .shift = HCLK_PCLK_RATIO_SHIFT,
500 /* apb configuration structure */
501 static struct bus_clk_config apb_config = {
502 .reg = CORE_CLK_CFG,
503 .masks = &apb_masks,
506 /* apb clock */
507 static struct clk apb_clk = {
508 .flags = ALWAYS_ENABLED,
509 .pclk = &ahb_clk,
510 .calc_rate = &bus_calc_rate,
511 .recalc = &bus_clk_recalc,
512 .set_rate = &bus_clk_set_rate,
513 .rate_config = {bus_rtbl, ARRAY_SIZE(bus_rtbl), 2},
514 .private_data = &apb_config,
517 /* i2c clock */
518 static struct clk i2c_clk = {
519 .pclk = &ahb_clk,
520 .en_reg = PERIP1_CLK_ENB,
521 .en_reg_bit = I2C_CLK_ENB,
522 .recalc = &follow_parent,
525 /* dma clock */
526 static struct clk dma_clk = {
527 .pclk = &ahb_clk,
528 .en_reg = PERIP1_CLK_ENB,
529 .en_reg_bit = DMA_CLK_ENB,
530 .recalc = &follow_parent,
533 /* jpeg clock */
534 static struct clk jpeg_clk = {
535 .pclk = &ahb_clk,
536 .en_reg = PERIP1_CLK_ENB,
537 .en_reg_bit = JPEG_CLK_ENB,
538 .recalc = &follow_parent,
541 /* gmac clock */
542 static struct clk gmac_clk = {
543 .pclk = &ahb_clk,
544 .en_reg = PERIP1_CLK_ENB,
545 .en_reg_bit = GMAC_CLK_ENB,
546 .recalc = &follow_parent,
549 /* smi clock */
550 static struct clk smi_clk = {
551 .pclk = &ahb_clk,
552 .en_reg = PERIP1_CLK_ENB,
553 .en_reg_bit = SMI_CLK_ENB,
554 .recalc = &follow_parent,
557 /* fsmc clock */
558 static struct clk fsmc_clk = {
559 .pclk = &ahb_clk,
560 .en_reg = PERIP1_CLK_ENB,
561 .en_reg_bit = FSMC_CLK_ENB,
562 .recalc = &follow_parent,
565 /* clock derived from apb clk */
566 /* adc clock */
567 static struct clk adc_clk = {
568 .pclk = &apb_clk,
569 .en_reg = PERIP1_CLK_ENB,
570 .en_reg_bit = ADC_CLK_ENB,
571 .recalc = &follow_parent,
574 /* ssp0 clock */
575 static struct clk ssp0_clk = {
576 .pclk = &apb_clk,
577 .en_reg = PERIP1_CLK_ENB,
578 .en_reg_bit = SSP0_CLK_ENB,
579 .recalc = &follow_parent,
582 /* ssp1 clock */
583 static struct clk ssp1_clk = {
584 .pclk = &apb_clk,
585 .en_reg = PERIP1_CLK_ENB,
586 .en_reg_bit = SSP1_CLK_ENB,
587 .recalc = &follow_parent,
590 /* ssp2 clock */
591 static struct clk ssp2_clk = {
592 .pclk = &apb_clk,
593 .en_reg = PERIP1_CLK_ENB,
594 .en_reg_bit = SSP2_CLK_ENB,
595 .recalc = &follow_parent,
598 /* gpio0 ARM subsystem clock */
599 static struct clk gpio0_clk = {
600 .flags = ALWAYS_ENABLED,
601 .pclk = &apb_clk,
602 .recalc = &follow_parent,
605 /* gpio1 clock */
606 static struct clk gpio1_clk = {
607 .pclk = &apb_clk,
608 .en_reg = PERIP1_CLK_ENB,
609 .en_reg_bit = GPIO1_CLK_ENB,
610 .recalc = &follow_parent,
613 /* gpio2 clock */
614 static struct clk gpio2_clk = {
615 .pclk = &apb_clk,
616 .en_reg = PERIP1_CLK_ENB,
617 .en_reg_bit = GPIO2_CLK_ENB,
618 .recalc = &follow_parent,
621 static struct clk dummy_apb_pclk;
623 /* array of all spear 6xx clock lookups */
624 static struct clk_lookup spear_clk_lookups[] = {
625 { .con_id = "apb_pclk", .clk = &dummy_apb_pclk},
626 /* root clks */
627 { .con_id = "osc_32k_clk", .clk = &osc_32k_clk},
628 { .con_id = "osc_30m_clk", .clk = &osc_30m_clk},
629 /* clock derived from 32 KHz os clk */
630 { .dev_id = "rtc-spear", .clk = &rtc_clk},
631 /* clock derived from 30 MHz os clk */
632 { .con_id = "pll1_clk", .clk = &pll1_clk},
633 { .con_id = "pll3_48m_clk", .clk = &pll3_48m_clk},
634 { .dev_id = "wdt", .clk = &wdt_clk},
635 /* clock derived from pll1 clk */
636 { .con_id = "cpu_clk", .clk = &cpu_clk},
637 { .con_id = "ahb_clk", .clk = &ahb_clk},
638 { .con_id = "uart_synth_clk", .clk = &uart_synth_clk},
639 { .con_id = "firda_synth_clk", .clk = &firda_synth_clk},
640 { .con_id = "clcd_synth_clk", .clk = &clcd_synth_clk},
641 { .con_id = "gpt0_synth_clk", .clk = &gpt0_synth_clk},
642 { .con_id = "gpt2_synth_clk", .clk = &gpt2_synth_clk},
643 { .con_id = "gpt3_synth_clk", .clk = &gpt3_synth_clk},
644 { .dev_id = "uart0", .clk = &uart0_clk},
645 { .dev_id = "uart1", .clk = &uart1_clk},
646 { .dev_id = "firda", .clk = &firda_clk},
647 { .dev_id = "clcd", .clk = &clcd_clk},
648 { .dev_id = "gpt0", .clk = &gpt0_clk},
649 { .dev_id = "gpt1", .clk = &gpt1_clk},
650 { .dev_id = "gpt2", .clk = &gpt2_clk},
651 { .dev_id = "gpt3", .clk = &gpt3_clk},
652 /* clock derived from pll3 clk */
653 { .dev_id = "designware_udc", .clk = &usbd_clk},
654 { .con_id = "usbh.0_clk", .clk = &usbh0_clk},
655 { .con_id = "usbh.1_clk", .clk = &usbh1_clk},
656 /* clock derived from ahb clk */
657 { .con_id = "apb_clk", .clk = &apb_clk},
658 { .dev_id = "i2c_designware.0", .clk = &i2c_clk},
659 { .dev_id = "dma", .clk = &dma_clk},
660 { .dev_id = "jpeg", .clk = &jpeg_clk},
661 { .dev_id = "gmac", .clk = &gmac_clk},
662 { .dev_id = "smi", .clk = &smi_clk},
663 { .con_id = "fsmc", .clk = &fsmc_clk},
664 /* clock derived from apb clk */
665 { .dev_id = "adc", .clk = &adc_clk},
666 { .dev_id = "ssp-pl022.0", .clk = &ssp0_clk},
667 { .dev_id = "ssp-pl022.1", .clk = &ssp1_clk},
668 { .dev_id = "ssp-pl022.2", .clk = &ssp2_clk},
669 { .dev_id = "gpio0", .clk = &gpio0_clk},
670 { .dev_id = "gpio1", .clk = &gpio1_clk},
671 { .dev_id = "gpio2", .clk = &gpio2_clk},
674 void __init clk_init(void)
676 int i;
678 for (i = 0; i < ARRAY_SIZE(spear_clk_lookups); i++)
679 clk_register(&spear_clk_lookups[i]);
681 recalc_root_clocks();