cablePowerDataOperation.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578
  1. /*
  2. * OMAP2430 clock data
  3. *
  4. * Copyright (C) 2005-2009, 2012 Texas Instruments, Inc.
  5. * Copyright (C) 2004-2011 Nokia Corporation
  6. *
  7. * Contacts:
  8. * Richard Woodruff <r-woodruff2@ti.com>
  9. * Paul Walmsley
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License version 2 as
  13. * published by the Free Software Foundation.
  14. */
  15. #include <linux/kernel.h>
  16. #include <linux/clk.h>
  17. #include <linux/clk-private.h>
  18. #include <linux/list.h>
  19. #include "soc.h"
  20. #include "iomap.h"
  21. #include "clock.h"
  22. #include "clock2xxx.h"
  23. #include "opp2xxx.h"
  24. #include "cm2xxx.h"
  25. #include "prm2xxx.h"
  26. #include "prm-regbits-24xx.h"
  27. #include "cm-regbits-24xx.h"
  28. #include "sdrc.h"
  29. #include "control.h"
  30. #define OMAP_CM_REGADDR OMAP2430_CM_REGADDR
  31. /*
  32. * 2430 clock tree.
  33. *
  34. * NOTE:In many cases here we are assigning a 'default' parent. In
  35. * many cases the parent is selectable. The set parent calls will
  36. * also switch sources.
  37. *
  38. * Several sources are given initial rates which may be wrong, this will
  39. * be fixed up in the init func.
  40. *
  41. * Things are broadly separated below by clock domains. It is
  42. * noteworthy that most peripherals have dependencies on multiple clock
  43. * domains. Many get their interface clocks from the L4 domain, but get
  44. * functional clocks from fixed sources or other core domain derived
  45. * clocks.
  46. */
  47. DEFINE_CLK_FIXED_RATE(alt_ck, CLK_IS_ROOT, 54000000, 0x0);
  48. DEFINE_CLK_FIXED_RATE(func_32k_ck, CLK_IS_ROOT, 32768, 0x0);
  49. DEFINE_CLK_FIXED_RATE(mcbsp_clks, CLK_IS_ROOT, 0x0, 0x0);
  50. static struct clk osc_ck;
  51. static const struct clk_ops osc_ck_ops = {
  52. .enable = &omap2_enable_osc_ck,
  53. .disable = omap2_disable_osc_ck,
  54. .recalc_rate = &omap2_osc_clk_recalc,
  55. };
  56. static struct clk_hw_omap osc_ck_hw = {
  57. .hw = {
  58. .clk = &osc_ck,
  59. },
  60. };
  61. static struct clk osc_ck = {
  62. .name = "osc_ck",
  63. .ops = &osc_ck_ops,
  64. .hw = &osc_ck_hw.hw,
  65. .flags = CLK_IS_ROOT,
  66. };
  67. DEFINE_CLK_FIXED_RATE(secure_32k_ck, CLK_IS_ROOT, 32768, 0x0);
  68. static struct clk sys_ck;
  69. static const char *sys_ck_parent_names[] = {
  70. "osc_ck",
  71. };
  72. static const struct clk_ops sys_ck_ops = {
  73. .init = &omap2_init_clk_clkdm,
  74. .recalc_rate = &omap2xxx_sys_clk_recalc,
  75. };
  76. DEFINE_STRUCT_CLK_HW_OMAP(sys_ck, "wkup_clkdm");
  77. DEFINE_STRUCT_CLK(sys_ck, sys_ck_parent_names, sys_ck_ops);
  78. static struct dpll_data dpll_dd = {
  79. .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
  80. .mult_mask = OMAP24XX_DPLL_MULT_MASK,
  81. .div1_mask = OMAP24XX_DPLL_DIV_MASK,
  82. .clk_bypass = &sys_ck,
  83. .clk_ref = &sys_ck,
  84. .control_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
  85. .enable_mask = OMAP24XX_EN_DPLL_MASK,
  86. .max_multiplier = 1023,
  87. .min_divider = 1,
  88. .max_divider = 16,
  89. };
  90. static struct clk dpll_ck;
  91. static const char *dpll_ck_parent_names[] = {
  92. "sys_ck",
  93. };
  94. static const struct clk_ops dpll_ck_ops = {
  95. .init = &omap2_init_clk_clkdm,
  96. .get_parent = &omap2_init_dpll_parent,
  97. .recalc_rate = &omap2_dpllcore_recalc,
  98. .round_rate = &omap2_dpll_round_rate,
  99. .set_rate = &omap2_reprogram_dpllcore,
  100. };
  101. static struct clk_hw_omap dpll_ck_hw = {
  102. .hw = {
  103. .clk = &dpll_ck,
  104. },
  105. .ops = &clkhwops_omap2xxx_dpll,
  106. .dpll_data = &dpll_dd,
  107. .clkdm_name = "wkup_clkdm",
  108. };
  109. DEFINE_STRUCT_CLK(dpll_ck, dpll_ck_parent_names, dpll_ck_ops);
  110. static struct clk core_ck;
  111. static const char *core_ck_parent_names[] = {
  112. "dpll_ck",
  113. };
  114. static const struct clk_ops core_ck_ops = {
  115. .init = &omap2_init_clk_clkdm,
  116. };
  117. DEFINE_STRUCT_CLK_HW_OMAP(core_ck, "wkup_clkdm");
  118. DEFINE_STRUCT_CLK(core_ck, core_ck_parent_names, core_ck_ops);
  119. DEFINE_CLK_DIVIDER(core_l3_ck, "core_ck", &core_ck, 0x0,
  120. OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
  121. OMAP24XX_CLKSEL_L3_SHIFT, OMAP24XX_CLKSEL_L3_WIDTH,
  122. CLK_DIVIDER_ONE_BASED, NULL);
  123. DEFINE_CLK_DIVIDER(l4_ck, "core_l3_ck", &core_l3_ck, 0x0,
  124. OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
  125. OMAP24XX_CLKSEL_L4_SHIFT, OMAP24XX_CLKSEL_L4_WIDTH,
  126. CLK_DIVIDER_ONE_BASED, NULL);
  127. static struct clk aes_ick;
  128. static const char *aes_ick_parent_names[] = {
  129. "l4_ck",
  130. };
  131. static const struct clk_ops aes_ick_ops = {
  132. .init = &omap2_init_clk_clkdm,
  133. .enable = &omap2_dflt_clk_enable,
  134. .disable = &omap2_dflt_clk_disable,
  135. .is_enabled = &omap2_dflt_clk_is_enabled,
  136. };
  137. static struct clk_hw_omap aes_ick_hw = {
  138. .hw = {
  139. .clk = &aes_ick,
  140. },
  141. .ops = &clkhwops_iclk_wait,
  142. .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
  143. .enable_bit = OMAP24XX_EN_AES_SHIFT,
  144. .clkdm_name = "core_l4_clkdm",
  145. };
  146. DEFINE_STRUCT_CLK(aes_ick, aes_ick_parent_names, aes_ick_ops);
  147. static struct clk apll54_ck;
  148. static const struct clk_ops apll54_ck_ops = {
  149. .init = &omap2_init_clk_clkdm,
  150. .enable = &omap2_clk_apll54_enable,
  151. .disable = &omap2_clk_apll54_disable,
  152. .recalc_rate = &omap2_clk_apll54_recalc,
  153. };
  154. static struct clk_hw_omap apll54_ck_hw = {
  155. .hw = {
  156. .clk = &apll54_ck,
  157. },
  158. .ops = &clkhwops_apll54,
  159. .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
  160. .enable_bit = OMAP24XX_EN_54M_PLL_SHIFT,
  161. .flags = ENABLE_ON_INIT,
  162. .clkdm_name = "wkup_clkdm",
  163. };
  164. DEFINE_STRUCT_CLK(apll54_ck, dpll_ck_parent_names, apll54_ck_ops);
  165. static struct clk apll96_ck;
  166. static const struct clk_ops apll96_ck_ops = {
  167. .init = &omap2_init_clk_clkdm,
  168. .enable = &omap2_clk_apll96_enable,
  169. .disable = &omap2_clk_apll96_disable,
  170. .recalc_rate = &omap2_clk_apll96_recalc,
  171. };
  172. static struct clk_hw_omap apll96_ck_hw = {
  173. .hw = {
  174. .clk = &apll96_ck,
  175. },
  176. .ops = &clkhwops_apll96,
  177. .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
  178. .enable_bit = OMAP24XX_EN_96M_PLL_SHIFT,
  179. .flags = ENABLE_ON_INIT,
  180. .clkdm_name = "wkup_clkdm",
  181. };
  182. DEFINE_STRUCT_CLK(apll96_ck, dpll_ck_parent_names, apll96_ck_ops);
  183. static const char *func_96m_ck_parent_names[] = {
  184. "apll96_ck", "alt_ck",
  185. };
  186. DEFINE_CLK_MUX(func_96m_ck, func_96m_ck_parent_names, NULL, 0x0,
  187. OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), OMAP2430_96M_SOURCE_SHIFT,
  188. OMAP2430_96M_SOURCE_WIDTH, 0x0, NULL);
  189. static struct clk cam_fck;
  190. static const char *cam_fck_parent_names[] = {
  191. "func_96m_ck",
  192. };
  193. static struct clk_hw_omap cam_fck_hw = {
  194. .hw = {
  195. .clk = &cam_fck,
  196. },
  197. .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
  198. .enable_bit = OMAP24XX_EN_CAM_SHIFT,
  199. .clkdm_name = "core_l3_clkdm",
  200. };
  201. DEFINE_STRUCT_CLK(cam_fck, cam_fck_parent_names, aes_ick_ops);
  202. static struct clk cam_ick;
  203. static struct clk_hw_omap cam_ick_hw = {
  204. .hw = {
  205. .clk = &cam_ick,
  206. },
  207. .ops = &clkhwops_iclk,
  208. .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
  209. .enable_bit = OMAP24XX_EN_CAM_SHIFT,
  210. .clkdm_name = "core_l4_clkdm",
  211. };
  212. DEFINE_STRUCT_CLK(cam_ick, aes_ick_parent_names, aes_ick_ops);
  213. static struct clk des_ick;
  214. static struct clk_hw_omap des_ick_hw = {
  215. .hw = {
  216. .clk = &des_ick,
  217. },
  218. .ops = &clkhwops_iclk_wait,
  219. .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
  220. .enable_bit = OMAP24XX_EN_DES_SHIFT,
  221. .clkdm_name = "core_l4_clkdm",
  222. };
  223. DEFINE_STRUCT_CLK(des_ick, aes_ick_parent_names, aes_ick_ops);
  224. static const struct clksel_rate dsp_fck_core_rates[] = {
  225. { .div = 1, .val = 1, .flags = RATE_IN_24XX },
  226. { .div = 2, .val = 2, .flags = RATE_IN_24XX },
  227. { .div = 3, .val = 3, .flags = RATE_IN_24XX },
  228. { .div = 4, .val = 4, .flags = RATE_IN_24XX },
  229. { .div = 0 }
  230. };
  231. static const struct clksel dsp_fck_clksel[] = {
  232. { .parent = &core_ck, .rates = dsp_fck_core_rates },
  233. { .parent = NULL },
  234. };
  235. static const char *dsp_fck_parent_names[] = {
  236. "core_ck",
  237. };
  238. static struct clk dsp_fck;
  239. static const struct clk_ops dsp_fck_ops = {
  240. .init = &omap2_init_clk_clkdm,
  241. .enable = &omap2_dflt_clk_enable,
  242. .disable = &omap2_dflt_clk_disable,
  243. .is_enabled = &omap2_dflt_clk_is_enabled,
  244. .recalc_rate = &omap2_clksel_recalc,
  245. .set_rate = &omap2_clksel_set_rate,
  246. .round_rate = &omap2_clksel_round_rate,
  247. };
  248. DEFINE_CLK_OMAP_MUX_GATE(dsp_fck, "dsp_clkdm", dsp_fck_clksel,
  249. OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL),
  250. OMAP24XX_CLKSEL_DSP_MASK,
  251. OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
  252. OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT, &clkhwops_wait,
  253. dsp_fck_parent_names, dsp_fck_ops);
  254. static const struct clksel_rate dss1_fck_sys_rates[] = {
  255. { .div = 1, .val = 0, .flags = RATE_IN_24XX },
  256. { .div = 0 }
  257. };
  258. static const struct clksel_rate dss1_fck_core_rates[] = {
  259. { .div = 1, .val = 1, .flags = RATE_IN_24XX },
  260. { .div = 2, .val = 2, .flags = RATE_IN_24XX },
  261. { .div = 3, .val = 3, .flags = RATE_IN_24XX },
  262. { .div = 4, .val = 4, .flags = RATE_IN_24XX },
  263. { .div = 5, .val = 5, .flags = RATE_IN_24XX },
  264. { .div = 6, .val = 6, .flags = RATE_IN_24XX },
  265. { .div = 8, .val = 8, .flags = RATE_IN_24XX },
  266. { .div = 9, .val = 9, .flags = RATE_IN_24XX },
  267. { .div = 12, .val = 12, .flags = RATE_IN_24XX },
  268. { .div = 16, .val = 16, .flags = RATE_IN_24XX },
  269. { .div = 0 }
  270. };
  271. static const struct clksel dss1_fck_clksel[] = {
  272. { .parent = &sys_ck, .rates = dss1_fck_sys_rates },
  273. { .parent = &core_ck, .rates = dss1_fck_core_rates },
  274. { .parent = NULL },
  275. };
  276. static const char *dss1_fck_parent_names[] = {
  277. "sys_ck", "core_ck",
  278. };
  279. static const struct clk_ops dss1_fck_ops = {
  280. .init = &omap2_init_clk_clkdm,
  281. .enable = &omap2_dflt_clk_enable,
  282. .disable = &omap2_dflt_clk_disable,
  283. .is_enabled = &omap2_dflt_clk_is_enabled,
  284. .recalc_rate = &omap2_clksel_recalc,
  285. .get_parent = &omap2_clksel_find_parent_index,
  286. .set_parent = &omap2_clksel_set_parent,
  287. };
  288. DEFINE_CLK_OMAP_MUX_GATE(dss1_fck, "dss_clkdm", dss1_fck_clksel,
  289. OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
  290. OMAP24XX_CLKSEL_DSS1_MASK,
  291. OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
  292. OMAP24XX_EN_DSS1_SHIFT, NULL,
  293. dss1_fck_parent_names, dss1_fck_ops);
  294. static const struct clksel_rate dss2_fck_sys_rates[] = {
  295. { .div = 1, .val = 0, .flags = RATE_IN_24XX },
  296. { .div = 0 }
  297. };
  298. static const struct clksel_rate dss2_fck_48m_rates[] = {
  299. { .div = 1, .val = 1, .flags = RATE_IN_24XX },
  300. { .div = 0 }
  301. };
  302. static const struct clksel_rate func_48m_apll96_rates[] = {
  303. { .div = 2, .val = 0, .flags = RATE_IN_24XX },
  304. { .div = 0 }
  305. };
  306. static const struct clksel_rate func_48m_alt_rates[] = {
  307. { .div = 1, .val = 1, .flags = RATE_IN_24XX },
  308. { .div = 0 }
  309. };
  310. static const struct clksel func_48m_clksel[] = {
  311. { .parent = &apll96_ck, .rates = func_48m_apll96_rates },
  312. { .parent = &alt_ck, .rates = func_48m_alt_rates },
  313. { .parent = NULL },
  314. };
  315. static const char *func_48m_ck_parent_names[] = {
  316. "apll96_ck", "alt_ck",
  317. };
  318. static struct clk func_48m_ck;
  319. static const struct clk_ops func_48m_ck_ops = {
  320. .init = &omap2_init_clk_clkdm,
  321. .recalc_rate = &omap2_clksel_recalc,
  322. .set_rate = &omap2_clksel_set_rate,
  323. .round_rate = &omap2_clksel_round_rate,
  324. .get_parent = &omap2_clksel_find_parent_index,
  325. .set_parent = &omap2_clksel_set_parent,
  326. };
  327. static struct clk_hw_omap func_48m_ck_hw = {
  328. .hw = {
  329. .clk = &func_48m_ck,
  330. },
  331. .clksel = func_48m_clksel,
  332. .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
  333. .clksel_mask = OMAP24XX_48M_SOURCE_MASK,
  334. .clkdm_name = "wkup_clkdm",
  335. };
  336. DEFINE_STRUCT_CLK(func_48m_ck, func_48m_ck_parent_names, func_48m_ck_ops);
  337. static const struct clksel dss2_fck_clksel[] = {
  338. { .parent = &sys_ck, .rates = dss2_fck_sys_rates },
  339. { .parent = &func_48m_ck, .rates = dss2_fck_48m_rates },
  340. { .parent = NULL },
  341. };
  342. static const char *dss2_fck_parent_names[] = {
  343. "sys_ck", "func_48m_ck",
  344. };
  345. DEFINE_CLK_OMAP_MUX_GATE(dss2_fck, "dss_clkdm", dss2_fck_clksel,
  346. OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
  347. OMAP24XX_CLKSEL_DSS2_MASK,
  348. OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
  349. OMAP24XX_EN_DSS2_SHIFT, NULL,
  350. dss2_fck_parent_names, dss1_fck_ops);
  351. static const char *func_54m_ck_parent_names[] = {
  352. "apll54_ck", "alt_ck",
  353. };
  354. DEFINE_CLK_MUX(func_54m_ck, func_54m_ck_parent_names, NULL, 0x0,
  355. OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
  356. OMAP24XX_54M_SOURCE_SHIFT, OMAP24XX_54M_SOURCE_WIDTH, 0x0, NULL);
  357. static struct clk dss_54m_fck;
  358. static const char *dss_54m_fck_parent_names[] = {
  359. "func_54m_ck",
  360. };
  361. static struct clk_hw_omap dss_54m_fck_hw = {
  362. .hw = {
  363. .clk = &dss_54m_fck,
  364. },
  365. .ops = &clkhwops_wait,
  366. .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
  367. .enable_bit = OMAP24XX_EN_TV_SHIFT,
  368. .clkdm_name = "dss_clkdm",
  369. };
  370. DEFINE_STRUCT_CLK(dss_54m_fck, dss_54m_fck_parent_names, aes_ick_ops);
  371. static struct clk dss_ick;
  372. static struct clk_hw_omap dss_ick_hw = {
  373. .hw = {
  374. .clk = &dss_ick,
  375. },
  376. .ops = &clkhwops_iclk,
  377. .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
  378. .enable_bit = OMAP24XX_EN_DSS1_SHIFT,
  379. .clkdm_name = "dss_clkdm",
  380. };
  381. DEFINE_STRUCT_CLK(dss_ick, aes_ick_parent_names, aes_ick_ops);
  382. static struct clk emul_ck;
  383. static struct clk_hw_omap emul_ck_hw = {
  384. .hw = {
  385. .clk = &emul_ck,
  386. },
  387. .enable_reg = OMAP2430_PRCM_CLKEMUL_CTRL,
  388. .enable_bit = OMAP24XX_EMULATION_EN_SHIFT,
  389. .clkdm_name = "wkup_clkdm",
  390. };
  391. DEFINE_STRUCT_CLK(emul_ck, dss_54m_fck_parent_names, aes_ick_ops);
  392. DEFINE_CLK_FIXED_FACTOR(func_12m_ck, "func_48m_ck", &func_48m_ck, 0x0, 1, 4);
  393. static struct clk fac_fck;
  394. static const char *fac_fck_parent_names[] = {
  395. "func_12m_ck",
  396. };
  397. static struct clk_hw_omap fac_fck_hw = {
  398. .hw = {
  399. .clk = &fac_fck,
  400. },
  401. .ops = &clkhwops_wait,
  402. .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
  403. .enable_bit = OMAP24XX_EN_FAC_SHIFT,
  404. .clkdm_name = "core_l4_clkdm",
  405. };
  406. DEFINE_STRUCT_CLK(fac_fck, fac_fck_parent_names, aes_ick_ops);
  407. static struct clk fac_ick;
  408. static struct clk_hw_omap fac_ick_hw = {
  409. .hw = {
  410. .clk = &fac_ick,
  411. },
  412. .ops = &clkhwops_iclk_wait,
  413. .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
  414. .enable_bit = OMAP24XX_EN_FAC_SHIFT,
  415. .clkdm_name = "core_l4_clkdm",
  416. };
  417. DEFINE_STRUCT_CLK(fac_ick, aes_ick_parent_names, aes_ick_ops);
  418. static const struct clksel gfx_fck_clksel[] = {
  419. { .parent = &core_l3_ck, .rates = gfx_l3_rates },
  420. { .parent = NULL },
  421. };
  422. static const char *gfx_2d_fck_parent_names[] = {
  423. "core_l3_ck",
  424. };
  425. DEFINE_CLK_OMAP_MUX_GATE(gfx_2d_fck, "gfx_clkdm", gfx_fck_clksel,
  426. OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL),
  427. OMAP_CLKSEL_GFX_MASK,
  428. OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
  429. OMAP24XX_EN_2D_SHIFT, &clkhwops_wait,
  430. gfx_2d_fck_parent_names, dsp_fck_ops);
  431. DEFINE_CLK_OMAP_MUX_GATE(gfx_3d_fck, "gfx_clkdm", gfx_fck_clksel,
  432. OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL),
  433. OMAP_CLKSEL_GFX_MASK,
  434. OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
  435. OMAP24XX_EN_3D_SHIFT, &clkhwops_wait,
  436. gfx_2d_fck_parent_names, dsp_fck_ops);
  437. static struct clk gfx_ick;
  438. static const char *gfx_ick_parent_names[] = {
  439. "core_l3_ck",
  440. };
  441. static struct clk_hw_omap gfx_ick_hw = {
  442. .hw = {
  443. .clk = &gfx_ick,
  444. },
  445. .ops = &clkhwops_wait,
  446. .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_ICLKEN),
  447. .enable_bit = OMAP_EN_GFX_SHIFT,
  448. .clkdm_name = "gfx_clkdm",
  449. };
  450. DEFINE_STRUCT_CLK(gfx_ick, gfx_ick_parent_names, aes_ick_ops);
  451. static struct clk gpio5_fck;
  452. static const char *gpio5_fck_parent_names[] = {
  453. "func_32k_ck",
  454. };
  455. static struct clk_hw_omap gpio5_fck_hw = {
  456. .hw = {
  457. .clk = &gpio5_fck,
  458. },
  459. .ops = &clkhwops_wait,
  460. .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
  461. .enable_bit = OMAP2430_EN_GPIO5_SHIFT,
  462. .clkdm_name = "core_l4_clkdm",
  463. };
  464. DEFINE_STRUCT_CLK(gpio5_fck, gpio5_fck_parent_names, aes_ick_ops);
  465. static struct clk gpio5_ick;
  466. static struct clk_hw_omap gpio5_ick_hw = {