clock-r8a73a4.c 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  1. /*
  2. * r8a73a4 clock framework support
  3. *
  4. * Copyright (C) 2013 Renesas Solutions Corp.
  5. * Copyright (C) 2013 Magnus Damm
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; version 2 of the License.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. #include <linux/init.h>
  21. #include <linux/io.h>
  22. #include <linux/kernel.h>
  23. #include <linux/sh_clk.h>
  24. #include <linux/clkdev.h>
  25. #include <mach/clock.h>
  26. #include <mach/common.h>
  27. #define CPG_BASE 0xe6150000
  28. #define CPG_LEN 0x270
  29. #define SMSTPCR2 0xe6150138
  30. #define SMSTPCR3 0xe615013c
  31. #define SMSTPCR5 0xe6150144
  32. #define FRQCRA 0xE6150000
  33. #define FRQCRB 0xE6150004
  34. #define VCLKCR1 0xE6150008
  35. #define VCLKCR2 0xE615000C
  36. #define VCLKCR3 0xE615001C
  37. #define VCLKCR4 0xE6150014
  38. #define VCLKCR5 0xE6150034
  39. #define ZBCKCR 0xE6150010
  40. #define SD0CKCR 0xE6150074
  41. #define SD1CKCR 0xE6150078
  42. #define SD2CKCR 0xE615007C
  43. #define MMC0CKCR 0xE6150240
  44. #define MMC1CKCR 0xE6150244
  45. #define FSIACKCR 0xE6150018
  46. #define FSIBCKCR 0xE6150090
  47. #define MPCKCR 0xe6150080
  48. #define SPUVCKCR 0xE6150094
  49. #define HSICKCR 0xE615026C
  50. #define M4CKCR 0xE6150098
  51. #define PLLECR 0xE61500D0
  52. #define PLL1CR 0xE6150028
  53. #define PLL2CR 0xE615002C
  54. #define PLL2SCR 0xE61501F4
  55. #define PLL2HCR 0xE61501E4
  56. #define CKSCR 0xE61500C0
  57. #define CPG_MAP(o) ((o - CPG_BASE) + cpg_mapping.base)
  58. static struct clk_mapping cpg_mapping = {
  59. .phys = CPG_BASE,
  60. .len = CPG_LEN,
  61. };
  62. static struct clk extalr_clk = {
  63. .rate = 32768,
  64. .mapping = &cpg_mapping,
  65. };
  66. static struct clk extal1_clk = {
  67. .rate = 26000000,
  68. .mapping = &cpg_mapping,
  69. };
  70. static struct clk extal2_clk = {
  71. .rate = 48000000,
  72. .mapping = &cpg_mapping,
  73. };
  74. static struct sh_clk_ops followparent_clk_ops = {
  75. .recalc = followparent_recalc,
  76. };
  77. static struct clk main_clk = {
  78. /* .parent will be set r8a73a4_clock_init */
  79. .ops = &followparent_clk_ops,
  80. };
  81. SH_CLK_RATIO(div2, 1, 2);
  82. SH_CLK_RATIO(div4, 1, 4);
  83. SH_FIXED_RATIO_CLK(main_div2_clk, main_clk, div2);
  84. SH_FIXED_RATIO_CLK(extal1_div2_clk, extal1_clk, div2);
  85. SH_FIXED_RATIO_CLK(extal2_div2_clk, extal2_clk, div2);
  86. SH_FIXED_RATIO_CLK(extal2_div4_clk, extal2_clk, div4);
  87. /* External FSIACK/FSIBCK clock */
  88. static struct clk fsiack_clk = {
  89. };
  90. static struct clk fsibck_clk = {
  91. };
  92. /*
  93. * PLL clocks
  94. */
  95. static struct clk *pll_parent_main[] = {
  96. [0] = &main_clk,
  97. [1] = &main_div2_clk
  98. };
  99. static struct clk *pll_parent_main_extal[8] = {
  100. [0] = &main_div2_clk,
  101. [1] = &extal2_div2_clk,
  102. [3] = &extal2_div4_clk,
  103. [4] = &main_clk,
  104. [5] = &extal2_clk,
  105. };
  106. static unsigned long pll_recalc(struct clk *clk)
  107. {
  108. unsigned long mult = 1;
  109. if (ioread32(CPG_MAP(PLLECR)) & (1 << clk->enable_bit))
  110. mult = (((ioread32(clk->mapped_reg) >> 24) & 0x7f) + 1);
  111. return clk->parent->rate * mult;
  112. }
  113. static int pll_set_parent(struct clk *clk, struct clk *parent)
  114. {
  115. u32 val;
  116. int i, ret;
  117. if (!clk->parent_table || !clk->parent_num)
  118. return -EINVAL;
  119. /* Search the parent */
  120. for (i = 0; i < clk->parent_num; i++)
  121. if (clk->parent_table[i] == parent)
  122. break;
  123. if (i == clk->parent_num)
  124. return -ENODEV;
  125. ret = clk_reparent(clk, parent);
  126. if (ret < 0)
  127. return ret;
  128. val = ioread32(clk->mapped_reg) &
  129. ~(((1 << clk->src_width) - 1) << clk->src_shift);
  130. iowrite32(val | i << clk->src_shift, clk->mapped_reg);
  131. return 0;
  132. }
  133. static struct sh_clk_ops pll_clk_ops = {
  134. .recalc = pll_recalc,
  135. .set_parent = pll_set_parent,
  136. };
  137. #define PLL_CLOCK(name, p, pt, w, s, reg, e) \
  138. static struct clk name = { \
  139. .ops = &pll_clk_ops, \
  140. .flags = CLK_ENABLE_ON_INIT, \
  141. .parent = p, \
  142. .parent_table = pt, \
  143. .parent_num = ARRAY_SIZE(pt), \
  144. .src_width = w, \
  145. .src_shift = s, \
  146. .enable_reg = (void __iomem *)reg, \
  147. .enable_bit = e, \
  148. .mapping = &cpg_mapping, \
  149. }
  150. PLL_CLOCK(pll1_clk, &main_clk, pll_parent_main, 1, 7, PLL1CR, 1);
  151. PLL_CLOCK(pll2_clk, &main_div2_clk, pll_parent_main_extal, 3, 5, PLL2CR, 2);
  152. PLL_CLOCK(pll2s_clk, &main_div2_clk, pll_parent_main_extal, 3, 5, PLL2SCR, 4);
  153. PLL_CLOCK(pll2h_clk, &main_div2_clk, pll_parent_main_extal, 3, 5, PLL2HCR, 5);
  154. SH_FIXED_RATIO_CLK(pll1_div2_clk, pll1_clk, div2);
  155. static struct clk *main_clks[] = {
  156. &extalr_clk,
  157. &extal1_clk,
  158. &extal1_div2_clk,
  159. &extal2_clk,
  160. &extal2_div2_clk,
  161. &extal2_div4_clk,
  162. &main_clk,
  163. &main_div2_clk,
  164. &fsiack_clk,
  165. &fsibck_clk,
  166. &pll1_clk,
  167. &pll1_div2_clk,
  168. &pll2_clk,
  169. &pll2s_clk,
  170. &pll2h_clk,
  171. };
  172. /* DIV4 */
  173. static void div4_kick(struct clk *clk)
  174. {
  175. unsigned long value;
  176. /* set KICK bit in FRQCRB to update hardware setting */
  177. value = ioread32(CPG_MAP(FRQCRB));
  178. value |= (1 << 31);
  179. iowrite32(value, CPG_MAP(FRQCRB));
  180. }
  181. static int divisors[] = { 2, 3, 4, 6, 8, 12, 16, 18, 24, 0, 36, 48, 10};
  182. static struct clk_div_mult_table div4_div_mult_table = {
  183. .divisors = divisors,
  184. .nr_divisors = ARRAY_SIZE(divisors),
  185. };
  186. static struct clk_div4_table div4_table = {
  187. .div_mult_table = &div4_div_mult_table,
  188. .kick = div4_kick,
  189. };
  190. enum {
  191. DIV4_I, DIV4_M3, DIV4_B, DIV4_M1, DIV4_M2,
  192. DIV4_ZX, DIV4_ZS, DIV4_HP,
  193. DIV4_NR };
  194. static struct clk div4_clks[DIV4_NR] = {
  195. [DIV4_I] = SH_CLK_DIV4(&pll1_clk, FRQCRA, 20, 0x0dff, CLK_ENABLE_ON_INIT),
  196. [DIV4_M3] = SH_CLK_DIV4(&pll1_clk, FRQCRA, 12, 0x1dff, CLK_ENABLE_ON_INIT),
  197. [DIV4_B] = SH_CLK_DIV4(&pll1_clk, FRQCRA, 8, 0x0dff, CLK_ENABLE_ON_INIT),
  198. [DIV4_M1] = SH_CLK_DIV4(&pll1_clk, FRQCRA, 4, 0x1dff, 0),
  199. [DIV4_M2] = SH_CLK_DIV4(&pll1_clk, FRQCRA, 0, 0x1dff, 0),
  200. [DIV4_ZX] = SH_CLK_DIV4(&pll1_clk, FRQCRB, 12, 0x0dff, 0),
  201. [DIV4_ZS] = SH_CLK_DIV4(&pll1_clk, FRQCRB, 8, 0x0dff, 0),
  202. [DIV4_HP] = SH_CLK_DIV4(&pll1_clk, FRQCRB, 4, 0x0dff, 0),
  203. };
  204. enum {
  205. DIV6_ZB,
  206. DIV6_SDHI0, DIV6_SDHI1, DIV6_SDHI2,
  207. DIV6_MMC0, DIV6_MMC1,
  208. DIV6_VCK1, DIV6_VCK2, DIV6_VCK3, DIV6_VCK4, DIV6_VCK5,
  209. DIV6_FSIA, DIV6_FSIB,
  210. DIV6_MP, DIV6_M4, DIV6_HSI, DIV6_SPUV,
  211. DIV6_NR };
  212. static struct clk *div6_parents[8] = {
  213. [0] = &pll1_div2_clk,
  214. [1] = &pll2s_clk,
  215. [3] = &extal2_clk,
  216. [4] = &main_div2_clk,
  217. [6] = &extalr_clk,
  218. };
  219. static struct clk *fsia_parents[4] = {
  220. [0] = &pll1_div2_clk,
  221. [1] = &pll2s_clk,
  222. [2] = &fsiack_clk,
  223. };
  224. static struct clk *fsib_parents[4] = {
  225. [0] = &pll1_div2_clk,
  226. [1] = &pll2s_clk,
  227. [2] = &fsibck_clk,
  228. };
  229. static struct clk *mp_parents[4] = {
  230. [0] = &pll1_div2_clk,
  231. [1] = &pll2s_clk,
  232. [2] = &extal2_clk,
  233. [3] = &extal2_clk,
  234. };
  235. static struct clk *m4_parents[2] = {
  236. [0] = &pll2s_clk,
  237. };
  238. static struct clk *hsi_parents[4] = {
  239. [0] = &pll2h_clk,
  240. [1] = &pll1_div2_clk,
  241. [3] = &pll2s_clk,
  242. };
  243. /*** FIXME ***
  244. * SH_CLK_DIV6_EXT() macro doesn't care .mapping
  245. * but, it is necessary on R-Car (= ioremap() base CPG)
  246. * The difference between
  247. * SH_CLK_DIV6_EXT() <--> SH_CLK_MAP_DIV6_EXT()
  248. * is only .mapping
  249. */
  250. #define SH_CLK_MAP_DIV6_EXT(_reg, _flags, _parents, \
  251. _num_parents, _src_shift, _src_width) \
  252. { \
  253. .enable_reg = (void __iomem *)_reg, \
  254. .enable_bit = 0, /* unused */ \
  255. .flags = _flags | CLK_MASK_DIV_ON_DISABLE, \
  256. .div_mask = SH_CLK_DIV6_MSK, \
  257. .parent_table = _parents, \
  258. .parent_num = _num_parents, \
  259. .src_shift = _src_shift, \
  260. .src_width = _src_width, \
  261. .mapping = &cpg_mapping, \
  262. }
  263. static struct clk div6_clks[DIV6_NR] = {
  264. [DIV6_ZB] = SH_CLK_MAP_DIV6_EXT(ZBCKCR, CLK_ENABLE_ON_INIT,
  265. div6_parents, 2, 7, 1),
  266. [DIV6_SDHI0] = SH_CLK_MAP_DIV6_EXT(SD0CKCR, 0,
  267. div6_parents, 2, 6, 2),
  268. [DIV6_SDHI1] = SH_CLK_MAP_DIV6_EXT(SD1CKCR, 0,
  269. div6_parents, 2, 6, 2),
  270. [DIV6_SDHI2] = SH_CLK_MAP_DIV6_EXT(SD2CKCR, 0,
  271. div6_parents, 2, 6, 2),
  272. [DIV6_MMC0] = SH_CLK_MAP_DIV6_EXT(MMC0CKCR, 0,
  273. div6_parents, 2, 6, 2),
  274. [DIV6_MMC1] = SH_CLK_MAP_DIV6_EXT(MMC1CKCR, 0,
  275. div6_parents, 2, 6, 2),
  276. [DIV6_VCK1] = SH_CLK_MAP_DIV6_EXT(VCLKCR1, 0, /* didn't care bit[6-7] */
  277. div6_parents, ARRAY_SIZE(div6_parents), 12, 3),
  278. [DIV6_VCK2] = SH_CLK_MAP_DIV6_EXT(VCLKCR2, 0, /* didn't care bit[6-7] */
  279. div6_parents, ARRAY_SIZE(div6_parents), 12, 3),
  280. [DIV6_VCK3] = SH_CLK_MAP_DIV6_EXT(VCLKCR3, 0, /* didn't care bit[6-7] */
  281. div6_parents, ARRAY_SIZE(div6_parents), 12, 3),
  282. [DIV6_VCK4] = SH_CLK_MAP_DIV6_EXT(VCLKCR4, 0, /* didn't care bit[6-7] */
  283. div6_parents, ARRAY_SIZE(div6_parents), 12, 3),
  284. [DIV6_VCK5] = SH_CLK_MAP_DIV6_EXT(VCLKCR5, 0, /* didn't care bit[6-7] */
  285. div6_parents, ARRAY_SIZE(div6_parents), 12, 3),
  286. [DIV6_FSIA] = SH_CLK_MAP_DIV6_EXT(FSIACKCR, 0,
  287. fsia_parents, ARRAY_SIZE(fsia_parents), 6, 2),
  288. [DIV6_FSIB] = SH_CLK_MAP_DIV6_EXT(FSIBCKCR, 0,
  289. fsib_parents, ARRAY_SIZE(fsib_parents), 6, 2),
  290. [DIV6_MP] = SH_CLK_MAP_DIV6_EXT(MPCKCR, 0, /* it needs bit[9-11] control */
  291. mp_parents, ARRAY_SIZE(mp_parents), 6, 2),
  292. /* pll2s will be selected always for M4 */
  293. [DIV6_M4] = SH_CLK_MAP_DIV6_EXT(M4CKCR, 0, /* it needs bit[9] control */
  294. m4_parents, ARRAY_SIZE(m4_parents), 6, 1),
  295. [DIV6_HSI] = SH_CLK_MAP_DIV6_EXT(HSICKCR, 0, /* it needs bit[9] control */
  296. hsi_parents, ARRAY_SIZE(hsi_parents), 6, 2),
  297. [DIV6_SPUV] = SH_CLK_MAP_DIV6_EXT(SPUVCKCR, 0,
  298. mp_parents, ARRAY_SIZE(mp_parents), 6, 2),
  299. };
  300. /* MSTP */
  301. enum {
  302. MSTP217, MSTP216, MSTP207, MSTP206, MSTP204, MSTP203,
  303. MSTP315, MSTP314, MSTP313, MSTP312, MSTP305,
  304. MSTP522,
  305. MSTP_NR
  306. };
  307. static struct clk mstp_clks[MSTP_NR] = {
  308. [MSTP204] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 4, 0), /* SCIFA0 */
  309. [MSTP203] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 3, 0), /* SCIFA1 */
  310. [MSTP206] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 6, 0), /* SCIFB0 */
  311. [MSTP207] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 7, 0), /* SCIFB1 */
  312. [MSTP216] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 16, 0), /* SCIFB2 */
  313. [MSTP217] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 17, 0), /* SCIFB3 */
  314. [MSTP305] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC1],SMSTPCR3, 5, 0), /* MMCIF1 */
  315. [MSTP312] = SH_CLK_MSTP32(&div6_clks[DIV6_SDHI2],SMSTPCR3, 12, 0), /* SDHI2 */
  316. [MSTP313] = SH_CLK_MSTP32(&div6_clks[DIV6_SDHI1],SMSTPCR3, 13, 0), /* SDHI1 */
  317. [MSTP314] = SH_CLK_MSTP32(&div6_clks[DIV6_SDHI0],SMSTPCR3, 14, 0), /* SDHI0 */
  318. [MSTP315] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC0],SMSTPCR3, 15, 0), /* MMCIF0 */
  319. [MSTP522] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR5, 22, 0), /* Thermal */
  320. };
  321. static struct clk_lookup lookups[] = {
  322. /* main clock */
  323. CLKDEV_CON_ID("extal1", &extal1_clk),
  324. CLKDEV_CON_ID("extal1_div2", &extal1_div2_clk),
  325. CLKDEV_CON_ID("extal2", &extal2_clk),
  326. CLKDEV_CON_ID("extal2_div2", &extal2_div2_clk),
  327. CLKDEV_CON_ID("extal2_div4", &extal2_div4_clk),
  328. CLKDEV_CON_ID("fsiack", &fsiack_clk),
  329. CLKDEV_CON_ID("fsibck", &fsibck_clk),
  330. /* pll clock */
  331. CLKDEV_CON_ID("pll1", &pll1_clk),
  332. CLKDEV_CON_ID("pll1_div2", &pll1_div2_clk),
  333. CLKDEV_CON_ID("pll2", &pll2_clk),
  334. CLKDEV_CON_ID("pll2s", &pll2s_clk),
  335. CLKDEV_CON_ID("pll2h", &pll2h_clk),
  336. /* DIV6 */
  337. CLKDEV_CON_ID("zb", &div6_clks[DIV6_ZB]),
  338. CLKDEV_CON_ID("vck1", &div6_clks[DIV6_VCK1]),
  339. CLKDEV_CON_ID("vck2", &div6_clks[DIV6_VCK2]),
  340. CLKDEV_CON_ID("vck3", &div6_clks[DIV6_VCK3]),
  341. CLKDEV_CON_ID("vck4", &div6_clks[DIV6_VCK4]),
  342. CLKDEV_CON_ID("vck5", &div6_clks[DIV6_VCK5]),
  343. CLKDEV_CON_ID("fsia", &div6_clks[DIV6_FSIA]),
  344. CLKDEV_CON_ID("fsib", &div6_clks[DIV6_FSIB]),
  345. CLKDEV_CON_ID("mp", &div6_clks[DIV6_MP]),
  346. CLKDEV_CON_ID("m4", &div6_clks[DIV6_M4]),
  347. CLKDEV_CON_ID("hsi", &div6_clks[DIV6_HSI]),
  348. CLKDEV_CON_ID("spuv", &div6_clks[DIV6_SPUV]),
  349. /* MSTP */
  350. CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]),
  351. CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]),
  352. CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]),
  353. CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP207]),
  354. CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP216]),
  355. CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP217]),
  356. CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
  357. CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]),
  358. CLKDEV_DEV_ID("ee220000.mmcif", &mstp_clks[MSTP305]),
  359. CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP312]),
  360. CLKDEV_DEV_ID("ee140000.sdhi", &mstp_clks[MSTP312]),
  361. CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]),
  362. CLKDEV_DEV_ID("ee120000.sdhi", &mstp_clks[MSTP313]),
  363. CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]),
  364. CLKDEV_DEV_ID("ee100000.sdhi", &mstp_clks[MSTP314]),
  365. CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]),
  366. CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]),
  367. /* for DT */
  368. CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]),
  369. };
  370. void __init r8a73a4_clock_init(void)
  371. {
  372. void __iomem *reg;
  373. int k, ret = 0;
  374. u32 ckscr;
  375. reg = ioremap_nocache(CKSCR, PAGE_SIZE);
  376. BUG_ON(!reg);
  377. ckscr = ioread32(reg);
  378. iounmap(reg);
  379. switch ((ckscr >> 28) & 0x3) {
  380. case 0:
  381. main_clk.parent = &extal1_clk;
  382. break;
  383. case 1:
  384. main_clk.parent = &extal1_div2_clk;
  385. break;
  386. case 2:
  387. main_clk.parent = &extal2_clk;
  388. break;
  389. case 3:
  390. main_clk.parent = &extal2_div2_clk;
  391. break;
  392. }
  393. for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++)
  394. ret = clk_register(main_clks[k]);
  395. if (!ret)
  396. ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table);
  397. if (!ret)
  398. ret = sh_clk_div6_reparent_register(div6_clks, DIV6_NR);
  399. if (!ret)
  400. ret = sh_clk_mstp_register(mstp_clks, MSTP_NR);
  401. clkdev_add_table(lookups, ARRAY_SIZE(lookups));
  402. if (!ret)
  403. shmobile_clk_init();
  404. else
  405. panic("failed to setup r8a73a4 clocks\n");
  406. }