clockdomains43xx_data.c 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. /*
  2. * AM43xx Clock domains framework
  3. *
  4. * Copyright (C) 2013 Texas Instruments, Inc.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #include <linux/kernel.h>
  11. #include <linux/io.h>
  12. #include "clockdomain.h"
  13. #include "prcm44xx.h"
  14. #include "prcm43xx.h"
  15. static struct clockdomain l4_cefuse_43xx_clkdm = {
  16. .name = "l4_cefuse_clkdm",
  17. .pwrdm = { .name = "cefuse_pwrdm" },
  18. .prcm_partition = AM43XX_CM_PARTITION,
  19. .cm_inst = AM43XX_CM_CEFUSE_INST,
  20. .clkdm_offs = AM43XX_CM_CEFUSE_CEFUSE_CDOFFS,
  21. .flags = CLKDM_CAN_SWSUP,
  22. };
  23. static struct clockdomain mpu_43xx_clkdm = {
  24. .name = "mpu_clkdm",
  25. .pwrdm = { .name = "mpu_pwrdm" },
  26. .prcm_partition = AM43XX_CM_PARTITION,
  27. .cm_inst = AM43XX_CM_MPU_INST,
  28. .clkdm_offs = AM43XX_CM_MPU_MPU_CDOFFS,
  29. .flags = CLKDM_CAN_HWSUP_SWSUP,
  30. };
  31. static struct clockdomain l4ls_43xx_clkdm = {
  32. .name = "l4ls_clkdm",
  33. .pwrdm = { .name = "per_pwrdm" },
  34. .prcm_partition = AM43XX_CM_PARTITION,
  35. .cm_inst = AM43XX_CM_PER_INST,
  36. .clkdm_offs = AM43XX_CM_PER_L4LS_CDOFFS,
  37. .flags = CLKDM_CAN_SWSUP,
  38. };
  39. static struct clockdomain tamper_43xx_clkdm = {
  40. .name = "tamper_clkdm",
  41. .pwrdm = { .name = "tamper_pwrdm" },
  42. .prcm_partition = AM43XX_CM_PARTITION,
  43. .cm_inst = AM43XX_CM_TAMPER_INST,
  44. .clkdm_offs = AM43XX_CM_TAMPER_TAMPER_CDOFFS,
  45. .flags = CLKDM_CAN_SWSUP,
  46. };
  47. static struct clockdomain l4_rtc_43xx_clkdm = {
  48. .name = "l4_rtc_clkdm",
  49. .pwrdm = { .name = "rtc_pwrdm" },
  50. .prcm_partition = AM43XX_CM_PARTITION,
  51. .cm_inst = AM43XX_CM_RTC_INST,
  52. .clkdm_offs = AM43XX_CM_RTC_RTC_CDOFFS,
  53. .flags = CLKDM_CAN_SWSUP,
  54. };
  55. static struct clockdomain pruss_ocp_43xx_clkdm = {
  56. .name = "pruss_ocp_clkdm",
  57. .pwrdm = { .name = "per_pwrdm" },
  58. .prcm_partition = AM43XX_CM_PARTITION,
  59. .cm_inst = AM43XX_CM_PER_INST,
  60. .clkdm_offs = AM43XX_CM_PER_ICSS_CDOFFS,
  61. .flags = CLKDM_CAN_SWSUP,
  62. };
  63. static struct clockdomain ocpwp_l3_43xx_clkdm = {
  64. .name = "ocpwp_l3_clkdm",
  65. .pwrdm = { .name = "per_pwrdm" },
  66. .prcm_partition = AM43XX_CM_PARTITION,
  67. .cm_inst = AM43XX_CM_PER_INST,
  68. .clkdm_offs = AM43XX_CM_PER_OCPWP_L3_CDOFFS,
  69. .flags = CLKDM_CAN_SWSUP,
  70. };
  71. static struct clockdomain l3s_tsc_43xx_clkdm = {
  72. .name = "l3s_tsc_clkdm",
  73. .pwrdm = { .name = "wkup_pwrdm" },
  74. .prcm_partition = AM43XX_CM_PARTITION,
  75. .cm_inst = AM43XX_CM_WKUP_INST,
  76. .clkdm_offs = AM43XX_CM_WKUP_L3S_TSC_CDOFFS,
  77. .flags = CLKDM_CAN_SWSUP,
  78. };
  79. static struct clockdomain dss_43xx_clkdm = {
  80. .name = "dss_clkdm",
  81. .pwrdm = { .name = "per_pwrdm" },
  82. .prcm_partition = AM43XX_CM_PARTITION,
  83. .cm_inst = AM43XX_CM_PER_INST,
  84. .clkdm_offs = AM43XX_CM_PER_DSS_CDOFFS,
  85. .flags = CLKDM_CAN_SWSUP,
  86. };
  87. static struct clockdomain l3_aon_43xx_clkdm = {
  88. .name = "l3_aon_clkdm",
  89. .pwrdm = { .name = "wkup_pwrdm" },
  90. .prcm_partition = AM43XX_CM_PARTITION,
  91. .cm_inst = AM43XX_CM_WKUP_INST,
  92. .clkdm_offs = AM43XX_CM_WKUP_L3_AON_CDOFFS,
  93. .flags = CLKDM_CAN_SWSUP,
  94. };
  95. static struct clockdomain emif_43xx_clkdm = {
  96. .name = "emif_clkdm",
  97. .pwrdm = { .name = "per_pwrdm" },
  98. .prcm_partition = AM43XX_CM_PARTITION,
  99. .cm_inst = AM43XX_CM_PER_INST,
  100. .clkdm_offs = AM43XX_CM_PER_EMIF_CDOFFS,
  101. .flags = CLKDM_CAN_SWSUP,
  102. };
  103. static struct clockdomain l4_wkup_aon_43xx_clkdm = {
  104. .name = "l4_wkup_aon_clkdm",
  105. .pwrdm = { .name = "wkup_pwrdm" },
  106. .prcm_partition = AM43XX_CM_PARTITION,
  107. .cm_inst = AM43XX_CM_WKUP_INST,
  108. .clkdm_offs = AM43XX_CM_WKUP_L4_WKUP_AON_CDOFFS,
  109. };
  110. static struct clockdomain l3_43xx_clkdm = {
  111. .name = "l3_clkdm",
  112. .pwrdm = { .name = "per_pwrdm" },
  113. .prcm_partition = AM43XX_CM_PARTITION,
  114. .cm_inst = AM43XX_CM_PER_INST,
  115. .clkdm_offs = AM43XX_CM_PER_L3_CDOFFS,
  116. .flags = CLKDM_CAN_SWSUP,
  117. };
  118. static struct clockdomain l4_wkup_43xx_clkdm = {
  119. .name = "l4_wkup_clkdm",
  120. .pwrdm = { .name = "wkup_pwrdm" },
  121. .prcm_partition = AM43XX_CM_PARTITION,
  122. .cm_inst = AM43XX_CM_WKUP_INST,
  123. .clkdm_offs = AM43XX_CM_WKUP_WKUP_CDOFFS,
  124. .flags = CLKDM_CAN_SWSUP,
  125. };
  126. static struct clockdomain cpsw_125mhz_43xx_clkdm = {
  127. .name = "cpsw_125mhz_clkdm",
  128. .pwrdm = { .name = "per_pwrdm" },
  129. .prcm_partition = AM43XX_CM_PARTITION,
  130. .cm_inst = AM43XX_CM_PER_INST,
  131. .clkdm_offs = AM43XX_CM_PER_CPSW_CDOFFS,
  132. .flags = CLKDM_CAN_SWSUP,
  133. };
  134. static struct clockdomain gfx_l3_43xx_clkdm = {
  135. .name = "gfx_l3_clkdm",
  136. .pwrdm = { .name = "gfx_pwrdm" },
  137. .prcm_partition = AM43XX_CM_PARTITION,
  138. .cm_inst = AM43XX_CM_GFX_INST,
  139. .clkdm_offs = AM43XX_CM_GFX_GFX_L3_CDOFFS,
  140. .flags = CLKDM_CAN_SWSUP,
  141. };
  142. static struct clockdomain l3s_43xx_clkdm = {
  143. .name = "l3s_clkdm",
  144. .pwrdm = { .name = "per_pwrdm" },
  145. .prcm_partition = AM43XX_CM_PARTITION,
  146. .cm_inst = AM43XX_CM_PER_INST,
  147. .clkdm_offs = AM43XX_CM_PER_L3S_CDOFFS,
  148. .flags = CLKDM_CAN_SWSUP,
  149. };
  150. static struct clockdomain *clockdomains_am43xx[] __initdata = {
  151. &l4_cefuse_43xx_clkdm,
  152. &mpu_43xx_clkdm,
  153. &l4ls_43xx_clkdm,
  154. &tamper_43xx_clkdm,
  155. &l4_rtc_43xx_clkdm,
  156. &pruss_ocp_43xx_clkdm,
  157. &ocpwp_l3_43xx_clkdm,
  158. &l3s_tsc_43xx_clkdm,
  159. &dss_43xx_clkdm,
  160. &l3_aon_43xx_clkdm,
  161. &emif_43xx_clkdm,
  162. &l4_wkup_aon_43xx_clkdm,
  163. &l3_43xx_clkdm,
  164. &l4_wkup_43xx_clkdm,
  165. &cpsw_125mhz_43xx_clkdm,
  166. &gfx_l3_43xx_clkdm,
  167. &l3s_43xx_clkdm,
  168. NULL
  169. };
  170. void __init am43xx_clockdomains_init(void)
  171. {
  172. clkdm_register_platform_funcs(&am43xx_clkdm_operations);
  173. clkdm_register_clkdms(clockdomains_am43xx);
  174. clkdm_complete_init();
  175. }