source: rtems/c/src/lib/libcpu/arm/mc9328mxl/include/mc9328mxl.h @ 1cfcfd3

4.104.114.84.95
Last change on this file since 1cfcfd3 was 1cfcfd3, checked in by Jay Monkman <jtm@…>, on Jul 15, 2004 at 6:25:44 AM

2004-07-15 Jay Monkman

  • ChangeLog?, Makefile.am, clock/.cvsignore, clock/clockdrv.c, include/mc9328mxl.h, irq/.cvsignore, irq/bsp_irq_asm.S, irq/bsp_irq_init.c, irq/irq.c, irq/irq.h, timer/.cvsignore, timer/timer.c: New files.
  • Property mode set to 100644
File size: 25.6 KB
Line 
1/*
2 * Motorola MC9328MXL Register definitions
3 *
4 * Copyright (c) 2003 by Cogent Computer Systems
5 * Written by Jay Monkman <jtm@lopingdog.com>
6 *     
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *
10 *  http://www.OARcorp.com/rtems/license.html.
11 *
12 *  $Id$
13 */
14#ifndef __MC9328MXL_H__
15#define __MC9328MXL_H__
16
17#include <rtems/stdint.h>
18
19#define bit(_x_) (1 << (_x_))
20
21/* Define some constants relating to the CPU */
22#define MC9328MXL_NUM_INTS  64        /* CPU supports 64 interrupts */
23
24/* Define the base addresses of the internal registers */
25#define MC9328MXL_AIPI1_BASE    0x00200000
26#define MC9328MXL_AIPI2_BASE    0x00210000
27#define MC9328MXL_WDOG_BASE     0x00201000
28#define MC9328MXL_TMR1_BASE     0x00202000
29#define MC9328MXL_TMR2_BASE     0x00203000
30#define MC9328MXL_RTC_BASE      0x00204000
31#define MC9328MXL_LCDC_BASE     0x00205000
32#define MC9328MXL_UART1_BASE    0x00206000
33#define MC9328MXL_UART2_BASE    0x00207000
34#define MC9328MXL_PWM_BASE      0x00208000
35#define MC9328MXL_DMAC_BASE     0x00209000
36#define MC9328MXL_USBD_BASE     0x00212000
37#define MC9328MXL_SPI1_BASE     0x00213000
38#define MC9328MXL_SPI2_BASE     0x00219000
39#define MC9328MXL_MMC_BASE      0x00214000
40#define MC9328MXL_I2C_BASE      0x00217000
41#define MC9328MXL_SSI_BASE      0x00218000
42#define MC9328MXL_MSHC_BASE     0x0021a000
43#define MC9328MXL_PLL_BASE      0x0021b000
44#define MC9328MXL_RESET_BASE    0x0021b800
45#define MC9328MXL_SYSCTRL_BASE  0x0021b804
46#define MC9328MXL_GPIOA_BASE    0x0021c000
47#define MC9328MXL_GPIOB_BASE    0x0021c100
48#define MC9328MXL_GPIOC_BASE    0x0021c200
49#define MC9328MXL_GPIOD_BASE    0x0021c300
50#define MC9328MXL_EIM_BASE      0x00220000
51#define MC9328MXL_SDRAM_BASE    0x00221000
52#define MC9328MXL_MMA_BASE      0x00222000
53#define MC9328MXL_AITC_BASE     0x00223000
54#define MC9328MXL_CSI_BASE      0x00224000
55
56
57#define MC9328MXL_TMR1_TCTL   (*((volatile uint32_t *)((MC9328MXL_TMR1_BASE) + 0x00)))
58#define MC9328MXL_TMR1_TPRER  (*((volatile uint32_t *)((MC9328MXL_TMR1_BASE) + 0x04)))
59#define MC9328MXL_TMR1_TCMP   (*((volatile uint32_t *)((MC9328MXL_TMR1_BASE) + 0x08)))
60#define MC9328MXL_TMR1_TCR    (*((volatile uint32_t *)((MC9328MXL_TMR1_BASE) + 0x0c)))
61#define MC9328MXL_TMR1_TCN    (*((volatile uint32_t *)((MC9328MXL_TMR1_BASE) + 0x10)))
62#define MC9328MXL_TMR1_TSTAT  (*((volatile uint32_t *)((MC9328MXL_TMR1_BASE) + 0x14)))
63
64#define MC9328MXL_TMR2_TCTL   (*((volatile uint32_t *)((MC9328MXL_TMR2_BASE) + 0x00)))
65#define MC9328MXL_TMR2_TPRER  (*((volatile uint32_t *)((MC9328MXL_TMR2_BASE) + 0x04)))
66#define MC9328MXL_TMR2_TCMP   (*((volatile uint32_t *)((MC9328MXL_TMR2_BASE) + 0x08)))
67#define MC9328MXL_TMR2_TCR    (*((volatile uint32_t *)((MC9328MXL_TMR2_BASE) + 0x0c)))
68#define MC9328MXL_TMR2_TCN    (*((volatile uint32_t *)((MC9328MXL_TMR2_BASE) + 0x10)))
69#define MC9328MXL_TMR2_TSTAT  (*((volatile uint32_t *)((MC9328MXL_TMR2_BASE) + 0x14)))
70
71#define MC9328MXL_TMR_TCTL_SWR                (bit(15))
72#define MC9328MXL_TMR_TCTL_FRR                (bit(8))
73#define MC9328MXL_TMR_TCTL_CAP_DIS            (0 << 6)
74#define MC9328MXL_TMR_TCTL_CAP_RISE           (1 << 6)
75#define MC9328MXL_TMR_TCTL_CAP_FALL           (2 << 6)
76#define MC9328MXL_TMR_TCTL_CAP_ANY            (3 << 6)
77#define MC9328MXL_TMR_TCTL_OM                 (bit(5))
78#define MC9328MXL_TMR_TCTL_IRQEN              (bit(4))               
79#define MC9328MXL_TMR_TCTL_CLKSRC_STOP        (0 << 1)
80#define MC9328MXL_TMR_TCTL_CLKSRC_PCLK1       (1 << 1)
81#define MC9328MXL_TMR_TCTL_CLKSRC_PCLK_DIV16  (2 << 1)
82#define MC9328MXL_TMR_TCTL_CLKSRC_TIN         (3 << 1)
83#define MC9328MXL_TMR_TCTL_CLKSRC_32KHX       (4 << 1)
84#define MC9328MXL_TMR_TCTL_TEN                (bit(0))
85
86#define MC9328MXL_UART1_RXD   (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0x00)))
87#define MC9328MXL_UART1_TXD   (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0x40)))
88#define MC9328MXL_UART1_CR1   (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0x80)))
89#define MC9328MXL_UART1_CR2   (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0x84)))
90#define MC9328MXL_UART1_CR3   (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0x88)))
91#define MC9328MXL_UART1_CR4   (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0x8c)))
92#define MC9328MXL_UART1_FCR   (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0x90)))
93#define MC9328MXL_UART1_SR1   (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0x94)))
94#define MC9328MXL_UART1_SR2   (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0x98)))
95#define MC9328MXL_UART1_ESC   (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0x9c)))
96#define MC9328MXL_UART1_TIM   (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0xa0)))
97#define MC9328MXL_UART1_BIR   (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0xa4)))
98#define MC9328MXL_UART1_BMR   (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0xa8)))
99#define MC9328MXL_UART1_BRC   (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0xac)))
100#define MC9328MXL_UART1_IPR1  (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0xb0)))
101#define MC9328MXL_UART1_IPR2  (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0xb4)))
102#define MC9328MXL_UART1_IPR3  (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0xb8)))
103#define MC9328MXL_UART1_IPR4  (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0xbc)))
104#define MC9328MXL_UART1_MPR1  (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0xc0)))
105#define MC9328MXL_UART1_MPR2  (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0xc4)))
106#define MC9328MXL_UART1_MPR3  (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0xc8)))
107#define MC9328MXL_UART1_MPR4  (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0xcc)))
108#define MC9328MXL_UART1_TS    (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0xd0)))
109
110#define MC9328MXL_UART2_RXD   (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0x00)))
111#define MC9328MXL_UART2_TXD   (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0x40)))
112#define MC9328MXL_UART2_CR1   (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0x80)))
113#define MC9328MXL_UART2_CR2   (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0x84)))
114#define MC9328MXL_UART2_CR3   (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0x88)))
115#define MC9328MXL_UART2_CR4   (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0x8c)))
116#define MC9328MXL_UART2_FCR   (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0x90)))
117#define MC9328MXL_UART2_SR1   (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0x94)))
118#define MC9328MXL_UART2_SR2   (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0x98)))
119#define MC9328MXL_UART2_ESC   (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0x9c)))
120#define MC9328MXL_UART2_TIM   (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0xa0)))
121#define MC9328MXL_UART2_BIR   (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0xa4)))
122#define MC9328MXL_UART2_BMR   (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0xa8)))
123#define MC9328MXL_UART2_BRC   (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0xac)))
124#define MC9328MXL_UART2_IPR1  (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0xb0)))
125#define MC9328MXL_UART2_IPR2  (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0xb4)))
126#define MC9328MXL_UART2_IPR3  (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0xb8)))
127#define MC9328MXL_UART2_IPR4  (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0xbc)))
128#define MC9328MXL_UART2_MPR1  (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0xc0)))
129#define MC9328MXL_UART2_MPR2  (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0xc4)))
130#define MC9328MXL_UART2_MPR3  (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0xc8)))
131#define MC9328MXL_UART2_MPR4  (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0xcc)))
132#define MC9328MXL_UART2_TS    (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0xd0)))
133
134
135#define MC9328MXL_UART_RXD_CHARRDY    (bit(15))
136#define MC9328MXL_UART_RXD_ERR        (bit(14))
137#define MC9328MXL_UART_RXD_OVRRUN     (bit(13))
138#define MC9328MXL_UART_RXD_FRMERR     (bit(12))
139#define MC9328MXL_UART_RXD_BRK        (bit(11))
140#define MC9328MXL_UART_RXD_PRERR      (bit(10))
141#define MC9328MXL_UART_RXD_CHARMASK   (0xff)
142
143#define MC9328MXL_UART_CR1_ADEN       (bit(15))
144#define MC9328MXL_UART_CR1_ADBR       (bit(14))
145#define MC9328MXL_UART_CR1_TRDYEN     (bit(13))
146#define MC9328MXL_UART_CR1_IDEN       (bit(12))
147#define MC9328MXL_UART_CR1_ICD4       (0x0 << 10)
148#define MC9328MXL_UART_CR1_ICD8       (0x1 << 10)
149#define MC9328MXL_UART_CR1_ICD16      (0x2 << 10)
150#define MC9328MXL_UART_CR1_ICD32      (0x3 << 10)
151#define MC9328MXL_UART_CR1_RRDYEN     (bit(9))
152#define MC9328MXL_UART_CR1_RDMAEN     (bit(8))
153#define MC9328MXL_UART_CR1_IREN       (bit(7))
154#define MC9328MXL_UART_CR1_TXMPTYEN   (bit(6))
155#define MC9328MXL_UART_CR1_RTSDEN     (bit(5))
156#define MC9328MXL_UART_CR1_SNDBRK     (bit(4))
157#define MC9328MXL_UART_CR1_TDMAEN     (bit(3))
158#define MC9328MXL_UART_CR1_UARTCLKEN  (bit(2))
159#define MC9328MXL_UART_CR1_DOZE       (bit(1))
160#define MC9328MXL_UART_CR1_UARTEN     (bit(0))
161
162
163#define MC9328MXL_UART_CR2_ESCI       (bit(15))
164#define MC9328MXL_UART_CR2_IRTS       (bit(14))
165#define MC9328MXL_UART_CR2_CTSC       (bit(13))
166#define MC9328MXL_UART_CR2_CTS        (bit(12))
167#define MC9328MXL_UART_CR2_ESCEN      (bit(11))
168#define MC9328MXL_UART_CR2_RTEC_RE    (0 << 9)
169#define MC9328MXL_UART_CR2_RTEC_FE    (1 << 9)
170#define MC9328MXL_UART_CR2_RTEC_ANY   (2 << 9)
171#define MC9328MXL_UART_CR2_PREN       (bit(8))
172#define MC9328MXL_UART_CR2_PROE       (bit(7))
173#define MC9328MXL_UART_CR2_STPB       (bit(6))
174#define MC9328MXL_UART_CR2_WS         (bit(5))
175#define MC9328MXL_UART_CR2_RTSEN      (bit(4))
176#define MC9328MXL_UART_CR2_TXEN       (bit(2))
177#define MC9328MXL_UART_CR2_RXEN       (bit(1))
178#define MC9328MXL_UART_CR2_SRST       (bit(0))
179
180#define MC9328MXL_UART_CR3_DPEC_RE    (0 << 14)  /* UART2 only */
181#define MC9328MXL_UART_CR3_DPEC_FE    (1 << 14)  /* UART2 only */
182#define MC9328MXL_UART_CR3_DPEC_ANY   (2 << 14)  /* UART2 only */
183#define MC9328MXL_UART_CR3_DTREN      (bit(13))  /* UART2 only */
184#define MC9328MXL_UART_CR3_PARERREN   (bit(12))
185#define MC9328MXL_UART_CR3_FRAERREN   (bit(11))
186#define MC9328MXL_UART_CR3_DSR        (bit(10))  /* UART2 only */
187#define MC9328MXL_UART_CR3_DCD        (bit(9))   /* UART2 only */
188#define MC9328MXL_UART_CR3_RI         (bit(8))   /* UART2 only */
189#define MC9328MXL_UART_CR3_RXDSEN     (bit(6))
190#define MC9328MXL_UART_CR3_AIRINTEN   (bit(5))
191#define MC9328MXL_UART_CR3_AWAKEN     (bit(4))
192#define MC9328MXL_UART_CR3_REF25      (bit(3))
193#define MC9328MXL_UART_CR3_REF30      (bit(2))
194#define MC9328MXL_UART_CR3_INVT       (bit(1))
195#define MC9328MXL_UART_CR3_BPEN       (bit(0))
196
197#define MC9328MXL_UART_CR4_CTSTL(_x_) (((_x_) & 0x3f) << 10)     
198#define MC9328MXL_UART_CR4_INVR       (bit(9))
199#define MC9328MXL_UART_CR4_ENIRI      (bit(8))
200#define MC9328MXL_UART_CR4_WKEN       (bit(7))
201#define MC9328MXL_UART_CR4_REF16      (bit(6))
202#define MC9328MXL_UART_CR4_IRSC       (bit(5))
203#define MC9328MXL_UART_CR4_TCEN       (bit(3))
204#define MC9328MXL_UART_CR4_BKEN       (bit(2))
205#define MC9328MXL_UART_CR4_OREN       (bit(1))
206#define MC9328MXL_UART_CR4_DREN       (bit(0))
207
208#define MC9328MXL_UART_SR1_PARERR     (bit(15))
209#define MC9328MXL_UART_SR1_RTSS       (bit(14))
210#define MC9328MXL_UART_SR1_TRDY       (bit(13))
211#define MC9328MXL_UART_SR1_RTSD       (bit(12))
212#define MC9328MXL_UART_SR1_ESCF       (bit(11))
213#define MC9328MXL_UART_SR1_FRMERR     (bit(10))
214#define MC9328MXL_UART_SR1_RRDY       (bit(9))
215#define MC9328MXL_UART_SR1_RXDS       (bit(6))
216#define MC9328MXL_UART_SR1_AIRINT     (bit(5))
217#define MC9328MXL_UART_SR1_AWAKE      (bit(4))
218
219#define MC9328MXL_UART_SR2_ADET       (bit(15))
220#define MC9328MXL_UART_SR2_TXFE       (bit(14))
221#define MC9328MXL_UART_SR2_DTRF       (bit(13))
222#define MC9328MXL_UART_SR2_IDLE       (bit(12))
223#define MC9328MXL_UART_SR2_IRINT      (bit(8))
224#define MC9328MXL_UART_SR2_WAKE       (bit(7))
225#define MC9328MXL_UART_SR2_RTSF       (bit(4))
226#define MC9328MXL_UART_SR2_TXDC       (bit(3))
227#define MC9328MXL_UART_SR2_BRCD       (bit(2))
228#define MC9328MXL_UART_SR2_ORE        (bit(1))
229#define MC9328MXL_UART_SR2_RDR        (bit(0))
230
231
232#define MC9328MXL_PLL_CSCR   (*((volatile uint32_t *)((MC9328MXL_PLL_BASE) + 0x00)))
233#define MC9328MXL_PLL_MPCTL0 (*((volatile uint32_t *)((MC9328MXL_PLL_BASE) + 0x04)))
234#define MC9328MXL_PLL_MPCTL1 (*((volatile uint32_t *)((MC9328MXL_PLL_BASE) + 0x08)))
235#define MC9328MXL_PLL_SPCTL0 (*((volatile uint32_t *)((MC9328MXL_PLL_BASE) + 0x0c)))
236#define MC9328MXL_PLL_SPCTL1 (*((volatile uint32_t *)((MC9328MXL_PLL_BASE) + 0x10)))
237#define MC9328MXL_PLL_PCDR   (*((volatile uint32_t *)((MC9328MXL_PLL_BASE) + 0x20)))
238
239#define MC9328MXL_PLL_CSCR_CLKOSEL_PERCLK1 (0 << 29)
240#define MC9328MXL_PLL_CSCR_CLKOSEL_HCLK    (1 << 29)
241#define MC9328MXL_PLL_CSCR_CLKOSEL_CLK48M  (2 << 29)
242#define MC9328MXL_PLL_CSCR_CLKOSEL_CLK16M  (3 << 29)
243#define MC9328MXL_PLL_CSCR_CLKOSEL_PREMCLK (4 << 29)
244#define MC9328MXL_PLL_CSCR_CLKOSEL_FCLK    (5 << 29)
245
246#define MC9328MXL_PLL_CSCR_USBDIV(_x_)     (((_x_) & 0x7) << 26)
247#define MC9328MXL_PLL_CSCR_SDCNT_1         (0 << 24)
248#define MC9328MXL_PLL_CSCR_SDCNT_2         (1 << 24)
249#define MC9328MXL_PLL_CSCR_SDCNT_3         (2 << 24)
250#define MC9328MXL_PLL_CSCR_SDCNT_4         (3 << 24)
251
252#define MC9328MXL_PLL_CSCR_SPLLRSTRT       (bit(22))
253#define MC9328MXL_PLL_CSCR_MPLLRSTRT       (bit(21))
254#define MC9328MXL_PLL_CSCR_CLK16SEL        (bit(18))
255#define MC9328MXL_PLL_CSCR_OSCEN           (bit(17))
256#define MC9328MXL_PLL_CSCR_SYSSEL          (bit(16))
257#define MC9328MXL_PLL_CSCR_PRESC           (bit(15))
258#define MC9328MXL_PLL_CSCR_BLKDIV(_x_)     (((_x_) & 0xf) << 10)
259#define MC9328MXL_PLL_CSCR_SPEN            (bit(1))
260#define MC9328MXL_PLL_CSCR_MPEN            (bit(0))
261
262#define MC9328MXL_PLL_PCDR_PCLK1_MASK      (0x0000000f)
263#define MC9328MXL_PLL_PCDR_PCLK1_SHIFT     (0)
264#define MC9328MXL_PLL_PCDR_PCLK2_MASK      (0x000000f0)
265#define MC9328MXL_PLL_PCDR_PCLK2_SHIFT     (4)
266#define MC9328MXL_PLL_PCDR_PCLK3_MASK      (0x007f0000)
267#define MC9328MXL_PLL_PCDR_PCLK3_SHIFT     (16)
268
269
270#define MC9328MXL_PLL_SPCTL_PD_MASK        (0x3c000000)
271#define MC9328MXL_PLL_SPCTL_PD_SHIFT       (26)
272#define MC9328MXL_PLL_SPCTL_MFD_MASK       (0x03ff0000)
273#define MC9328MXL_PLL_SPCTL_MFD_SHIFT      (16)
274#define MC9328MXL_PLL_SPCTL_MFI_MASK       (0x00003c00)
275#define MC9328MXL_PLL_SPCTL_MFI_SHIFT      (10)
276#define MC9328MXL_PLL_SPCTL_MFN_MASK       (0x000003ff)
277#define MC9328MXL_PLL_SPCTL_MFN_SHIFT      (0)
278   
279
280#define MC9328MXL_GPIOA_DDIR    (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x00)))
281#define MC9328MXL_GPIOA_OCR1    (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x04)))
282#define MC9328MXL_GPIOA_OCR2    (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x08)))
283#define MC9328MXL_GPIOA_ICONFA1 (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x0c)))
284#define MC9328MXL_GPIOA_ICONFA2 (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x10)))
285#define MC9328MXL_GPIOA_ICONFB1 (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x14)))
286#define MC9328MXL_GPIOA_ICONFB2 (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x18)))
287#define MC9328MXL_GPIOA_DR      (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x1c)))
288#define MC9328MXL_GPIOA_GIUS    (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x20)))
289#define MC9328MXL_GPIOA_SSR     (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x24)))
290#define MC9328MXL_GPIOA_ICR1    (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x28)))
291#define MC9328MXL_GPIOA_ICR2    (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x2c)))
292#define MC9328MXL_GPIOA_IMR     (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x30)))
293#define MC9328MXL_GPIOA_ISR     (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x34)))
294#define MC9328MXL_GPIOA_GPR     (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x38)))
295#define MC9328MXL_GPIOA_SWR     (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x3c)))
296#define MC9328MXL_GPIOA_PUEN    (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x40)))
297
298#define MC9328MXL_GPIOB_DDIR    (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x00)))
299#define MC9328MXL_GPIOB_OCR1    (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x04)))
300#define MC9328MXL_GPIOB_OCR2    (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x08)))
301#define MC9328MXL_GPIOB_ICONFA1 (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x0c)))
302#define MC9328MXL_GPIOB_ICONFA2 (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x10)))
303#define MC9328MXL_GPIOB_ICONFB1 (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x14)))
304#define MC9328MXL_GPIOB_ICONFB2 (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x18)))
305#define MC9328MXL_GPIOB_DR      (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x1c)))
306#define MC9328MXL_GPIOB_GIUS    (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x20)))
307#define MC9328MXL_GPIOB_SSR     (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x24)))
308#define MC9328MXL_GPIOB_ICR1    (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x28)))
309#define MC9328MXL_GPIOB_ICR2    (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x2c)))
310#define MC9328MXL_GPIOB_IMR     (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x30)))
311#define MC9328MXL_GPIOB_ISR     (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x34)))
312#define MC9328MXL_GPIOB_GPR     (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x38)))
313#define MC9328MXL_GPIOB_SWR     (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x3c)))
314#define MC9328MXL_GPIOB_PUEN    (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x40)))
315
316#define MC9328MXL_GPIOC_DDIR    (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x00)))
317#define MC9328MXL_GPIOC_OCR1    (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x04)))
318#define MC9328MXL_GPIOC_OCR2    (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x08)))
319#define MC9328MXL_GPIOC_ICONFA1 (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x0c)))
320#define MC9328MXL_GPIOC_ICONFA2 (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x10)))
321#define MC9328MXL_GPIOC_ICONFB1 (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x14)))
322#define MC9328MXL_GPIOC_ICONFB2 (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x18)))
323#define MC9328MXL_GPIOC_DR      (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x1c)))
324#define MC9328MXL_GPIOC_GIUS    (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x20)))
325#define MC9328MXL_GPIOC_SSR     (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x24)))
326#define MC9328MXL_GPIOC_ICR1    (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x28)))
327#define MC9328MXL_GPIOC_ICR2    (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x2c)))
328#define MC9328MXL_GPIOC_IMR     (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x30)))
329#define MC9328MXL_GPIOC_ISR     (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x34)))
330#define MC9328MXL_GPIOC_GPR     (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x38)))
331#define MC9328MXL_GPIOC_SWR     (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x3c)))
332#define MC9328MXL_GPIOC_PUEN    (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x40)))
333
334#define MC9328MXL_GPIOD_DDIR    (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x00)))
335#define MC9328MXL_GPIOD_OCR1    (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x04)))
336#define MC9328MXL_GPIOD_OCR2    (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x08)))
337#define MC9328MXL_GPIOD_ICONFA1 (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x0c)))
338#define MC9328MXL_GPIOD_ICONFA2 (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x10)))
339#define MC9328MXL_GPIOD_ICONFB1 (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x14)))
340#define MC9328MXL_GPIOD_ICONFB2 (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x18)))
341#define MC9328MXL_GPIOD_DR      (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x1c)))
342#define MC9328MXL_GPIOD_GIUS    (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x20)))
343#define MC9328MXL_GPIOD_SSR     (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x24)))
344#define MC9328MXL_GPIOD_ICR1    (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x28)))
345#define MC9328MXL_GPIOD_ICR2    (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x2c)))
346#define MC9328MXL_GPIOD_IMR     (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x30)))
347#define MC9328MXL_GPIOD_ISR     (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x34)))
348#define MC9328MXL_GPIOD_GPR     (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x38)))
349#define MC9328MXL_GPIOD_SWR     (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x3c)))
350#define MC9328MXL_GPIOD_PUEN    (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x40)))
351
352#define MC9328MXL_AITC_INTCNTL    (*((volatile uint32_t *)((MC9328MXL_AITC_BASE) + 0x00)))
353#define MC9328MXL_AITC_NIMASK     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE) + 0x04)))
354#define MC9328MXL_AITC_INTENNUM   (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x08)))
355#define MC9328MXL_AITC_INTDISNUM  (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x0c)))
356#define MC9328MXL_AITC_INTENABLEH (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x10)))
357#define MC9328MXL_AITC_INTENABLEL (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x14)))
358#define MC9328MXL_AITC_INTTYPEH   (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x18)))
359#define MC9328MXL_AITC_INTTYPEL   (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x1c)))
360#define MC9328MXL_AITC_NIPIR7     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x20)))
361#define MC9328MXL_AITC_NIPRI6     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x24)))
362#define MC9328MXL_AITC_NIPRI5     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x28)))
363#define MC9328MXL_AITC_NIPRI4     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x2c)))
364#define MC9328MXL_AITC_NIPRI3     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x30)))
365#define MC9328MXL_AITC_NIPRI2     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x34)))
366#define MC9328MXL_AITC_NIPRI1     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x38)))
367#define MC9328MXL_AITC_NIPRI0     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x3c)))
368#define MC9328MXL_AITC_NIVECSR    (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x40)))
369#define MC9328MXL_AITC_FIVECSR    (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x44)))
370#define MC9328MXL_AITC_INTSRCH    (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x48)))
371#define MC9328MXL_AITC_INTSRCL    (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x4c)))
372#define MC9328MXL_AITC_INTFRCH    (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x50)))
373#define MC9328MXL_AITC_INTFRCL    (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x54)))
374#define MC9328MXL_AITC_NIPNDH     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x58)))
375#define MC9328MXL_AITC_NIPNDL     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x5c)))
376#define MC9328MXL_AITC_FIPNDH     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x60)))
377#define MC9328MXL_AITC_FIPNDL     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x64)))
378
379#define MC9328MXL_INT_UART3_PFERR          (0)
380#define MC9328MXL_INT_UART3_RTS            (1)
381#define MC9328MXL_INT_UART3_DTR            (2)
382#define MC9328MXL_INT_UART3_UARTC          (3)
383#define MC9328MXL_INT_UART3_TX             (4)
384#define MC9328MXL_INT_PEN_UP               (5)
385#define MC9328MXL_INT_CSI                  (6)
386#define MC9328MXL_INT_MMA_MAC              (7)
387#define MC9328MXL_INT_MMA                  (8)
388#define MC9328MXL_INT_COMP                 (9)
389#define MC9328MXL_INT_MSIRQ                (10)
390#define MC9328MXL_INT_GPIO_PORTA           (11)
391#define MC9328MXL_INT_GPIO_PORTB           (12)
392#define MC9328MXL_INT_GPIO_PORTC           (13)
393#define MC9328MXL_INT_LCDC                 (14)
394#define MC9328MXL_INT_SIM_IRQ              (15)
395#define MC9328MXL_INT_SIM_DATA             (16)
396#define MC9328MXL_INT_RTC                  (17)
397#define MC9328MXL_INT_RTC_SAM              (18)
398#define MC9328MXL_INT_UART2_PFERR          (19)
399#define MC9328MXL_INT_UART2_RTS            (20)
400#define MC9328MXL_INT_UART2_DTR            (21)
401#define MC9328MXL_INT_UART2_UARTC          (22)
402#define MC9328MXL_INT_UART2_TX             (23)
403#define MC9328MXL_INT_UART2_RX             (24)
404#define MC9328MXL_INT_UART1_PFERR          (25)
405#define MC9328MXL_INT_UART1_RTS            (26)
406#define MC9328MXL_INT_UART1_DTR            (27)
407#define MC9328MXL_INT_UART1_UARTC          (28)
408#define MC9328MXL_INT_UART1_TX             (29)
409#define MC9328MXL_INT_UART1_RX             (30)
410#define MC9328MXL_INT_PEN_DATA             (33)
411#define MC9328MXL_INT_PWM                  (34)
412#define MC9328MXL_INT_MMC_IRQ              (35)
413#define MC9328MXL_INT_SSI2_TX              (36)
414#define MC9328MXL_INT_SSI2_RX              (37)
415#define MC9328MXL_INT_SSI2_ERR             (38)
416#define MC9328MXL_INT_I2C                  (39)
417#define MC9328MXL_INT_SPI2                 (40)
418#define MC9328MXL_INT_SPI1                 (41)
419#define MC9328MXL_INT_SSI_TX               (42)
420#define MC9328MXL_INT_SSI_TX_ERR           (43)
421#define MC9328MXL_INT_SSI_RX               (44)
422#define MC9328MXL_INT_SSI_RX_ERR           (45)
423#define MC9328MXL_INT_TOUCH                (46)
424#define MC9328MXL_INT_USBD0                (47)
425#define MC9328MXL_INT_USBD1                (48)
426#define MC9328MXL_INT_USBD2                (49)
427#define MC9328MXL_INT_USBD3                (50)
428#define MC9328MXL_INT_USBD4                (51)
429#define MC9328MXL_INT_USBD5                (52)
430#define MC9328MXL_INT_USBD6                (53)
431#define MC9328MXL_INT_UART3_RX             (54)
432#define MC9328MXL_INT_BTSYS                (55)
433#define MC9328MXL_INT_BTTIM                (56)
434#define MC9328MXL_INT_BTWUI                (57)
435#define MC9328MXL_INT_TIMER2               (58)
436#define MC9328MXL_INT_TIMER1               (59)
437#define MC9328MXL_INT_DMA_ERR              (60)
438#define MC9328MXL_INT_DMA                  (61)
439#define MC9328MXL_INT_GPIO_PORTD           (62)
440#define MC9328MXL_INT_WDT                  (63)
441
442#define MC9328MXL_AITC_INTCTL_NIAD    BIT(20)
443#define MC9328MXL_AITC_INTCTL_FIAD    BIT(19)
444#define MC9328MXL_AITC_NIMASK_MASK (0X1F)
445#define MC9328MXL_AITC_INTENNUM_MASK  (0X3F)
446#define MC9328MXL_AITC_INTDISNUM_MASK (0X3F)
447#define MC9328MXL_AITC_NIPRIORITY(_int_, _pri_) \
448           (((_pri_) & 0xf) << ((_int_) & 0x7) * 4)
449
450
451#endif /* __MC9328MXL_H__ */
Note: See TracBrowser for help on using the repository browser.