bf561.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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 OFFSET_(x) ((x) & 0x0000FFFF)
  32. /*some misc defines*/
  33. #define IMASK_IVG15 0x8000
  34. #define IMASK_IVG14 0x4000
  35. #define IMASK_IVG13 0x2000
  36. #define IMASK_IVG12 0x1000
  37. #define IMASK_IVG11 0x0800
  38. #define IMASK_IVG10 0x0400
  39. #define IMASK_IVG9 0x0200
  40. #define IMASK_IVG8 0x0100
  41. #define IMASK_IVG7 0x0080
  42. #define IMASK_IVGTMR 0x0040
  43. #define IMASK_IVGHW 0x0020
  44. /***************************
  45. * Blackfin Cache setup
  46. */
  47. #define BFIN_ISUBBANKS 4
  48. #define BFIN_IWAYS 4
  49. #define BFIN_ILINES 32
  50. #define BFIN_DSUBBANKS 4
  51. #define BFIN_DWAYS 2
  52. #define BFIN_DLINES 64
  53. #define WAY0_L 0x1
  54. #define WAY1_L 0x2
  55. #define WAY01_L 0x3
  56. #define WAY2_L 0x4
  57. #define WAY02_L 0x5
  58. #define WAY12_L 0x6
  59. #define WAY012_L 0x7
  60. #define WAY3_L 0x8
  61. #define WAY03_L 0x9
  62. #define WAY13_L 0xA
  63. #define WAY013_L 0xB
  64. #define WAY32_L 0xC
  65. #define WAY320_L 0xD
  66. #define WAY321_L 0xE
  67. #define WAYALL_L 0xF
  68. #define DMC_ENABLE (2<<2) /*yes, 2, not 1 */
  69. /* IAR0 BIT FIELDS */
  70. #define PLL_WAKEUP_BIT 0xFFFFFFFF
  71. #define DMA1_ERROR_BIT 0xFFFFFF0F
  72. #define DMA2_ERROR_BIT 0xFFFFF0FF
  73. #define IMDMA_ERROR_BIT 0xFFFF0FFF
  74. #define PPI1_ERROR_BIT 0xFFF0FFFF
  75. #define PPI2_ERROR_BIT 0xFF0FFFFF
  76. #define SPORT0_ERROR_BIT 0xF0FFFFFF
  77. #define SPORT1_ERROR_BIT 0x0FFFFFFF
  78. /* IAR1 BIT FIELDS */
  79. #define SPI_ERROR_BIT 0xFFFFFFFF
  80. #define UART_ERROR_BIT 0xFFFFFF0F
  81. #define RESERVED_ERROR_BIT 0xFFFFF0FF
  82. #define DMA1_0_BIT 0xFFFF0FFF
  83. #define DMA1_1_BIT 0xFFF0FFFF
  84. #define DMA1_2_BIT 0xFF0FFFFF
  85. #define DMA1_3_BIT 0xF0FFFFFF
  86. #define DMA1_4_BIT 0x0FFFFFFF
  87. /* IAR2 BIT FIELDS */
  88. #define DMA1_5_BIT 0xFFFFFFFF
  89. #define DMA1_6_BIT 0xFFFFFF0F
  90. #define DMA1_7_BIT 0xFFFFF0FF
  91. #define DMA1_8_BIT 0xFFFF0FFF
  92. #define DMA1_9_BIT 0xFFF0FFFF
  93. #define DMA1_10_BIT 0xFF0FFFFF
  94. #define DMA1_11_BIT 0xF0FFFFFF
  95. #define DMA2_0_BIT 0x0FFFFFFF
  96. /* IAR3 BIT FIELDS */
  97. #define DMA2_1_BIT 0xFFFFFFFF
  98. #define DMA2_2_BIT 0xFFFFFF0F
  99. #define DMA2_3_BIT 0xFFFFF0FF
  100. #define DMA2_4_BIT 0xFFFF0FFF
  101. #define DMA2_5_BIT 0xFFF0FFFF
  102. #define DMA2_6_BIT 0xFF0FFFFF
  103. #define DMA2_7_BIT 0xF0FFFFFF
  104. #define DMA2_8_BIT 0x0FFFFFFF
  105. /* IAR4 BIT FIELDS */
  106. #define DMA2_9_BIT 0xFFFFFFFF
  107. #define DMA2_10_BIT 0xFFFFFF0F
  108. #define DMA2_11_BIT 0xFFFFF0FF
  109. #define TIMER0_BIT 0xFFFF0FFF
  110. #define TIMER1_BIT 0xFFF0FFFF
  111. #define TIMER2_BIT 0xFF0FFFFF
  112. #define TIMER3_BIT 0xF0FFFFFF
  113. #define TIMER4_BIT 0x0FFFFFFF
  114. /* IAR5 BIT FIELDS */
  115. #define TIMER5_BIT 0xFFFFFFFF
  116. #define TIMER6_BIT 0xFFFFFF0F
  117. #define TIMER7_BIT 0xFFFFF0FF
  118. #define TIMER8_BIT 0xFFFF0FFF
  119. #define TIMER9_BIT 0xFFF0FFFF
  120. #define TIMER10_BIT 0xFF0FFFFF
  121. #define TIMER11_BIT 0xF0FFFFFF
  122. #define PROG0_INTA_BIT 0x0FFFFFFF
  123. /* IAR6 BIT FIELDS */
  124. #define PROG0_INTB_BIT 0xFFFFFFFF
  125. #define PROG1_INTA_BIT 0xFFFFFF0F
  126. #define PROG1_INTB_BIT 0xFFFFF0FF
  127. #define PROG2_INTA_BIT 0xFFFF0FFF
  128. #define PROG2_INTB_BIT 0xFFF0FFFF
  129. #define DMA1_WRRD0_BIT 0xFF0FFFFF
  130. #define DMA1_WRRD1_BIT 0xF0FFFFFF
  131. #define DMA2_WRRD0_BIT 0x0FFFFFFF
  132. /* IAR7 BIT FIELDS */
  133. #define DMA2_WRRD1_BIT 0xFFFFFFFF
  134. #define IMDMA_WRRD0_BIT 0xFFFFFF0F
  135. #define IMDMA_WRRD1_BIT 0xFFFFF0FF
  136. #define WATCH_BIT 0xFFFF0FFF
  137. #define RESERVED_1_BIT 0xFFF0FFFF
  138. #define RESERVED_2_BIT 0xFF0FFFFF
  139. #define SUPPLE_0_BIT 0xF0FFFFFF
  140. #define SUPPLE_1_BIT 0x0FFFFFFF
  141. /* Miscellaneous Values */
  142. /****************************** EBIU Settings ********************************/
  143. #define AMBCTL0VAL ((CONFIG_BANK_1 << 16) | CONFIG_BANK_0)
  144. #define AMBCTL1VAL ((CONFIG_BANK_3 << 16) | CONFIG_BANK_2)
  145. #if defined(CONFIG_C_AMBEN_ALL)
  146. #define V_AMBEN AMBEN_ALL
  147. #elif defined(CONFIG_C_AMBEN)
  148. #define V_AMBEN 0x0
  149. #elif defined(CONFIG_C_AMBEN_B0)
  150. #define V_AMBEN AMBEN_B0
  151. #elif defined(CONFIG_C_AMBEN_B0_B1)
  152. #define V_AMBEN AMBEN_B0_B1
  153. #elif defined(CONFIG_C_AMBEN_B0_B1_B2)
  154. #define V_AMBEN AMBEN_B0_B1_B2
  155. #endif
  156. #ifdef CONFIG_C_AMCKEN
  157. #define V_AMCKEN AMCKEN
  158. #else
  159. #define V_AMCKEN 0x0
  160. #endif
  161. #ifdef CONFIG_C_B0PEN
  162. #define V_B0PEN 0x10
  163. #else
  164. #define V_B0PEN 0x00
  165. #endif
  166. #ifdef CONFIG_C_B1PEN
  167. #define V_B1PEN 0x20
  168. #else
  169. #define V_B1PEN 0x00
  170. #endif
  171. #ifdef CONFIG_C_B2PEN
  172. #define V_B2PEN 0x40
  173. #else
  174. #define V_B2PEN 0x00
  175. #endif
  176. #ifdef CONFIG_C_B3PEN
  177. #define V_B3PEN 0x80
  178. #else
  179. #define V_B3PEN 0x00
  180. #endif
  181. #ifdef CONFIG_C_CDPRIO
  182. #define V_CDPRIO 0x100
  183. #else
  184. #define V_CDPRIO 0x0
  185. #endif
  186. #define AMGCTLVAL (V_AMBEN | V_AMCKEN | V_CDPRIO | V_B0PEN | V_B1PEN | V_B2PEN | V_B3PEN | 0x0002)
  187. #ifdef CONFIG_BF561
  188. #define CPU "BF561"
  189. #define CPUID 0x27bb
  190. #endif
  191. #ifndef CPU
  192. #error Unknown CPU type - This kernel doesn't seem to be configured properly
  193. #endif
  194. #endif /* __MACH_BF561_H__ */