bf561.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. /*
  2. * File: include/asm-blackfin/mach-bf561/bf561.h
  3. * Based on:
  4. * Author:
  5. *
  6. * Created:
  7. * Description: SYSTEM MMR REGISTER AND MEMORY MAP FOR ADSP-BF561
  8. *
  9. * Modified:
  10. * Copyright 2004-2006 Analog Devices Inc.
  11. *
  12. * Bugs: Enter bugs at http://blackfin.uclinux.org/
  13. *
  14. * This program is free software; you can redistribute it and/or modify
  15. * it under the terms of the GNU General Public License as published by
  16. * the Free Software Foundation; either version 2 of the License, or
  17. * (at your option) any later version.
  18. *
  19. * This program is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. * GNU General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU General Public License
  25. * along with this program; if not, see the file COPYING, or write
  26. * to the Free Software Foundation, Inc.,
  27. * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  28. */
  29. #ifndef __MACH_BF561_H__
  30. #define __MACH_BF561_H__
  31. #define SUPPORTED_REVID 0x3
  32. #define OFFSET_(x) ((x) & 0x0000FFFF)
  33. /*some misc defines*/
  34. #define IMASK_IVG15 0x8000
  35. #define IMASK_IVG14 0x4000
  36. #define IMASK_IVG13 0x2000
  37. #define IMASK_IVG12 0x1000
  38. #define IMASK_IVG11 0x0800
  39. #define IMASK_IVG10 0x0400
  40. #define IMASK_IVG9 0x0200
  41. #define IMASK_IVG8 0x0100
  42. #define IMASK_IVG7 0x0080
  43. #define IMASK_IVGTMR 0x0040
  44. #define IMASK_IVGHW 0x0020
  45. /***************************
  46. * Blackfin Cache setup
  47. */
  48. #define BFIN_ISUBBANKS 4
  49. #define BFIN_IWAYS 4
  50. #define BFIN_ILINES 32
  51. #define BFIN_DSUBBANKS 4
  52. #define BFIN_DWAYS 2
  53. #define BFIN_DLINES 64
  54. #define WAY0_L 0x1
  55. #define WAY1_L 0x2
  56. #define WAY01_L 0x3
  57. #define WAY2_L 0x4
  58. #define WAY02_L 0x5
  59. #define WAY12_L 0x6
  60. #define WAY012_L 0x7
  61. #define WAY3_L 0x8
  62. #define WAY03_L 0x9
  63. #define WAY13_L 0xA
  64. #define WAY013_L 0xB
  65. #define WAY32_L 0xC
  66. #define WAY320_L 0xD
  67. #define WAY321_L 0xE
  68. #define WAYALL_L 0xF
  69. #define DMC_ENABLE (2<<2) /*yes, 2, not 1 */
  70. /* IAR0 BIT FIELDS */
  71. #define PLL_WAKEUP_BIT 0xFFFFFFFF
  72. #define DMA1_ERROR_BIT 0xFFFFFF0F
  73. #define DMA2_ERROR_BIT 0xFFFFF0FF
  74. #define IMDMA_ERROR_BIT 0xFFFF0FFF
  75. #define PPI1_ERROR_BIT 0xFFF0FFFF
  76. #define PPI2_ERROR_BIT 0xFF0FFFFF
  77. #define SPORT0_ERROR_BIT 0xF0FFFFFF
  78. #define SPORT1_ERROR_BIT 0x0FFFFFFF
  79. /* IAR1 BIT FIELDS */
  80. #define SPI_ERROR_BIT 0xFFFFFFFF
  81. #define UART_ERROR_BIT 0xFFFFFF0F
  82. #define RESERVED_ERROR_BIT 0xFFFFF0FF
  83. #define DMA1_0_BIT 0xFFFF0FFF
  84. #define DMA1_1_BIT 0xFFF0FFFF
  85. #define DMA1_2_BIT 0xFF0FFFFF
  86. #define DMA1_3_BIT 0xF0FFFFFF
  87. #define DMA1_4_BIT 0x0FFFFFFF
  88. /* IAR2 BIT FIELDS */
  89. #define DMA1_5_BIT 0xFFFFFFFF
  90. #define DMA1_6_BIT 0xFFFFFF0F
  91. #define DMA1_7_BIT 0xFFFFF0FF
  92. #define DMA1_8_BIT 0xFFFF0FFF
  93. #define DMA1_9_BIT 0xFFF0FFFF
  94. #define DMA1_10_BIT 0xFF0FFFFF
  95. #define DMA1_11_BIT 0xF0FFFFFF
  96. #define DMA2_0_BIT 0x0FFFFFFF
  97. /* IAR3 BIT FIELDS */
  98. #define DMA2_1_BIT 0xFFFFFFFF
  99. #define DMA2_2_BIT 0xFFFFFF0F
  100. #define DMA2_3_BIT 0xFFFFF0FF
  101. #define DMA2_4_BIT 0xFFFF0FFF
  102. #define DMA2_5_BIT 0xFFF0FFFF
  103. #define DMA2_6_BIT 0xFF0FFFFF
  104. #define DMA2_7_BIT 0xF0FFFFFF
  105. #define DMA2_8_BIT 0x0FFFFFFF
  106. /* IAR4 BIT FIELDS */
  107. #define DMA2_9_BIT 0xFFFFFFFF
  108. #define DMA2_10_BIT 0xFFFFFF0F
  109. #define DMA2_11_BIT 0xFFFFF0FF
  110. #define TIMER0_BIT 0xFFFF0FFF
  111. #define TIMER1_BIT 0xFFF0FFFF
  112. #define TIMER2_BIT 0xFF0FFFFF
  113. #define TIMER3_BIT 0xF0FFFFFF
  114. #define TIMER4_BIT 0x0FFFFFFF
  115. /* IAR5 BIT FIELDS */
  116. #define TIMER5_BIT 0xFFFFFFFF
  117. #define TIMER6_BIT 0xFFFFFF0F
  118. #define TIMER7_BIT 0xFFFFF0FF
  119. #define TIMER8_BIT 0xFFFF0FFF
  120. #define TIMER9_BIT 0xFFF0FFFF
  121. #define TIMER10_BIT 0xFF0FFFFF
  122. #define TIMER11_BIT 0xF0FFFFFF
  123. #define PROG0_INTA_BIT 0x0FFFFFFF
  124. /* IAR6 BIT FIELDS */
  125. #define PROG0_INTB_BIT 0xFFFFFFFF
  126. #define PROG1_INTA_BIT 0xFFFFFF0F
  127. #define PROG1_INTB_BIT 0xFFFFF0FF
  128. #define PROG2_INTA_BIT 0xFFFF0FFF
  129. #define PROG2_INTB_BIT 0xFFF0FFFF
  130. #define DMA1_WRRD0_BIT 0xFF0FFFFF
  131. #define DMA1_WRRD1_BIT 0xF0FFFFFF
  132. #define DMA2_WRRD0_BIT 0x0FFFFFFF
  133. /* IAR7 BIT FIELDS */
  134. #define DMA2_WRRD1_BIT 0xFFFFFFFF
  135. #define IMDMA_WRRD0_BIT 0xFFFFFF0F
  136. #define IMDMA_WRRD1_BIT 0xFFFFF0FF
  137. #define WATCH_BIT 0xFFFF0FFF
  138. #define RESERVED_1_BIT 0xFFF0FFFF
  139. #define RESERVED_2_BIT 0xFF0FFFFF
  140. #define SUPPLE_0_BIT 0xF0FFFFFF
  141. #define SUPPLE_1_BIT 0x0FFFFFFF
  142. /* Miscellaneous Values */
  143. /****************************** EBIU Settings ********************************/
  144. #define AMBCTL0VAL ((CONFIG_BANK_1 << 16) | CONFIG_BANK_0)
  145. #define AMBCTL1VAL ((CONFIG_BANK_3 << 16) | CONFIG_BANK_2)
  146. #if defined(CONFIG_C_AMBEN_ALL)
  147. #define V_AMBEN AMBEN_ALL
  148. #elif defined(CONFIG_C_AMBEN)
  149. #define V_AMBEN 0x0
  150. #elif defined(CONFIG_C_AMBEN_B0)
  151. #define V_AMBEN AMBEN_B0
  152. #elif defined(CONFIG_C_AMBEN_B0_B1)
  153. #define V_AMBEN AMBEN_B0_B1
  154. #elif defined(CONFIG_C_AMBEN_B0_B1_B2)
  155. #define V_AMBEN AMBEN_B0_B1_B2
  156. #endif
  157. #ifdef CONFIG_C_AMCKEN
  158. #define V_AMCKEN AMCKEN
  159. #else
  160. #define V_AMCKEN 0x0
  161. #endif
  162. #ifdef CONFIG_C_B0PEN
  163. #define V_B0PEN 0x10
  164. #else
  165. #define V_B0PEN 0x00
  166. #endif
  167. #ifdef CONFIG_C_B1PEN
  168. #define V_B1PEN 0x20
  169. #else
  170. #define V_B1PEN 0x00
  171. #endif
  172. #ifdef CONFIG_C_B2PEN
  173. #define V_B2PEN 0x40
  174. #else
  175. #define V_B2PEN 0x00
  176. #endif
  177. #ifdef CONFIG_C_B3PEN
  178. #define V_B3PEN 0x80
  179. #else
  180. #define V_B3PEN 0x00
  181. #endif
  182. #ifdef CONFIG_C_CDPRIO
  183. #define V_CDPRIO 0x100
  184. #else
  185. #define V_CDPRIO 0x0
  186. #endif
  187. #define AMGCTLVAL (V_AMBEN | V_AMCKEN | V_CDPRIO | V_B0PEN | V_B1PEN | V_B2PEN | V_B3PEN | 0x0002)
  188. #ifdef CONFIG_BF561
  189. #define CPU "BF561"
  190. #define CPUID 0x027bb000
  191. #endif
  192. #ifndef CPU
  193. #define CPU "UNKNOWN"
  194. #define CPUID 0x0
  195. #endif
  196. #endif /* __MACH_BF561_H__ */