clockdomains33xx_data.c 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. /*
  2. * AM33XX Clock Domain data.
  3. *
  4. * Copyright (C) 2011-2012 Texas Instruments Incorporated - http://www.ti.com/
  5. * Vaibhav Hiremath <hvaibhav@ti.com>
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation version 2.
  10. *
  11. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  12. * kind, whether express or implied; without even the implied warranty
  13. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. */
  16. #include <linux/kernel.h>
  17. #include <linux/io.h>
  18. #include "clockdomain.h"
  19. #include "cm.h"
  20. #include "cm33xx.h"
  21. #include "cm-regbits-33xx.h"
  22. static struct clockdomain l4ls_am33xx_clkdm = {
  23. .name = "l4ls_clkdm",
  24. .pwrdm = { .name = "per_pwrdm" },
  25. .cm_inst = AM33XX_CM_PER_MOD,
  26. .clkdm_offs = AM33XX_CM_PER_L4LS_CLKSTCTRL_OFFSET,
  27. .flags = CLKDM_CAN_SWSUP,
  28. };
  29. static struct clockdomain l3s_am33xx_clkdm = {
  30. .name = "l3s_clkdm",
  31. .pwrdm = { .name = "per_pwrdm" },
  32. .cm_inst = AM33XX_CM_PER_MOD,
  33. .clkdm_offs = AM33XX_CM_PER_L3S_CLKSTCTRL_OFFSET,
  34. .flags = CLKDM_CAN_SWSUP,
  35. };
  36. static struct clockdomain l4fw_am33xx_clkdm = {
  37. .name = "l4fw_clkdm",
  38. .pwrdm = { .name = "per_pwrdm" },
  39. .cm_inst = AM33XX_CM_PER_MOD,
  40. .clkdm_offs = AM33XX_CM_PER_L4FW_CLKSTCTRL_OFFSET,
  41. .flags = CLKDM_CAN_SWSUP,
  42. };
  43. static struct clockdomain l3_am33xx_clkdm = {
  44. .name = "l3_clkdm",
  45. .pwrdm = { .name = "per_pwrdm" },
  46. .cm_inst = AM33XX_CM_PER_MOD,
  47. .clkdm_offs = AM33XX_CM_PER_L3_CLKSTCTRL_OFFSET,
  48. .flags = CLKDM_CAN_SWSUP,
  49. };
  50. static struct clockdomain l4hs_am33xx_clkdm = {
  51. .name = "l4hs_clkdm",
  52. .pwrdm = { .name = "per_pwrdm" },
  53. .cm_inst = AM33XX_CM_PER_MOD,
  54. .clkdm_offs = AM33XX_CM_PER_L4HS_CLKSTCTRL_OFFSET,
  55. .flags = CLKDM_CAN_SWSUP,
  56. };
  57. static struct clockdomain ocpwp_l3_am33xx_clkdm = {
  58. .name = "ocpwp_l3_clkdm",
  59. .pwrdm = { .name = "per_pwrdm" },
  60. .cm_inst = AM33XX_CM_PER_MOD,
  61. .clkdm_offs = AM33XX_CM_PER_OCPWP_L3_CLKSTCTRL_OFFSET,
  62. .flags = CLKDM_CAN_SWSUP,
  63. };
  64. static struct clockdomain pruss_ocp_am33xx_clkdm = {
  65. .name = "pruss_ocp_clkdm",
  66. .pwrdm = { .name = "per_pwrdm" },
  67. .cm_inst = AM33XX_CM_PER_MOD,
  68. .clkdm_offs = AM33XX_CM_PER_PRUSS_CLKSTCTRL_OFFSET,
  69. .flags = CLKDM_CAN_SWSUP,
  70. };
  71. static struct clockdomain cpsw_125mhz_am33xx_clkdm = {
  72. .name = "cpsw_125mhz_clkdm",
  73. .pwrdm = { .name = "per_pwrdm" },
  74. .cm_inst = AM33XX_CM_PER_MOD,
  75. .clkdm_offs = AM33XX_CM_PER_CPSW_CLKSTCTRL_OFFSET,
  76. .flags = CLKDM_CAN_SWSUP,
  77. };
  78. static struct clockdomain lcdc_am33xx_clkdm = {
  79. .name = "lcdc_clkdm",
  80. .pwrdm = { .name = "per_pwrdm" },
  81. .cm_inst = AM33XX_CM_PER_MOD,
  82. .clkdm_offs = AM33XX_CM_PER_LCDC_CLKSTCTRL_OFFSET,
  83. .flags = CLKDM_CAN_SWSUP,
  84. };
  85. static struct clockdomain clk_24mhz_am33xx_clkdm = {
  86. .name = "clk_24mhz_clkdm",
  87. .pwrdm = { .name = "per_pwrdm" },
  88. .cm_inst = AM33XX_CM_PER_MOD,
  89. .clkdm_offs = AM33XX_CM_PER_CLK_24MHZ_CLKSTCTRL_OFFSET,
  90. .flags = CLKDM_CAN_SWSUP,
  91. };
  92. static struct clockdomain l4_wkup_am33xx_clkdm = {
  93. .name = "l4_wkup_clkdm",
  94. .pwrdm = { .name = "wkup_pwrdm" },
  95. .cm_inst = AM33XX_CM_WKUP_MOD,
  96. .clkdm_offs = AM33XX_CM_WKUP_CLKSTCTRL_OFFSET,
  97. .flags = CLKDM_CAN_SWSUP,
  98. };
  99. static struct clockdomain l3_aon_am33xx_clkdm = {
  100. .name = "l3_aon_clkdm",
  101. .pwrdm = { .name = "wkup_pwrdm" },
  102. .cm_inst = AM33XX_CM_WKUP_MOD,
  103. .clkdm_offs = AM33XX_CM_L3_AON_CLKSTCTRL_OFFSET,
  104. .flags = CLKDM_CAN_SWSUP,
  105. };
  106. static struct clockdomain l4_wkup_aon_am33xx_clkdm = {
  107. .name = "l4_wkup_aon_clkdm",
  108. .pwrdm = { .name = "wkup_pwrdm" },
  109. .cm_inst = AM33XX_CM_WKUP_MOD,
  110. .clkdm_offs = AM33XX_CM_L4_WKUP_AON_CLKSTCTRL_OFFSET,
  111. .flags = CLKDM_CAN_SWSUP,
  112. };
  113. static struct clockdomain mpu_am33xx_clkdm = {
  114. .name = "mpu_clkdm",
  115. .pwrdm = { .name = "mpu_pwrdm" },
  116. .cm_inst = AM33XX_CM_MPU_MOD,
  117. .clkdm_offs = AM33XX_CM_MPU_CLKSTCTRL_OFFSET,
  118. .flags = CLKDM_CAN_SWSUP,
  119. };
  120. static struct clockdomain l4_rtc_am33xx_clkdm = {
  121. .name = "l4_rtc_clkdm",
  122. .pwrdm = { .name = "rtc_pwrdm" },
  123. .cm_inst = AM33XX_CM_RTC_MOD,
  124. .clkdm_offs = AM33XX_CM_RTC_CLKSTCTRL_OFFSET,
  125. .flags = CLKDM_CAN_SWSUP,
  126. };
  127. static struct clockdomain gfx_l3_am33xx_clkdm = {
  128. .name = "gfx_l3_clkdm",
  129. .pwrdm = { .name = "gfx_pwrdm" },
  130. .cm_inst = AM33XX_CM_GFX_MOD,
  131. .clkdm_offs = AM33XX_CM_GFX_L3_CLKSTCTRL_OFFSET,
  132. .flags = CLKDM_CAN_SWSUP,
  133. };
  134. static struct clockdomain gfx_l4ls_gfx_am33xx_clkdm = {
  135. .name = "gfx_l4ls_gfx_clkdm",
  136. .pwrdm = { .name = "gfx_pwrdm" },
  137. .cm_inst = AM33XX_CM_GFX_MOD,
  138. .clkdm_offs = AM33XX_CM_GFX_L4LS_GFX_CLKSTCTRL__1_OFFSET,
  139. .flags = CLKDM_CAN_SWSUP,
  140. };
  141. static struct clockdomain l4_cefuse_am33xx_clkdm = {
  142. .name = "l4_cefuse_clkdm",
  143. .pwrdm = { .name = "cefuse_pwrdm" },
  144. .cm_inst = AM33XX_CM_CEFUSE_MOD,
  145. .clkdm_offs = AM33XX_CM_CEFUSE_CLKSTCTRL_OFFSET,
  146. .flags = CLKDM_CAN_SWSUP,
  147. };
  148. static struct clockdomain *clockdomains_am33xx[] __initdata = {
  149. &l4ls_am33xx_clkdm,
  150. &l3s_am33xx_clkdm,
  151. &l4fw_am33xx_clkdm,
  152. &l3_am33xx_clkdm,
  153. &l4hs_am33xx_clkdm,
  154. &ocpwp_l3_am33xx_clkdm,
  155. &pruss_ocp_am33xx_clkdm,
  156. &cpsw_125mhz_am33xx_clkdm,
  157. &lcdc_am33xx_clkdm,
  158. &clk_24mhz_am33xx_clkdm,
  159. &l4_wkup_am33xx_clkdm,
  160. &l3_aon_am33xx_clkdm,
  161. &l4_wkup_aon_am33xx_clkdm,
  162. &mpu_am33xx_clkdm,
  163. &l4_rtc_am33xx_clkdm,
  164. &gfx_l3_am33xx_clkdm,
  165. &gfx_l4ls_gfx_am33xx_clkdm,
  166. &l4_cefuse_am33xx_clkdm,
  167. NULL,
  168. };
  169. void __init am33xx_clockdomains_init(void)
  170. {
  171. clkdm_register_platform_funcs(&am33xx_clkdm_operations);
  172. clkdm_register_clkdms(clockdomains_am33xx);
  173. clkdm_complete_init();
  174. }