2 * Copyright 2005-2008 Analog Devices Inc.
4 * Licensed under the GPL-2 or later
10 /*include core specific register pointer definitions*/
11 #include <asm/cdef_LPBlackfin.h>
13 /* Clock and System Control (0xFFC0 0400-0xFFC0 07FF) */
14 #define bfin_read_PLL_CTL() bfin_read16(PLL_CTL)
15 #define bfin_read_PLL_STAT() bfin_read16(PLL_STAT)
16 #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT,val)
17 #define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT)
18 #define bfin_write_PLL_LOCKCNT(val) bfin_write16(PLL_LOCKCNT,val)
19 #define bfin_read_CHIPID() bfin_read32(CHIPID)
20 #define bfin_read_PLL_DIV() bfin_read16(PLL_DIV)
21 #define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV,val)
22 #define bfin_read_VR_CTL() bfin_read16(VR_CTL)
24 /* System Interrupt Controller (0xFFC0 0C00-0xFFC0 0FFF) */
25 #define bfin_read_SWRST() bfin_read16(SWRST)
26 #define bfin_write_SWRST(val) bfin_write16(SWRST,val)
27 #define bfin_read_SYSCR() bfin_read16(SYSCR)
28 #define bfin_write_SYSCR(val) bfin_write16(SYSCR,val)
29 #define bfin_read_SIC_IAR0() bfin_read32(SIC_IAR0)
30 #define bfin_write_SIC_IAR0(val) bfin_write32(SIC_IAR0,val)
31 #define bfin_read_SIC_IAR1() bfin_read32(SIC_IAR1)
32 #define bfin_write_SIC_IAR1(val) bfin_write32(SIC_IAR1,val)
33 #define bfin_read_SIC_IAR2() bfin_read32(SIC_IAR2)
34 #define bfin_write_SIC_IAR2(val) bfin_write32(SIC_IAR2,val)
35 #define bfin_read_SIC_IAR3() bfin_read32(SIC_IAR3)
36 #define bfin_write_SIC_IAR3(val) bfin_write32(SIC_IAR3,val)
37 #define bfin_read_SIC_IMASK() bfin_read32(SIC_IMASK)
38 #define bfin_write_SIC_IMASK(val) bfin_write32(SIC_IMASK,val)
39 #define bfin_read_SIC_ISR() bfin_read32(SIC_ISR)
40 #define bfin_write_SIC_ISR(val) bfin_write32(SIC_ISR,val)
41 #define bfin_read_SIC_IWR() bfin_read32(SIC_IWR)
42 #define bfin_write_SIC_IWR(val) bfin_write32(SIC_IWR,val)
44 /* Watchdog Timer (0xFFC0 1000-0xFFC0 13FF) */
45 #define bfin_read_WDOG_CTL() bfin_read16(WDOG_CTL)
46 #define bfin_write_WDOG_CTL(val) bfin_write16(WDOG_CTL,val)
47 #define bfin_read_WDOG_CNT() bfin_read32(WDOG_CNT)
48 #define bfin_write_WDOG_CNT(val) bfin_write32(WDOG_CNT,val)
49 #define bfin_read_WDOG_STAT() bfin_read32(WDOG_STAT)
50 #define bfin_write_WDOG_STAT(val) bfin_write32(WDOG_STAT,val)
52 /* Real Time Clock (0xFFC0 1400-0xFFC0 17FF) */
53 #define bfin_read_RTC_STAT() bfin_read32(RTC_STAT)
54 #define bfin_write_RTC_STAT(val) bfin_write32(RTC_STAT,val)
55 #define bfin_read_RTC_ICTL() bfin_read16(RTC_ICTL)
56 #define bfin_write_RTC_ICTL(val) bfin_write16(RTC_ICTL,val)
57 #define bfin_read_RTC_ISTAT() bfin_read16(RTC_ISTAT)
58 #define bfin_write_RTC_ISTAT(val) bfin_write16(RTC_ISTAT,val)
59 #define bfin_read_RTC_SWCNT() bfin_read16(RTC_SWCNT)
60 #define bfin_write_RTC_SWCNT(val) bfin_write16(RTC_SWCNT,val)
61 #define bfin_read_RTC_ALARM() bfin_read32(RTC_ALARM)
62 #define bfin_write_RTC_ALARM(val) bfin_write32(RTC_ALARM,val)
63 #define bfin_read_RTC_FAST() bfin_read16(RTC_FAST)
64 #define bfin_write_RTC_FAST(val) bfin_write16(RTC_FAST,val)
65 #define bfin_read_RTC_PREN() bfin_read16(RTC_PREN)
66 #define bfin_write_RTC_PREN(val) bfin_write16(RTC_PREN,val)
68 /* DMA Traffic controls */
69 #define bfin_read_DMA_TCPER() bfin_read16(DMA_TCPER)
70 #define bfin_write_DMA_TCPER(val) bfin_write16(DMA_TCPER,val)
71 #define bfin_read_DMA_TCCNT() bfin_read16(DMA_TCCNT)
72 #define bfin_write_DMA_TCCNT(val) bfin_write16(DMA_TCCNT,val)
74 /* Alternate deprecated register names (below) provided for backwards code compatibility */
75 #define bfin_read_DMA_TC_PER() bfin_read16(DMA_TC_PER)
76 #define bfin_write_DMA_TC_PER(val) bfin_write16(DMA_TC_PER,val)
77 #define bfin_read_DMA_TC_CNT() bfin_read16(DMA_TC_CNT)
78 #define bfin_write_DMA_TC_CNT(val) bfin_write16(DMA_TC_CNT,val)
80 /* General Purpose IO (0xFFC0 2400-0xFFC0 27FF) */
81 #define bfin_read_FIO_DIR() bfin_read16(FIO_DIR)
82 #define bfin_write_FIO_DIR(val) bfin_write16(FIO_DIR,val)
83 #define bfin_read_FIO_MASKA_C() bfin_read16(FIO_MASKA_C)
84 #define bfin_write_FIO_MASKA_C(val) bfin_write16(FIO_MASKA_C,val)
85 #define bfin_read_FIO_MASKA_S() bfin_read16(FIO_MASKA_S)
86 #define bfin_write_FIO_MASKA_S(val) bfin_write16(FIO_MASKA_S,val)
87 #define bfin_read_FIO_MASKB_C() bfin_read16(FIO_MASKB_C)
88 #define bfin_write_FIO_MASKB_C(val) bfin_write16(FIO_MASKB_C,val)
89 #define bfin_read_FIO_MASKB_S() bfin_read16(FIO_MASKB_S)
90 #define bfin_write_FIO_MASKB_S(val) bfin_write16(FIO_MASKB_S,val)
91 #define bfin_read_FIO_POLAR() bfin_read16(FIO_POLAR)
92 #define bfin_write_FIO_POLAR(val) bfin_write16(FIO_POLAR,val)
93 #define bfin_read_FIO_EDGE() bfin_read16(FIO_EDGE)
94 #define bfin_write_FIO_EDGE(val) bfin_write16(FIO_EDGE,val)
95 #define bfin_read_FIO_BOTH() bfin_read16(FIO_BOTH)
96 #define bfin_write_FIO_BOTH(val) bfin_write16(FIO_BOTH,val)
97 #define bfin_read_FIO_INEN() bfin_read16(FIO_INEN)
98 #define bfin_write_FIO_INEN(val) bfin_write16(FIO_INEN,val)
99 #define bfin_read_FIO_MASKA_D() bfin_read16(FIO_MASKA_D)
100 #define bfin_write_FIO_MASKA_D(val) bfin_write16(FIO_MASKA_D,val)
101 #define bfin_read_FIO_MASKA_T() bfin_read16(FIO_MASKA_T)
102 #define bfin_write_FIO_MASKA_T(val) bfin_write16(FIO_MASKA_T,val)
103 #define bfin_read_FIO_MASKB_D() bfin_read16(FIO_MASKB_D)
104 #define bfin_write_FIO_MASKB_D(val) bfin_write16(FIO_MASKB_D,val)
105 #define bfin_read_FIO_MASKB_T() bfin_read16(FIO_MASKB_T)
106 #define bfin_write_FIO_MASKB_T(val) bfin_write16(FIO_MASKB_T,val)
109 #define bfin_read_DMA0_CONFIG() bfin_read16(DMA0_CONFIG)
110 #define bfin_write_DMA0_CONFIG(val) bfin_write16(DMA0_CONFIG,val)
111 #define bfin_read_DMA0_NEXT_DESC_PTR() bfin_read32(DMA0_NEXT_DESC_PTR)
112 #define bfin_write_DMA0_NEXT_DESC_PTR(val) bfin_write32(DMA0_NEXT_DESC_PTR,val)
113 #define bfin_read_DMA0_START_ADDR() bfin_read32(DMA0_START_ADDR)
114 #define bfin_write_DMA0_START_ADDR(val) bfin_write32(DMA0_START_ADDR,val)
115 #define bfin_read_DMA0_X_COUNT() bfin_read16(DMA0_X_COUNT)
116 #define bfin_write_DMA0_X_COUNT(val) bfin_write16(DMA0_X_COUNT,val)
117 #define bfin_read_DMA0_Y_COUNT() bfin_read16(DMA0_Y_COUNT)
118 #define bfin_write_DMA0_Y_COUNT(val) bfin_write16(DMA0_Y_COUNT,val)
119 #define bfin_read_DMA0_X_MODIFY() bfin_read16(DMA0_X_MODIFY)
120 #define bfin_write_DMA0_X_MODIFY(val) bfin_write16(DMA0_X_MODIFY,val)
121 #define bfin_read_DMA0_Y_MODIFY() bfin_read16(DMA0_Y_MODIFY)
122 #define bfin_write_DMA0_Y_MODIFY(val) bfin_write16(DMA0_Y_MODIFY,val)
123 #define bfin_read_DMA0_CURR_DESC_PTR() bfin_read32(DMA0_CURR_DESC_PTR)
124 #define bfin_write_DMA0_CURR_DESC_PTR(val) bfin_write32(DMA0_CURR_DESC_PTR,val)
125 #define bfin_read_DMA0_CURR_ADDR() bfin_read32(DMA0_CURR_ADDR)
126 #define bfin_write_DMA0_CURR_ADDR(val) bfin_write32(DMA0_CURR_ADDR,val)
127 #define bfin_read_DMA0_CURR_X_COUNT() bfin_read16(DMA0_CURR_X_COUNT)
128 #define bfin_write_DMA0_CURR_X_COUNT(val) bfin_write16(DMA0_CURR_X_COUNT,val)
129 #define bfin_read_DMA0_CURR_Y_COUNT() bfin_read16(DMA0_CURR_Y_COUNT)
130 #define bfin_write_DMA0_CURR_Y_COUNT(val) bfin_write16(DMA0_CURR_Y_COUNT,val)
131 #define bfin_read_DMA0_IRQ_STATUS() bfin_read16(DMA0_IRQ_STATUS)
132 #define bfin_write_DMA0_IRQ_STATUS(val) bfin_write16(DMA0_IRQ_STATUS,val)
133 #define bfin_read_DMA0_PERIPHERAL_MAP() bfin_read16(DMA0_PERIPHERAL_MAP)
134 #define bfin_write_DMA0_PERIPHERAL_MAP(val) bfin_write16(DMA0_PERIPHERAL_MAP,val)
136 #define bfin_read_DMA1_CONFIG() bfin_read16(DMA1_CONFIG)
137 #define bfin_write_DMA1_CONFIG(val) bfin_write16(DMA1_CONFIG,val)
138 #define bfin_read_DMA1_NEXT_DESC_PTR() bfin_read32(DMA1_NEXT_DESC_PTR)
139 #define bfin_write_DMA1_NEXT_DESC_PTR(val) bfin_write32(DMA1_NEXT_DESC_PTR,val)
140 #define bfin_read_DMA1_START_ADDR() bfin_read32(DMA1_START_ADDR)
141 #define bfin_write_DMA1_START_ADDR(val) bfin_write32(DMA1_START_ADDR,val)
142 #define bfin_read_DMA1_X_COUNT() bfin_read16(DMA1_X_COUNT)
143 #define bfin_write_DMA1_X_COUNT(val) bfin_write16(DMA1_X_COUNT,val)
144 #define bfin_read_DMA1_Y_COUNT() bfin_read16(DMA1_Y_COUNT)
145 #define bfin_write_DMA1_Y_COUNT(val) bfin_write16(DMA1_Y_COUNT,val)
146 #define bfin_read_DMA1_X_MODIFY() bfin_read16(DMA1_X_MODIFY)
147 #define bfin_write_DMA1_X_MODIFY(val) bfin_write16(DMA1_X_MODIFY,val)
148 #define bfin_read_DMA1_Y_MODIFY() bfin_read16(DMA1_Y_MODIFY)
149 #define bfin_write_DMA1_Y_MODIFY(val) bfin_write16(DMA1_Y_MODIFY,val)
150 #define bfin_read_DMA1_CURR_DESC_PTR() bfin_read32(DMA1_CURR_DESC_PTR)
151 #define bfin_write_DMA1_CURR_DESC_PTR(val) bfin_write32(DMA1_CURR_DESC_PTR,val)
152 #define bfin_read_DMA1_CURR_ADDR() bfin_read32(DMA1_CURR_ADDR)
153 #define bfin_write_DMA1_CURR_ADDR(val) bfin_write32(DMA1_CURR_ADDR,val)
154 #define bfin_read_DMA1_CURR_X_COUNT() bfin_read16(DMA1_CURR_X_COUNT)
155 #define bfin_write_DMA1_CURR_X_COUNT(val) bfin_write16(DMA1_CURR_X_COUNT,val)
156 #define bfin_read_DMA1_CURR_Y_COUNT() bfin_read16(DMA1_CURR_Y_COUNT)
157 #define bfin_write_DMA1_CURR_Y_COUNT(val) bfin_write16(DMA1_CURR_Y_COUNT,val)
158 #define bfin_read_DMA1_IRQ_STATUS() bfin_read16(DMA1_IRQ_STATUS)
159 #define bfin_write_DMA1_IRQ_STATUS(val) bfin_write16(DMA1_IRQ_STATUS,val)
160 #define bfin_read_DMA1_PERIPHERAL_MAP() bfin_read16(DMA1_PERIPHERAL_MAP)
161 #define bfin_write_DMA1_PERIPHERAL_MAP(val) bfin_write16(DMA1_PERIPHERAL_MAP,val)
163 #define bfin_read_DMA2_CONFIG() bfin_read16(DMA2_CONFIG)
164 #define bfin_write_DMA2_CONFIG(val) bfin_write16(DMA2_CONFIG,val)
165 #define bfin_read_DMA2_NEXT_DESC_PTR() bfin_read32(DMA2_NEXT_DESC_PTR)
166 #define bfin_write_DMA2_NEXT_DESC_PTR(val) bfin_write32(DMA2_NEXT_DESC_PTR,val)
167 #define bfin_read_DMA2_START_ADDR() bfin_read32(DMA2_START_ADDR)
168 #define bfin_write_DMA2_START_ADDR(val) bfin_write32(DMA2_START_ADDR,val)
169 #define bfin_read_DMA2_X_COUNT() bfin_read16(DMA2_X_COUNT)
170 #define bfin_write_DMA2_X_COUNT(val) bfin_write16(DMA2_X_COUNT,val)
171 #define bfin_read_DMA2_Y_COUNT() bfin_read16(DMA2_Y_COUNT)
172 #define bfin_write_DMA2_Y_COUNT(val) bfin_write16(DMA2_Y_COUNT,val)
173 #define bfin_read_DMA2_X_MODIFY() bfin_read16(DMA2_X_MODIFY)
174 #define bfin_write_DMA2_X_MODIFY(val) bfin_write16(DMA2_X_MODIFY,val)
175 #define bfin_read_DMA2_Y_MODIFY() bfin_read16(DMA2_Y_MODIFY)
176 #define bfin_write_DMA2_Y_MODIFY(val) bfin_write16(DMA2_Y_MODIFY,val)
177 #define bfin_read_DMA2_CURR_DESC_PTR() bfin_read32(DMA2_CURR_DESC_PTR)
178 #define bfin_write_DMA2_CURR_DESC_PTR(val) bfin_write32(DMA2_CURR_DESC_PTR,val)
179 #define bfin_read_DMA2_CURR_ADDR() bfin_read32(DMA2_CURR_ADDR)
180 #define bfin_write_DMA2_CURR_ADDR(val) bfin_write32(DMA2_CURR_ADDR,val)
181 #define bfin_read_DMA2_CURR_X_COUNT() bfin_read16(DMA2_CURR_X_COUNT)
182 #define bfin_write_DMA2_CURR_X_COUNT(val) bfin_write16(DMA2_CURR_X_COUNT,val)
183 #define bfin_read_DMA2_CURR_Y_COUNT() bfin_read16(DMA2_CURR_Y_COUNT)
184 #define bfin_write_DMA2_CURR_Y_COUNT(val) bfin_write16(DMA2_CURR_Y_COUNT,val)
185 #define bfin_read_DMA2_IRQ_STATUS() bfin_read16(DMA2_IRQ_STATUS)
186 #define bfin_write_DMA2_IRQ_STATUS(val) bfin_write16(DMA2_IRQ_STATUS,val)
187 #define bfin_read_DMA2_PERIPHERAL_MAP() bfin_read16(DMA2_PERIPHERAL_MAP)
188 #define bfin_write_DMA2_PERIPHERAL_MAP(val) bfin_write16(DMA2_PERIPHERAL_MAP,val)
190 #define bfin_read_DMA3_CONFIG() bfin_read16(DMA3_CONFIG)
191 #define bfin_write_DMA3_CONFIG(val) bfin_write16(DMA3_CONFIG,val)
192 #define bfin_read_DMA3_NEXT_DESC_PTR() bfin_read32(DMA3_NEXT_DESC_PTR)
193 #define bfin_write_DMA3_NEXT_DESC_PTR(val) bfin_write32(DMA3_NEXT_DESC_PTR,val)
194 #define bfin_read_DMA3_START_ADDR() bfin_read32(DMA3_START_ADDR)
195 #define bfin_write_DMA3_START_ADDR(val) bfin_write32(DMA3_START_ADDR,val)
196 #define bfin_read_DMA3_X_COUNT() bfin_read16(DMA3_X_COUNT)
197 #define bfin_write_DMA3_X_COUNT(val) bfin_write16(DMA3_X_COUNT,val)
198 #define bfin_read_DMA3_Y_COUNT() bfin_read16(DMA3_Y_COUNT)
199 #define bfin_write_DMA3_Y_COUNT(val) bfin_write16(DMA3_Y_COUNT,val)
200 #define bfin_read_DMA3_X_MODIFY() bfin_read16(DMA3_X_MODIFY)
201 #define bfin_write_DMA3_X_MODIFY(val) bfin_write16(DMA3_X_MODIFY,val)
202 #define bfin_read_DMA3_Y_MODIFY() bfin_read16(DMA3_Y_MODIFY)
203 #define bfin_write_DMA3_Y_MODIFY(val) bfin_write16(DMA3_Y_MODIFY,val)
204 #define bfin_read_DMA3_CURR_DESC_PTR() bfin_read32(DMA3_CURR_DESC_PTR)
205 #define bfin_write_DMA3_CURR_DESC_PTR(val) bfin_write32(DMA3_CURR_DESC_PTR,val)
206 #define bfin_read_DMA3_CURR_ADDR() bfin_read32(DMA3_CURR_ADDR)
207 #define bfin_write_DMA3_CURR_ADDR(val) bfin_write32(DMA3_CURR_ADDR,val)
208 #define bfin_read_DMA3_CURR_X_COUNT() bfin_read16(DMA3_CURR_X_COUNT)
209 #define bfin_write_DMA3_CURR_X_COUNT(val) bfin_write16(DMA3_CURR_X_COUNT,val)
210 #define bfin_read_DMA3_CURR_Y_COUNT() bfin_read16(DMA3_CURR_Y_COUNT)
211 #define bfin_write_DMA3_CURR_Y_COUNT(val) bfin_write16(DMA3_CURR_Y_COUNT,val)
212 #define bfin_read_DMA3_IRQ_STATUS() bfin_read16(DMA3_IRQ_STATUS)
213 #define bfin_write_DMA3_IRQ_STATUS(val) bfin_write16(DMA3_IRQ_STATUS,val)
214 #define bfin_read_DMA3_PERIPHERAL_MAP() bfin_read16(DMA3_PERIPHERAL_MAP)
215 #define bfin_write_DMA3_PERIPHERAL_MAP(val) bfin_write16(DMA3_PERIPHERAL_MAP,val)
217 #define bfin_read_DMA4_CONFIG() bfin_read16(DMA4_CONFIG)
218 #define bfin_write_DMA4_CONFIG(val) bfin_write16(DMA4_CONFIG,val)
219 #define bfin_read_DMA4_NEXT_DESC_PTR() bfin_read32(DMA4_NEXT_DESC_PTR)
220 #define bfin_write_DMA4_NEXT_DESC_PTR(val) bfin_write32(DMA4_NEXT_DESC_PTR,val)
221 #define bfin_read_DMA4_START_ADDR() bfin_read32(DMA4_START_ADDR)
222 #define bfin_write_DMA4_START_ADDR(val) bfin_write32(DMA4_START_ADDR,val)
223 #define bfin_read_DMA4_X_COUNT() bfin_read16(DMA4_X_COUNT)
224 #define bfin_write_DMA4_X_COUNT(val) bfin_write16(DMA4_X_COUNT,val)
225 #define bfin_read_DMA4_Y_COUNT() bfin_read16(DMA4_Y_COUNT)
226 #define bfin_write_DMA4_Y_COUNT(val) bfin_write16(DMA4_Y_COUNT,val)
227 #define bfin_read_DMA4_X_MODIFY() bfin_read16(DMA4_X_MODIFY)
228 #define bfin_write_DMA4_X_MODIFY(val) bfin_write16(DMA4_X_MODIFY,val)
229 #define bfin_read_DMA4_Y_MODIFY() bfin_read16(DMA4_Y_MODIFY)
230 #define bfin_write_DMA4_Y_MODIFY(val) bfin_write16(DMA4_Y_MODIFY,val)
231 #define bfin_read_DMA4_CURR_DESC_PTR() bfin_read32(DMA4_CURR_DESC_PTR)
232 #define bfin_write_DMA4_CURR_DESC_PTR(val) bfin_write32(DMA4_CURR_DESC_PTR,val)
233 #define bfin_read_DMA4_CURR_ADDR() bfin_read32(DMA4_CURR_ADDR)
234 #define bfin_write_DMA4_CURR_ADDR(val) bfin_write32(DMA4_CURR_ADDR,val)
235 #define bfin_read_DMA4_CURR_X_COUNT() bfin_read16(DMA4_CURR_X_COUNT)
236 #define bfin_write_DMA4_CURR_X_COUNT(val) bfin_write16(DMA4_CURR_X_COUNT,val)
237 #define bfin_read_DMA4_CURR_Y_COUNT() bfin_read16(DMA4_CURR_Y_COUNT)
238 #define bfin_write_DMA4_CURR_Y_COUNT(val) bfin_write16(DMA4_CURR_Y_COUNT,val)
239 #define bfin_read_DMA4_IRQ_STATUS() bfin_read16(DMA4_IRQ_STATUS)
240 #define bfin_write_DMA4_IRQ_STATUS(val) bfin_write16(DMA4_IRQ_STATUS,val)
241 #define bfin_read_DMA4_PERIPHERAL_MAP() bfin_read16(DMA4_PERIPHERAL_MAP)
242 #define bfin_write_DMA4_PERIPHERAL_MAP(val) bfin_write16(DMA4_PERIPHERAL_MAP,val)
244 #define bfin_read_DMA5_CONFIG() bfin_read16(DMA5_CONFIG)
245 #define bfin_write_DMA5_CONFIG(val) bfin_write16(DMA5_CONFIG,val)
246 #define bfin_read_DMA5_NEXT_DESC_PTR() bfin_read32(DMA5_NEXT_DESC_PTR)
247 #define bfin_write_DMA5_NEXT_DESC_PTR(val) bfin_write32(DMA5_NEXT_DESC_PTR,val)
248 #define bfin_read_DMA5_START_ADDR() bfin_read32(DMA5_START_ADDR)
249 #define bfin_write_DMA5_START_ADDR(val) bfin_write32(DMA5_START_ADDR,val)
250 #define bfin_read_DMA5_X_COUNT() bfin_read16(DMA5_X_COUNT)
251 #define bfin_write_DMA5_X_COUNT(val) bfin_write16(DMA5_X_COUNT,val)
252 #define bfin_read_DMA5_Y_COUNT() bfin_read16(DMA5_Y_COUNT)
253 #define bfin_write_DMA5_Y_COUNT(val) bfin_write16(DMA5_Y_COUNT,val)
254 #define bfin_read_DMA5_X_MODIFY() bfin_read16(DMA5_X_MODIFY)
255 #define bfin_write_DMA5_X_MODIFY(val) bfin_write16(DMA5_X_MODIFY,val)
256 #define bfin_read_DMA5_Y_MODIFY() bfin_read16(DMA5_Y_MODIFY)
257 #define bfin_write_DMA5_Y_MODIFY(val) bfin_write16(DMA5_Y_MODIFY,val)
258 #define bfin_read_DMA5_CURR_DESC_PTR() bfin_read32(DMA5_CURR_DESC_PTR)
259 #define bfin_write_DMA5_CURR_DESC_PTR(val) bfin_write32(DMA5_CURR_DESC_PTR,val)
260 #define bfin_read_DMA5_CURR_ADDR() bfin_read32(DMA5_CURR_ADDR)
261 #define bfin_write_DMA5_CURR_ADDR(val) bfin_write32(DMA5_CURR_ADDR,val)
262 #define bfin_read_DMA5_CURR_X_COUNT() bfin_read16(DMA5_CURR_X_COUNT)
263 #define bfin_write_DMA5_CURR_X_COUNT(val) bfin_write16(DMA5_CURR_X_COUNT,val)
264 #define bfin_read_DMA5_CURR_Y_COUNT() bfin_read16(DMA5_CURR_Y_COUNT)
265 #define bfin_write_DMA5_CURR_Y_COUNT(val) bfin_write16(DMA5_CURR_Y_COUNT,val)
266 #define bfin_read_DMA5_IRQ_STATUS() bfin_read16(DMA5_IRQ_STATUS)
267 #define bfin_write_DMA5_IRQ_STATUS(val) bfin_write16(DMA5_IRQ_STATUS,val)
268 #define bfin_read_DMA5_PERIPHERAL_MAP() bfin_read16(DMA5_PERIPHERAL_MAP)
269 #define bfin_write_DMA5_PERIPHERAL_MAP(val) bfin_write16(DMA5_PERIPHERAL_MAP,val)
271 #define bfin_read_DMA6_CONFIG() bfin_read16(DMA6_CONFIG)
272 #define bfin_write_DMA6_CONFIG(val) bfin_write16(DMA6_CONFIG,val)
273 #define bfin_read_DMA6_NEXT_DESC_PTR() bfin_read32(DMA6_NEXT_DESC_PTR)
274 #define bfin_write_DMA6_NEXT_DESC_PTR(val) bfin_write32(DMA6_NEXT_DESC_PTR,val)
275 #define bfin_read_DMA6_START_ADDR() bfin_read32(DMA6_START_ADDR)
276 #define bfin_write_DMA6_START_ADDR(val) bfin_write32(DMA6_START_ADDR,val)
277 #define bfin_read_DMA6_X_COUNT() bfin_read16(DMA6_X_COUNT)
278 #define bfin_write_DMA6_X_COUNT(val) bfin_write16(DMA6_X_COUNT,val)
279 #define bfin_read_DMA6_Y_COUNT() bfin_read16(DMA6_Y_COUNT)
280 #define bfin_write_DMA6_Y_COUNT(val) bfin_write16(DMA6_Y_COUNT,val)
281 #define bfin_read_DMA6_X_MODIFY() bfin_read16(DMA6_X_MODIFY)
282 #define bfin_write_DMA6_X_MODIFY(val) bfin_write16(DMA6_X_MODIFY,val)
283 #define bfin_read_DMA6_Y_MODIFY() bfin_read16(DMA6_Y_MODIFY)
284 #define bfin_write_DMA6_Y_MODIFY(val) bfin_write16(DMA6_Y_MODIFY,val)
285 #define bfin_read_DMA6_CURR_DESC_PTR() bfin_read32(DMA6_CURR_DESC_PTR)
286 #define bfin_write_DMA6_CURR_DESC_PTR(val) bfin_write32(DMA6_CURR_DESC_PTR,val)
287 #define bfin_read_DMA6_CURR_ADDR() bfin_read32(DMA6_CURR_ADDR)
288 #define bfin_write_DMA6_CURR_ADDR(val) bfin_write32(DMA6_CURR_ADDR,val)
289 #define bfin_read_DMA6_CURR_X_COUNT() bfin_read16(DMA6_CURR_X_COUNT)
290 #define bfin_write_DMA6_CURR_X_COUNT(val) bfin_write16(DMA6_CURR_X_COUNT,val)
291 #define bfin_read_DMA6_CURR_Y_COUNT() bfin_read16(DMA6_CURR_Y_COUNT)
292 #define bfin_write_DMA6_CURR_Y_COUNT(val) bfin_write16(DMA6_CURR_Y_COUNT,val)
293 #define bfin_read_DMA6_IRQ_STATUS() bfin_read16(DMA6_IRQ_STATUS)
294 #define bfin_write_DMA6_IRQ_STATUS(val) bfin_write16(DMA6_IRQ_STATUS,val)
295 #define bfin_read_DMA6_PERIPHERAL_MAP() bfin_read16(DMA6_PERIPHERAL_MAP)
296 #define bfin_write_DMA6_PERIPHERAL_MAP(val) bfin_write16(DMA6_PERIPHERAL_MAP,val)
298 #define bfin_read_DMA7_CONFIG() bfin_read16(DMA7_CONFIG)
299 #define bfin_write_DMA7_CONFIG(val) bfin_write16(DMA7_CONFIG,val)
300 #define bfin_read_DMA7_NEXT_DESC_PTR() bfin_read32(DMA7_NEXT_DESC_PTR)
301 #define bfin_write_DMA7_NEXT_DESC_PTR(val) bfin_write32(DMA7_NEXT_DESC_PTR,val)
302 #define bfin_read_DMA7_START_ADDR() bfin_read32(DMA7_START_ADDR)
303 #define bfin_write_DMA7_START_ADDR(val) bfin_write32(DMA7_START_ADDR,val)
304 #define bfin_read_DMA7_X_COUNT() bfin_read16(DMA7_X_COUNT)
305 #define bfin_write_DMA7_X_COUNT(val) bfin_write16(DMA7_X_COUNT,val)
306 #define bfin_read_DMA7_Y_COUNT() bfin_read16(DMA7_Y_COUNT)
307 #define bfin_write_DMA7_Y_COUNT(val) bfin_write16(DMA7_Y_COUNT,val)
308 #define bfin_read_DMA7_X_MODIFY() bfin_read16(DMA7_X_MODIFY)
309 #define bfin_write_DMA7_X_MODIFY(val) bfin_write16(DMA7_X_MODIFY,val)
310 #define bfin_read_DMA7_Y_MODIFY() bfin_read16(DMA7_Y_MODIFY)
311 #define bfin_write_DMA7_Y_MODIFY(val) bfin_write16(DMA7_Y_MODIFY,val)
312 #define bfin_read_DMA7_CURR_DESC_PTR() bfin_read32(DMA7_CURR_DESC_PTR)
313 #define bfin_write_DMA7_CURR_DESC_PTR(val) bfin_write32(DMA7_CURR_DESC_PTR,val)
314 #define bfin_read_DMA7_CURR_ADDR() bfin_read32(DMA7_CURR_ADDR)
315 #define bfin_write_DMA7_CURR_ADDR(val) bfin_write32(DMA7_CURR_ADDR,val)
316 #define bfin_read_DMA7_CURR_X_COUNT() bfin_read16(DMA7_CURR_X_COUNT)
317 #define bfin_write_DMA7_CURR_X_COUNT(val) bfin_write16(DMA7_CURR_X_COUNT,val)
318 #define bfin_read_DMA7_CURR_Y_COUNT() bfin_read16(DMA7_CURR_Y_COUNT)
319 #define bfin_write_DMA7_CURR_Y_COUNT(val) bfin_write16(DMA7_CURR_Y_COUNT,val)
320 #define bfin_read_DMA7_IRQ_STATUS() bfin_read16(DMA7_IRQ_STATUS)
321 #define bfin_write_DMA7_IRQ_STATUS(val) bfin_write16(DMA7_IRQ_STATUS,val)
322 #define bfin_read_DMA7_PERIPHERAL_MAP() bfin_read16(DMA7_PERIPHERAL_MAP)
323 #define bfin_write_DMA7_PERIPHERAL_MAP(val) bfin_write16(DMA7_PERIPHERAL_MAP,val)
325 #define bfin_read_MDMA_D1_CONFIG() bfin_read16(MDMA_D1_CONFIG)
326 #define bfin_write_MDMA_D1_CONFIG(val) bfin_write16(MDMA_D1_CONFIG,val)
327 #define bfin_read_MDMA_D1_NEXT_DESC_PTR() bfin_read32(MDMA_D1_NEXT_DESC_PTR)
328 #define bfin_write_MDMA_D1_NEXT_DESC_PTR(val) bfin_write32(MDMA_D1_NEXT_DESC_PTR,val)
329 #define bfin_read_MDMA_D1_START_ADDR() bfin_read32(MDMA_D1_START_ADDR)
330 #define bfin_write_MDMA_D1_START_ADDR(val) bfin_write32(MDMA_D1_START_ADDR,val)
331 #define bfin_read_MDMA_D1_X_COUNT() bfin_read16(MDMA_D1_X_COUNT)
332 #define bfin_write_MDMA_D1_X_COUNT(val) bfin_write16(MDMA_D1_X_COUNT,val)
333 #define bfin_read_MDMA_D1_Y_COUNT() bfin_read16(MDMA_D1_Y_COUNT)
334 #define bfin_write_MDMA_D1_Y_COUNT(val) bfin_write16(MDMA_D1_Y_COUNT,val)
335 #define bfin_read_MDMA_D1_X_MODIFY() bfin_read16(MDMA_D1_X_MODIFY)
336 #define bfin_write_MDMA_D1_X_MODIFY(val) bfin_write16(MDMA_D1_X_MODIFY,val)
337 #define bfin_read_MDMA_D1_Y_MODIFY() bfin_read16(MDMA_D1_Y_MODIFY)
338 #define bfin_write_MDMA_D1_Y_MODIFY(val) bfin_write16(MDMA_D1_Y_MODIFY,val)
339 #define bfin_read_MDMA_D1_CURR_DESC_PTR() bfin_read32(MDMA_D1_CURR_DESC_PTR)
340 #define bfin_write_MDMA_D1_CURR_DESC_PTR(val) bfin_write32(MDMA_D1_CURR_DESC_PTR,val)
341 #define bfin_read_MDMA_D1_CURR_ADDR() bfin_read32(MDMA_D1_CURR_ADDR)
342 #define bfin_write_MDMA_D1_CURR_ADDR(val) bfin_write32(MDMA_D1_CURR_ADDR,val)
343 #define bfin_read_MDMA_D1_CURR_X_COUNT() bfin_read16(MDMA_D1_CURR_X_COUNT)
344 #define bfin_write_MDMA_D1_CURR_X_COUNT(val) bfin_write16(MDMA_D1_CURR_X_COUNT,val)
345 #define bfin_read_MDMA_D1_CURR_Y_COUNT() bfin_read16(MDMA_D1_CURR_Y_COUNT)
346 #define bfin_write_MDMA_D1_CURR_Y_COUNT(val) bfin_write16(MDMA_D1_CURR_Y_COUNT,val)
347 #define bfin_read_MDMA_D1_IRQ_STATUS() bfin_read16(MDMA_D1_IRQ_STATUS)
348 #define bfin_write_MDMA_D1_IRQ_STATUS(val) bfin_write16(MDMA_D1_IRQ_STATUS,val)
349 #define bfin_read_MDMA_D1_PERIPHERAL_MAP() bfin_read16(MDMA_D1_PERIPHERAL_MAP)
350 #define bfin_write_MDMA_D1_PERIPHERAL_MAP(val) bfin_write16(MDMA_D1_PERIPHERAL_MAP,val)
352 #define bfin_read_MDMA_S1_CONFIG() bfin_read16(MDMA_S1_CONFIG)
353 #define bfin_write_MDMA_S1_CONFIG(val) bfin_write16(MDMA_S1_CONFIG,val)
354 #define bfin_read_MDMA_S1_NEXT_DESC_PTR() bfin_read32(MDMA_S1_NEXT_DESC_PTR)
355 #define bfin_write_MDMA_S1_NEXT_DESC_PTR(val) bfin_write32(MDMA_S1_NEXT_DESC_PTR,val)
356 #define bfin_read_MDMA_S1_START_ADDR() bfin_read32(MDMA_S1_START_ADDR)
357 #define bfin_write_MDMA_S1_START_ADDR(val) bfin_write32(MDMA_S1_START_ADDR,val)
358 #define bfin_read_MDMA_S1_X_COUNT() bfin_read16(MDMA_S1_X_COUNT)
359 #define bfin_write_MDMA_S1_X_COUNT(val) bfin_write16(MDMA_S1_X_COUNT,val)
360 #define bfin_read_MDMA_S1_Y_COUNT() bfin_read16(MDMA_S1_Y_COUNT)
361 #define bfin_write_MDMA_S1_Y_COUNT(val) bfin_write16(MDMA_S1_Y_COUNT,val)
362 #define bfin_read_MDMA_S1_X_MODIFY() bfin_read16(MDMA_S1_X_MODIFY)
363 #define bfin_write_MDMA_S1_X_MODIFY(val) bfin_write16(MDMA_S1_X_MODIFY,val)
364 #define bfin_read_MDMA_S1_Y_MODIFY() bfin_read16(MDMA_S1_Y_MODIFY)
365 #define bfin_write_MDMA_S1_Y_MODIFY(val) bfin_write16(MDMA_S1_Y_MODIFY,val)
366 #define bfin_read_MDMA_S1_CURR_DESC_PTR() bfin_read32(MDMA_S1_CURR_DESC_PTR)
367 #define bfin_write_MDMA_S1_CURR_DESC_PTR(val) bfin_write32(MDMA_S1_CURR_DESC_PTR,val)
368 #define bfin_read_MDMA_S1_CURR_ADDR() bfin_read32(MDMA_S1_CURR_ADDR)
369 #define bfin_write_MDMA_S1_CURR_ADDR(val) bfin_write32(MDMA_S1_CURR_ADDR,val)
370 #define bfin_read_MDMA_S1_CURR_X_COUNT() bfin_read16(MDMA_S1_CURR_X_COUNT)
371 #define bfin_write_MDMA_S1_CURR_X_COUNT(val) bfin_write16(MDMA_S1_CURR_X_COUNT,val)
372 #define bfin_read_MDMA_S1_CURR_Y_COUNT() bfin_read16(MDMA_S1_CURR_Y_COUNT)
373 #define bfin_write_MDMA_S1_CURR_Y_COUNT(val) bfin_write16(MDMA_S1_CURR_Y_COUNT,val)
374 #define bfin_read_MDMA_S1_IRQ_STATUS() bfin_read16(MDMA_S1_IRQ_STATUS)
375 #define bfin_write_MDMA_S1_IRQ_STATUS(val) bfin_write16(MDMA_S1_IRQ_STATUS,val)
376 #define bfin_read_MDMA_S1_PERIPHERAL_MAP() bfin_read16(MDMA_S1_PERIPHERAL_MAP)
377 #define bfin_write_MDMA_S1_PERIPHERAL_MAP(val) bfin_write16(MDMA_S1_PERIPHERAL_MAP,val)
379 #define bfin_read_MDMA_D0_CONFIG() bfin_read16(MDMA_D0_CONFIG)
380 #define bfin_write_MDMA_D0_CONFIG(val) bfin_write16(MDMA_D0_CONFIG,val)
381 #define bfin_read_MDMA_D0_NEXT_DESC_PTR() bfin_read32(MDMA_D0_NEXT_DESC_PTR)
382 #define bfin_write_MDMA_D0_NEXT_DESC_PTR(val) bfin_write32(MDMA_D0_NEXT_DESC_PTR,val)
383 #define bfin_read_MDMA_D0_START_ADDR() bfin_read32(MDMA_D0_START_ADDR)
384 #define bfin_write_MDMA_D0_START_ADDR(val) bfin_write32(MDMA_D0_START_ADDR,val)
385 #define bfin_read_MDMA_D0_X_COUNT() bfin_read16(MDMA_D0_X_COUNT)
386 #define bfin_write_MDMA_D0_X_COUNT(val) bfin_write16(MDMA_D0_X_COUNT,val)
387 #define bfin_read_MDMA_D0_Y_COUNT() bfin_read16(MDMA_D0_Y_COUNT)
388 #define bfin_write_MDMA_D0_Y_COUNT(val) bfin_write16(MDMA_D0_Y_COUNT,val)
389 #define bfin_read_MDMA_D0_X_MODIFY() bfin_read16(MDMA_D0_X_MODIFY)
390 #define bfin_write_MDMA_D0_X_MODIFY(val) bfin_write16(MDMA_D0_X_MODIFY,val)
391 #define bfin_read_MDMA_D0_Y_MODIFY() bfin_read16(MDMA_D0_Y_MODIFY)
392 #define bfin_write_MDMA_D0_Y_MODIFY(val) bfin_write16(MDMA_D0_Y_MODIFY,val)
393 #define bfin_read_MDMA_D0_CURR_DESC_PTR() bfin_read32(MDMA_D0_CURR_DESC_PTR)
394 #define bfin_write_MDMA_D0_CURR_DESC_PTR(val) bfin_write32(MDMA_D0_CURR_DESC_PTR,val)
395 #define bfin_read_MDMA_D0_CURR_ADDR() bfin_read32(MDMA_D0_CURR_ADDR)
396 #define bfin_write_MDMA_D0_CURR_ADDR(val) bfin_write32(MDMA_D0_CURR_ADDR,val)
397 #define bfin_read_MDMA_D0_CURR_X_COUNT() bfin_read16(MDMA_D0_CURR_X_COUNT)
398 #define bfin_write_MDMA_D0_CURR_X_COUNT(val) bfin_write16(MDMA_D0_CURR_X_COUNT,val)
399 #define bfin_read_MDMA_D0_CURR_Y_COUNT() bfin_read16(MDMA_D0_CURR_Y_COUNT)
400 #define bfin_write_MDMA_D0_CURR_Y_COUNT(val) bfin_write16(MDMA_D0_CURR_Y_COUNT,val)
401 #define bfin_read_MDMA_D0_IRQ_STATUS() bfin_read16(MDMA_D0_IRQ_STATUS)
402 #define bfin_write_MDMA_D0_IRQ_STATUS(val) bfin_write16(MDMA_D0_IRQ_STATUS,val)
403 #define bfin_read_MDMA_D0_PERIPHERAL_MAP() bfin_read16(MDMA_D0_PERIPHERAL_MAP)
404 #define bfin_write_MDMA_D0_PERIPHERAL_MAP(val) bfin_write16(MDMA_D0_PERIPHERAL_MAP,val)
406 #define bfin_read_MDMA_S0_CONFIG() bfin_read16(MDMA_S0_CONFIG)
407 #define bfin_write_MDMA_S0_CONFIG(val) bfin_write16(MDMA_S0_CONFIG,val)
408 #define bfin_read_MDMA_S0_NEXT_DESC_PTR() bfin_read32(MDMA_S0_NEXT_DESC_PTR)
409 #define bfin_write_MDMA_S0_NEXT_DESC_PTR(val) bfin_write32(MDMA_S0_NEXT_DESC_PTR,val)
410 #define bfin_read_MDMA_S0_START_ADDR() bfin_read32(MDMA_S0_START_ADDR)
411 #define bfin_write_MDMA_S0_START_ADDR(val) bfin_write32(MDMA_S0_START_ADDR,val)
412 #define bfin_read_MDMA_S0_X_COUNT() bfin_read16(MDMA_S0_X_COUNT)
413 #define bfin_write_MDMA_S0_X_COUNT(val) bfin_write16(MDMA_S0_X_COUNT,val)
414 #define bfin_read_MDMA_S0_Y_COUNT() bfin_read16(MDMA_S0_Y_COUNT)
415 #define bfin_write_MDMA_S0_Y_COUNT(val) bfin_write16(MDMA_S0_Y_COUNT,val)
416 #define bfin_read_MDMA_S0_X_MODIFY() bfin_read16(MDMA_S0_X_MODIFY)
417 #define bfin_write_MDMA_S0_X_MODIFY(val) bfin_write16(MDMA_S0_X_MODIFY,val)
418 #define bfin_read_MDMA_S0_Y_MODIFY() bfin_read16(MDMA_S0_Y_MODIFY)
419 #define bfin_write_MDMA_S0_Y_MODIFY(val) bfin_write16(MDMA_S0_Y_MODIFY,val)
420 #define bfin_read_MDMA_S0_CURR_DESC_PTR() bfin_read32(MDMA_S0_CURR_DESC_PTR)
421 #define bfin_write_MDMA_S0_CURR_DESC_PTR(val) bfin_write32(MDMA_S0_CURR_DESC_PTR,val)
422 #define bfin_read_MDMA_S0_CURR_ADDR() bfin_read32(MDMA_S0_CURR_ADDR)
423 #define bfin_write_MDMA_S0_CURR_ADDR(val) bfin_write32(MDMA_S0_CURR_ADDR,val)
424 #define bfin_read_MDMA_S0_CURR_X_COUNT() bfin_read16(MDMA_S0_CURR_X_COUNT)
425 #define bfin_write_MDMA_S0_CURR_X_COUNT(val) bfin_write16(MDMA_S0_CURR_X_COUNT,val)
426 #define bfin_read_MDMA_S0_CURR_Y_COUNT() bfin_read16(MDMA_S0_CURR_Y_COUNT)
427 #define bfin_write_MDMA_S0_CURR_Y_COUNT(val) bfin_write16(MDMA_S0_CURR_Y_COUNT,val)
428 #define bfin_read_MDMA_S0_IRQ_STATUS() bfin_read16(MDMA_S0_IRQ_STATUS)
429 #define bfin_write_MDMA_S0_IRQ_STATUS(val) bfin_write16(MDMA_S0_IRQ_STATUS,val)
430 #define bfin_read_MDMA_S0_PERIPHERAL_MAP() bfin_read16(MDMA_S0_PERIPHERAL_MAP)
431 #define bfin_write_MDMA_S0_PERIPHERAL_MAP(val) bfin_write16(MDMA_S0_PERIPHERAL_MAP,val)
433 /* Aysnchronous Memory Controller - External Bus Interface Unit (0xFFC0 3C00-0xFFC0 3FFF) */
434 #define bfin_read_EBIU_AMGCTL() bfin_read16(EBIU_AMGCTL)
435 #define bfin_write_EBIU_AMGCTL(val) bfin_write16(EBIU_AMGCTL,val)
436 #define bfin_read_EBIU_AMBCTL0() bfin_read32(EBIU_AMBCTL0)
437 #define bfin_write_EBIU_AMBCTL0(val) bfin_write32(EBIU_AMBCTL0,val)
438 #define bfin_read_EBIU_AMBCTL1() bfin_read32(EBIU_AMBCTL1)
439 #define bfin_write_EBIU_AMBCTL1(val) bfin_write32(EBIU_AMBCTL1,val)
441 /* SDRAM Controller External Bus Interface Unit (0xFFC0 4C00-0xFFC0 4FFF) */
442 #define bfin_read_EBIU_SDGCTL() bfin_read32(EBIU_SDGCTL)
443 #define bfin_write_EBIU_SDGCTL(val) bfin_write32(EBIU_SDGCTL,val)
444 #define bfin_read_EBIU_SDRRC() bfin_read16(EBIU_SDRRC)
445 #define bfin_write_EBIU_SDRRC(val) bfin_write16(EBIU_SDRRC,val)
446 #define bfin_read_EBIU_SDSTAT() bfin_read16(EBIU_SDSTAT)
447 #define bfin_write_EBIU_SDSTAT(val) bfin_write16(EBIU_SDSTAT,val)
448 #define bfin_read_EBIU_SDBCTL() bfin_read16(EBIU_SDBCTL)
449 #define bfin_write_EBIU_SDBCTL(val) bfin_write16(EBIU_SDBCTL,val)
451 /* UART Controller */
452 #define bfin_read_UART_THR() bfin_read16(UART_THR)
453 #define bfin_write_UART_THR(val) bfin_write16(UART_THR,val)
454 #define bfin_read_UART_RBR() bfin_read16(UART_RBR)
455 #define bfin_write_UART_RBR(val) bfin_write16(UART_RBR,val)
456 #define bfin_read_UART_DLL() bfin_read16(UART_DLL)
457 #define bfin_write_UART_DLL(val) bfin_write16(UART_DLL,val)
458 #define bfin_read_UART_IER() bfin_read16(UART_IER)
459 #define bfin_write_UART_IER(val) bfin_write16(UART_IER,val)
460 #define bfin_read_UART_DLH() bfin_read16(UART_DLH)
461 #define bfin_write_UART_DLH(val) bfin_write16(UART_DLH,val)
462 #define bfin_read_UART_IIR() bfin_read16(UART_IIR)
463 #define bfin_write_UART_IIR(val) bfin_write16(UART_IIR,val)
464 #define bfin_read_UART_LCR() bfin_read16(UART_LCR)
465 #define bfin_write_UART_LCR(val) bfin_write16(UART_LCR,val)
466 #define bfin_read_UART_MCR() bfin_read16(UART_MCR)
467 #define bfin_write_UART_MCR(val) bfin_write16(UART_MCR,val)
468 #define bfin_read_UART_LSR() bfin_read16(UART_LSR)
469 #define bfin_write_UART_LSR(val) bfin_write16(UART_LSR,val)
473 #define bfin_read_UART_SCR() bfin_read16(UART_SCR)
474 #define bfin_write_UART_SCR(val) bfin_write16(UART_SCR,val)
475 #define bfin_read_UART_GCTL() bfin_read16(UART_GCTL)
476 #define bfin_write_UART_GCTL(val) bfin_write16(UART_GCTL,val)
479 #define bfin_read_SPI_CTL() bfin_read16(SPI_CTL)
480 #define bfin_write_SPI_CTL(val) bfin_write16(SPI_CTL,val)
481 #define bfin_read_SPI_FLG() bfin_read16(SPI_FLG)
482 #define bfin_write_SPI_FLG(val) bfin_write16(SPI_FLG,val)
483 #define bfin_read_SPI_STAT() bfin_read16(SPI_STAT)
484 #define bfin_write_SPI_STAT(val) bfin_write16(SPI_STAT,val)
485 #define bfin_read_SPI_TDBR() bfin_read16(SPI_TDBR)
486 #define bfin_write_SPI_TDBR(val) bfin_write16(SPI_TDBR,val)
487 #define bfin_read_SPI_RDBR() bfin_read16(SPI_RDBR)
488 #define bfin_write_SPI_RDBR(val) bfin_write16(SPI_RDBR,val)
489 #define bfin_read_SPI_BAUD() bfin_read16(SPI_BAUD)
490 #define bfin_write_SPI_BAUD(val) bfin_write16(SPI_BAUD,val)
491 #define bfin_read_SPI_SHADOW() bfin_read16(SPI_SHADOW)
492 #define bfin_write_SPI_SHADOW(val) bfin_write16(SPI_SHADOW,val)
494 /* TIMER 0, 1, 2 Registers */
495 #define bfin_read_TIMER0_CONFIG() bfin_read16(TIMER0_CONFIG)
496 #define bfin_write_TIMER0_CONFIG(val) bfin_write16(TIMER0_CONFIG,val)
497 #define bfin_read_TIMER0_COUNTER() bfin_read32(TIMER0_COUNTER)
498 #define bfin_write_TIMER0_COUNTER(val) bfin_write32(TIMER0_COUNTER,val)
499 #define bfin_read_TIMER0_PERIOD() bfin_read32(TIMER0_PERIOD)
500 #define bfin_write_TIMER0_PERIOD(val) bfin_write32(TIMER0_PERIOD,val)
501 #define bfin_read_TIMER0_WIDTH() bfin_read32(TIMER0_WIDTH)
502 #define bfin_write_TIMER0_WIDTH(val) bfin_write32(TIMER0_WIDTH,val)
504 #define bfin_read_TIMER1_CONFIG() bfin_read16(TIMER1_CONFIG)
505 #define bfin_write_TIMER1_CONFIG(val) bfin_write16(TIMER1_CONFIG,val)
506 #define bfin_read_TIMER1_COUNTER() bfin_read32(TIMER1_COUNTER)
507 #define bfin_write_TIMER1_COUNTER(val) bfin_write32(TIMER1_COUNTER,val)
508 #define bfin_read_TIMER1_PERIOD() bfin_read32(TIMER1_PERIOD)
509 #define bfin_write_TIMER1_PERIOD(val) bfin_write32(TIMER1_PERIOD,val)
510 #define bfin_read_TIMER1_WIDTH() bfin_read32(TIMER1_WIDTH)
511 #define bfin_write_TIMER1_WIDTH(val) bfin_write32(TIMER1_WIDTH,val)
513 #define bfin_read_TIMER2_CONFIG() bfin_read16(TIMER2_CONFIG)
514 #define bfin_write_TIMER2_CONFIG(val) bfin_write16(TIMER2_CONFIG,val)
515 #define bfin_read_TIMER2_COUNTER() bfin_read32(TIMER2_COUNTER)
516 #define bfin_write_TIMER2_COUNTER(val) bfin_write32(TIMER2_COUNTER,val)
517 #define bfin_read_TIMER2_PERIOD() bfin_read32(TIMER2_PERIOD)
518 #define bfin_write_TIMER2_PERIOD(val) bfin_write32(TIMER2_PERIOD,val)
519 #define bfin_read_TIMER2_WIDTH() bfin_read32(TIMER2_WIDTH)
520 #define bfin_write_TIMER2_WIDTH(val) bfin_write32(TIMER2_WIDTH,val)
522 #define bfin_read_TIMER_ENABLE() bfin_read16(TIMER_ENABLE)
523 #define bfin_write_TIMER_ENABLE(val) bfin_write16(TIMER_ENABLE,val)
524 #define bfin_read_TIMER_DISABLE() bfin_read16(TIMER_DISABLE)
525 #define bfin_write_TIMER_DISABLE(val) bfin_write16(TIMER_DISABLE,val)
526 #define bfin_read_TIMER_STATUS() bfin_read16(TIMER_STATUS)
527 #define bfin_write_TIMER_STATUS(val) bfin_write16(TIMER_STATUS,val)
529 /* SPORT0 Controller */
530 #define bfin_read_SPORT0_TCR1() bfin_read16(SPORT0_TCR1)
531 #define bfin_write_SPORT0_TCR1(val) bfin_write16(SPORT0_TCR1,val)
532 #define bfin_read_SPORT0_TCR2() bfin_read16(SPORT0_TCR2)
533 #define bfin_write_SPORT0_TCR2(val) bfin_write16(SPORT0_TCR2,val)
534 #define bfin_read_SPORT0_TCLKDIV() bfin_read16(SPORT0_TCLKDIV)
535 #define bfin_write_SPORT0_TCLKDIV(val) bfin_write16(SPORT0_TCLKDIV,val)
536 #define bfin_read_SPORT0_TFSDIV() bfin_read16(SPORT0_TFSDIV)
537 #define bfin_write_SPORT0_TFSDIV(val) bfin_write16(SPORT0_TFSDIV,val)
538 #define bfin_read_SPORT0_TX() bfin_read32(SPORT0_TX)
539 #define bfin_write_SPORT0_TX(val) bfin_write32(SPORT0_TX,val)
540 #define bfin_read_SPORT0_RX() bfin_read32(SPORT0_RX)
541 #define bfin_write_SPORT0_RX(val) bfin_write32(SPORT0_RX,val)
542 #define bfin_read_SPORT0_TX32() bfin_read32(SPORT0_TX)
543 #define bfin_write_SPORT0_TX32(val) bfin_write32(SPORT0_TX,val)
544 #define bfin_read_SPORT0_RX32() bfin_read32(SPORT0_RX)
545 #define bfin_write_SPORT0_RX32(val) bfin_write32(SPORT0_RX,val)
546 #define bfin_read_SPORT0_TX16() bfin_read16(SPORT0_TX)
547 #define bfin_write_SPORT0_TX16(val) bfin_write16(SPORT0_TX,val)
548 #define bfin_read_SPORT0_RX16() bfin_read16(SPORT0_RX)
549 #define bfin_write_SPORT0_RX16(val) bfin_write16(SPORT0_RX,val)
550 #define bfin_read_SPORT0_RCR1() bfin_read16(SPORT0_RCR1)
551 #define bfin_write_SPORT0_RCR1(val) bfin_write16(SPORT0_RCR1,val)
552 #define bfin_read_SPORT0_RCR2() bfin_read16(SPORT0_RCR2)
553 #define bfin_write_SPORT0_RCR2(val) bfin_write16(SPORT0_RCR2,val)
554 #define bfin_read_SPORT0_RCLKDIV() bfin_read16(SPORT0_RCLKDIV)
555 #define bfin_write_SPORT0_RCLKDIV(val) bfin_write16(SPORT0_RCLKDIV,val)
556 #define bfin_read_SPORT0_RFSDIV() bfin_read16(SPORT0_RFSDIV)
557 #define bfin_write_SPORT0_RFSDIV(val) bfin_write16(SPORT0_RFSDIV,val)
558 #define bfin_read_SPORT0_STAT() bfin_read16(SPORT0_STAT)
559 #define bfin_write_SPORT0_STAT(val) bfin_write16(SPORT0_STAT,val)
560 #define bfin_read_SPORT0_CHNL() bfin_read16(SPORT0_CHNL)
561 #define bfin_write_SPORT0_CHNL(val) bfin_write16(SPORT0_CHNL,val)
562 #define bfin_read_SPORT0_MCMC1() bfin_read16(SPORT0_MCMC1)
563 #define bfin_write_SPORT0_MCMC1(val) bfin_write16(SPORT0_MCMC1,val)
564 #define bfin_read_SPORT0_MCMC2() bfin_read16(SPORT0_MCMC2)
565 #define bfin_write_SPORT0_MCMC2(val) bfin_write16(SPORT0_MCMC2,val)
566 #define bfin_read_SPORT0_MTCS0() bfin_read32(SPORT0_MTCS0)
567 #define bfin_write_SPORT0_MTCS0(val) bfin_write32(SPORT0_MTCS0,val)
568 #define bfin_read_SPORT0_MTCS1() bfin_read32(SPORT0_MTCS1)
569 #define bfin_write_SPORT0_MTCS1(val) bfin_write32(SPORT0_MTCS1,val)
570 #define bfin_read_SPORT0_MTCS2() bfin_read32(SPORT0_MTCS2)
571 #define bfin_write_SPORT0_MTCS2(val) bfin_write32(SPORT0_MTCS2,val)
572 #define bfin_read_SPORT0_MTCS3() bfin_read32(SPORT0_MTCS3)
573 #define bfin_write_SPORT0_MTCS3(val) bfin_write32(SPORT0_MTCS3,val)
574 #define bfin_read_SPORT0_MRCS0() bfin_read32(SPORT0_MRCS0)
575 #define bfin_write_SPORT0_MRCS0(val) bfin_write32(SPORT0_MRCS0,val)
576 #define bfin_read_SPORT0_MRCS1() bfin_read32(SPORT0_MRCS1)
577 #define bfin_write_SPORT0_MRCS1(val) bfin_write32(SPORT0_MRCS1,val)
578 #define bfin_read_SPORT0_MRCS2() bfin_read32(SPORT0_MRCS2)
579 #define bfin_write_SPORT0_MRCS2(val) bfin_write32(SPORT0_MRCS2,val)
580 #define bfin_read_SPORT0_MRCS3() bfin_read32(SPORT0_MRCS3)
581 #define bfin_write_SPORT0_MRCS3(val) bfin_write32(SPORT0_MRCS3,val)
583 /* SPORT1 Controller */
584 #define bfin_read_SPORT1_TCR1() bfin_read16(SPORT1_TCR1)
585 #define bfin_write_SPORT1_TCR1(val) bfin_write16(SPORT1_TCR1,val)
586 #define bfin_read_SPORT1_TCR2() bfin_read16(SPORT1_TCR2)
587 #define bfin_write_SPORT1_TCR2(val) bfin_write16(SPORT1_TCR2,val)
588 #define bfin_read_SPORT1_TCLKDIV() bfin_read16(SPORT1_TCLKDIV)
589 #define bfin_write_SPORT1_TCLKDIV(val) bfin_write16(SPORT1_TCLKDIV,val)
590 #define bfin_read_SPORT1_TFSDIV() bfin_read16(SPORT1_TFSDIV)
591 #define bfin_write_SPORT1_TFSDIV(val) bfin_write16(SPORT1_TFSDIV,val)
592 #define bfin_read_SPORT1_TX() bfin_read32(SPORT1_TX)
593 #define bfin_write_SPORT1_TX(val) bfin_write32(SPORT1_TX,val)
594 #define bfin_read_SPORT1_RX() bfin_read32(SPORT1_RX)
595 #define bfin_write_SPORT1_RX(val) bfin_write32(SPORT1_RX,val)
596 #define bfin_read_SPORT1_TX32() bfin_read32(SPORT1_TX)
597 #define bfin_write_SPORT1_TX32(val) bfin_write32(SPORT1_TX,val)
598 #define bfin_read_SPORT1_RX32() bfin_read32(SPORT1_RX)
599 #define bfin_write_SPORT1_RX32(val) bfin_write32(SPORT1_RX,val)
600 #define bfin_read_SPORT1_TX16() bfin_read16(SPORT1_TX)
601 #define bfin_write_SPORT1_TX16(val) bfin_write16(SPORT1_TX,val)
602 #define bfin_read_SPORT1_RX16() bfin_read16(SPORT1_RX)
603 #define bfin_write_SPORT1_RX16(val) bfin_write16(SPORT1_RX,val)
604 #define bfin_read_SPORT1_RCR1() bfin_read16(SPORT1_RCR1)
605 #define bfin_write_SPORT1_RCR1(val) bfin_write16(SPORT1_RCR1,val)
606 #define bfin_read_SPORT1_RCR2() bfin_read16(SPORT1_RCR2)
607 #define bfin_write_SPORT1_RCR2(val) bfin_write16(SPORT1_RCR2,val)
608 #define bfin_read_SPORT1_RCLKDIV() bfin_read16(SPORT1_RCLKDIV)
609 #define bfin_write_SPORT1_RCLKDIV(val) bfin_write16(SPORT1_RCLKDIV,val)
610 #define bfin_read_SPORT1_RFSDIV() bfin_read16(SPORT1_RFSDIV)
611 #define bfin_write_SPORT1_RFSDIV(val) bfin_write16(SPORT1_RFSDIV,val)
612 #define bfin_read_SPORT1_STAT() bfin_read16(SPORT1_STAT)
613 #define bfin_write_SPORT1_STAT(val) bfin_write16(SPORT1_STAT,val)
614 #define bfin_read_SPORT1_CHNL() bfin_read16(SPORT1_CHNL)
615 #define bfin_write_SPORT1_CHNL(val) bfin_write16(SPORT1_CHNL,val)
616 #define bfin_read_SPORT1_MCMC1() bfin_read16(SPORT1_MCMC1)
617 #define bfin_write_SPORT1_MCMC1(val) bfin_write16(SPORT1_MCMC1,val)
618 #define bfin_read_SPORT1_MCMC2() bfin_read16(SPORT1_MCMC2)
619 #define bfin_write_SPORT1_MCMC2(val) bfin_write16(SPORT1_MCMC2,val)
620 #define bfin_read_SPORT1_MTCS0() bfin_read32(SPORT1_MTCS0)
621 #define bfin_write_SPORT1_MTCS0(val) bfin_write32(SPORT1_MTCS0,val)
622 #define bfin_read_SPORT1_MTCS1() bfin_read32(SPORT1_MTCS1)
623 #define bfin_write_SPORT1_MTCS1(val) bfin_write32(SPORT1_MTCS1,val)
624 #define bfin_read_SPORT1_MTCS2() bfin_read32(SPORT1_MTCS2)
625 #define bfin_write_SPORT1_MTCS2(val) bfin_write32(SPORT1_MTCS2,val)
626 #define bfin_read_SPORT1_MTCS3() bfin_read32(SPORT1_MTCS3)
627 #define bfin_write_SPORT1_MTCS3(val) bfin_write32(SPORT1_MTCS3,val)
628 #define bfin_read_SPORT1_MRCS0() bfin_read32(SPORT1_MRCS0)
629 #define bfin_write_SPORT1_MRCS0(val) bfin_write32(SPORT1_MRCS0,val)
630 #define bfin_read_SPORT1_MRCS1() bfin_read32(SPORT1_MRCS1)
631 #define bfin_write_SPORT1_MRCS1(val) bfin_write32(SPORT1_MRCS1,val)
632 #define bfin_read_SPORT1_MRCS2() bfin_read32(SPORT1_MRCS2)
633 #define bfin_write_SPORT1_MRCS2(val) bfin_write32(SPORT1_MRCS2,val)
634 #define bfin_read_SPORT1_MRCS3() bfin_read32(SPORT1_MRCS3)
635 #define bfin_write_SPORT1_MRCS3(val) bfin_write32(SPORT1_MRCS3,val)
637 /* Parallel Peripheral Interface (PPI) */
638 #define bfin_read_PPI_CONTROL() bfin_read16(PPI_CONTROL)
639 #define bfin_write_PPI_CONTROL(val) bfin_write16(PPI_CONTROL,val)
640 #define bfin_read_PPI_STATUS() bfin_read16(PPI_STATUS)
641 #define bfin_write_PPI_STATUS(val) bfin_write16(PPI_STATUS,val)
642 #define bfin_clear_PPI_STATUS() bfin_read_PPI_STATUS()
643 #define bfin_read_PPI_DELAY() bfin_read16(PPI_DELAY)
644 #define bfin_write_PPI_DELAY(val) bfin_write16(PPI_DELAY,val)
645 #define bfin_read_PPI_COUNT() bfin_read16(PPI_COUNT)
646 #define bfin_write_PPI_COUNT(val) bfin_write16(PPI_COUNT,val)
647 #define bfin_read_PPI_FRAME() bfin_read16(PPI_FRAME)
648 #define bfin_write_PPI_FRAME(val) bfin_write16(PPI_FRAME,val)
650 /* These need to be last due to the cdef/linux inter-dependencies */
653 #endif /* _CDEF_BF532_H */