bf561.h 6.4 KB

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