hw_emifb.h 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. /**
  2. * \file hw_emifb.h
  3. *
  4. * \brief EMIFB register definitions
  5. */
  6. /*
  7. * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
  8. */
  9. /*
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. *
  14. * Redistributions of source code must retain the above copyright
  15. * notice, this list of conditions and the following disclaimer.
  16. *
  17. * Redistributions in binary form must reproduce the above copyright
  18. * notice, this list of conditions and the following disclaimer in the
  19. * documentation and/or other materials provided with the
  20. * distribution.
  21. *
  22. * Neither the name of Texas Instruments Incorporated nor the names of
  23. * its contributors may be used to endorse or promote products derived
  24. * from this software without specific prior written permission.
  25. *
  26. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  27. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  28. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  29. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  30. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  31. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  32. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  33. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  34. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  35. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  36. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  37. *
  38. */
  39. #ifndef _HW_EMIFB_H_
  40. #define _HW_EMIFB_H_
  41. #ifdef __cplusplus
  42. extern "C" {
  43. #endif
  44. #define EMIFB_REVID (0x0)
  45. #define EMIFB_SDCFG (0x4)
  46. #define EMIFB_SDRFC (0x8)
  47. #define EMIFB_SDTIM1 (0xC)
  48. #define EMIFB_SDTIM2 (0x10)
  49. #define EMIFB_SDCFG2 (0x1C)
  50. #define EMIFB_BPRIO (0x20)
  51. #define EMIFB_PC1 (0x40)
  52. #define EMIFB_PC2 (0x44)
  53. #define EMIFB_PCC (0x48)
  54. #define EMIFB_PCMRS (0x4C)
  55. #define EMIFB_PCT (0x50)
  56. #define EMIFB_IRR (0xC0)
  57. #define EMIFB_IMR (0xC4)
  58. #define EMIFB_IMSR (0xC8)
  59. #define EMIFB_IMCR (0xCC)
  60. #define EMIFB_DRPYC1R (0xE4)
  61. /**************************************************************************\
  62. * Field Definition Macros
  63. \**************************************************************************/
  64. /* REVID */
  65. #define EMIFB_REVID_REV (0xFFFFFFFFu)
  66. #define EMIFB_REVID_REV_SHIFT (0x00000000u)
  67. /* SDCFG */
  68. #define EMIFB_SDCFG_MSDRAM_ENABLE_SHIFT (0x00000019u)
  69. #define EMIFB_SDCFG_BOOT_UNLOCK (0x00800000u)
  70. #define EMIFB_SDCFG_BOOT_UNLOCK_SHIFT (0x00000017u)
  71. #define EMIFB_SDCFG_SDREN (0x00010000u)
  72. #define EMIFB_SDCFG_SDREN_SHIFT (0x00000010u)
  73. #define EMIFB_SDCFG_TIMUNLOCK (0x00008000u)
  74. #define EMIFB_SDCFG_TIMUNLOCK_SHIFT (0x0000000Fu)
  75. #define EMIFB_SDCFG_NM (0x00004000u)
  76. #define EMIFB_SDCFG_NM_SHIFT (0x0000000Eu)
  77. #define EMIFB_SDCFG_CL (0x00000E00u)
  78. #define EMIFB_SDCFG_CL_SHIFT (0x00000009u)
  79. /*----CL Tokens----*/
  80. #define EMIFB_SDCFG_CL_TWO (0x00000002u)
  81. #define EMIFB_SDCFG_CL_THREE (0x00000003u)
  82. #define EMIFB_SDCFG_IBANK (0x00000070u)
  83. #define EMIFB_SDCFG_IBANK_SHIFT (0x00000004u)
  84. /*----IBANK Tokens----*/
  85. #define EMIFB_SDCFG_IBANK_ONE (0x00000000u)
  86. #define EMIFB_SDCFG_IBANK_TWO (0x00000001u)
  87. #define EMIFB_SDCFG_IBANK_FOUR (0x00000002u)
  88. #define EMIFB_SDCFG_EBANK (0x00000008u)
  89. #define EMIFB_SDCFG_EBANK_SHIFT (0x00000003u)
  90. #define EMIFB_SDCFG_PAGESIZE (0x00000007u)
  91. #define EMIFB_SDCFG_PAGESIZE_SHIFT (0x00000000u)
  92. /*----PAGESIZE Tokens----*/
  93. #define EMIFB_SDCFG_PAGESIZE_256W_PAGE (0x00000000u)
  94. #define EMIFB_SDCFG_PAGESIZE_512W_PAGE (0x00000001u)
  95. #define EMIFB_SDCFG_PAGESIZE_1024W_PAGE (0x00000002u)
  96. #define EMIFB_SDCFG_PAGESIZE_2048W_PAGE (0x00000003u)
  97. /* SDRFC */
  98. #define EMIFB_SDRFC_LP_MODE (0x80000000u)
  99. #define EMIFB_SDRFC_LP_MODE_SHIFT (0x0000001Fu)
  100. #define EMIFB_SDRFC_MCLKSTOP_EN (0x40000000u)
  101. #define EMIFB_SDRFC_MCLKSTOP_EN_SHIFT (0x0000001Eu)
  102. #define EMIFB_SDRFC_SR_PD (0x00800000u)
  103. #define EMIFB_SDRFC_SR_PD_SHIFT (0x00000017u)
  104. #define EMIFB_SDRFC_REFRESH_RATE (0x0000FFFFu)
  105. #define EMIFB_SDRFC_REFRESH_RATE_SHIFT (0x00000000u)
  106. /* SDTIM1 */
  107. #define EMIFB_SDTIM1_T_RFC (0xFE000000u)
  108. #define EMIFB_SDTIM1_T_RFC_SHIFT (0x00000019u)
  109. #define EMIFB_SDTIM1_T_RP (0x01C00000u)
  110. #define EMIFB_SDTIM1_T_RP_SHIFT (0x00000016u)
  111. #define EMIFB_SDTIM1_T_RCD (0x00380000u)
  112. #define EMIFB_SDTIM1_T_RCD_SHIFT (0x00000013u)
  113. #define EMIFB_SDTIM1_T_WR (0x00070000u)
  114. #define EMIFB_SDTIM1_T_WR_SHIFT (0x00000010u)
  115. #define EMIFB_SDTIM1_T_RAS (0x0000F800u)
  116. #define EMIFB_SDTIM1_T_RAS_SHIFT (0x0000000Bu)
  117. #define EMIFB_SDTIM1_T_RC (0x000007C0u)
  118. #define EMIFB_SDTIM1_T_RC_SHIFT (0x00000006u)
  119. #define EMIFB_SDTIM1_T_RRD (0x00000038u)
  120. #define EMIFB_SDTIM1_T_RRD_SHIFT (0x00000003u)
  121. /* SDTIM2 */
  122. #define EMIFB_SDTIM2_T_RAS_MAX (0x78000000u)
  123. #define EMIFB_SDTIM2_T_RAS_MAX_SHIFT (0x0000001Bu)
  124. #define EMIFB_SDTIM2_T_XSR (0x007F0000u)
  125. #define EMIFB_SDTIM2_T_XSR_SHIFT (0x00000010u)
  126. #define EMIFB_SDTIM2_T_CKE (0x0000001Fu)
  127. #define EMIFB_SDTIM2_T_CKE_SHIFT (0x00000000u)
  128. /* SDCFG2 */
  129. #define EMIFB_SDCFG2_PASR (0x00070000u)
  130. #define EMIFB_SDCFG2_PASR_SHIFT (0x00000010u)
  131. /*----PASR Tokens----*/
  132. #define EMIFB_SDCFG2_PASR_FOUR_BANK (0x00000000u)
  133. #define EMIFB_SDCFG2_PASR_TWO_BANK (0x00000001u)
  134. #define EMIFB_SDCFG2_PASR_ONE_BANK (0x00000002u)
  135. #define EMIFB_SDCFG2_PASR_HALF_BANK (0x00000005u)
  136. #define EMIFB_SDCFG2_PASR_QRTR_BANK (0x00000006u)
  137. #define EMIFB_SDCFG2_PASR_RSVD1 (0x00000007u)
  138. #define EMIFB_SDCFG2_ROWSIZE (0x00000007u)
  139. #define EMIFB_SDCFG2_ROWSIZE_SHIFT (0x00000000u)
  140. /*----ROWSIZE Tokens----*/
  141. #define EMIFB_SDCFG2_ROWSIZE_9BITS (0x00000000u)
  142. #define EMIFB_SDCFG2_ROWSIZE_10BITS (0x00000001u)
  143. #define EMIFB_SDCFG2_ROWSIZE_11BITS (0x00000002u)
  144. #define EMIFB_SDCFG2_ROWSIZE_12BITS (0x00000003u)
  145. #define EMIFB_SDCFG2_ROWSIZE_13BITS (0x00000004u)
  146. #define EMIFB_SDCFG2_ROWSIZE_14BITS (0x00000005u)
  147. /* BPRIO */
  148. #define EMIFB_BPRIO_PRIO_RAISE (0x000000FFu)
  149. #define EMIFB_BPRIO_PRIO_RAISE_SHIFT (0x00000000u)
  150. /* PC1 */
  151. #define EMIFB_PC1_COUNTER1 (0xFFFFFFFFu)
  152. #define EMIFB_PC1_COUNTER1_SHIFT (0x00000000u)
  153. /* PC2 */
  154. #define EMIFB_PC2_COUNTER2 (0xFFFFFFFFu)
  155. #define EMIFB_PC2_COUNTER2_SHIFT (0x00000000u)
  156. /* PCC */
  157. #define EMIFB_PCC_CNTR2_MSTID_EN (0x80000000u)
  158. #define EMIFB_PCC_CNTR2_MSTID_EN_SHIFT (0x0000001Fu)
  159. #define EMIFB_PCC_CNTR2_REGION_EN (0x40000000u)
  160. #define EMIFB_PCC_CNTR2_REGION_EN_SHIFT (0x0000001Eu)
  161. #define EMIFB_PCC_CNTR2_CFG (0x000F0000u)
  162. #define EMIFB_PCC_CNTR2_CFG_SHIFT (0x00000010u)
  163. #define EMIFB_PCC_CNTR1_MSTID_EN (0x00008000u)
  164. #define EMIFB_PCC_CNTR1_MSTID_EN_SHIFT (0x0000000Fu)
  165. #define EMIFB_PCC_CNTR1_REGION_EN (0x00004000u)
  166. #define EMIFB_PCC_CNTR1_REGION_EN_SHIFT (0x0000000Eu)
  167. #define EMIFB_PCC_CNTR1_CFG (0x0000000Fu)
  168. #define EMIFB_PCC_CNTR1_CFG_SHIFT (0x00000000u)
  169. /* PCMRS */
  170. #define EMIFB_PCMRS_MST_ID2 (0xFF000000u)
  171. #define EMIFB_PCMRS_MST_ID2_SHIFT (0x00000018u)
  172. #define EMIFB_PCMRS_MST_ID1 (0x0000FF00u)
  173. #define EMIFB_PCMRS_MST_ID1_SHIFT (0x00000008u)
  174. /* PCT */
  175. #define EMIFB_PCT_TOTAL_TIME (0xFFFFFFFFu)
  176. #define EMIFB_PCT_TOTAL_TIME_SHIFT (0x00000000u)
  177. /* IRR */
  178. #define EMIFB_IRR_LT (0x00000004u)
  179. #define EMIFB_IRR_LT_SHIFT (0x00000002u)
  180. /* IMR */
  181. #define EMIFB_IMR_LTM (0x00000004u)
  182. #define EMIFB_IMR_LTM_SHIFT (0x00000002u)
  183. /* IMSR */
  184. #define EMIFB_IMSR_LTMSET (0x00000004u)
  185. #define EMIFB_IMSR_LTMSET_SHIFT (0x00000002u)
  186. /* IMCR */
  187. #define EMIFB_IMCR_LTMCLR (0x00000004u)
  188. #define EMIFB_IMCR_LTMCLR_SHIFT (0x00000002u)
  189. #ifdef __cplusplus
  190. }
  191. #endif
  192. #endif