clk-imx35.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. /*
  2. * Copyright (C) 2012 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. *
  8. */
  9. #include <linux/mm.h>
  10. #include <linux/delay.h>
  11. #include <linux/clk.h>
  12. #include <linux/io.h>
  13. #include <linux/clkdev.h>
  14. #include <linux/of.h>
  15. #include <linux/err.h>
  16. #include <soc/imx/revision.h>
  17. #include <soc/imx/timer.h>
  18. #include <asm/irq.h>
  19. #include "clk.h"
  20. #define MX35_CCM_BASE_ADDR 0x53f80000
  21. #define MX35_GPT1_BASE_ADDR 0x53f90000
  22. #define MX35_INT_GPT (NR_IRQS_LEGACY + 29)
  23. #define MXC_CCM_PDR0 0x04
  24. #define MX35_CCM_PDR2 0x0c
  25. #define MX35_CCM_PDR3 0x10
  26. #define MX35_CCM_PDR4 0x14
  27. #define MX35_CCM_MPCTL 0x1c
  28. #define MX35_CCM_PPCTL 0x20
  29. #define MX35_CCM_CGR0 0x2c
  30. #define MX35_CCM_CGR1 0x30
  31. #define MX35_CCM_CGR2 0x34
  32. #define MX35_CCM_CGR3 0x38
  33. struct arm_ahb_div {
  34. unsigned char arm, ahb, sel;
  35. };
  36. static struct arm_ahb_div clk_consumer[] = {
  37. { .arm = 1, .ahb = 4, .sel = 0},
  38. { .arm = 1, .ahb = 3, .sel = 1},
  39. { .arm = 2, .ahb = 2, .sel = 0},
  40. { .arm = 0, .ahb = 0, .sel = 0},
  41. { .arm = 0, .ahb = 0, .sel = 0},
  42. { .arm = 0, .ahb = 0, .sel = 0},
  43. { .arm = 4, .ahb = 1, .sel = 0},
  44. { .arm = 1, .ahb = 5, .sel = 0},
  45. { .arm = 1, .ahb = 8, .sel = 0},
  46. { .arm = 1, .ahb = 6, .sel = 1},
  47. { .arm = 2, .ahb = 4, .sel = 0},
  48. { .arm = 0, .ahb = 0, .sel = 0},
  49. { .arm = 0, .ahb = 0, .sel = 0},
  50. { .arm = 0, .ahb = 0, .sel = 0},
  51. { .arm = 4, .ahb = 2, .sel = 0},
  52. { .arm = 0, .ahb = 0, .sel = 0},
  53. };
  54. static char hsp_div_532[] = { 4, 8, 3, 0 };
  55. static char hsp_div_400[] = { 3, 6, 3, 0 };
  56. static struct clk_onecell_data clk_data;
  57. static const char *std_sel[] = {"ppll", "arm"};
  58. static const char *ipg_per_sel[] = {"ahb_per_div", "arm_per_div"};
  59. enum mx35_clks {
  60. ckih, mpll, ppll, mpll_075, arm, hsp, hsp_div, hsp_sel, ahb, ipg,
  61. arm_per_div, ahb_per_div, ipg_per, uart_sel, uart_div, esdhc_sel,
  62. esdhc1_div, esdhc2_div, esdhc3_div, spdif_sel, spdif_div_pre,
  63. spdif_div_post, ssi_sel, ssi1_div_pre, ssi1_div_post, ssi2_div_pre,
  64. ssi2_div_post, usb_sel, usb_div, nfc_div, asrc_gate, pata_gate,
  65. audmux_gate, can1_gate, can2_gate, cspi1_gate, cspi2_gate, ect_gate,
  66. edio_gate, emi_gate, epit1_gate, epit2_gate, esai_gate, esdhc1_gate,
  67. esdhc2_gate, esdhc3_gate, fec_gate, gpio1_gate, gpio2_gate, gpio3_gate,
  68. gpt_gate, i2c1_gate, i2c2_gate, i2c3_gate, iomuxc_gate, ipu_gate,
  69. kpp_gate, mlb_gate, mshc_gate, owire_gate, pwm_gate, rngc_gate,
  70. rtc_gate, rtic_gate, scc_gate, sdma_gate, spba_gate, spdif_gate,
  71. ssi1_gate, ssi2_gate, uart1_gate, uart2_gate, uart3_gate, usbotg_gate,
  72. wdog_gate, max_gate, admux_gate, csi_gate, csi_div, csi_sel, iim_gate,
  73. gpu2d_gate, ckil, clk_max
  74. };
  75. static struct clk *clk[clk_max];
  76. static struct clk ** const uart_clks[] __initconst = {
  77. &clk[ipg],
  78. &clk[uart1_gate],
  79. &clk[uart2_gate],
  80. &clk[uart3_gate],
  81. NULL
  82. };
  83. static void __init _mx35_clocks_init(void)
  84. {
  85. void __iomem *base;
  86. u32 pdr0, consumer_sel, hsp_sel;
  87. struct arm_ahb_div *aad;
  88. unsigned char *hsp_div;
  89. base = ioremap(MX35_CCM_BASE_ADDR, SZ_4K);
  90. BUG_ON(!base);
  91. pdr0 = __raw_readl(base + MXC_CCM_PDR0);
  92. consumer_sel = (pdr0 >> 16) & 0xf;
  93. aad = &clk_consumer[consumer_sel];
  94. if (!aad->arm) {
  95. pr_err("i.MX35 clk: illegal consumer mux selection 0x%x\n", consumer_sel);
  96. /*
  97. * We are basically stuck. Continue with a default entry and hope we
  98. * get far enough to actually show the above message
  99. */
  100. aad = &clk_consumer[0];
  101. }
  102. clk[ckih] = imx_clk_fixed("ckih", 24000000);
  103. clk[ckil] = imx_clk_fixed("ckil", 32768);
  104. clk[mpll] = imx_clk_pllv1(IMX_PLLV1_IMX35, "mpll", "ckih", base + MX35_CCM_MPCTL);
  105. clk[ppll] = imx_clk_pllv1(IMX_PLLV1_IMX35, "ppll", "ckih", base + MX35_CCM_PPCTL);
  106. clk[mpll] = imx_clk_fixed_factor("mpll_075", "mpll", 3, 4);
  107. if (aad->sel)
  108. clk[arm] = imx_clk_fixed_factor("arm", "mpll_075", 1, aad->arm);
  109. else
  110. clk[arm] = imx_clk_fixed_factor("arm", "mpll", 1, aad->arm);
  111. if (clk_get_rate(clk[arm]) > 400000000)
  112. hsp_div = hsp_div_532;
  113. else
  114. hsp_div = hsp_div_400;
  115. hsp_sel = (pdr0 >> 20) & 0x3;
  116. if (!hsp_div[hsp_sel]) {
  117. pr_err("i.MX35 clk: illegal hsp clk selection 0x%x\n", hsp_sel);
  118. hsp_sel = 0;
  119. }
  120. clk[hsp] = imx_clk_fixed_factor("hsp", "arm", 1, hsp_div[hsp_sel]);
  121. clk[ahb] = imx_clk_fixed_factor("ahb", "arm", 1, aad->ahb);
  122. clk[ipg] = imx_clk_fixed_factor("ipg", "ahb", 1, 2);
  123. clk[arm_per_div] = imx_clk_divider("arm_per_div", "arm", base + MX35_CCM_PDR4, 16, 6);
  124. clk[ahb_per_div] = imx_clk_divider("ahb_per_div", "ahb", base + MXC_CCM_PDR0, 12, 3);
  125. clk[ipg_per] = imx_clk_mux("ipg_per", base + MXC_CCM_PDR0, 26, 1, ipg_per_sel, ARRAY_SIZE(ipg_per_sel));
  126. clk[uart_sel] = imx_clk_mux("uart_sel", base + MX35_CCM_PDR3, 14, 1, std_sel, ARRAY_SIZE(std_sel));
  127. clk[uart_div] = imx_clk_divider("uart_div", "uart_sel", base + MX35_CCM_PDR4, 10, 6);
  128. clk[esdhc_sel] = imx_clk_mux("esdhc_sel", base + MX35_CCM_PDR4, 9, 1, std_sel, ARRAY_SIZE(std_sel));
  129. clk[esdhc1_div] = imx_clk_divider("esdhc1_div", "esdhc_sel", base + MX35_CCM_PDR3, 0, 6);
  130. clk[esdhc2_div] = imx_clk_divider("esdhc2_div", "esdhc_sel", base + MX35_CCM_PDR3, 8, 6);
  131. clk[esdhc3_div] = imx_clk_divider("esdhc3_div", "esdhc_sel", base + MX35_CCM_PDR3, 16, 6);
  132. clk[spdif_sel] = imx_clk_mux("spdif_sel", base + MX35_CCM_PDR3, 22, 1, std_sel, ARRAY_SIZE(std_sel));
  133. clk[spdif_div_pre] = imx_clk_divider("spdif_div_pre", "spdif_sel", base + MX35_CCM_PDR3, 29, 3); /* divide by 1 not allowed */
  134. clk[spdif_div_post] = imx_clk_divider("spdif_div_post", "spdif_div_pre", base + MX35_CCM_PDR3, 23, 6);
  135. clk[ssi_sel] = imx_clk_mux("ssi_sel", base + MX35_CCM_PDR2, 6, 1, std_sel, ARRAY_SIZE(std_sel));
  136. clk[ssi1_div_pre] = imx_clk_divider("ssi1_div_pre", "ssi_sel", base + MX35_CCM_PDR2, 24, 3);
  137. clk[ssi1_div_post] = imx_clk_divider("ssi1_div_post", "ssi1_div_pre", base + MX35_CCM_PDR2, 0, 6);
  138. clk[ssi2_div_pre] = imx_clk_divider("ssi2_div_pre", "ssi_sel", base + MX35_CCM_PDR2, 27, 3);
  139. clk[ssi2_div_post] = imx_clk_divider("ssi2_div_post", "ssi2_div_pre", base + MX35_CCM_PDR2, 8, 6);
  140. clk[usb_sel] = imx_clk_mux("usb_sel", base + MX35_CCM_PDR4, 9, 1, std_sel, ARRAY_SIZE(std_sel));
  141. clk[usb_div] = imx_clk_divider("usb_div", "usb_sel", base + MX35_CCM_PDR4, 22, 6);
  142. clk[nfc_div] = imx_clk_divider("nfc_div", "ahb", base + MX35_CCM_PDR4, 28, 4);
  143. clk[csi_sel] = imx_clk_mux("csi_sel", base + MX35_CCM_PDR2, 7, 1, std_sel, ARRAY_SIZE(std_sel));
  144. clk[csi_div] = imx_clk_divider("csi_div", "csi_sel", base + MX35_CCM_PDR2, 16, 6);
  145. clk[asrc_gate] = imx_clk_gate2("asrc_gate", "ipg", base + MX35_CCM_CGR0, 0);
  146. clk[pata_gate] = imx_clk_gate2("pata_gate", "ipg", base + MX35_CCM_CGR0, 2);
  147. clk[audmux_gate] = imx_clk_gate2("audmux_gate", "ipg", base + MX35_CCM_CGR0, 4);
  148. clk[can1_gate] = imx_clk_gate2("can1_gate", "ipg", base + MX35_CCM_CGR0, 6);
  149. clk[can2_gate] = imx_clk_gate2("can2_gate", "ipg", base + MX35_CCM_CGR0, 8);
  150. clk[cspi1_gate] = imx_clk_gate2("cspi1_gate", "ipg", base + MX35_CCM_CGR0, 10);
  151. clk[cspi2_gate] = imx_clk_gate2("cspi2_gate", "ipg", base + MX35_CCM_CGR0, 12);
  152. clk[ect_gate] = imx_clk_gate2("ect_gate", "ipg", base + MX35_CCM_CGR0, 14);
  153. clk[edio_gate] = imx_clk_gate2("edio_gate", "ipg", base + MX35_CCM_CGR0, 16);
  154. clk[emi_gate] = imx_clk_gate2("emi_gate", "ipg", base + MX35_CCM_CGR0, 18);
  155. clk[epit1_gate] = imx_clk_gate2("epit1_gate", "ipg", base + MX35_CCM_CGR0, 20);
  156. clk[epit2_gate] = imx_clk_gate2("epit2_gate", "ipg", base + MX35_CCM_CGR0, 22);
  157. clk[esai_gate] = imx_clk_gate2("esai_gate", "ipg", base + MX35_CCM_CGR0, 24);
  158. clk[esdhc1_gate] = imx_clk_gate2("esdhc1_gate", "esdhc1_div", base + MX35_CCM_CGR0, 26);
  159. clk[esdhc2_gate] = imx_clk_gate2("esdhc2_gate", "esdhc2_div", base + MX35_CCM_CGR0, 28);
  160. clk[esdhc3_gate] = imx_clk_gate2("esdhc3_gate", "esdhc3_div", base + MX35_CCM_CGR0, 30);
  161. clk[fec_gate] = imx_clk_gate2("fec_gate", "ipg", base + MX35_CCM_CGR1, 0);
  162. clk[gpio1_gate] = imx_clk_gate2("gpio1_gate", "ipg", base + MX35_CCM_CGR1, 2);
  163. clk[gpio2_gate] = imx_clk_gate2("gpio2_gate", "ipg", base + MX35_CCM_CGR1, 4);
  164. clk[gpio3_gate] = imx_clk_gate2("gpio3_gate", "ipg", base + MX35_CCM_CGR1, 6);
  165. clk[gpt_gate] = imx_clk_gate2("gpt_gate", "ipg", base + MX35_CCM_CGR1, 8);
  166. clk[i2c1_gate] = imx_clk_gate2("i2c1_gate", "ipg_per", base + MX35_CCM_CGR1, 10);
  167. clk[i2c2_gate] = imx_clk_gate2("i2c2_gate", "ipg_per", base + MX35_CCM_CGR1, 12);
  168. clk[i2c3_gate] = imx_clk_gate2("i2c3_gate", "ipg_per", base + MX35_CCM_CGR1, 14);
  169. clk[iomuxc_gate] = imx_clk_gate2("iomuxc_gate", "ipg", base + MX35_CCM_CGR1, 16);
  170. clk[ipu_gate] = imx_clk_gate2("ipu_gate", "hsp", base + MX35_CCM_CGR1, 18);
  171. clk[kpp_gate] = imx_clk_gate2("kpp_gate", "ipg", base + MX35_CCM_CGR1, 20);
  172. clk[mlb_gate] = imx_clk_gate2("mlb_gate", "ahb", base + MX35_CCM_CGR1, 22);
  173. clk[mshc_gate] = imx_clk_gate2("mshc_gate", "dummy", base + MX35_CCM_CGR1, 24);
  174. clk[owire_gate] = imx_clk_gate2("owire_gate", "ipg_per", base + MX35_CCM_CGR1, 26);
  175. clk[pwm_gate] = imx_clk_gate2("pwm_gate", "ipg_per", base + MX35_CCM_CGR1, 28);
  176. clk[rngc_gate] = imx_clk_gate2("rngc_gate", "ipg", base + MX35_CCM_CGR1, 30);
  177. clk[rtc_gate] = imx_clk_gate2("rtc_gate", "ipg", base + MX35_CCM_CGR2, 0);
  178. clk[rtic_gate] = imx_clk_gate2("rtic_gate", "ahb", base + MX35_CCM_CGR2, 2);
  179. clk[scc_gate] = imx_clk_gate2("scc_gate", "ipg", base + MX35_CCM_CGR2, 4);
  180. clk[sdma_gate] = imx_clk_gate2("sdma_gate", "ahb", base + MX35_CCM_CGR2, 6);
  181. clk[spba_gate] = imx_clk_gate2("spba_gate", "ipg", base + MX35_CCM_CGR2, 8);
  182. clk[spdif_gate] = imx_clk_gate2("spdif_gate", "spdif_div_post", base + MX35_CCM_CGR2, 10);
  183. clk[ssi1_gate] = imx_clk_gate2("ssi1_gate", "ssi1_div_post", base + MX35_CCM_CGR2, 12);
  184. clk[ssi2_gate] = imx_clk_gate2("ssi2_gate", "ssi2_div_post", base + MX35_CCM_CGR2, 14);
  185. clk[uart1_gate] = imx_clk_gate2("uart1_gate", "uart_div", base + MX35_CCM_CGR2, 16);
  186. clk[uart2_gate] = imx_clk_gate2("uart2_gate", "uart_div", base + MX35_CCM_CGR2, 18);
  187. clk[uart3_gate] = imx_clk_gate2("uart3_gate", "uart_div", base + MX35_CCM_CGR2, 20);
  188. clk[usbotg_gate] = imx_clk_gate2("usbotg_gate", "ahb", base + MX35_CCM_CGR2, 22);
  189. clk[wdog_gate] = imx_clk_gate2("wdog_gate", "ipg", base + MX35_CCM_CGR2, 24);
  190. clk[max_gate] = imx_clk_gate2("max_gate", "dummy", base + MX35_CCM_CGR2, 26);
  191. clk[admux_gate] = imx_clk_gate2("admux_gate", "ipg", base + MX35_CCM_CGR2, 30);
  192. clk[csi_gate] = imx_clk_gate2("csi_gate", "csi_div", base + MX35_CCM_CGR3, 0);
  193. clk[iim_gate] = imx_clk_gate2("iim_gate", "ipg", base + MX35_CCM_CGR3, 2);
  194. clk[gpu2d_gate] = imx_clk_gate2("gpu2d_gate", "ahb", base + MX35_CCM_CGR3, 4);
  195. imx_check_clocks(clk, ARRAY_SIZE(clk));
  196. clk_prepare_enable(clk[spba_gate]);
  197. clk_prepare_enable(clk[gpio1_gate]);
  198. clk_prepare_enable(clk[gpio2_gate]);
  199. clk_prepare_enable(clk[gpio3_gate]);
  200. clk_prepare_enable(clk[iim_gate]);
  201. clk_prepare_enable(clk[emi_gate]);
  202. clk_prepare_enable(clk[max_gate]);
  203. clk_prepare_enable(clk[iomuxc_gate]);
  204. /*
  205. * SCC is needed to boot via mmc after a watchdog reset. The clock code
  206. * before conversion to common clk also enabled UART1 (which isn't
  207. * handled here and not needed for mmc) and IIM (which is enabled
  208. * unconditionally above).
  209. */
  210. clk_prepare_enable(clk[scc_gate]);
  211. imx_register_uart_clocks(uart_clks);
  212. imx_print_silicon_rev("i.MX35", mx35_revision());
  213. }
  214. int __init mx35_clocks_init(void)
  215. {
  216. _mx35_clocks_init();
  217. clk_register_clkdev(clk[pata_gate], NULL, "pata_imx");
  218. clk_register_clkdev(clk[can1_gate], NULL, "flexcan.0");
  219. clk_register_clkdev(clk[can2_gate], NULL, "flexcan.1");
  220. clk_register_clkdev(clk[cspi1_gate], "per", "imx35-cspi.0");
  221. clk_register_clkdev(clk[cspi1_gate], "ipg", "imx35-cspi.0");
  222. clk_register_clkdev(clk[cspi2_gate], "per", "imx35-cspi.1");
  223. clk_register_clkdev(clk[cspi2_gate], "ipg", "imx35-cspi.1");
  224. clk_register_clkdev(clk[epit1_gate], NULL, "imx-epit.0");
  225. clk_register_clkdev(clk[epit2_gate], NULL, "imx-epit.1");
  226. clk_register_clkdev(clk[esdhc1_gate], "per", "sdhci-esdhc-imx35.0");
  227. clk_register_clkdev(clk[ipg], "ipg", "sdhci-esdhc-imx35.0");
  228. clk_register_clkdev(clk[ahb], "ahb", "sdhci-esdhc-imx35.0");
  229. clk_register_clkdev(clk[esdhc2_gate], "per", "sdhci-esdhc-imx35.1");
  230. clk_register_clkdev(clk[ipg], "ipg", "sdhci-esdhc-imx35.1");
  231. clk_register_clkdev(clk[ahb], "ahb", "sdhci-esdhc-imx35.1");
  232. clk_register_clkdev(clk[esdhc3_gate], "per", "sdhci-esdhc-imx35.2");
  233. clk_register_clkdev(clk[ipg], "ipg", "sdhci-esdhc-imx35.2");
  234. clk_register_clkdev(clk[ahb], "ahb", "sdhci-esdhc-imx35.2");
  235. /* i.mx35 has the i.mx27 type fec */
  236. clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0");
  237. clk_register_clkdev(clk[gpt_gate], "per", "imx-gpt.0");
  238. clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0");
  239. clk_register_clkdev(clk[i2c1_gate], NULL, "imx21-i2c.0");
  240. clk_register_clkdev(clk[i2c2_gate], NULL, "imx21-i2c.1");
  241. clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2");
  242. clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core");
  243. clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb");
  244. clk_register_clkdev(clk[kpp_gate], NULL, "imx-keypad");
  245. clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1");
  246. clk_register_clkdev(clk[sdma_gate], NULL, "imx35-sdma");
  247. clk_register_clkdev(clk[ssi1_gate], NULL, "imx-ssi.0");
  248. clk_register_clkdev(clk[ssi2_gate], NULL, "imx-ssi.1");
  249. /* i.mx35 has the i.mx21 type uart */
  250. clk_register_clkdev(clk[uart1_gate], "per", "imx21-uart.0");
  251. clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.0");
  252. clk_register_clkdev(clk[uart2_gate], "per", "imx21-uart.1");
  253. clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.1");
  254. clk_register_clkdev(clk[uart3_gate], "per", "imx21-uart.2");
  255. clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.2");
  256. /* i.mx35 has the i.mx21 type rtc */
  257. clk_register_clkdev(clk[ckil], "ref", "imx21-rtc");
  258. clk_register_clkdev(clk[rtc_gate], "ipg", "imx21-rtc");
  259. clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.0");
  260. clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.0");
  261. clk_register_clkdev(clk[usbotg_gate], "ahb", "mxc-ehci.0");
  262. clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.1");
  263. clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.1");
  264. clk_register_clkdev(clk[usbotg_gate], "ahb", "mxc-ehci.1");
  265. clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2");
  266. clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2");
  267. clk_register_clkdev(clk[usbotg_gate], "ahb", "mxc-ehci.2");
  268. clk_register_clkdev(clk[usb_div], "per", "imx-udc-mx27");
  269. clk_register_clkdev(clk[ipg], "ipg", "imx-udc-mx27");
  270. clk_register_clkdev(clk[usbotg_gate], "ahb", "imx-udc-mx27");
  271. clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0");
  272. clk_register_clkdev(clk[nfc_div], NULL, "imx25-nand.0");
  273. clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0");
  274. clk_register_clkdev(clk[admux_gate], "audmux", NULL);
  275. mxc_timer_init(MX35_GPT1_BASE_ADDR, MX35_INT_GPT, GPT_TYPE_IMX31);
  276. return 0;
  277. }
  278. static void __init mx35_clocks_init_dt(struct device_node *ccm_node)
  279. {
  280. _mx35_clocks_init();
  281. clk_data.clks = clk;
  282. clk_data.clk_num = ARRAY_SIZE(clk);
  283. of_clk_add_provider(ccm_node, of_clk_src_onecell_get, &clk_data);
  284. }
  285. CLK_OF_DECLARE(imx35, "fsl,imx35-ccm", mx35_clocks_init_dt);