]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - arch/arm/mach-pxa/include/mach/pxa-regs.h
[ARM] pxa: move UART register definitions into dedicated regs-uart.h
[linux-2.6-omap-h63xx.git] / arch / arm / mach-pxa / include / mach / pxa-regs.h
1 /*
2  *  arch/arm/mach-pxa/include/mach/pxa-regs.h
3  *
4  *  Author:     Nicolas Pitre
5  *  Created:    Jun 15, 2001
6  *  Copyright:  MontaVista Software Inc.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as
10  * published by the Free Software Foundation.
11  */
12
13 #ifndef __PXA_REGS_H
14 #define __PXA_REGS_H
15
16
17 /*
18  * PXA Chip selects
19  */
20
21 #define PXA_CS0_PHYS    0x00000000
22 #define PXA_CS1_PHYS    0x04000000
23 #define PXA_CS2_PHYS    0x08000000
24 #define PXA_CS3_PHYS    0x0C000000
25 #define PXA_CS4_PHYS    0x10000000
26 #define PXA_CS5_PHYS    0x14000000
27
28
29 /*
30  * Personal Computer Memory Card International Association (PCMCIA) sockets
31  */
32
33 #define PCMCIAPrtSp     0x04000000      /* PCMCIA Partition Space [byte]   */
34 #define PCMCIASp        (4*PCMCIAPrtSp) /* PCMCIA Space [byte]             */
35 #define PCMCIAIOSp      PCMCIAPrtSp     /* PCMCIA I/O Space [byte]         */
36 #define PCMCIAAttrSp    PCMCIAPrtSp     /* PCMCIA Attribute Space [byte]   */
37 #define PCMCIAMemSp     PCMCIAPrtSp     /* PCMCIA Memory Space [byte]      */
38
39 #define PCMCIA0Sp       PCMCIASp        /* PCMCIA 0 Space [byte]           */
40 #define PCMCIA0IOSp     PCMCIAIOSp      /* PCMCIA 0 I/O Space [byte]       */
41 #define PCMCIA0AttrSp   PCMCIAAttrSp    /* PCMCIA 0 Attribute Space [byte] */
42 #define PCMCIA0MemSp    PCMCIAMemSp     /* PCMCIA 0 Memory Space [byte]    */
43
44 #define PCMCIA1Sp       PCMCIASp        /* PCMCIA 1 Space [byte]           */
45 #define PCMCIA1IOSp     PCMCIAIOSp      /* PCMCIA 1 I/O Space [byte]       */
46 #define PCMCIA1AttrSp   PCMCIAAttrSp    /* PCMCIA 1 Attribute Space [byte] */
47 #define PCMCIA1MemSp    PCMCIAMemSp     /* PCMCIA 1 Memory Space [byte]    */
48
49 #define _PCMCIA(Nb)                     /* PCMCIA [0..1]                   */ \
50                         (0x20000000 + (Nb)*PCMCIASp)
51 #define _PCMCIAIO(Nb)   _PCMCIA (Nb)    /* PCMCIA I/O [0..1]               */
52 #define _PCMCIAAttr(Nb)                 /* PCMCIA Attribute [0..1]         */ \
53                         (_PCMCIA (Nb) + 2*PCMCIAPrtSp)
54 #define _PCMCIAMem(Nb)                  /* PCMCIA Memory [0..1]            */ \
55                         (_PCMCIA (Nb) + 3*PCMCIAPrtSp)
56
57 #define _PCMCIA0        _PCMCIA (0)     /* PCMCIA 0                        */
58 #define _PCMCIA0IO      _PCMCIAIO (0)   /* PCMCIA 0 I/O                    */
59 #define _PCMCIA0Attr    _PCMCIAAttr (0) /* PCMCIA 0 Attribute              */
60 #define _PCMCIA0Mem     _PCMCIAMem (0)  /* PCMCIA 0 Memory                 */
61
62 #define _PCMCIA1        _PCMCIA (1)     /* PCMCIA 1                        */
63 #define _PCMCIA1IO      _PCMCIAIO (1)   /* PCMCIA 1 I/O                    */
64 #define _PCMCIA1Attr    _PCMCIAAttr (1) /* PCMCIA 1 Attribute              */
65 #define _PCMCIA1Mem     _PCMCIAMem (1)  /* PCMCIA 1 Memory                 */
66
67
68
69 /*
70  * DMA Controller
71  */
72 #define DCSR(x)         __REG2(0x40000000, (x) << 2)
73
74 #define DCSR_RUN        (1 << 31)       /* Run Bit (read / write) */
75 #define DCSR_NODESC     (1 << 30)       /* No-Descriptor Fetch (read / write) */
76 #define DCSR_STOPIRQEN  (1 << 29)       /* Stop Interrupt Enable (read / write) */
77 #define DCSR_REQPEND    (1 << 8)        /* Request Pending (read-only) */
78 #define DCSR_STOPSTATE  (1 << 3)        /* Stop State (read-only) */
79 #define DCSR_ENDINTR    (1 << 2)        /* End Interrupt (read / write) */
80 #define DCSR_STARTINTR  (1 << 1)        /* Start Interrupt (read / write) */
81 #define DCSR_BUSERR     (1 << 0)        /* Bus Error Interrupt (read / write) */
82
83 #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
84 #define DCSR_EORIRQEN   (1 << 28)       /* End of Receive Interrupt Enable (R/W) */
85 #define DCSR_EORJMPEN   (1 << 27)       /* Jump to next descriptor on EOR */
86 #define DCSR_EORSTOPEN  (1 << 26)       /* STOP on an EOR */
87 #define DCSR_SETCMPST   (1 << 25)       /* Set Descriptor Compare Status */
88 #define DCSR_CLRCMPST   (1 << 24)       /* Clear Descriptor Compare Status */
89 #define DCSR_CMPST      (1 << 10)       /* The Descriptor Compare Status */
90 #define DCSR_EORINTR    (1 << 9)        /* The end of Receive */
91 #endif
92
93 #define DALGN           __REG(0x400000a0)  /* DMA Alignment Register */
94 #define DINT            __REG(0x400000f0)  /* DMA Interrupt Register */
95
96 #define DRCMR(n)        (*(((n) < 64) ? \
97                         &__REG2(0x40000100, ((n) & 0x3f) << 2) : \
98                         &__REG2(0x40001100, ((n) & 0x3f) << 2)))
99
100 #define DRCMR_MAPVLD    (1 << 7)        /* Map Valid (read / write) */
101 #define DRCMR_CHLNUM    0x1f            /* mask for Channel Number (read / write) */
102
103 #define DDADR(x)        __REG2(0x40000200, (x) << 4)
104 #define DSADR(x)        __REG2(0x40000204, (x) << 4)
105 #define DTADR(x)        __REG2(0x40000208, (x) << 4)
106 #define DCMD(x)         __REG2(0x4000020c, (x) << 4)
107
108 #define DDADR_DESCADDR  0xfffffff0      /* Address of next descriptor (mask) */
109 #define DDADR_STOP      (1 << 0)        /* Stop (read / write) */
110
111 #define DCMD_INCSRCADDR (1 << 31)       /* Source Address Increment Setting. */
112 #define DCMD_INCTRGADDR (1 << 30)       /* Target Address Increment Setting. */
113 #define DCMD_FLOWSRC    (1 << 29)       /* Flow Control by the source. */
114 #define DCMD_FLOWTRG    (1 << 28)       /* Flow Control by the target. */
115 #define DCMD_STARTIRQEN (1 << 22)       /* Start Interrupt Enable */
116 #define DCMD_ENDIRQEN   (1 << 21)       /* End Interrupt Enable */
117 #define DCMD_ENDIAN     (1 << 18)       /* Device Endian-ness. */
118 #define DCMD_BURST8     (1 << 16)       /* 8 byte burst */
119 #define DCMD_BURST16    (2 << 16)       /* 16 byte burst */
120 #define DCMD_BURST32    (3 << 16)       /* 32 byte burst */
121 #define DCMD_WIDTH1     (1 << 14)       /* 1 byte width */
122 #define DCMD_WIDTH2     (2 << 14)       /* 2 byte width (HalfWord) */
123 #define DCMD_WIDTH4     (3 << 14)       /* 4 byte width (Word) */
124 #define DCMD_LENGTH     0x01fff         /* length mask (max = 8K - 1) */
125
126 /*
127  * I2C registers - moved into drivers/i2c/busses/i2c-pxa.c
128  */
129
130 /*
131  * Serial Audio Controller - moved into sound/soc/pxa/pxa2xx-i2s.c
132  */
133
134 /*
135  * AC97 Controller registers
136  */
137
138 #define POCR            __REG(0x40500000)  /* PCM Out Control Register */
139 #define POCR_FEIE       (1 << 3)        /* FIFO Error Interrupt Enable */
140 #define POCR_FSRIE      (1 << 1)        /* FIFO Service Request Interrupt Enable */
141
142 #define PICR            __REG(0x40500004)  /* PCM In Control Register */
143 #define PICR_FEIE       (1 << 3)        /* FIFO Error Interrupt Enable */
144 #define PICR_FSRIE      (1 << 1)        /* FIFO Service Request Interrupt Enable */
145
146 #define MCCR            __REG(0x40500008)  /* Mic In Control Register */
147 #define MCCR_FEIE       (1 << 3)        /* FIFO Error Interrupt Enable */
148 #define MCCR_FSRIE      (1 << 1)        /* FIFO Service Request Interrupt Enable */
149
150 #define GCR             __REG(0x4050000C)  /* Global Control Register */
151 #ifdef CONFIG_PXA3xx
152 #define GCR_CLKBPB      (1 << 31)       /* Internal clock enable */
153 #endif
154 #define GCR_nDMAEN      (1 << 24)       /* non DMA Enable */
155 #define GCR_CDONE_IE    (1 << 19)       /* Command Done Interrupt Enable */
156 #define GCR_SDONE_IE    (1 << 18)       /* Status Done Interrupt Enable */
157 #define GCR_SECRDY_IEN  (1 << 9)        /* Secondary Ready Interrupt Enable */
158 #define GCR_PRIRDY_IEN  (1 << 8)        /* Primary Ready Interrupt Enable */
159 #define GCR_SECRES_IEN  (1 << 5)        /* Secondary Resume Interrupt Enable */
160 #define GCR_PRIRES_IEN  (1 << 4)        /* Primary Resume Interrupt Enable */
161 #define GCR_ACLINK_OFF  (1 << 3)        /* AC-link Shut Off */
162 #define GCR_WARM_RST    (1 << 2)        /* AC97 Warm Reset */
163 #define GCR_COLD_RST    (1 << 1)        /* AC'97 Cold Reset (0 = active) */
164 #define GCR_GIE         (1 << 0)        /* Codec GPI Interrupt Enable */
165
166 #define POSR            __REG(0x40500010)  /* PCM Out Status Register */
167 #define POSR_FIFOE      (1 << 4)        /* FIFO error */
168 #define POSR_FSR        (1 << 2)        /* FIFO Service Request */
169
170 #define PISR            __REG(0x40500014)  /* PCM In Status Register */
171 #define PISR_FIFOE      (1 << 4)        /* FIFO error */
172 #define PISR_EOC        (1 << 3)        /* DMA End-of-Chain (exclusive clear) */
173 #define PISR_FSR        (1 << 2)        /* FIFO Service Request */
174
175 #define MCSR            __REG(0x40500018)  /* Mic In Status Register */
176 #define MCSR_FIFOE      (1 << 4)        /* FIFO error */
177 #define MCSR_EOC        (1 << 3)        /* DMA End-of-Chain (exclusive clear) */
178 #define MCSR_FSR        (1 << 2)        /* FIFO Service Request */
179
180 #define GSR             __REG(0x4050001C)  /* Global Status Register */
181 #define GSR_CDONE       (1 << 19)       /* Command Done */
182 #define GSR_SDONE       (1 << 18)       /* Status Done */
183 #define GSR_RDCS        (1 << 15)       /* Read Completion Status */
184 #define GSR_BIT3SLT12   (1 << 14)       /* Bit 3 of slot 12 */
185 #define GSR_BIT2SLT12   (1 << 13)       /* Bit 2 of slot 12 */
186 #define GSR_BIT1SLT12   (1 << 12)       /* Bit 1 of slot 12 */
187 #define GSR_SECRES      (1 << 11)       /* Secondary Resume Interrupt */
188 #define GSR_PRIRES      (1 << 10)       /* Primary Resume Interrupt */
189 #define GSR_SCR         (1 << 9)        /* Secondary Codec Ready */
190 #define GSR_PCR         (1 << 8)        /*  Primary Codec Ready */
191 #define GSR_MCINT       (1 << 7)        /* Mic In Interrupt */
192 #define GSR_POINT       (1 << 6)        /* PCM Out Interrupt */
193 #define GSR_PIINT       (1 << 5)        /* PCM In Interrupt */
194 #define GSR_ACOFFD      (1 << 3)        /* AC-link Shut Off Done */
195 #define GSR_MOINT       (1 << 2)        /* Modem Out Interrupt */
196 #define GSR_MIINT       (1 << 1)        /* Modem In Interrupt */
197 #define GSR_GSCI        (1 << 0)        /* Codec GPI Status Change Interrupt */
198
199 #define CAR             __REG(0x40500020)  /* CODEC Access Register */
200 #define CAR_CAIP        (1 << 0)        /* Codec Access In Progress */
201
202 #define PCDR            __REG(0x40500040)  /* PCM FIFO Data Register */
203 #define MCDR            __REG(0x40500060)  /* Mic-in FIFO Data Register */
204
205 #define MOCR            __REG(0x40500100)  /* Modem Out Control Register */
206 #define MOCR_FEIE       (1 << 3)        /* FIFO Error */
207 #define MOCR_FSRIE      (1 << 1)        /* FIFO Service Request Interrupt Enable */
208
209 #define MICR            __REG(0x40500108)  /* Modem In Control Register */
210 #define MICR_FEIE       (1 << 3)        /* FIFO Error */
211 #define MICR_FSRIE      (1 << 1)        /* FIFO Service Request Interrupt Enable */
212
213 #define MOSR            __REG(0x40500110)  /* Modem Out Status Register */
214 #define MOSR_FIFOE      (1 << 4)        /* FIFO error */
215 #define MOSR_FSR        (1 << 2)        /* FIFO Service Request */
216
217 #define MISR            __REG(0x40500118)  /* Modem In Status Register */
218 #define MISR_FIFOE      (1 << 4)        /* FIFO error */
219 #define MISR_EOC        (1 << 3)        /* DMA End-of-Chain (exclusive clear) */
220 #define MISR_FSR        (1 << 2)        /* FIFO Service Request */
221
222 #define MODR            __REG(0x40500140)  /* Modem FIFO Data Register */
223
224 #define PAC_REG_BASE    __REG(0x40500200)  /* Primary Audio Codec */
225 #define SAC_REG_BASE    __REG(0x40500300)  /* Secondary Audio Codec */
226 #define PMC_REG_BASE    __REG(0x40500400)  /* Primary Modem Codec */
227 #define SMC_REG_BASE    __REG(0x40500500)  /* Secondary Modem Codec */
228
229
230 /*
231  * Fast Infrared Communication Port - moved into drivers/net/irda/pxaficp_ir.c
232  */
233
234 /*
235  * Real Time Clock
236  */
237
238 #define RCNR            __REG(0x40900000)  /* RTC Count Register */
239 #define RTAR            __REG(0x40900004)  /* RTC Alarm Register */
240 #define RTSR            __REG(0x40900008)  /* RTC Status Register */
241 #define RTTR            __REG(0x4090000C)  /* RTC Timer Trim Register */
242 #define PIAR            __REG(0x40900038)  /* Periodic Interrupt Alarm Register */
243
244 #define RTSR_PICE       (1 << 15)       /* Periodic interrupt count enable */
245 #define RTSR_PIALE      (1 << 14)       /* Periodic interrupt Alarm enable */
246 #define RTSR_HZE        (1 << 3)        /* HZ interrupt enable */
247 #define RTSR_ALE        (1 << 2)        /* RTC alarm interrupt enable */
248 #define RTSR_HZ         (1 << 1)        /* HZ rising-edge detected */
249 #define RTSR_AL         (1 << 0)        /* RTC alarm detected */
250
251
252 /*
253  * OS Timer & Match Registers
254  */
255
256 #define OSMR0           __REG(0x40A00000)  /* */
257 #define OSMR1           __REG(0x40A00004)  /* */
258 #define OSMR2           __REG(0x40A00008)  /* */
259 #define OSMR3           __REG(0x40A0000C)  /* */
260 #define OSMR4           __REG(0x40A00080)  /* */
261 #define OSCR            __REG(0x40A00010)  /* OS Timer Counter Register */
262 #define OSCR4           __REG(0x40A00040)  /* OS Timer Counter Register */
263 #define OMCR4           __REG(0x40A000C0)  /* */
264 #define OSSR            __REG(0x40A00014)  /* OS Timer Status Register */
265 #define OWER            __REG(0x40A00018)  /* OS Timer Watchdog Enable Register */
266 #define OIER            __REG(0x40A0001C)  /* OS Timer Interrupt Enable Register */
267
268 #define OSSR_M3         (1 << 3)        /* Match status channel 3 */
269 #define OSSR_M2         (1 << 2)        /* Match status channel 2 */
270 #define OSSR_M1         (1 << 1)        /* Match status channel 1 */
271 #define OSSR_M0         (1 << 0)        /* Match status channel 0 */
272
273 #define OWER_WME        (1 << 0)        /* Watchdog Match Enable */
274
275 #define OIER_E3         (1 << 3)        /* Interrupt enable channel 3 */
276 #define OIER_E2         (1 << 2)        /* Interrupt enable channel 2 */
277 #define OIER_E1         (1 << 1)        /* Interrupt enable channel 1 */
278 #define OIER_E0         (1 << 0)        /* Interrupt enable channel 0 */
279
280
281 /*
282  * Interrupt Controller
283  */
284
285 #define ICIP            __REG(0x40D00000)  /* Interrupt Controller IRQ Pending Register */
286 #define ICMR            __REG(0x40D00004)  /* Interrupt Controller Mask Register */
287 #define ICLR            __REG(0x40D00008)  /* Interrupt Controller Level Register */
288 #define ICFP            __REG(0x40D0000C)  /* Interrupt Controller FIQ Pending Register */
289 #define ICPR            __REG(0x40D00010)  /* Interrupt Controller Pending Register */
290 #define ICCR            __REG(0x40D00014)  /* Interrupt Controller Control Register */
291
292 #define ICIP2           __REG(0x40D0009C)  /* Interrupt Controller IRQ Pending Register 2 */
293 #define ICMR2           __REG(0x40D000A0)  /* Interrupt Controller Mask Register 2 */
294 #define ICLR2           __REG(0x40D000A4)  /* Interrupt Controller Level Register 2 */
295 #define ICFP2           __REG(0x40D000A8)  /* Interrupt Controller FIQ Pending Register 2 */
296 #define ICPR2           __REG(0x40D000AC)  /* Interrupt Controller Pending Register 2 */
297
298 /*
299  * General Purpose I/O
300  */
301
302 #define GPIO0_BASE      ((void __iomem *)io_p2v(0x40E00000))
303 #define GPIO1_BASE      ((void __iomem *)io_p2v(0x40E00004))
304 #define GPIO2_BASE      ((void __iomem *)io_p2v(0x40E00008))
305 #define GPIO3_BASE      ((void __iomem *)io_p2v(0x40E00100))
306
307 #define GPLR_OFFSET     0x00
308 #define GPDR_OFFSET     0x0C
309 #define GPSR_OFFSET     0x18
310 #define GPCR_OFFSET     0x24
311 #define GRER_OFFSET     0x30
312 #define GFER_OFFSET     0x3C
313 #define GEDR_OFFSET     0x48
314
315 #define GPLR0           __REG(0x40E00000)  /* GPIO Pin-Level Register GPIO<31:0> */
316 #define GPLR1           __REG(0x40E00004)  /* GPIO Pin-Level Register GPIO<63:32> */
317 #define GPLR2           __REG(0x40E00008)  /* GPIO Pin-Level Register GPIO<80:64> */
318
319 #define GPDR0           __REG(0x40E0000C)  /* GPIO Pin Direction Register GPIO<31:0> */
320 #define GPDR1           __REG(0x40E00010)  /* GPIO Pin Direction Register GPIO<63:32> */
321 #define GPDR2           __REG(0x40E00014)  /* GPIO Pin Direction Register GPIO<80:64> */
322
323 #define GPSR0           __REG(0x40E00018)  /* GPIO Pin Output Set Register GPIO<31:0> */
324 #define GPSR1           __REG(0x40E0001C)  /* GPIO Pin Output Set Register GPIO<63:32> */
325 #define GPSR2           __REG(0x40E00020)  /* GPIO Pin Output Set Register GPIO<80:64> */
326
327 #define GPCR0           __REG(0x40E00024)  /* GPIO Pin Output Clear Register GPIO<31:0> */
328 #define GPCR1           __REG(0x40E00028)  /* GPIO Pin Output Clear Register GPIO <63:32> */
329 #define GPCR2           __REG(0x40E0002C)  /* GPIO Pin Output Clear Register GPIO <80:64> */
330
331 #define GRER0           __REG(0x40E00030)  /* GPIO Rising-Edge Detect Register GPIO<31:0> */
332 #define GRER1           __REG(0x40E00034)  /* GPIO Rising-Edge Detect Register GPIO<63:32> */
333 #define GRER2           __REG(0x40E00038)  /* GPIO Rising-Edge Detect Register GPIO<80:64> */
334
335 #define GFER0           __REG(0x40E0003C)  /* GPIO Falling-Edge Detect Register GPIO<31:0> */
336 #define GFER1           __REG(0x40E00040)  /* GPIO Falling-Edge Detect Register GPIO<63:32> */
337 #define GFER2           __REG(0x40E00044)  /* GPIO Falling-Edge Detect Register GPIO<80:64> */
338
339 #define GEDR0           __REG(0x40E00048)  /* GPIO Edge Detect Status Register GPIO<31:0> */
340 #define GEDR1           __REG(0x40E0004C)  /* GPIO Edge Detect Status Register GPIO<63:32> */
341 #define GEDR2           __REG(0x40E00050)  /* GPIO Edge Detect Status Register GPIO<80:64> */
342
343 #define GAFR0_L         __REG(0x40E00054)  /* GPIO Alternate Function Select Register GPIO<15:0> */
344 #define GAFR0_U         __REG(0x40E00058)  /* GPIO Alternate Function Select Register GPIO<31:16> */
345 #define GAFR1_L         __REG(0x40E0005C)  /* GPIO Alternate Function Select Register GPIO<47:32> */
346 #define GAFR1_U         __REG(0x40E00060)  /* GPIO Alternate Function Select Register GPIO<63:48> */
347 #define GAFR2_L         __REG(0x40E00064)  /* GPIO Alternate Function Select Register GPIO<79:64> */
348 #define GAFR2_U         __REG(0x40E00068)  /* GPIO Alternate Function Select Register GPIO<95-80> */
349 #define GAFR3_L         __REG(0x40E0006C)  /* GPIO Alternate Function Select Register GPIO<111:96> */
350 #define GAFR3_U         __REG(0x40E00070)  /* GPIO Alternate Function Select Register GPIO<127:112> */
351
352 #define GPLR3           __REG(0x40E00100)  /* GPIO Pin-Level Register GPIO<127:96> */
353 #define GPDR3           __REG(0x40E0010C)  /* GPIO Pin Direction Register GPIO<127:96> */
354 #define GPSR3           __REG(0x40E00118)  /* GPIO Pin Output Set Register GPIO<127:96> */
355 #define GPCR3           __REG(0x40E00124)  /* GPIO Pin Output Clear Register GPIO<127:96> */
356 #define GRER3           __REG(0x40E00130)  /* GPIO Rising-Edge Detect Register GPIO<127:96> */
357 #define GFER3           __REG(0x40E0013C)  /* GPIO Falling-Edge Detect Register GPIO<127:96> */
358 #define GEDR3           __REG(0x40E00148)  /* GPIO Edge Detect Status Register GPIO<127:96> */
359
360 /* More handy macros.  The argument is a literal GPIO number. */
361
362 #define GPIO_bit(x)     (1 << ((x) & 0x1f))
363
364 #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
365
366 /* Interrupt Controller */
367
368 #define _GPLR(x)        __REG2(0x40E00000, ((x) & 0x60) >> 3)
369 #define _GPDR(x)        __REG2(0x40E0000C, ((x) & 0x60) >> 3)
370 #define _GPSR(x)        __REG2(0x40E00018, ((x) & 0x60) >> 3)
371 #define _GPCR(x)        __REG2(0x40E00024, ((x) & 0x60) >> 3)
372 #define _GRER(x)        __REG2(0x40E00030, ((x) & 0x60) >> 3)
373 #define _GFER(x)        __REG2(0x40E0003C, ((x) & 0x60) >> 3)
374 #define _GEDR(x)        __REG2(0x40E00048, ((x) & 0x60) >> 3)
375 #define _GAFR(x)        __REG2(0x40E00054, ((x) & 0x70) >> 2)
376
377 #define GPLR(x)         (*((((x) & 0x7f) < 96) ? &_GPLR(x) : &GPLR3))
378 #define GPDR(x)         (*((((x) & 0x7f) < 96) ? &_GPDR(x) : &GPDR3))
379 #define GPSR(x)         (*((((x) & 0x7f) < 96) ? &_GPSR(x) : &GPSR3))
380 #define GPCR(x)         (*((((x) & 0x7f) < 96) ? &_GPCR(x) : &GPCR3))
381 #define GRER(x)         (*((((x) & 0x7f) < 96) ? &_GRER(x) : &GRER3))
382 #define GFER(x)         (*((((x) & 0x7f) < 96) ? &_GFER(x) : &GFER3))
383 #define GEDR(x)         (*((((x) & 0x7f) < 96) ? &_GEDR(x) : &GEDR3))
384 #define GAFR(x)         (*((((x) & 0x7f) < 96) ? &_GAFR(x) : \
385                          ((((x) & 0x7f) < 112) ? &GAFR3_L : &GAFR3_U)))
386 #else
387
388 #define GPLR(x)         __REG2(0x40E00000, ((x) & 0x60) >> 3)
389 #define GPDR(x)         __REG2(0x40E0000C, ((x) & 0x60) >> 3)
390 #define GPSR(x)         __REG2(0x40E00018, ((x) & 0x60) >> 3)
391 #define GPCR(x)         __REG2(0x40E00024, ((x) & 0x60) >> 3)
392 #define GRER(x)         __REG2(0x40E00030, ((x) & 0x60) >> 3)
393 #define GFER(x)         __REG2(0x40E0003C, ((x) & 0x60) >> 3)
394 #define GEDR(x)         __REG2(0x40E00048, ((x) & 0x60) >> 3)
395 #define GAFR(x)         __REG2(0x40E00054, ((x) & 0x70) >> 2)
396
397 #endif
398
399 /*
400  * Power Manager - see pxa2xx-regs.h
401  */
402
403 /*
404  * SSP Serial Port Registers - see arch/arm/mach-pxa/include/mach/regs-ssp.h
405  */
406
407 /*
408  * MultiMediaCard (MMC) controller - see drivers/mmc/host/pxamci.h
409  */
410
411 /*
412  * Core Clock - see arch/arm/mach-pxa/include/mach/pxa2xx-regs.h
413  */
414
415 #endif