clk-vt8500.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  1. /*
  2. * Clock implementation for VIA/Wondermedia SoC's
  3. * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz>
  4. *
  5. * This software is licensed under the terms of the GNU General Public
  6. * License version 2, as published by the Free Software Foundation, and
  7. * may be copied, distributed, and modified under those terms.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. */
  15. #include <linux/io.h>
  16. #include <linux/of.h>
  17. #include <linux/slab.h>
  18. #include <linux/bitops.h>
  19. #include <linux/clkdev.h>
  20. #include <linux/clk-provider.h>
  21. /* All clocks share the same lock as none can be changed concurrently */
  22. static DEFINE_SPINLOCK(_lock);
  23. struct clk_device {
  24. struct clk_hw hw;
  25. void __iomem *div_reg;
  26. unsigned int div_mask;
  27. void __iomem *en_reg;
  28. int en_bit;
  29. spinlock_t *lock;
  30. };
  31. /*
  32. * Add new PLL_TYPE_x definitions here as required. Use the first known model
  33. * to support the new type as the name.
  34. * Add case statements to vtwm_pll_recalc_rate(), vtwm_pll_round_round() and
  35. * vtwm_pll_set_rate() to handle the new PLL_TYPE_x
  36. */
  37. #define PLL_TYPE_VT8500 0
  38. #define PLL_TYPE_WM8650 1
  39. #define PLL_TYPE_WM8750 2
  40. struct clk_pll {
  41. struct clk_hw hw;
  42. void __iomem *reg;
  43. spinlock_t *lock;
  44. int type;
  45. };
  46. static void __iomem *pmc_base;
  47. #define to_clk_device(_hw) container_of(_hw, struct clk_device, hw)
  48. #define VT8500_PMC_BUSY_MASK 0x18
  49. static void vt8500_pmc_wait_busy(void)
  50. {
  51. while (readl(pmc_base) & VT8500_PMC_BUSY_MASK)
  52. cpu_relax();
  53. }
  54. static int vt8500_dclk_enable(struct clk_hw *hw)
  55. {
  56. struct clk_device *cdev = to_clk_device(hw);
  57. u32 en_val;
  58. unsigned long flags = 0;
  59. spin_lock_irqsave(cdev->lock, flags);
  60. en_val = readl(cdev->en_reg);
  61. en_val |= BIT(cdev->en_bit);
  62. writel(en_val, cdev->en_reg);
  63. spin_unlock_irqrestore(cdev->lock, flags);
  64. return 0;
  65. }
  66. static void vt8500_dclk_disable(struct clk_hw *hw)
  67. {
  68. struct clk_device *cdev = to_clk_device(hw);
  69. u32 en_val;
  70. unsigned long flags = 0;
  71. spin_lock_irqsave(cdev->lock, flags);
  72. en_val = readl(cdev->en_reg);
  73. en_val &= ~BIT(cdev->en_bit);
  74. writel(en_val, cdev->en_reg);
  75. spin_unlock_irqrestore(cdev->lock, flags);
  76. }
  77. static int vt8500_dclk_is_enabled(struct clk_hw *hw)
  78. {
  79. struct clk_device *cdev = to_clk_device(hw);
  80. u32 en_val = (readl(cdev->en_reg) & BIT(cdev->en_bit));
  81. return en_val ? 1 : 0;
  82. }
  83. static unsigned long vt8500_dclk_recalc_rate(struct clk_hw *hw,
  84. unsigned long parent_rate)
  85. {
  86. struct clk_device *cdev = to_clk_device(hw);
  87. u32 div = readl(cdev->div_reg) & cdev->div_mask;
  88. /* Special case for SDMMC devices */
  89. if ((cdev->div_mask == 0x3F) && (div & BIT(5)))
  90. div = 64 * (div & 0x1f);
  91. /* div == 0 is actually the highest divisor */
  92. if (div == 0)
  93. div = (cdev->div_mask + 1);
  94. return parent_rate / div;
  95. }
  96. static long vt8500_dclk_round_rate(struct clk_hw *hw, unsigned long rate,
  97. unsigned long *prate)
  98. {
  99. struct clk_device *cdev = to_clk_device(hw);
  100. u32 divisor;
  101. if (rate == 0)
  102. return 0;
  103. divisor = *prate / rate;
  104. /* If prate / rate would be decimal, incr the divisor */
  105. if (rate * divisor < *prate)
  106. divisor++;
  107. /*
  108. * If this is a request for SDMMC we have to adjust the divisor
  109. * when >31 to use the fixed predivisor
  110. */
  111. if ((cdev->div_mask == 0x3F) && (divisor > 31)) {
  112. divisor = 64 * ((divisor / 64) + 1);
  113. }
  114. return *prate / divisor;
  115. }
  116. static int vt8500_dclk_set_rate(struct clk_hw *hw, unsigned long rate,
  117. unsigned long parent_rate)
  118. {
  119. struct clk_device *cdev = to_clk_device(hw);
  120. u32 divisor;
  121. unsigned long flags = 0;
  122. if (rate == 0)
  123. return 0;
  124. divisor = parent_rate / rate;
  125. /* If prate / rate would be decimal, incr the divisor */
  126. if (rate * divisor < *prate)
  127. divisor++;
  128. if (divisor == cdev->div_mask + 1)
  129. divisor = 0;
  130. /* SDMMC mask may need to be corrected before testing if its valid */
  131. if ((cdev->div_mask == 0x3F) && (divisor > 31)) {
  132. /*
  133. * Bit 5 is a fixed /64 predivisor. If the requested divisor
  134. * is >31 then correct for the fixed divisor being required.
  135. */
  136. divisor = 0x20 + (divisor / 64);
  137. }
  138. if (divisor > cdev->div_mask) {
  139. pr_err("%s: invalid divisor for clock\n", __func__);
  140. return -EINVAL;
  141. }
  142. spin_lock_irqsave(cdev->lock, flags);
  143. vt8500_pmc_wait_busy();
  144. writel(divisor, cdev->div_reg);
  145. vt8500_pmc_wait_busy();
  146. spin_lock_irqsave(cdev->lock, flags);
  147. return 0;
  148. }
  149. static const struct clk_ops vt8500_gated_clk_ops = {
  150. .enable = vt8500_dclk_enable,
  151. .disable = vt8500_dclk_disable,
  152. .is_enabled = vt8500_dclk_is_enabled,
  153. };
  154. static const struct clk_ops vt8500_divisor_clk_ops = {
  155. .round_rate = vt8500_dclk_round_rate,
  156. .set_rate = vt8500_dclk_set_rate,
  157. .recalc_rate = vt8500_dclk_recalc_rate,
  158. };
  159. static const struct clk_ops vt8500_gated_divisor_clk_ops = {
  160. .enable = vt8500_dclk_enable,
  161. .disable = vt8500_dclk_disable,
  162. .is_enabled = vt8500_dclk_is_enabled,
  163. .round_rate = vt8500_dclk_round_rate,
  164. .set_rate = vt8500_dclk_set_rate,
  165. .recalc_rate = vt8500_dclk_recalc_rate,
  166. };
  167. #define CLK_INIT_GATED BIT(0)
  168. #define CLK_INIT_DIVISOR BIT(1)
  169. #define CLK_INIT_GATED_DIVISOR (CLK_INIT_DIVISOR | CLK_INIT_GATED)
  170. static __init void vtwm_device_clk_init(struct device_node *node)
  171. {
  172. u32 en_reg, div_reg;
  173. struct clk *clk;
  174. struct clk_device *dev_clk;
  175. const char *clk_name = node->name;
  176. const char *parent_name;
  177. struct clk_init_data init;
  178. int rc;
  179. int clk_init_flags = 0;
  180. dev_clk = kzalloc(sizeof(*dev_clk), GFP_KERNEL);
  181. if (WARN_ON(!dev_clk))
  182. return;
  183. dev_clk->lock = &_lock;
  184. rc = of_property_read_u32(node, "enable-reg", &en_reg);
  185. if (!rc) {
  186. dev_clk->en_reg = pmc_base + en_reg;
  187. rc = of_property_read_u32(node, "enable-bit", &dev_clk->en_bit);
  188. if (rc) {
  189. pr_err("%s: enable-bit property required for gated clock\n",
  190. __func__);
  191. return;
  192. }
  193. clk_init_flags |= CLK_INIT_GATED;
  194. }
  195. rc = of_property_read_u32(node, "divisor-reg", &div_reg);
  196. if (!rc) {
  197. dev_clk->div_reg = pmc_base + div_reg;
  198. /*
  199. * use 0x1f as the default mask since it covers
  200. * almost all the clocks and reduces dts properties
  201. */
  202. dev_clk->div_mask = 0x1f;
  203. of_property_read_u32(node, "divisor-mask", &dev_clk->div_mask);
  204. clk_init_flags |= CLK_INIT_DIVISOR;
  205. }
  206. of_property_read_string(node, "clock-output-names", &clk_name);
  207. switch (clk_init_flags) {
  208. case CLK_INIT_GATED:
  209. init.ops = &vt8500_gated_clk_ops;
  210. break;
  211. case CLK_INIT_DIVISOR:
  212. init.ops = &vt8500_divisor_clk_ops;
  213. break;
  214. case CLK_INIT_GATED_DIVISOR:
  215. init.ops = &vt8500_gated_divisor_clk_ops;
  216. break;
  217. default:
  218. pr_err("%s: Invalid clock description in device tree\n",
  219. __func__);
  220. kfree(dev_clk);
  221. return;
  222. }
  223. init.name = clk_name;
  224. init.flags = 0;
  225. parent_name = of_clk_get_parent_name(node, 0);
  226. init.parent_names = &parent_name;
  227. init.num_parents = 1;
  228. dev_clk->hw.init = &init;
  229. clk = clk_register(NULL, &dev_clk->hw);
  230. if (WARN_ON(IS_ERR(clk))) {
  231. kfree(dev_clk);
  232. return;
  233. }
  234. rc = of_clk_add_provider(node, of_clk_src_simple_get, clk);
  235. clk_register_clkdev(clk, clk_name, NULL);
  236. }
  237. /* PLL clock related functions */
  238. #define to_clk_pll(_hw) container_of(_hw, struct clk_pll, hw)
  239. /* Helper macros for PLL_VT8500 */
  240. #define VT8500_PLL_MUL(x) ((x & 0x1F) << 1)
  241. #define VT8500_PLL_DIV(x) ((x & 0x100) ? 1 : 2)
  242. #define VT8500_BITS_TO_FREQ(r, m, d) \
  243. ((r / d) * m)
  244. #define VT8500_BITS_TO_VAL(m, d) \
  245. ((d == 2 ? 0 : 0x100) | ((m >> 1) & 0x1F))
  246. /* Helper macros for PLL_WM8650 */
  247. #define WM8650_PLL_MUL(x) (x & 0x3FF)
  248. #define WM8650_PLL_DIV(x) (((x >> 10) & 7) * (1 << ((x >> 13) & 3)))
  249. #define WM8650_BITS_TO_FREQ(r, m, d1, d2) \
  250. (r * m / (d1 * (1 << d2)))
  251. #define WM8650_BITS_TO_VAL(m, d1, d2) \
  252. ((d2 << 13) | (d1 << 10) | (m & 0x3FF))
  253. /* Helper macros for PLL_WM8750 */
  254. #define WM8750_PLL_MUL(x) (((x >> 16) & 0xFF) + 1)
  255. #define WM8750_PLL_DIV(x) ((((x >> 8) & 1) + 1) * (1 << (x & 7)))
  256. #define WM8750_BITS_TO_FREQ(r, m, d1, d2) \
  257. (r * (m+1) / ((d1+1) * (1 << d2)))
  258. #define WM8750_BITS_TO_VAL(f, m, d1, d2) \
  259. ((f << 24) | ((m - 1) << 16) | ((d1 - 1) << 8) | d2)
  260. static void vt8500_find_pll_bits(unsigned long rate, unsigned long parent_rate,
  261. u32 *multiplier, u32 *prediv)
  262. {
  263. unsigned long tclk;
  264. /* sanity check */
  265. if ((rate < parent_rate * 4) || (rate > parent_rate * 62)) {
  266. pr_err("%s: requested rate out of range\n", __func__);
  267. *multiplier = 0;
  268. *prediv = 1;
  269. return;
  270. }
  271. if (rate <= parent_rate * 31)
  272. /* use the prediv to double the resolution */
  273. *prediv = 2;
  274. else
  275. *prediv = 1;
  276. *multiplier = rate / (parent_rate / *prediv);
  277. tclk = (parent_rate / *prediv) * *multiplier;
  278. if (tclk != rate)
  279. pr_warn("%s: requested rate %lu, found rate %lu\n", __func__,
  280. rate, tclk);
  281. }
  282. static void wm8650_find_pll_bits(unsigned long rate, unsigned long parent_rate,
  283. u32 *multiplier, u32 *divisor1, u32 *divisor2)
  284. {
  285. u32 mul, div1, div2;
  286. u32 best_mul, best_div1, best_div2;
  287. unsigned long tclk, rate_err, best_err;
  288. best_err = (unsigned long)-1;
  289. /* Find the closest match (lower or equal to requested) */
  290. for (div1 = 5; div1 >= 3; div1--)
  291. for (div2 = 3; div2 >= 0; div2--)
  292. for (mul = 3; mul <= 1023; mul++) {
  293. tclk = parent_rate * mul / (div1 * (1 << div2));
  294. if (tclk > rate)
  295. continue;
  296. /* error will always be +ve */
  297. rate_err = rate - tclk;
  298. if (rate_err == 0) {
  299. *multiplier = mul;
  300. *divisor1 = div1;
  301. *divisor2 = div2;
  302. return;
  303. }
  304. if (rate_err < best_err) {
  305. best_err = rate_err;
  306. best_mul = mul;
  307. best_div1 = div1;
  308. best_div2 = div2;
  309. }
  310. }
  311. /* if we got here, it wasn't an exact match */
  312. pr_warn("%s: requested rate %lu, found rate %lu\n", __func__, rate,
  313. rate - best_err);
  314. *multiplier = best_mul;
  315. *divisor1 = best_div1;
  316. *divisor2 = best_div2;
  317. }
  318. static u32 wm8750_get_filter(u32 parent_rate, u32 divisor1)
  319. {
  320. /* calculate frequency (MHz) after pre-divisor */
  321. u32 freq = (parent_rate / 1000000) / (divisor1 + 1);
  322. if ((freq < 10) || (freq > 200))
  323. pr_warn("%s: PLL recommended input frequency 10..200Mhz (requested %d Mhz)\n",
  324. __func__, freq);
  325. if (freq >= 166)
  326. return 7;
  327. else if (freq >= 104)
  328. return 6;
  329. else if (freq >= 65)
  330. return 5;
  331. else if (freq >= 42)
  332. return 4;
  333. else if (freq >= 26)
  334. return 3;
  335. else if (freq >= 16)
  336. return 2;
  337. else if (freq >= 10)
  338. return 1;
  339. return 0;
  340. }
  341. static void wm8750_find_pll_bits(unsigned long rate, unsigned long parent_rate,
  342. u32 *filter, u32 *multiplier, u32 *divisor1, u32 *divisor2)
  343. {
  344. u32 mul, div1, div2;
  345. u32 best_mul, best_div1, best_div2;
  346. unsigned long tclk, rate_err, best_err;
  347. best_err = (unsigned long)-1;
  348. /* Find the closest match (lower or equal to requested) */
  349. for (div1 = 1; div1 >= 0; div1--)
  350. for (div2 = 7; div2 >= 0; div2--)
  351. for (mul = 0; mul <= 255; mul++) {
  352. tclk = parent_rate * (mul + 1) / ((div1 + 1) * (1 << div2));
  353. if (tclk > rate)
  354. continue;
  355. /* error will always be +ve */
  356. rate_err = rate - tclk;
  357. if (rate_err == 0) {
  358. *filter = wm8750_get_filter(parent_rate, div1);
  359. *multiplier = mul;
  360. *divisor1 = div1;
  361. *divisor2 = div2;
  362. return;
  363. }
  364. if (rate_err < best_err) {
  365. best_err = rate_err;
  366. best_mul = mul;
  367. best_div1 = div1;
  368. best_div2 = div2;
  369. }
  370. }
  371. /* if we got here, it wasn't an exact match */
  372. pr_warn("%s: requested rate %lu, found rate %lu\n", __func__, rate,
  373. rate - best_err);
  374. *filter = wm8750_get_filter(parent_rate, best_div1);
  375. *multiplier = best_mul;
  376. *divisor1 = best_div1;
  377. *divisor2 = best_div2;
  378. }
  379. static int vtwm_pll_set_rate(struct clk_hw *hw, unsigned long rate,
  380. unsigned long parent_rate)
  381. {
  382. struct clk_pll *pll = to_clk_pll(hw);
  383. u32 filter, mul, div1, div2;
  384. u32 pll_val;
  385. unsigned long flags = 0;
  386. /* sanity check */
  387. switch (pll->type) {
  388. case PLL_TYPE_VT8500:
  389. vt8500_find_pll_bits(rate, parent_rate, &mul, &div1);
  390. pll_val = VT8500_BITS_TO_VAL(mul, div1);
  391. break;
  392. case PLL_TYPE_WM8650:
  393. wm8650_find_pll_bits(rate, parent_rate, &mul, &div1, &div2);
  394. pll_val = WM8650_BITS_TO_VAL(mul, div1, div2);
  395. break;
  396. case PLL_TYPE_WM8750:
  397. wm8750_find_pll_bits(rate, parent_rate, &filter, &mul, &div1, &div2);
  398. pll_val = WM8750_BITS_TO_VAL(filter, mul, div1, div2);
  399. default:
  400. pr_err("%s: invalid pll type\n", __func__);
  401. return 0;
  402. }
  403. spin_lock_irqsave(pll->lock, flags);
  404. vt8500_pmc_wait_busy();
  405. writel(pll_val, pll->reg);
  406. vt8500_pmc_wait_busy();
  407. spin_unlock_irqrestore(pll->lock, flags);
  408. return 0;
  409. }
  410. static long vtwm_pll_round_rate(struct clk_hw *hw, unsigned long rate,
  411. unsigned long *prate)
  412. {
  413. struct clk_pll *pll = to_clk_pll(hw);
  414. u32 filter, mul, div1, div2;
  415. long round_rate;
  416. switch (pll->type) {
  417. case PLL_TYPE_VT8500:
  418. vt8500_find_pll_bits(rate, *prate, &mul, &div1);
  419. round_rate = VT8500_BITS_TO_FREQ(*prate, mul, div1);
  420. break;
  421. case PLL_TYPE_WM8650:
  422. wm8650_find_pll_bits(rate, *prate, &mul, &div1, &div2);
  423. round_rate = WM8650_BITS_TO_FREQ(*prate, mul, div1, div2);
  424. break;
  425. case PLL_TYPE_WM8750:
  426. wm8750_find_pll_bits(rate, *prate, &filter, &mul, &div1, &div2);
  427. round_rate = WM8750_BITS_TO_FREQ(*prate, mul, div1, div2);
  428. default:
  429. round_rate = 0;
  430. }
  431. return round_rate;
  432. }
  433. static unsigned long vtwm_pll_recalc_rate(struct clk_hw *hw,
  434. unsigned long parent_rate)
  435. {
  436. struct clk_pll *pll = to_clk_pll(hw);
  437. u32 pll_val = readl(pll->reg);
  438. unsigned long pll_freq;
  439. switch (pll->type) {
  440. case PLL_TYPE_VT8500:
  441. pll_freq = parent_rate * VT8500_PLL_MUL(pll_val);
  442. pll_freq /= VT8500_PLL_DIV(pll_val);
  443. break;
  444. case PLL_TYPE_WM8650:
  445. pll_freq = parent_rate * WM8650_PLL_MUL(pll_val);
  446. pll_freq /= WM8650_PLL_DIV(pll_val);
  447. break;
  448. case PLL_TYPE_WM8750:
  449. pll_freq = parent_rate * WM8750_PLL_MUL(pll_val);
  450. pll_freq /= WM8750_PLL_DIV(pll_val);
  451. break;
  452. default:
  453. pll_freq = 0;
  454. }
  455. return pll_freq;
  456. }
  457. const struct clk_ops vtwm_pll_ops = {
  458. .round_rate = vtwm_pll_round_rate,
  459. .set_rate = vtwm_pll_set_rate,
  460. .recalc_rate = vtwm_pll_recalc_rate,
  461. };
  462. static __init void vtwm_pll_clk_init(struct device_node *node, int pll_type)
  463. {
  464. u32 reg;
  465. struct clk *clk;
  466. struct clk_pll *pll_clk;
  467. const char *clk_name = node->name;
  468. const char *parent_name;
  469. struct clk_init_data init;
  470. int rc;
  471. rc = of_property_read_u32(node, "reg", &reg);
  472. if (WARN_ON(rc))
  473. return;
  474. pll_clk = kzalloc(sizeof(*pll_clk), GFP_KERNEL);
  475. if (WARN_ON(!pll_clk))
  476. return;
  477. pll_clk->reg = pmc_base + reg;
  478. pll_clk->lock = &_lock;
  479. pll_clk->type = pll_type;
  480. of_property_read_string(node, "clock-output-names", &clk_name);
  481. init.name = clk_name;
  482. init.ops = &vtwm_pll_ops;
  483. init.flags = 0;
  484. parent_name = of_clk_get_parent_name(node, 0);
  485. init.parent_names = &parent_name;
  486. init.num_parents = 1;
  487. pll_clk->hw.init = &init;
  488. clk = clk_register(NULL, &pll_clk->hw);
  489. if (WARN_ON(IS_ERR(clk))) {
  490. kfree(pll_clk);
  491. return;
  492. }
  493. rc = of_clk_add_provider(node, of_clk_src_simple_get, clk);
  494. clk_register_clkdev(clk, clk_name, NULL);
  495. }
  496. /* Wrappers for initialization functions */
  497. static void __init vt8500_pll_init(struct device_node *node)
  498. {
  499. vtwm_pll_clk_init(node, PLL_TYPE_VT8500);
  500. }
  501. static void __init wm8650_pll_init(struct device_node *node)
  502. {
  503. vtwm_pll_clk_init(node, PLL_TYPE_WM8650);
  504. }
  505. static void __init wm8750_pll_init(struct device_node *node)
  506. {
  507. vtwm_pll_clk_init(node, PLL_TYPE_WM8750);
  508. }
  509. static const __initconst struct of_device_id clk_match[] = {
  510. { .compatible = "fixed-clock", .data = of_fixed_clk_setup, },
  511. { .compatible = "via,vt8500-pll-clock", .data = vt8500_pll_init, },
  512. { .compatible = "wm,wm8650-pll-clock", .data = wm8650_pll_init, },
  513. { .compatible = "wm,wm8750-pll-clock", .data = wm8750_pll_init, },
  514. { .compatible = "via,vt8500-device-clock",
  515. .data = vtwm_device_clk_init, },
  516. { /* sentinel */ }
  517. };
  518. void __init vtwm_clk_init(void __iomem *base)
  519. {
  520. if (!base)
  521. return;
  522. pmc_base = base;
  523. of_clk_init(clk_match);
  524. }