source: rtems/bsps/arm/csb336/include/mc9328mxl.h @ 2afb22b

5
Last change on this file since 2afb22b was 2afb22b, checked in by Chris Johns <chrisj@…>, on Dec 23, 2017 at 7:18:56 AM

Remove make preinstall

A speciality of the RTEMS build system was the make preinstall step. It
copied header files from arbitrary locations into the build tree. The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

  • The make preinstall step itself needs time and disk space.
  • Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error.
  • There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult.
  • The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit.
  • An introduction of a new build system is difficult.
  • Include paths specified by the -B option are system headers. This may suppress warnings.
  • The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step. All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

  • cpukit/include
  • cpukit/score/cpu/@RTEMS_CPU@/include
  • cpukit/libnetworking

The new BSP include directories are:

  • bsps/include
  • bsps/@RTEMS_CPU@/include
  • bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed. The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.

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