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