2 * File: include/asm-blackfin/mach-bf561/bf561.h
7 * Description: SYSTEM MMR REGISTER AND MEMORY MAP FOR ADSP-BF561
10 * Copyright 2004-2006 Analog Devices Inc.
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
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.
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.
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
30 #ifndef __MACH_BF561_H__
31 #define __MACH_BF561_H__
33 #define OFFSET_(x) ((x) & 0x0000FFFF)
36 #define IMASK_IVG15 0x8000
37 #define IMASK_IVG14 0x4000
38 #define IMASK_IVG13 0x2000
39 #define IMASK_IVG12 0x1000
41 #define IMASK_IVG11 0x0800
42 #define IMASK_IVG10 0x0400
43 #define IMASK_IVG9 0x0200
44 #define IMASK_IVG8 0x0100
46 #define IMASK_IVG7 0x0080
47 #define IMASK_IVGTMR 0x0040
48 #define IMASK_IVGHW 0x0020
50 /***************************
51 * Blackfin Cache setup
55 #define BFIN_ISUBBANKS 4
57 #define BFIN_ILINES 32
59 #define BFIN_DSUBBANKS 4
61 #define BFIN_DLINES 64
81 #define DMC_ENABLE (2<<2) /*yes, 2, not 1 */
84 #define PLL_WAKEUP_BIT 0xFFFFFFFF
85 #define DMA1_ERROR_BIT 0xFFFFFF0F
86 #define DMA2_ERROR_BIT 0xFFFFF0FF
87 #define IMDMA_ERROR_BIT 0xFFFF0FFF
88 #define PPI1_ERROR_BIT 0xFFF0FFFF
89 #define PPI2_ERROR_BIT 0xFF0FFFFF
90 #define SPORT0_ERROR_BIT 0xF0FFFFFF
91 #define SPORT1_ERROR_BIT 0x0FFFFFFF
93 #define SPI_ERROR_BIT 0xFFFFFFFF
94 #define UART_ERROR_BIT 0xFFFFFF0F
95 #define RESERVED_ERROR_BIT 0xFFFFF0FF
96 #define DMA1_0_BIT 0xFFFF0FFF
97 #define DMA1_1_BIT 0xFFF0FFFF
98 #define DMA1_2_BIT 0xFF0FFFFF
99 #define DMA1_3_BIT 0xF0FFFFFF
100 #define DMA1_4_BIT 0x0FFFFFFF
101 /* IAR2 BIT FIELDS */
102 #define DMA1_5_BIT 0xFFFFFFFF
103 #define DMA1_6_BIT 0xFFFFFF0F
104 #define DMA1_7_BIT 0xFFFFF0FF
105 #define DMA1_8_BIT 0xFFFF0FFF
106 #define DMA1_9_BIT 0xFFF0FFFF
107 #define DMA1_10_BIT 0xFF0FFFFF
108 #define DMA1_11_BIT 0xF0FFFFFF
109 #define DMA2_0_BIT 0x0FFFFFFF
110 /* IAR3 BIT FIELDS */
111 #define DMA2_1_BIT 0xFFFFFFFF
112 #define DMA2_2_BIT 0xFFFFFF0F
113 #define DMA2_3_BIT 0xFFFFF0FF
114 #define DMA2_4_BIT 0xFFFF0FFF
115 #define DMA2_5_BIT 0xFFF0FFFF
116 #define DMA2_6_BIT 0xFF0FFFFF
117 #define DMA2_7_BIT 0xF0FFFFFF
118 #define DMA2_8_BIT 0x0FFFFFFF
119 /* IAR4 BIT FIELDS */
120 #define DMA2_9_BIT 0xFFFFFFFF
121 #define DMA2_10_BIT 0xFFFFFF0F
122 #define DMA2_11_BIT 0xFFFFF0FF
123 #define TIMER0_BIT 0xFFFF0FFF
124 #define TIMER1_BIT 0xFFF0FFFF
125 #define TIMER2_BIT 0xFF0FFFFF
126 #define TIMER3_BIT 0xF0FFFFFF
127 #define TIMER4_BIT 0x0FFFFFFF
128 /* IAR5 BIT FIELDS */
129 #define TIMER5_BIT 0xFFFFFFFF
130 #define TIMER6_BIT 0xFFFFFF0F
131 #define TIMER7_BIT 0xFFFFF0FF
132 #define TIMER8_BIT 0xFFFF0FFF
133 #define TIMER9_BIT 0xFFF0FFFF
134 #define TIMER10_BIT 0xFF0FFFFF
135 #define TIMER11_BIT 0xF0FFFFFF
136 #define PROG0_INTA_BIT 0x0FFFFFFF
137 /* IAR6 BIT FIELDS */
138 #define PROG0_INTB_BIT 0xFFFFFFFF
139 #define PROG1_INTA_BIT 0xFFFFFF0F
140 #define PROG1_INTB_BIT 0xFFFFF0FF
141 #define PROG2_INTA_BIT 0xFFFF0FFF
142 #define PROG2_INTB_BIT 0xFFF0FFFF
143 #define DMA1_WRRD0_BIT 0xFF0FFFFF
144 #define DMA1_WRRD1_BIT 0xF0FFFFFF
145 #define DMA2_WRRD0_BIT 0x0FFFFFFF
146 /* IAR7 BIT FIELDS */
147 #define DMA2_WRRD1_BIT 0xFFFFFFFF
148 #define IMDMA_WRRD0_BIT 0xFFFFFF0F
149 #define IMDMA_WRRD1_BIT 0xFFFFF0FF
150 #define WATCH_BIT 0xFFFF0FFF
151 #define RESERVED_1_BIT 0xFFF0FFFF
152 #define RESERVED_2_BIT 0xFF0FFFFF
153 #define SUPPLE_0_BIT 0xF0FFFFFF
154 #define SUPPLE_1_BIT 0x0FFFFFFF
156 /* Miscellaneous Values */
158 /****************************** EBIU Settings ********************************/
159 #define AMBCTL0VAL ((CONFIG_BANK_1 << 16) | CONFIG_BANK_0)
160 #define AMBCTL1VAL ((CONFIG_BANK_3 << 16) | CONFIG_BANK_2)
162 #if defined(CONFIG_C_AMBEN_ALL)
163 #define V_AMBEN AMBEN_ALL
164 #elif defined(CONFIG_C_AMBEN)
166 #elif defined(CONFIG_C_AMBEN_B0)
167 #define V_AMBEN AMBEN_B0
168 #elif defined(CONFIG_C_AMBEN_B0_B1)
169 #define V_AMBEN AMBEN_B0_B1
170 #elif defined(CONFIG_C_AMBEN_B0_B1_B2)
171 #define V_AMBEN AMBEN_B0_B1_B2
174 #ifdef CONFIG_C_AMCKEN
175 #define V_AMCKEN AMCKEN
180 #ifdef CONFIG_C_B0PEN
186 #ifdef CONFIG_C_B1PEN
192 #ifdef CONFIG_C_B2PEN
198 #ifdef CONFIG_C_B3PEN
204 #ifdef CONFIG_C_CDPRIO
205 #define V_CDPRIO 0x100
210 #define AMGCTLVAL (V_AMBEN | V_AMCKEN | V_CDPRIO | V_B0PEN | V_B1PEN | V_B2PEN | V_B3PEN | 0x0002)
218 #error Unknown CPU type - This kernel doesn't seem to be configured properly
221 #endif /* __MACH_BF561_H__ */