clockdomains81xx_data.c 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. /*
  2. * TI81XX Clock Domain data.
  3. *
  4. * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/
  5. * Copyright (C) 2013 SKTB SKiT, http://www.skitlab.ru/
  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. #ifndef __ARCH_ARM_MACH_OMAP2_CLOCKDOMAINS_81XX_H
  17. #define __ARCH_ARM_MACH_OMAP2_CLOCKDOMAINS_81XX_H
  18. #include <linux/kernel.h>
  19. #include <linux/io.h>
  20. #include "clockdomain.h"
  21. #include "cm81xx.h"
  22. /*
  23. * Note that 814x seems to have HWSUP_SWSUP for many clockdomains
  24. * while 816x does not. According to the TRM, 816x only has HWSUP
  25. * for ALWON_L3_FAST. Also note that the TI tree clockdomains81xx.h
  26. * seems to have the related ifdef the wrong way around claiming
  27. * 816x supports HWSUP while 814x does not. For now, we only set
  28. * HWSUP for ALWON_L3_FAST as that seems to be supported for both
  29. * dm814x and dm816x.
  30. */
  31. /* Common for 81xx */
  32. static struct clockdomain alwon_l3_slow_81xx_clkdm = {
  33. .name = "alwon_l3s_clkdm",
  34. .pwrdm = { .name = "alwon_pwrdm" },
  35. .cm_inst = TI81XX_CM_ALWON_MOD,
  36. .clkdm_offs = TI81XX_CM_ALWON_L3_SLOW_CLKDM,
  37. .flags = CLKDM_CAN_SWSUP,
  38. };
  39. static struct clockdomain alwon_l3_med_81xx_clkdm = {
  40. .name = "alwon_l3_med_clkdm",
  41. .pwrdm = { .name = "alwon_pwrdm" },
  42. .cm_inst = TI81XX_CM_ALWON_MOD,
  43. .clkdm_offs = TI81XX_CM_ALWON_L3_MED_CLKDM,
  44. .flags = CLKDM_CAN_SWSUP,
  45. };
  46. static struct clockdomain alwon_l3_fast_81xx_clkdm = {
  47. .name = "alwon_l3_fast_clkdm",
  48. .pwrdm = { .name = "alwon_pwrdm" },
  49. .cm_inst = TI81XX_CM_ALWON_MOD,
  50. .clkdm_offs = TI81XX_CM_ALWON_L3_FAST_CLKDM,
  51. .flags = CLKDM_CAN_HWSUP_SWSUP,
  52. };
  53. static struct clockdomain alwon_ethernet_81xx_clkdm = {
  54. .name = "alwon_ethernet_clkdm",
  55. .pwrdm = { .name = "alwon_pwrdm" },
  56. .cm_inst = TI81XX_CM_ALWON_MOD,
  57. .clkdm_offs = TI81XX_CM_ETHERNET_CLKDM,
  58. .flags = CLKDM_CAN_SWSUP,
  59. };
  60. static struct clockdomain mmu_81xx_clkdm = {
  61. .name = "mmu_clkdm",
  62. .pwrdm = { .name = "alwon_pwrdm" },
  63. .cm_inst = TI81XX_CM_ALWON_MOD,
  64. .clkdm_offs = TI81XX_CM_MMU_CLKDM,
  65. .flags = CLKDM_CAN_SWSUP,
  66. };
  67. static struct clockdomain mmu_cfg_81xx_clkdm = {
  68. .name = "mmu_cfg_clkdm",
  69. .pwrdm = { .name = "alwon_pwrdm" },
  70. .cm_inst = TI81XX_CM_ALWON_MOD,
  71. .clkdm_offs = TI81XX_CM_MMUCFG_CLKDM,
  72. .flags = CLKDM_CAN_SWSUP,
  73. };
  74. static struct clockdomain default_l3_slow_81xx_clkdm = {
  75. .name = "default_l3_slow_clkdm",
  76. .pwrdm = { .name = "default_pwrdm" },
  77. .cm_inst = TI81XX_CM_DEFAULT_MOD,
  78. .clkdm_offs = TI816X_CM_DEFAULT_L3_SLOW_CLKDM,
  79. .flags = CLKDM_CAN_SWSUP,
  80. };
  81. /* 816x only */
  82. static struct clockdomain alwon_mpu_816x_clkdm = {
  83. .name = "alwon_mpu_clkdm",
  84. .pwrdm = { .name = "alwon_pwrdm" },
  85. .cm_inst = TI81XX_CM_ALWON_MOD,
  86. .clkdm_offs = TI81XX_CM_ALWON_MPU_CLKDM,
  87. .flags = CLKDM_CAN_SWSUP,
  88. };
  89. static struct clockdomain active_gem_816x_clkdm = {
  90. .name = "active_gem_clkdm",
  91. .pwrdm = { .name = "active_pwrdm" },
  92. .cm_inst = TI81XX_CM_ACTIVE_MOD,
  93. .clkdm_offs = TI816X_CM_ACTIVE_GEM_CLKDM,
  94. .flags = CLKDM_CAN_SWSUP,
  95. };
  96. static struct clockdomain ivahd0_816x_clkdm = {
  97. .name = "ivahd0_clkdm",
  98. .pwrdm = { .name = "ivahd0_pwrdm" },
  99. .cm_inst = TI816X_CM_IVAHD0_MOD,
  100. .clkdm_offs = TI816X_CM_IVAHD0_CLKDM,
  101. .flags = CLKDM_CAN_SWSUP,
  102. };
  103. static struct clockdomain ivahd1_816x_clkdm = {
  104. .name = "ivahd1_clkdm",
  105. .pwrdm = { .name = "ivahd1_pwrdm" },
  106. .cm_inst = TI816X_CM_IVAHD1_MOD,
  107. .clkdm_offs = TI816X_CM_IVAHD1_CLKDM,
  108. .flags = CLKDM_CAN_SWSUP,
  109. };
  110. static struct clockdomain ivahd2_816x_clkdm = {
  111. .name = "ivahd2_clkdm",
  112. .pwrdm = { .name = "ivahd2_pwrdm" },
  113. .cm_inst = TI816X_CM_IVAHD2_MOD,
  114. .clkdm_offs = TI816X_CM_IVAHD2_CLKDM,
  115. .flags = CLKDM_CAN_SWSUP,
  116. };
  117. static struct clockdomain sgx_816x_clkdm = {
  118. .name = "sgx_clkdm",
  119. .pwrdm = { .name = "sgx_pwrdm" },
  120. .cm_inst = TI81XX_CM_SGX_MOD,
  121. .clkdm_offs = TI816X_CM_SGX_CLKDM,
  122. .flags = CLKDM_CAN_SWSUP,
  123. };
  124. static struct clockdomain default_l3_med_816x_clkdm = {
  125. .name = "default_l3_med_clkdm",
  126. .pwrdm = { .name = "default_pwrdm" },
  127. .cm_inst = TI81XX_CM_DEFAULT_MOD,
  128. .clkdm_offs = TI816X_CM_DEFAULT_L3_MED_CLKDM,
  129. .flags = CLKDM_CAN_SWSUP,
  130. };
  131. static struct clockdomain default_ducati_816x_clkdm = {
  132. .name = "default_ducati_clkdm",
  133. .pwrdm = { .name = "default_pwrdm" },
  134. .cm_inst = TI81XX_CM_DEFAULT_MOD,
  135. .clkdm_offs = TI816X_CM_DEFAULT_DUCATI_CLKDM,
  136. .flags = CLKDM_CAN_SWSUP,
  137. };
  138. static struct clockdomain default_pci_816x_clkdm = {
  139. .name = "default_pci_clkdm",
  140. .pwrdm = { .name = "default_pwrdm" },
  141. .cm_inst = TI81XX_CM_DEFAULT_MOD,
  142. .clkdm_offs = TI816X_CM_DEFAULT_PCI_CLKDM,
  143. .flags = CLKDM_CAN_SWSUP,
  144. };
  145. static struct clockdomain *clockdomains_ti814x[] __initdata = {
  146. &alwon_l3_slow_81xx_clkdm,
  147. &alwon_l3_med_81xx_clkdm,
  148. &alwon_l3_fast_81xx_clkdm,
  149. &alwon_ethernet_81xx_clkdm,
  150. &mmu_81xx_clkdm,
  151. &mmu_cfg_81xx_clkdm,
  152. &default_l3_slow_81xx_clkdm,
  153. NULL,
  154. };
  155. void __init ti814x_clockdomains_init(void)
  156. {
  157. clkdm_register_platform_funcs(&am33xx_clkdm_operations);
  158. clkdm_register_clkdms(clockdomains_ti814x);
  159. clkdm_complete_init();
  160. }
  161. static struct clockdomain *clockdomains_ti816x[] __initdata = {
  162. &alwon_mpu_816x_clkdm,
  163. &alwon_l3_slow_81xx_clkdm,
  164. &alwon_l3_med_81xx_clkdm,
  165. &alwon_l3_fast_81xx_clkdm,
  166. &alwon_ethernet_81xx_clkdm,
  167. &mmu_81xx_clkdm,
  168. &mmu_cfg_81xx_clkdm,
  169. &active_gem_816x_clkdm,
  170. &ivahd0_816x_clkdm,
  171. &ivahd1_816x_clkdm,
  172. &ivahd2_816x_clkdm,
  173. &sgx_816x_clkdm,
  174. &default_l3_med_816x_clkdm,
  175. &default_ducati_816x_clkdm,
  176. &default_pci_816x_clkdm,
  177. &default_l3_slow_81xx_clkdm,
  178. NULL,
  179. };
  180. void __init ti816x_clockdomains_init(void)
  181. {
  182. clkdm_register_platform_funcs(&am33xx_clkdm_operations);
  183. clkdm_register_clkdms(clockdomains_ti816x);
  184. clkdm_complete_init();
  185. }
  186. #endif