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

4.104.114.84.95
Last change on this file since bc19e2a was bc19e2a, checked in by Jay Monkman <jtm@…>, on Jun 3, 2006 at 3:16:18 AM

2006-06-02 Jay Monkman <jtm@…>

  • mc9328mxl/include/mc9328mxl.h: Added UART register definitions.
  • Property mode set to 100644
File size: 26.8 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
134typedef struct {
135    volatile uint32_t rxd;
136    volatile uint32_t _res0[15];
137    volatile uint32_t txd;
138    volatile uint32_t _res1[15];
139    volatile uint32_t cr1;
140    volatile uint32_t cr2;
141    volatile uint32_t cr3;
142    volatile uint32_t cr4;
143    volatile uint32_t fcr;
144    volatile uint32_t sr1;
145    volatile uint32_t sr2;
146    volatile uint32_t esc;
147    volatile uint32_t tim;
148    volatile uint32_t bir;
149    volatile uint32_t bmr;
150    volatile uint32_t brc;
151    volatile uint32_t ipr1;
152    volatile uint32_t ipr2;
153    volatile uint32_t ipr3;
154    volatile uint32_t ipr4;
155    volatile uint32_t mpr1;
156    volatile uint32_t mpr2;
157    volatile uint32_t mpr3;
158    volatile uint32_t mpr4;
159    volatile uint32_t ts;
160} mc9328mxl_uart_regs_t;
161
162#define MC9328MXL_UART_RXD_CHARRDY    (bit(15))
163#define MC9328MXL_UART_RXD_ERR        (bit(14))
164#define MC9328MXL_UART_RXD_OVRRUN     (bit(13))
165#define MC9328MXL_UART_RXD_FRMERR     (bit(12))
166#define MC9328MXL_UART_RXD_BRK        (bit(11))
167#define MC9328MXL_UART_RXD_PRERR      (bit(10))
168#define MC9328MXL_UART_RXD_CHARMASK   (0xff)
169
170#define MC9328MXL_UART_CR1_ADEN       (bit(15))
171#define MC9328MXL_UART_CR1_ADBR       (bit(14))
172#define MC9328MXL_UART_CR1_TRDYEN     (bit(13))
173#define MC9328MXL_UART_CR1_IDEN       (bit(12))
174#define MC9328MXL_UART_CR1_ICD4       (0x0 << 10)
175#define MC9328MXL_UART_CR1_ICD8       (0x1 << 10)
176#define MC9328MXL_UART_CR1_ICD16      (0x2 << 10)
177#define MC9328MXL_UART_CR1_ICD32      (0x3 << 10)
178#define MC9328MXL_UART_CR1_RRDYEN     (bit(9))
179#define MC9328MXL_UART_CR1_RDMAEN     (bit(8))
180#define MC9328MXL_UART_CR1_IREN       (bit(7))
181#define MC9328MXL_UART_CR1_TXMPTYEN   (bit(6))
182#define MC9328MXL_UART_CR1_RTSDEN     (bit(5))
183#define MC9328MXL_UART_CR1_SNDBRK     (bit(4))
184#define MC9328MXL_UART_CR1_TDMAEN     (bit(3))
185#define MC9328MXL_UART_CR1_UARTCLKEN  (bit(2))
186#define MC9328MXL_UART_CR1_DOZE       (bit(1))
187#define MC9328MXL_UART_CR1_UARTEN     (bit(0))
188
189
190#define MC9328MXL_UART_CR2_ESCI       (bit(15))
191#define MC9328MXL_UART_CR2_IRTS       (bit(14))
192#define MC9328MXL_UART_CR2_CTSC       (bit(13))
193#define MC9328MXL_UART_CR2_CTS        (bit(12))
194#define MC9328MXL_UART_CR2_ESCEN      (bit(11))
195#define MC9328MXL_UART_CR2_RTEC_RE    (0 << 9)
196#define MC9328MXL_UART_CR2_RTEC_FE    (1 << 9)
197#define MC9328MXL_UART_CR2_RTEC_ANY   (2 << 9)
198#define MC9328MXL_UART_CR2_PREN       (bit(8))
199#define MC9328MXL_UART_CR2_PROE       (bit(7))
200#define MC9328MXL_UART_CR2_STPB       (bit(6))
201#define MC9328MXL_UART_CR2_WS         (bit(5))
202#define MC9328MXL_UART_CR2_RTSEN      (bit(4))
203#define MC9328MXL_UART_CR2_TXEN       (bit(2))
204#define MC9328MXL_UART_CR2_RXEN       (bit(1))
205#define MC9328MXL_UART_CR2_SRST       (bit(0))
206
207#define MC9328MXL_UART_CR3_DPEC_RE    (0 << 14)  /* UART2 only */
208#define MC9328MXL_UART_CR3_DPEC_FE    (1 << 14)  /* UART2 only */
209#define MC9328MXL_UART_CR3_DPEC_ANY   (2 << 14)  /* UART2 only */
210#define MC9328MXL_UART_CR3_DTREN      (bit(13))  /* UART2 only */
211#define MC9328MXL_UART_CR3_PARERREN   (bit(12))
212#define MC9328MXL_UART_CR3_FRAERREN   (bit(11))
213#define MC9328MXL_UART_CR3_DSR        (bit(10))  /* UART2 only */
214#define MC9328MXL_UART_CR3_DCD        (bit(9))   /* UART2 only */
215#define MC9328MXL_UART_CR3_RI         (bit(8))   /* UART2 only */
216#define MC9328MXL_UART_CR3_RXDSEN     (bit(6))
217#define MC9328MXL_UART_CR3_AIRINTEN   (bit(5))
218#define MC9328MXL_UART_CR3_AWAKEN     (bit(4))
219#define MC9328MXL_UART_CR3_REF25      (bit(3))
220#define MC9328MXL_UART_CR3_REF30      (bit(2))
221#define MC9328MXL_UART_CR3_INVT       (bit(1))
222#define MC9328MXL_UART_CR3_BPEN       (bit(0))
223
224#define MC9328MXL_UART_CR4_CTSTL(_x_) (((_x_) & 0x3f) << 10)     
225#define MC9328MXL_UART_CR4_INVR       (bit(9))
226#define MC9328MXL_UART_CR4_ENIRI      (bit(8))
227#define MC9328MXL_UART_CR4_WKEN       (bit(7))
228#define MC9328MXL_UART_CR4_REF16      (bit(6))
229#define MC9328MXL_UART_CR4_IRSC       (bit(5))
230#define MC9328MXL_UART_CR4_TCEN       (bit(3))
231#define MC9328MXL_UART_CR4_BKEN       (bit(2))
232#define MC9328MXL_UART_CR4_OREN       (bit(1))
233#define MC9328MXL_UART_CR4_DREN       (bit(0))
234
235#define MC9328MXL_UART_FCR_TXTL(x)    (((x) & 0x3f) << 10)
236#define MC9328MXL_UART_FCR_RFDIV_1    (5 << 7)
237#define MC9328MXL_UART_FCR_RFDIV_2    (4 << 7)
238#define MC9328MXL_UART_FCR_RFDIV_3    (3 << 7)
239#define MC9328MXL_UART_FCR_RFDIV_4    (2 << 7)
240#define MC9328MXL_UART_FCR_RFDIV_5    (1 << 7)
241#define MC9328MXL_UART_FCR_RFDIV_6    (0 << 7)
242#define MC9328MXL_UART_FCR_RFDIV_7    (6 << 7)
243#define MC9328MXL_UART_FCR_RFDIV_MASK (7 << 7)
244#define MC9328MXL_UART_FCR_RXTL(x)    (((x) & 0x3f) << 0)
245
246#define MC9328MXL_UART_SR1_PARERR     (bit(15))
247#define MC9328MXL_UART_SR1_RTSS       (bit(14))
248#define MC9328MXL_UART_SR1_TRDY       (bit(13))
249#define MC9328MXL_UART_SR1_RTSD       (bit(12))
250#define MC9328MXL_UART_SR1_ESCF       (bit(11))
251#define MC9328MXL_UART_SR1_FRMERR     (bit(10))
252#define MC9328MXL_UART_SR1_RRDY       (bit(9))
253#define MC9328MXL_UART_SR1_RXDS       (bit(6))
254#define MC9328MXL_UART_SR1_AIRINT     (bit(5))
255#define MC9328MXL_UART_SR1_AWAKE      (bit(4))
256
257#define MC9328MXL_UART_SR2_ADET       (bit(15))
258#define MC9328MXL_UART_SR2_TXFE       (bit(14))
259#define MC9328MXL_UART_SR2_DTRF       (bit(13))
260#define MC9328MXL_UART_SR2_IDLE       (bit(12))
261#define MC9328MXL_UART_SR2_IRINT      (bit(8))
262#define MC9328MXL_UART_SR2_WAKE       (bit(7))
263#define MC9328MXL_UART_SR2_RTSF       (bit(4))
264#define MC9328MXL_UART_SR2_TXDC       (bit(3))
265#define MC9328MXL_UART_SR2_BRCD       (bit(2))
266#define MC9328MXL_UART_SR2_ORE        (bit(1))
267#define MC9328MXL_UART_SR2_RDR        (bit(0))
268
269
270#define MC9328MXL_PLL_CSCR   (*((volatile uint32_t *)((MC9328MXL_PLL_BASE) + 0x00)))
271#define MC9328MXL_PLL_MPCTL0 (*((volatile uint32_t *)((MC9328MXL_PLL_BASE) + 0x04)))
272#define MC9328MXL_PLL_MPCTL1 (*((volatile uint32_t *)((MC9328MXL_PLL_BASE) + 0x08)))
273#define MC9328MXL_PLL_SPCTL0 (*((volatile uint32_t *)((MC9328MXL_PLL_BASE) + 0x0c)))
274#define MC9328MXL_PLL_SPCTL1 (*((volatile uint32_t *)((MC9328MXL_PLL_BASE) + 0x10)))
275#define MC9328MXL_PLL_PCDR   (*((volatile uint32_t *)((MC9328MXL_PLL_BASE) + 0x20)))
276
277#define MC9328MXL_PLL_CSCR_CLKOSEL_PERCLK1 (0 << 29)
278#define MC9328MXL_PLL_CSCR_CLKOSEL_HCLK    (1 << 29)
279#define MC9328MXL_PLL_CSCR_CLKOSEL_CLK48M  (2 << 29)
280#define MC9328MXL_PLL_CSCR_CLKOSEL_CLK16M  (3 << 29)
281#define MC9328MXL_PLL_CSCR_CLKOSEL_PREMCLK (4 << 29)
282#define MC9328MXL_PLL_CSCR_CLKOSEL_FCLK    (5 << 29)
283
284#define MC9328MXL_PLL_CSCR_USBDIV(_x_)     (((_x_) & 0x7) << 26)
285#define MC9328MXL_PLL_CSCR_SDCNT_1         (0 << 24)
286#define MC9328MXL_PLL_CSCR_SDCNT_2         (1 << 24)
287#define MC9328MXL_PLL_CSCR_SDCNT_3         (2 << 24)
288#define MC9328MXL_PLL_CSCR_SDCNT_4         (3 << 24)
289
290#define MC9328MXL_PLL_CSCR_SPLLRSTRT       (bit(22))
291#define MC9328MXL_PLL_CSCR_MPLLRSTRT       (bit(21))
292#define MC9328MXL_PLL_CSCR_CLK16SEL        (bit(18))
293#define MC9328MXL_PLL_CSCR_OSCEN           (bit(17))
294#define MC9328MXL_PLL_CSCR_SYSSEL          (bit(16))
295#define MC9328MXL_PLL_CSCR_PRESC           (bit(15))
296#define MC9328MXL_PLL_CSCR_BLKDIV(_x_)     (((_x_) & 0xf) << 10)
297#define MC9328MXL_PLL_CSCR_SPEN            (bit(1))
298#define MC9328MXL_PLL_CSCR_MPEN            (bit(0))
299
300#define MC9328MXL_PLL_PCDR_PCLK1_MASK      (0x0000000f)
301#define MC9328MXL_PLL_PCDR_PCLK1_SHIFT     (0)
302#define MC9328MXL_PLL_PCDR_PCLK2_MASK      (0x000000f0)
303#define MC9328MXL_PLL_PCDR_PCLK2_SHIFT     (4)
304#define MC9328MXL_PLL_PCDR_PCLK3_MASK      (0x007f0000)
305#define MC9328MXL_PLL_PCDR_PCLK3_SHIFT     (16)
306
307
308#define MC9328MXL_PLL_SPCTL_PD_MASK        (0x3c000000)
309#define MC9328MXL_PLL_SPCTL_PD_SHIFT       (26)
310#define MC9328MXL_PLL_SPCTL_MFD_MASK       (0x03ff0000)
311#define MC9328MXL_PLL_SPCTL_MFD_SHIFT      (16)
312#define MC9328MXL_PLL_SPCTL_MFI_MASK       (0x00003c00)
313#define MC9328MXL_PLL_SPCTL_MFI_SHIFT      (10)
314#define MC9328MXL_PLL_SPCTL_MFN_MASK       (0x000003ff)
315#define MC9328MXL_PLL_SPCTL_MFN_SHIFT      (0)
316   
317
318#define MC9328MXL_GPIOA_DDIR    (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x00)))
319#define MC9328MXL_GPIOA_OCR1    (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x04)))
320#define MC9328MXL_GPIOA_OCR2    (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x08)))
321#define MC9328MXL_GPIOA_ICONFA1 (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x0c)))
322#define MC9328MXL_GPIOA_ICONFA2 (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x10)))
323#define MC9328MXL_GPIOA_ICONFB1 (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x14)))
324#define MC9328MXL_GPIOA_ICONFB2 (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x18)))
325#define MC9328MXL_GPIOA_DR      (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x1c)))
326#define MC9328MXL_GPIOA_GIUS    (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x20)))
327#define MC9328MXL_GPIOA_SSR     (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x24)))
328#define MC9328MXL_GPIOA_ICR1    (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x28)))
329#define MC9328MXL_GPIOA_ICR2    (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x2c)))
330#define MC9328MXL_GPIOA_IMR     (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x30)))
331#define MC9328MXL_GPIOA_ISR     (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x34)))
332#define MC9328MXL_GPIOA_GPR     (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x38)))
333#define MC9328MXL_GPIOA_SWR     (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x3c)))
334#define MC9328MXL_GPIOA_PUEN    (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x40)))
335
336#define MC9328MXL_GPIOB_DDIR    (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x00)))
337#define MC9328MXL_GPIOB_OCR1    (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x04)))
338#define MC9328MXL_GPIOB_OCR2    (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x08)))
339#define MC9328MXL_GPIOB_ICONFA1 (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x0c)))
340#define MC9328MXL_GPIOB_ICONFA2 (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x10)))
341#define MC9328MXL_GPIOB_ICONFB1 (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x14)))
342#define MC9328MXL_GPIOB_ICONFB2 (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x18)))
343#define MC9328MXL_GPIOB_DR      (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x1c)))
344#define MC9328MXL_GPIOB_GIUS    (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x20)))
345#define MC9328MXL_GPIOB_SSR     (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x24)))
346#define MC9328MXL_GPIOB_ICR1    (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x28)))
347#define MC9328MXL_GPIOB_ICR2    (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x2c)))
348#define MC9328MXL_GPIOB_IMR     (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x30)))
349#define MC9328MXL_GPIOB_ISR     (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x34)))
350#define MC9328MXL_GPIOB_GPR     (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x38)))
351#define MC9328MXL_GPIOB_SWR     (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x3c)))
352#define MC9328MXL_GPIOB_PUEN    (*((volatile uint32_t *)((MC9328MXL_GPIOB_BASE) + 0x40)))
353
354#define MC9328MXL_GPIOC_DDIR    (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x00)))
355#define MC9328MXL_GPIOC_OCR1    (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x04)))
356#define MC9328MXL_GPIOC_OCR2    (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x08)))
357#define MC9328MXL_GPIOC_ICONFA1 (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x0c)))
358#define MC9328MXL_GPIOC_ICONFA2 (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x10)))
359#define MC9328MXL_GPIOC_ICONFB1 (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x14)))
360#define MC9328MXL_GPIOC_ICONFB2 (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x18)))
361#define MC9328MXL_GPIOC_DR      (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x1c)))
362#define MC9328MXL_GPIOC_GIUS    (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x20)))
363#define MC9328MXL_GPIOC_SSR     (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x24)))
364#define MC9328MXL_GPIOC_ICR1    (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x28)))
365#define MC9328MXL_GPIOC_ICR2    (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x2c)))
366#define MC9328MXL_GPIOC_IMR     (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x30)))
367#define MC9328MXL_GPIOC_ISR     (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x34)))
368#define MC9328MXL_GPIOC_GPR     (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x38)))
369#define MC9328MXL_GPIOC_SWR     (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x3c)))
370#define MC9328MXL_GPIOC_PUEN    (*((volatile uint32_t *)((MC9328MXL_GPIOC_BASE) + 0x40)))
371
372#define MC9328MXL_GPIOD_DDIR    (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x00)))
373#define MC9328MXL_GPIOD_OCR1    (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x04)))
374#define MC9328MXL_GPIOD_OCR2    (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x08)))
375#define MC9328MXL_GPIOD_ICONFA1 (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x0c)))
376#define MC9328MXL_GPIOD_ICONFA2 (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x10)))
377#define MC9328MXL_GPIOD_ICONFB1 (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x14)))
378#define MC9328MXL_GPIOD_ICONFB2 (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x18)))
379#define MC9328MXL_GPIOD_DR      (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x1c)))
380#define MC9328MXL_GPIOD_GIUS    (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x20)))
381#define MC9328MXL_GPIOD_SSR     (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x24)))
382#define MC9328MXL_GPIOD_ICR1    (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x28)))
383#define MC9328MXL_GPIOD_ICR2    (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x2c)))
384#define MC9328MXL_GPIOD_IMR     (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x30)))
385#define MC9328MXL_GPIOD_ISR     (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x34)))
386#define MC9328MXL_GPIOD_GPR     (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x38)))
387#define MC9328MXL_GPIOD_SWR     (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x3c)))
388#define MC9328MXL_GPIOD_PUEN    (*((volatile uint32_t *)((MC9328MXL_GPIOD_BASE) + 0x40)))
389
390#define MC9328MXL_AITC_INTCNTL    (*((volatile uint32_t *)((MC9328MXL_AITC_BASE) + 0x00)))
391#define MC9328MXL_AITC_NIMASK     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE) + 0x04)))
392#define MC9328MXL_AITC_INTENNUM   (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x08)))
393#define MC9328MXL_AITC_INTDISNUM  (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x0c)))
394#define MC9328MXL_AITC_INTENABLEH (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x10)))
395#define MC9328MXL_AITC_INTENABLEL (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x14)))
396#define MC9328MXL_AITC_INTTYPEH   (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x18)))
397#define MC9328MXL_AITC_INTTYPEL   (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x1c)))
398#define MC9328MXL_AITC_NIPIR7     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x20)))
399#define MC9328MXL_AITC_NIPRI6     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x24)))
400#define MC9328MXL_AITC_NIPRI5     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x28)))
401#define MC9328MXL_AITC_NIPRI4     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x2c)))
402#define MC9328MXL_AITC_NIPRI3     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x30)))
403#define MC9328MXL_AITC_NIPRI2     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x34)))
404#define MC9328MXL_AITC_NIPRI1     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x38)))
405#define MC9328MXL_AITC_NIPRI0     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x3c)))
406#define MC9328MXL_AITC_NIVECSR    (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x40)))
407#define MC9328MXL_AITC_FIVECSR    (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x44)))
408#define MC9328MXL_AITC_INTSRCH    (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x48)))
409#define MC9328MXL_AITC_INTSRCL    (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x4c)))
410#define MC9328MXL_AITC_INTFRCH    (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x50)))
411#define MC9328MXL_AITC_INTFRCL    (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x54)))
412#define MC9328MXL_AITC_NIPNDH     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x58)))
413#define MC9328MXL_AITC_NIPNDL     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x5c)))
414#define MC9328MXL_AITC_FIPNDH     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x60)))
415#define MC9328MXL_AITC_FIPNDL     (*((volatile uint32_t *)((MC9328MXL_AITC_BASE)+ 0x64)))
416
417#define MC9328MXL_INT_UART3_PFERR          (0)
418#define MC9328MXL_INT_UART3_RTS            (1)
419#define MC9328MXL_INT_UART3_DTR            (2)
420#define MC9328MXL_INT_UART3_UARTC          (3)
421#define MC9328MXL_INT_UART3_TX             (4)
422#define MC9328MXL_INT_PEN_UP               (5)
423#define MC9328MXL_INT_CSI                  (6)
424#define MC9328MXL_INT_MMA_MAC              (7)
425#define MC9328MXL_INT_MMA                  (8)
426#define MC9328MXL_INT_COMP                 (9)
427#define MC9328MXL_INT_MSIRQ                (10)
428#define MC9328MXL_INT_GPIO_PORTA           (11)
429#define MC9328MXL_INT_GPIO_PORTB           (12)
430#define MC9328MXL_INT_GPIO_PORTC           (13)
431#define MC9328MXL_INT_LCDC                 (14)
432#define MC9328MXL_INT_SIM_IRQ              (15)
433#define MC9328MXL_INT_SIM_DATA             (16)
434#define MC9328MXL_INT_RTC                  (17)
435#define MC9328MXL_INT_RTC_SAM              (18)
436#define MC9328MXL_INT_UART2_PFERR          (19)
437#define MC9328MXL_INT_UART2_RTS            (20)
438#define MC9328MXL_INT_UART2_DTR            (21)
439#define MC9328MXL_INT_UART2_UARTC          (22)
440#define MC9328MXL_INT_UART2_TX             (23)
441#define MC9328MXL_INT_UART2_RX             (24)
442#define MC9328MXL_INT_UART1_PFERR          (25)
443#define MC9328MXL_INT_UART1_RTS            (26)
444#define MC9328MXL_INT_UART1_DTR            (27)
445#define MC9328MXL_INT_UART1_UARTC          (28)
446#define MC9328MXL_INT_UART1_TX             (29)
447#define MC9328MXL_INT_UART1_RX             (30)
448#define MC9328MXL_INT_PEN_DATA             (33)
449#define MC9328MXL_INT_PWM                  (34)
450#define MC9328MXL_INT_MMC_IRQ              (35)
451#define MC9328MXL_INT_SSI2_TX              (36)
452#define MC9328MXL_INT_SSI2_RX              (37)
453#define MC9328MXL_INT_SSI2_ERR             (38)
454#define MC9328MXL_INT_I2C                  (39)
455#define MC9328MXL_INT_SPI2                 (40)
456#define MC9328MXL_INT_SPI1                 (41)
457#define MC9328MXL_INT_SSI_TX               (42)
458#define MC9328MXL_INT_SSI_TX_ERR           (43)
459#define MC9328MXL_INT_SSI_RX               (44)
460#define MC9328MXL_INT_SSI_RX_ERR           (45)
461#define MC9328MXL_INT_TOUCH                (46)
462#define MC9328MXL_INT_USBD0                (47)
463#define MC9328MXL_INT_USBD1                (48)
464#define MC9328MXL_INT_USBD2                (49)
465#define MC9328MXL_INT_USBD3                (50)
466#define MC9328MXL_INT_USBD4                (51)
467#define MC9328MXL_INT_USBD5                (52)
468#define MC9328MXL_INT_USBD6                (53)
469#define MC9328MXL_INT_UART3_RX             (54)
470#define MC9328MXL_INT_BTSYS                (55)
471#define MC9328MXL_INT_BTTIM                (56)
472#define MC9328MXL_INT_BTWUI                (57)
473#define MC9328MXL_INT_TIMER2               (58)
474#define MC9328MXL_INT_TIMER1               (59)
475#define MC9328MXL_INT_DMA_ERR              (60)
476#define MC9328MXL_INT_DMA                  (61)
477#define MC9328MXL_INT_GPIO_PORTD           (62)
478#define MC9328MXL_INT_WDT                  (63)
479
480#define MC9328MXL_AITC_INTCTL_NIAD    BIT(20)
481#define MC9328MXL_AITC_INTCTL_FIAD    BIT(19)
482#define MC9328MXL_AITC_NIMASK_MASK (0X1F)
483#define MC9328MXL_AITC_INTENNUM_MASK  (0X3F)
484#define MC9328MXL_AITC_INTDISNUM_MASK (0X3F)
485#define MC9328MXL_AITC_NIPRIORITY(_int_, _pri_) \
486           (((_pri_) & 0xf) << ((_int_) & 0x7) * 4)
487
488
489#endif /* __MC9328MXL_H__ */
Note: See TracBrowser for help on using the repository browser.