ns9750_sys.h 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. /***********************************************************************
  2. *
  3. * Copyright (C) 2004 by FS Forth-Systeme GmbH.
  4. * All rights reserved.
  5. *
  6. * $Id: ns9750_sys.h,v 1.1 2004/02/16 10:37:20 mpietrek Exp $
  7. * @Author: Markus Pietrek
  8. * @Descr: Definitions for SYS Control Module
  9. * @References: [1] NS9750 Hardware Reference Manual/December 2003 Chap. 4
  10. *
  11. * This program is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License as
  13. * published by the Free Software Foundation; either version 2 of
  14. * the License, or (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  24. * MA 02111-1307 USA
  25. *
  26. ***********************************************************************/
  27. #ifndef FS_NS9750_SYS_H
  28. #define FS_NS9750_SYS_H
  29. #define NS9750_SYS_MODULE_BASE (0xA0900000)
  30. #define get_sys_reg_addr(c) \
  31. ((volatile unsigned int *)(NS9750_SYS_MODULE_BASE+(unsigned int) (c)))
  32. /* the register addresses */
  33. #define NS9750_SYS_AHB_GEN (0x0000)
  34. #define NS9750_SYS_BRC_BASE (0x0004)
  35. #define NS9750_SYS_AHB_TIMEOUT (0x0014)
  36. #define NS9750_SYS_AHB_ERROR1 (0x0018)
  37. #define NS9750_SYS_AHB_ERROR2 (0x001C)
  38. #define NS9750_SYS_AHB_MON (0x0020)
  39. #define NS9750_SYS_TIMER_COUNT_BASE (0x0044)
  40. #define NS9750_SYS_TIMER_READ_BASE (0x0084)
  41. #define NS9750_SYS_INT_VEC_ADR_BASE (0x00C4)
  42. #define NS9750_SYS_INT_CFG_BASE (0x0144)
  43. #define NS9750_SYS_ISRADDR (0x0164)
  44. #define NS9750_SYS_INT_STAT_ACTIVE (0x0168)
  45. #define NS9750_SYS_INT_STAT_RAW (0x016C)
  46. #define NS9750_SYS_TIMER_INT_STAT (0x0170)
  47. #define NS9750_SYS_SW_WDOG_CFG (0x0174)
  48. #define NS9750_SYS_SW_WDOG_TIMER (0x0178)
  49. #define NS9750_SYS_CLOCK (0x017C)
  50. #define NS9750_SYS_RESET (0x0180)
  51. #define NS9750_SYS_MISC (0x0184)
  52. #define NS9750_SYS_PLL (0x0188)
  53. #define NS9750_SYS_ACT_INT_STAT (0x018C)
  54. #define NS9750_SYS_TIMER_CTRL_BASE (0x0190)
  55. #define NS9750_SYS_CS_DYN_BASE_BASE (0x01D0)
  56. #define NS9750_SYS_CS_DYN_MASK_BASE (0x01D4)
  57. #define NS9750_SYS_CS_STATIC_BASE_BASE (0x01F0)
  58. #define NS9750_SYS_CS_STATIC_MASK_BASE (0x01F4)
  59. #define NS9750_SYS_GEN_ID (0x0210)
  60. #define NS9750_SYS_EXT_INT_CTRL_BASE (0x0214)
  61. /* the vectored register addresses */
  62. #define NS9750_SYS_TIMER_COUNT(c) (NS9750_SYS_TIMER_COUNT_BASE + (c))
  63. #define NS9750_SYS_TIMER_READ(c) (NS9750_SYS_TIMER_READ_BASE + (c))
  64. #define NS9750_SYS_INT_VEC_ADR(c) (NS9750_SYS_INT_VEC_ADR_BASE + (c))
  65. #define NS9750_SYS_TIMER_CTRL(c) (NS9750_SYS_TIMER_CTRL_BASE + (c))
  66. /* CS_DYN start with 4 */
  67. #define NS9750_SYS_CS_DYN_BASE(c) (NS9750_SYS_CS_DYN_BASE_BASE + ((c)-4)*2)
  68. #define NS9750_SYS_CS_DYN_MASK(c) (NS9750_SYS_CS_DYN_MASK_BASE + ((c)-4)*2)
  69. /* CS_STATIC start with 0 */
  70. #define NS9750_SYS_CS_STATIC_BASE(c) (NS9750_SYS_CS_STATIC_BASE_BASE + (c)*2)
  71. #define NS9750_SYS_CS_STATIC_MASK(c) (NS9750_SYS_CS_STATIC_MASK_BASE + (c)*2)
  72. #define NS9750_SYS_EXT_INT_CTRL(c) (NS9750_SYS_EXT_INT_CTRL + (c))
  73. /* register bit fields */
  74. #define NS9750_SYS_AHB_GEN_EXMAM (0x00000001)
  75. /* need to be n*8bit to BRC channel */
  76. #define NS9750_SYS_BRC_CEB (0x00000080)
  77. #define NS9750_SYS_BRC_BRF_MA (0x00000030)
  78. #define NS9750_SYS_BRC_BRF_100 (0x00000000)
  79. #define NS9750_SYS_BRC_BRF_75 (0x00000010)
  80. #define NS9750_SYS_BRC_BRF_50 (0x00000020)
  81. #define NS9750_SYS_BRC_BRF_25 (0x00000030)
  82. #define NS9750_SYS_AHB_TIMEOUT_BAT_MA (0xFFFF0000)
  83. #define NS9750_SYS_AHB_TIMEOUT_BMT_MA (0x0000FFFF)
  84. #define NS9750_SYS_AHB_ERROR2_ABL (0x00040000)
  85. #define NS9750_SYS_AHB_ERROR2_AER (0x00020000)
  86. #define NS9750_SYS_AHB_ERROR2_ABM (0x00010000)
  87. #define NS9750_SYS_AHB_ERROR2_ABA (0x00008000)
  88. #define NS9750_SYS_AHB_ERROR2_HWRT (0x00004000)
  89. #define NS9750_SYS_AHB_ERROR2_HMID_MA (0x00003C00)
  90. #define NS9750_SYS_AHB_ERROR2_HTPC_MA (0x000003C0)
  91. #define NS9750_SYS_AHB_ERROR2_HSZ_MA (0x00000038)
  92. #define NS9750_SYS_AHB_ERROR2_RR_MA (0x00000007)
  93. #define NS9750_SYS_AHB_MON_EIC (0x00800000)
  94. #define NS9750_SYS_AHB_MON_MBII (0x00400000)
  95. #define NS9750_SYS_AHB_MON_MBL_MA (0x003FFFC0)
  96. #define NS9750_SYS_AHB_MON_MBLDC (0x00000020)
  97. #define NS9750_SYS_AHB_MON_SERDC (0x00000010)
  98. #define NS9750_SYS_AHB_MON_BMTC_MA (0x0000000C)
  99. #define NS9750_SYS_AHB_MON_BMTC_RECORD (0x00000000)
  100. #define NS9750_SYS_AHB_MON_BMTC_GEN_IRQ (0x00000004)
  101. #define NS9750_SYS_AHB_MON_BMTC_GEN_RES (0x00000008)
  102. #define NS9750_SYS_AHB_MON_BATC_MA (0x00000003)
  103. #define NS9750_SYS_AHB_MON_BATC_RECORD (0x00000000)
  104. #define NS9750_SYS_AHB_MON_BATC_GEN_IRQ (0x00000001)
  105. #define NS9750_SYS_AHB_MON_BATC_GEN_RES (0x00000002)
  106. /* need to be n*8bit to Int Level */
  107. #define NS9750_SYS_INT_CFG_IE (0x00000080)
  108. #define NS9750_SYS_INT_CFG_IT (0x00000020)
  109. #define NS9750_SYS_INT_CFG_IAD_MA (0x0000001F)
  110. #define NS9750_SYS_TIMER_INT_STAT_MA (0x0000FFFF)
  111. #define NS9750_SYS_SW_WDOG_CFG_SWWE (0x00000080)
  112. #define NS9750_SYS_SW_WDOG_CFG_SWWI (0x00000020)
  113. #define NS9750_SYS_SW_WDOG_CFG_SWWIC (0x00000010)
  114. #define NS9750_SYS_SW_WDOG_CFG_SWTCS_MA (0x00000007)
  115. #define NS9750_SYS_SW_WDOG_CFG_SWTCS_2 (0x00000000)
  116. #define NS9750_SYS_SW_WDOG_CFG_SWTCS_4 (0x00000001)
  117. #define NS9750_SYS_SW_WDOG_CFG_SWTCS_8 (0x00000002)
  118. #define NS9750_SYS_SW_WDOG_CFG_SWTCS_16 (0x00000003)
  119. #define NS9750_SYS_SW_WDOG_CFG_SWTCS_32 (0x00000004)
  120. #define NS9750_SYS_SW_WDOG_CFG_SWTCS_64 (0x00000005)
  121. #define NS9750_SYS_CLOCK_LPCS_MA (0x00000380)
  122. #define NS9750_SYS_CLOCK_LPCS_1 (0x00000000)
  123. #define NS9750_SYS_CLOCK_LPCS_2 (0x00000080)
  124. #define NS9750_SYS_CLOCK_LPCS_4 (0x00000100)
  125. #define NS9750_SYS_CLOCK_LPCS_8 (0x00000180)
  126. #define NS9750_SYS_CLOCK_LPCS_EXT (0x00000200)
  127. #define NS9750_SYS_CLOCK_BBC (0x00000040)
  128. #define NS9750_SYS_CLOCK_LCC (0x00000020)
  129. #define NS9750_SYS_CLOCK_MCC (0x00000010)
  130. #define NS9750_SYS_CLOCK_PARBC (0x00000008)
  131. #define NS9750_SYS_CLOCK_PC (0x00000004)
  132. #define NS9750_SYS_CLOCK_MACC (0x00000001)
  133. #define NS9750_SYS_RESET_SR (0x80000000)
  134. #define NS9750_SYS_RESET_I2CW (0x00100000)
  135. #define NS9750_SYS_RESET_CSE (0x00080000)
  136. #define NS9750_SYS_RESET_SMWE (0x00040000)
  137. #define NS9750_SYS_RESET_EWE (0x00020000)
  138. #define NS9750_SYS_RESET_PI3WE (0x00010000)
  139. #define NS9750_SYS_RESET_BBT (0x00000040)
  140. #define NS9750_SYS_RESET_LCDC (0x00000020)
  141. #define NS9750_SYS_RESET_MEMC (0x00000010)
  142. #define NS9750_SYS_RESET_PCIAR (0x00000008)
  143. #define NS9750_SYS_RESET_PCIM (0x00000004)
  144. #define NS9750_SYS_RESET_MACM (0x00000001)
  145. #define NS9750_SYS_MISC_REV_MA (0xFF000000)
  146. #define NS9750_SYS_MISC_PCIA (0x00002000)
  147. #define NS9750_SYS_MISC_VDIS (0x00001000)
  148. #define NS9750_SYS_MISC_BMM (0x00000800)
  149. #define NS9750_SYS_MISC_CS1DB (0x00000400)
  150. #define NS9750_SYS_MISC_CS1DW_MA (0x00000300)
  151. #define NS9750_SYS_MISC_MCCM (0x00000080)
  152. #define NS9750_SYS_MISC_PMSS (0x00000040)
  153. #define NS9750_SYS_MISC_CS1P (0x00000020)
  154. #define NS9750_SYS_MISC_ENDM (0x00000008)
  155. #define NS9750_SYS_MISC_MBAR (0x00000004)
  156. #define NS9750_SYS_MISC_IRAM0 (0x00000001)
  157. #define NS9750_SYS_PLL_PLLBS (0x02000000)
  158. #define NS9750_SYS_PLL_PLLFS_MA (0x01800000)
  159. #define NS9750_SYS_PLL_PLLIS_MA (0x00600000)
  160. #define NS9750_SYS_PLL_PLLND_MA (0x001F0000)
  161. #define NS9750_SYS_PLL_PLLSW (0x00008000)
  162. #define NS9750_SYS_PLL_PLLBSSW (0x00000200)
  163. #define NS9750_SYS_PLL_FSEL_MA (0x00000180)
  164. #define NS9750_SYS_PLL_CPCC_MA (0x00000060)
  165. #define NS9750_SYS_PLL_NDSW_MA (0x0000001F)
  166. #define NS9750_SYS_ACT_INT_STAT_MA (0x0000FFFF)
  167. #define NS9750_SYS_TIMER_CTRL_TEN (0x00008000)
  168. #define NS9750_SYS_TIMER_CTRL_INTC (0x00000200)
  169. #define NS9750_SYS_TIMER_CTRL_TLCS_MA (0x000001C0)
  170. #define NS9750_SYS_TIMER_CTRL_TLCS_1 (0x00000000)
  171. #define NS9750_SYS_TIMER_CTRL_TLCS_2 (0x00000040)
  172. #define NS9750_SYS_TIMER_CTRL_TLCS_4 (0x00000080)
  173. #define NS9750_SYS_TIMER_CTRL_TLCS_8 (0x000000C0)
  174. #define NS9750_SYS_TIMER_CTRL_TLCS_16 (0x00000100)
  175. #define NS9750_SYS_TIMER_CTRL_TLCS_32 (0x00000140)
  176. #define NS9750_SYS_TIMER_CTRL_TLCS_64 (0x00000180)
  177. #define NS9750_SYS_TIMER_CTRL_TLCS_EXT (0x000001C0)
  178. #define NS9750_SYS_TIMER_CTRL_TM_MA (0x00000030)
  179. #define NS9750_SYS_TIMER_CTRL_TM_INT (0x00000000)
  180. #define NS9750_SYS_TIMER_CTRL_TM_LOW (0x00000010)
  181. #define NS9750_SYS_TIMER_CTRL_TM_HIGH (0x00000020)
  182. #define NS9750_SYS_TIMER_CTRL_INTS (0x00000008)
  183. #define NS9750_SYS_TIMER_CTRL_UDS (0x00000004)
  184. #define NS9750_SYS_TIMER_CTRL_TSZ (0x00000002)
  185. #define NS9750_SYS_TIMER_CTRL_REN (0x00000001)
  186. #define NS9750_SYS_EXT_INT_CTRL_STS (0x00000008)
  187. #define NS9750_SYS_EXT_INT_CTRL_CLR (0x00000004)
  188. #define NS9750_SYS_EXT_INT_CTRL_PLTY (0x00000002)
  189. #define NS9750_SYS_EXT_INT_CTRL_LVEDG (0x00000001)
  190. #endif /* FS_NS9750_SYS_H */