prm33xx.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /*
  2. * AM33XX PRM instance offset macros
  3. *
  4. * Copyright (C) 2011-2012 Texas Instruments Incorporated - http://www.ti.com/
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation version 2.
  9. *
  10. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  11. * kind, whether express or implied; without even the implied warranty
  12. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. */
  15. #ifndef __ARCH_ARM_MACH_OMAP2_PRM33XX_H
  16. #define __ARCH_ARM_MACH_OMAP2_PRM33XX_H
  17. #include "prcm-common.h"
  18. #include "prm.h"
  19. #define AM33XX_PRM_BASE 0x44E00000
  20. #define AM33XX_PRM_REGADDR(inst, reg) \
  21. AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRM_BASE + (inst) + (reg))
  22. /* PRM instances */
  23. #define AM33XX_PRM_OCP_SOCKET_MOD 0x0B00
  24. #define AM33XX_PRM_PER_MOD 0x0C00
  25. #define AM33XX_PRM_WKUP_MOD 0x0D00
  26. #define AM33XX_PRM_MPU_MOD 0x0E00
  27. #define AM33XX_PRM_DEVICE_MOD 0x0F00
  28. #define AM33XX_PRM_RTC_MOD 0x1000
  29. #define AM33XX_PRM_GFX_MOD 0x1100
  30. #define AM33XX_PRM_CEFUSE_MOD 0x1200
  31. /* PRM */
  32. /* PRM.OCP_SOCKET_PRM register offsets */
  33. #define AM33XX_REVISION_PRM_OFFSET 0x0000
  34. #define AM33XX_REVISION_PRM AM33XX_PRM_REGADDR(AM33XX_PRM_OCP_SOCKET_MOD, 0x0000)
  35. #define AM33XX_PRM_IRQSTATUS_MPU_OFFSET 0x0004
  36. #define AM33XX_PRM_IRQSTATUS_MPU AM33XX_PRM_REGADDR(AM33XX_PRM_OCP_SOCKET_MOD, 0x0004)
  37. #define AM33XX_PRM_IRQENABLE_MPU_OFFSET 0x0008
  38. #define AM33XX_PRM_IRQENABLE_MPU AM33XX_PRM_REGADDR(AM33XX_PRM_OCP_SOCKET_MOD, 0x0008)
  39. #define AM33XX_PRM_IRQSTATUS_M3_OFFSET 0x000c
  40. #define AM33XX_PRM_IRQSTATUS_M3 AM33XX_PRM_REGADDR(AM33XX_PRM_OCP_SOCKET_MOD, 0x000c)
  41. #define AM33XX_PRM_IRQENABLE_M3_OFFSET 0x0010
  42. #define AM33XX_PRM_IRQENABLE_M3 AM33XX_PRM_REGADDR(AM33XX_PRM_OCP_SOCKET_MOD, 0x0010)
  43. /* PRM.PER_PRM register offsets */
  44. #define AM33XX_RM_PER_RSTCTRL_OFFSET 0x0000
  45. #define AM33XX_RM_PER_RSTCTRL AM33XX_PRM_REGADDR(AM33XX_PRM_PER_MOD, 0x0000)
  46. #define AM33XX_PM_PER_PWRSTST_OFFSET 0x0008
  47. #define AM33XX_PM_PER_PWRSTST AM33XX_PRM_REGADDR(AM33XX_PRM_PER_MOD, 0x0008)
  48. #define AM33XX_PM_PER_PWRSTCTRL_OFFSET 0x000c
  49. #define AM33XX_PM_PER_PWRSTCTRL AM33XX_PRM_REGADDR(AM33XX_PRM_PER_MOD, 0x000c)
  50. /* PRM.WKUP_PRM register offsets */
  51. #define AM33XX_RM_WKUP_RSTCTRL_OFFSET 0x0000
  52. #define AM33XX_RM_WKUP_RSTCTRL AM33XX_PRM_REGADDR(AM33XX_PRM_WKUP_MOD, 0x0000)
  53. #define AM33XX_PM_WKUP_PWRSTCTRL_OFFSET 0x0004
  54. #define AM33XX_PM_WKUP_PWRSTCTRL AM33XX_PRM_REGADDR(AM33XX_PRM_WKUP_MOD, 0x0004)
  55. #define AM33XX_PM_WKUP_PWRSTST_OFFSET 0x0008
  56. #define AM33XX_PM_WKUP_PWRSTST AM33XX_PRM_REGADDR(AM33XX_PRM_WKUP_MOD, 0x0008)
  57. #define AM33XX_RM_WKUP_RSTST_OFFSET 0x000c
  58. #define AM33XX_RM_WKUP_RSTST AM33XX_PRM_REGADDR(AM33XX_PRM_WKUP_MOD, 0x000c)
  59. /* PRM.MPU_PRM register offsets */
  60. #define AM33XX_PM_MPU_PWRSTCTRL_OFFSET 0x0000
  61. #define AM33XX_PM_MPU_PWRSTCTRL AM33XX_PRM_REGADDR(AM33XX_PRM_MPU_MOD, 0x0000)
  62. #define AM33XX_PM_MPU_PWRSTST_OFFSET 0x0004
  63. #define AM33XX_PM_MPU_PWRSTST AM33XX_PRM_REGADDR(AM33XX_PRM_MPU_MOD, 0x0004)
  64. #define AM33XX_RM_MPU_RSTST_OFFSET 0x0008
  65. #define AM33XX_RM_MPU_RSTST AM33XX_PRM_REGADDR(AM33XX_PRM_MPU_MOD, 0x0008)
  66. /* PRM.DEVICE_PRM register offsets */
  67. #define AM33XX_PRM_RSTCTRL_OFFSET 0x0000
  68. #define AM33XX_PRM_RSTCTRL AM33XX_PRM_REGADDR(AM33XX_PRM_DEVICE_MOD, 0x0000)
  69. #define AM33XX_PRM_RSTTIME_OFFSET 0x0004
  70. #define AM33XX_PRM_RSTTIME AM33XX_PRM_REGADDR(AM33XX_PRM_DEVICE_MOD, 0x0004)
  71. #define AM33XX_PRM_RSTST_OFFSET 0x0008
  72. #define AM33XX_PRM_RSTST AM33XX_PRM_REGADDR(AM33XX_PRM_DEVICE_MOD, 0x0008)
  73. #define AM33XX_PRM_SRAM_COUNT_OFFSET 0x000c
  74. #define AM33XX_PRM_SRAM_COUNT AM33XX_PRM_REGADDR(AM33XX_PRM_DEVICE_MOD, 0x000c)
  75. #define AM33XX_PRM_LDO_SRAM_CORE_SETUP_OFFSET 0x0010
  76. #define AM33XX_PRM_LDO_SRAM_CORE_SETUP AM33XX_PRM_REGADDR(AM33XX_PRM_DEVICE_MOD, 0x0010)
  77. #define AM33XX_PRM_LDO_SRAM_CORE_CTRL_OFFSET 0x0014
  78. #define AM33XX_PRM_LDO_SRAM_CORE_CTRL AM33XX_PRM_REGADDR(AM33XX_PRM_DEVICE_MOD, 0x0014)
  79. #define AM33XX_PRM_LDO_SRAM_MPU_SETUP_OFFSET 0x0018
  80. #define AM33XX_PRM_LDO_SRAM_MPU_SETUP AM33XX_PRM_REGADDR(AM33XX_PRM_DEVICE_MOD, 0x0018)
  81. #define AM33XX_PRM_LDO_SRAM_MPU_CTRL_OFFSET 0x001c
  82. #define AM33XX_PRM_LDO_SRAM_MPU_CTRL AM33XX_PRM_REGADDR(AM33XX_PRM_DEVICE_MOD, 0x001c)
  83. /* PRM.RTC_PRM register offsets */
  84. #define AM33XX_PM_RTC_PWRSTCTRL_OFFSET 0x0000
  85. #define AM33XX_PM_RTC_PWRSTCTRL AM33XX_PRM_REGADDR(AM33XX_PRM_RTC_MOD, 0x0000)
  86. #define AM33XX_PM_RTC_PWRSTST_OFFSET 0x0004
  87. #define AM33XX_PM_RTC_PWRSTST AM33XX_PRM_REGADDR(AM33XX_PRM_RTC_MOD, 0x0004)
  88. /* PRM.GFX_PRM register offsets */
  89. #define AM33XX_PM_GFX_PWRSTCTRL_OFFSET 0x0000
  90. #define AM33XX_PM_GFX_PWRSTCTRL AM33XX_PRM_REGADDR(AM33XX_PRM_GFX_MOD, 0x0000)
  91. #define AM33XX_RM_GFX_RSTCTRL_OFFSET 0x0004
  92. #define AM33XX_RM_GFX_RSTCTRL AM33XX_PRM_REGADDR(AM33XX_PRM_GFX_MOD, 0x0004)
  93. #define AM33XX_PM_GFX_PWRSTST_OFFSET 0x0010
  94. #define AM33XX_PM_GFX_PWRSTST AM33XX_PRM_REGADDR(AM33XX_PRM_GFX_MOD, 0x0010)
  95. #define AM33XX_RM_GFX_RSTST_OFFSET 0x0014
  96. #define AM33XX_RM_GFX_RSTST AM33XX_PRM_REGADDR(AM33XX_PRM_GFX_MOD, 0x0014)
  97. /* PRM.CEFUSE_PRM register offsets */
  98. #define AM33XX_PM_CEFUSE_PWRSTCTRL_OFFSET 0x0000
  99. #define AM33XX_PM_CEFUSE_PWRSTCTRL AM33XX_PRM_REGADDR(AM33XX_PRM_CEFUSE_MOD, 0x0000)
  100. #define AM33XX_PM_CEFUSE_PWRSTST_OFFSET 0x0004
  101. #define AM33XX_PM_CEFUSE_PWRSTST AM33XX_PRM_REGADDR(AM33XX_PRM_CEFUSE_MOD, 0x0004)
  102. #ifndef __ASSEMBLER__
  103. int am33xx_prm_init(const struct omap_prcm_init_data *data);
  104. #endif /* ASSEMBLER */
  105. #endif