bf561.h 4.9 KB

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