]> git.sur5r.net Git - freertos/blob - Demo/HCS12_GCC_banked/asm-m68hcs12/ports_def.h
Remove unused variable warning.
[freertos] / Demo / HCS12_GCC_banked / asm-m68hcs12 / ports_def.h
1 /*      IO DEFINITIONS AND MACROS FOR THE MCS912DG256B\r
2    09/19/03\r
3    EMAC.inc\r
4    Nathan Z. Gustavson ngustavson@emacinc.com\r
5    Emac.inc\r
6    May 2005; Modified by Jefferson Smith for general use in GEL\r
7  */\r
8 #ifndef _ARCH_IODG256B_H\r
9 #define _ARCH_IODG256B_H\r
10 \r
11 #define IO_BASE 0\r
12 /*macros\r
13 */\r
14 #define ienable() __asm("cli");\r
15 #define idisable() __asm("orcc #0x10")\r
16 #define xenable() __asm("andcc #0xbf")\r
17 #define xdisable()__asm("orcc #0x40")\r
18 \r
19 /* constant offsets to use where a C expression doesn't work\r
20 */\r
21 #define  M6811_PORTA     0x00\r
22 #define  M6811_PORTB     0x01\r
23 #define  M6811_PTT       0x240\r
24 #define  M6811_PTM       0x250\r
25 #define  M6811_PTP       0x258\r
26 #define  M6811_PTH       0x260\r
27 \r
28 #define PORTIO_8                *(volatile unsigned char *)\r
29 #define PORTIO_16               *(volatile unsigned short int *)\r
30 \r
31 /*      Core HC12 Registers\r
32  */\r
33 #define  PORTA     PORTIO_8(IO_BASE + 0x00)   /* port A */\r
34 #define  PORTB     PORTIO_8(IO_BASE + 0x01)   /* port B */\r
35 #define  DDRA      PORTIO_8(IO_BASE + 0x02)   /* data direction port A */\r
36 #define  DDRB      PORTIO_8(IO_BASE + 0x03)   /* data direction port B */\r
37 #define  PORTE     PORTIO_8(IO_BASE + 0x08)   /* port E */\r
38 #define  DDRE      PORTIO_8(IO_BASE + 0x09)   /* data direction port E */\r
39 #define  PEAR      PORTIO_8(IO_BASE + 0x0a)   /* port E assignment register */\r
40 #define  MODE      PORTIO_8(IO_BASE + 0x0b)   /* mode register */\r
41 #define  PUCR      PORTIO_8(IO_BASE + 0x0c)   /* pull-up control register */\r
42 #define  RDRIV     PORTIO_8(IO_BASE + 0x0d)   /* reduced drive of I/O lines */\r
43 #define  EBICTL    PORTIO_8(IO_BASE + 0x0e)   /* external bus control */\r
44 #define  INITRM    PORTIO_8(IO_BASE + 0x10)   /* RAM mapping register */\r
45 #define  INITRG    PORTIO_8(IO_BASE + 0x11)   /* IO mapping register */\r
46 #define  INITEE    PORTIO_8(IO_BASE + 0x12)   /* EEPROM mapping register */\r
47 #define  MISC      PORTIO_8(IO_BASE + 0x13)   /* mapping control register */\r
48 #define  MTST0     PORTIO_8(IO_BASE + 0x14)   /* mapping test register 0 */\r
49 #define  ITCR      PORTIO_8(IO_BASE + 0x15)   /* interrupt test control reg. */\r
50 #define  ITEST     PORTIO_8(IO_BASE + 0x16)   /* interrupt test register */\r
51 #define  MTST1     PORTIO_8(IO_BASE + 0x17)   /* mapping test register 1 */\r
52 #define  PARTID    PORTIO_16(IO_BASE + 0x1a)   /* part ID register */\r
53 #define  MEMSIZ0   PORTIO_8(IO_BASE + 0x1c)   /* memory size register 0 */\r
54 #define  MEMSIZ1   PORTIO_8(IO_BASE + 0x1d)   /* memory size register 1 */\r
55 #define  INTCR     PORTIO_8(IO_BASE + 0x1e)   /* interrupt control */\r
56 #define  HPRIO     PORTIO_8(IO_BASE + 0x1f)   /* highest priority */\r
57 \r
58 /*\r
59 bitflags\r
60 */\r
61 //PEAR\r
62 #define NOACCE 0x80\r
63 #define PIPOE  0x20\r
64 #define NECLK  0x10\r
65 #define LSTRE  0x08\r
66 #define RDWE   0x04\r
67 //INTCR bitflags\r
68 #define IRQE 0x80\r
69 #define IRQEN 0x40\r
70 #define DLY 0x20\r
71 \r
72 /*      BKP Module  \r
73  */\r
74 #define  BKPCT0    PORTIO_8(IO_BASE + 0x28)   /* Breakpoint Control 0 */\r
75 #define  BKPCT1    PORTIO_8(IO_BASE + 0x29)   /* Breakpoint Control 1 */\r
76 #define  BKP0X     PORTIO_8(IO_BASE + 0x2a)   /* Breakpoint 0 address upper */\r
77 #define  BKP0      PORTIO_16(IO_BASE + 0x2b)   /* Breakpoint 0 address */\r
78 #define  BKP1X     PORTIO_8(IO_BASE + 0x2d)   /* Breakpoint 1 address upper */\r
79 #define  BKP1      PORTIO_16(IO_BASE + 0x2e)   /* Breakpoint 1 address */\r
80 \r
81 /*      MEBI Module  \r
82  */\r
83 #define  PPAGE     PORTIO_8(IO_BASE + 0x30)   /* program page register */\r
84 #define  PORTK     PORTIO_8(IO_BASE + 0x32)   /* port K data register */\r
85 #define  DDRK      PORTIO_8(IO_BASE + 0x33)   /* port K data direction */\r
86 \r
87 /*      CRG Module  \r
88  */\r
89 #define  SYNR      PORTIO_8(IO_BASE + 0x34)   /* synthesizer register */\r
90 #define  REFDV     PORTIO_8(IO_BASE + 0x35)   /* reference divider register */\r
91 #define  CTFLG     PORTIO_8(IO_BASE + 0x36)   /* clock test flag register */\r
92 #define  CRGFLG    PORTIO_8(IO_BASE + 0x37)   /* clock generator flag register */\r
93 #define  CRGINT    PORTIO_8(IO_BASE + 0x38)   /* clock interrupt enable */\r
94 #define  CLKSEL    PORTIO_8(IO_BASE + 0x39)   /* clock select register */\r
95 #define  PLLCTL    PORTIO_8(IO_BASE + 0x3a)   /* PLL control register */\r
96 #define  RTICTL    PORTIO_8(IO_BASE + 0x3b)   /* clock real time control reg. */\r
97 #define  COPCTL    PORTIO_8(IO_BASE + 0x3c)   /* COP control register */\r
98 #define  FORBYP    PORTIO_8(IO_BASE + 0x3d)   /* clock force and bypass register */\r
99 #define  CTCTL     PORTIO_8(IO_BASE + 0x3e)   /* clock test control register */\r
100 #define  ARMCOP    PORTIO_8(IO_BASE + 0x3f)   /* COP arm/reset register with sequence 0x55,0xaa. */\r
101 \r
102 // CRG bitflags\r
103 #define RTIF   0x80\r
104 #define RTIE   0x80\r
105 #define LOCK   0x08\r
106 #define AUTO   0x20\r
107 #define PLLSEL 0x80\r
108 // COPCTL bitflags\r
109 #define WCOP   0x80\r
110 #define RSBCK  0x40\r
111 \r
112 /*      ECT Module\r
113  */\r
114 #define  TIOS      PORTIO_8(IO_BASE + 0x40)   /* timer select register */\r
115 #define  TCFORC    PORTIO_8(IO_BASE + 0x41)   /* compare force register */\r
116 #define  TOC7M     PORTIO_8(IO_BASE + 0x42)   /* oc7 mask register */\r
117 #define  TOC7D     PORTIO_8(IO_BASE + 0x43)   /* oc7 data register */\r
118 #define  TCNT      PORTIO_16(IO_BASE + 0x44)   /* timer counter */\r
119 #define  TSCR1     PORTIO_8(IO_BASE + 0x46)   /* system control register 1 */\r
120 #define  TTOV      PORTIO_8(IO_BASE + 0x47)   /* toggle on overflow register */\r
121 #define  TCTL1     PORTIO_8(IO_BASE + 0x48)   /* control register 1 */\r
122 #define  TCTL2     PORTIO_8(IO_BASE + 0x49)   /* control register 2 */\r
123 #define  TCTL3     PORTIO_8(IO_BASE + 0x4a)   /* control register 3 */\r
124 #define  TCTL4     PORTIO_8(IO_BASE + 0x4b)   /* control register 4 */\r
125 #define  TIE          PORTIO_8(IO_BASE + 0x4c)   /* interrupt enable register */\r
126 #define  TSCR2     PORTIO_8(IO_BASE + 0x4d)   /* system control register 2 */\r
127 #define  TFLG1     PORTIO_8(IO_BASE + 0x4e)   /* interrupt flag register 1 */\r
128 #define  TFLG2     PORTIO_8(IO_BASE + 0x4f)   /* interrupt flag register 2 */\r
129 #define  TC0       PORTIO_16(IO_BASE + 0x50)   /* capture/compare register 0 */\r
130 #define  TC1       PORTIO_16(IO_BASE + 0x52)   /* capture/compare register 0 */\r
131 #define  TC2       PORTIO_16(IO_BASE + 0x54)   /* capture/compare register 0 */\r
132 #define  TC3       PORTIO_16(IO_BASE + 0x56)   /* capture/compare register 0 */\r
133 #define  TC4       PORTIO_16(IO_BASE + 0x58)   /* capture/compare register 0 */\r
134 #define  TC5       PORTIO_16(IO_BASE + 0x5a)   /* capture/compare register 0 */\r
135 #define  TC6       PORTIO_16(IO_BASE + 0x5c)   /* capture/compare register 0 */\r
136 #define  TC7       PORTIO_16(IO_BASE + 0x5e)   /* capture/compare register 0 */\r
137 #define  PACTL     PORTIO_8(IO_BASE + 0x60)   /* pulse accumulator A control */\r
138 #define  PAFLG     PORTIO_8(IO_BASE + 0x61)   /* pulse accumulator A flag */\r
139 #define  PACN3     PORTIO_8(IO_BASE + 0x62)   /* pulse accumulator A3 count */\r
140 #define  PACN2     PORTIO_8(IO_BASE + 0x63)   /* pulse accumulator A2 count */\r
141 #define  PACN1     PORTIO_8(IO_BASE + 0x64)   /* pulse accumulator A1 count */\r
142 #define  PACN0     PORTIO_8(IO_BASE + 0x65)   /* pulse accumulator A0 count */\r
143 #define  MCCTL     PORTIO_8(IO_BASE + 0x66)   /* modulus counter control reg */\r
144 #define  MCFLG     PORTIO_8(IO_BASE + 0x67)   /* modulus counter flag reg */\r
145 #define  ICPAR     PORTIO_8(IO_BASE + 0x68)   /* input control pulse acc reg */\r
146 #define  DLYCT     PORTIO_8(IO_BASE + 0x69)   /* delay counter control reg */\r
147 #define  ICOVW     PORTIO_8(IO_BASE + 0x6a)   /* input control overwrite reg */\r
148 #define  ICSYS     PORTIO_8(IO_BASE + 0x6b)   /* input control system reg */\r
149 #define  TIMTST    PORTIO_8(IO_BASE + 0x6d)   /* timer test register */\r
150 #define  PBCTL     PORTIO_8(IO_BASE + 0x70)   /* pulse accumulator B control */\r
151 #define  PBFLG     PORTIO_8(IO_BASE + 0x71)   /* pulse accumulator B flag */\r
152 #define  PA3H      PORTIO_8(IO_BASE + 0x72)   /* pulse accumulator B3 count */\r
153 #define  PA2H      PORTIO_8(IO_BASE + 0x73)   /* pulse accumulator B2 count */\r
154 #define  PA1H      PORTIO_8(IO_BASE + 0x74)   /* pulse accumulator B1 count */\r
155 #define  PA0H      PORTIO_8(IO_BASE + 0x75)   /* pulse accumulator B0 count */\r
156 #define  MCCNT     PORTIO_16(IO_BASE + 0x76)   /* modulus counter count reg */\r
157 #define  TC0H      PORTIO_16(IO_BASE + 0x78)   /* timer input capture hold 0 */\r
158 #define  TC1H      PORTIO_16(IO_BASE + 0x7a)   /* timer input capture hold 1 */\r
159 #define  TC2H      PORTIO_16(IO_BASE + 0x7c)   /* timer input capture hold 2 */\r
160 #define  TC3H      PORTIO_16(IO_BASE + 0x7e)   /* timer input capture hold 3 */\r
161 \r
162 /*      ATD0 Module  \r
163  */\r
164 #define  ATD0_BASE (IO_BASE + 0x80)\r
165 #define  ATD0CTL0  PORTIO_8(IO_BASE + 0x80)   /* A/D0 control register 0 */\r
166 #define  ATD0CTL1  PORTIO_8(IO_BASE + 0x81)   /* A/D0 control register 1 */\r
167 #define  ATD0CTL2  PORTIO_8(IO_BASE + 0x82)   /* A/D0 control register 2 */\r
168 #define  ATD0CTL3  PORTIO_8(IO_BASE + 0x83)   /* A/D0 control register 3 */\r
169 #define  ATD0CTL4  PORTIO_8(IO_BASE + 0x84)   /* A/D0 control register 4 */\r
170 #define  ATD0CTL5  PORTIO_8(IO_BASE + 0x85)   /* A/D0 control register 5 */\r
171 #define  ATD0STAT0 PORTIO_8(IO_BASE + 0x86)   /* A/D0 status register 0 */\r
172 #define  ATD0STAT1 PORTIO_8(IO_BASE + 0x87)   /* A/D0 status register 1 */\r
173 #define  ATD0TEST0 PORTIO_8(IO_BASE + 0x88)   /* A/D0 test register 0 */\r
174 #define  ATD0TEST1 PORTIO_8(IO_BASE + 0x89)   /* A/D0 test register 1 */\r
175 #define  ATD0DIEN  PORTIO_8(IO_BASE + 0x8d)   /* A/D0 interrupt enable */\r
176 #define  PORTAD0   PORTIO_8(IO_BASE + 0x8f)   /* port AD0 data input register */\r
177 #define  ATD0DR0   PORTIO_16(IO_BASE + 0x90)   /* A/D0 result 0 */\r
178 #define  ATD0DR0H  PORTIO_8(IO_BASE + 0x90)    /* A/D0 result 0 */\r
179 #define  ATD0DR1   PORTIO_16(IO_BASE + 0x92)   /* A/D0 result 1 */\r
180 #define  ATD0DR1H  PORTIO_8(IO_BASE + 0x92)    /* A/D0 result 1 */\r
181 #define  ATD0DR2   PORTIO_16(IO_BASE + 0x94)   /* A/D0 result 2 */\r
182 #define  ATD0DR2H  PORTIO_8(IO_BASE + 0x94)    /* A/D0 result 2 */\r
183 #define  ATD0DR3   PORTIO_16(IO_BASE + 0x96)   /* A/D0 result 3 */\r
184 #define  ATD0DR3H  PORTIO_8(IO_BASE + 0x96)    /* A/D0 result 3 */\r
185 #define  ATD0DR4   PORTIO_16(IO_BASE + 0x98)   /* A/D0 result 4 */\r
186 #define  ATD0DR4H  PORTIO_8(IO_BASE + 0x98)    /* A/D0 result 4 */\r
187 #define  ATD0DR5   PORTIO_16(IO_BASE + 0x9a)   /* A/D0 result 5 */\r
188 #define  ATD0DR5H  PORTIO_8(IO_BASE + 0x9a)    /* A/D0 result 5 */\r
189 #define  ATD0DR6   PORTIO_16(IO_BASE + 0x9c)   /* A/D0 result 6 */\r
190 #define  ATD0DR6H  PORTIO_8(IO_BASE + 0x9c)    /* A/D0 result 6 */\r
191 #define  ATD0DR7   PORTIO_16(IO_BASE + 0x9e)   /* A/D0 result 7 */\r
192 #define  ATD0DR7H  PORTIO_8(IO_BASE + 0x9e)    /* A/D0 result 7 */\r
193 \r
194 //ATDnCTL5 bitflags\r
195 #define DJM  0x80\r
196 #define DSGN 0x40\r
197 #define SCAN 0x20\r
198 #define MULT 0x10\r
199 //ATDnSTAT0 bitflags\r
200 #define SCF   0x80\r
201 #define ETORF 0x20\r
202 #define FIFOR 0x10\r
203 \r
204 /*      PWM Module  \r
205  */\r
206 #define  PWME      PORTIO_8(IO_BASE + 0xa0)   /* PWM Enable */\r
207 #define  PWMPOL    PORTIO_8(IO_BASE + 0xa1)   /* PWM Clock Polarity */\r
208 #define  PWMCLK    PORTIO_8(IO_BASE + 0xa2)   /* PWM Clocks */\r
209 #define  PWMPRCLK  PORTIO_8(IO_BASE + 0xa3)   /* PWM prescale clock select */\r
210 #define  PWMCAE    PORTIO_8(IO_BASE + 0xa4)   /* PWM center align enable */\r
211 #define  PWMCTL    PORTIO_8(IO_BASE + 0xa5)   /* PWM Control Register */\r
212 #define  PWMTST    PORTIO_8(IO_BASE + 0xa6)   /* PWM Test Register */\r
213 #define  PWMPRSC   PORTIO_8(IO_BASE + 0xa7)   /* PWM Test Register */\r
214 #define  PWMSCLA   PORTIO_8(IO_BASE + 0xa8)   /* PWM scale A */\r
215 #define  PWMSCLB   PORTIO_8(IO_BASE + 0xa9)   /* PWM scale B */\r
216 #define  PWMSCNTA  PORTIO_8(IO_BASE + 0xaa)   /* PWM Test Register A */\r
217 #define  PWMSCNTB  PORTIO_8(IO_BASE + 0xab)   /* PWM Test Register B */\r
218 #define  PWMCNT0   PORTIO_8(IO_BASE + 0xac)   /* PWM Channel Counter 0 */\r
219 #define  PWMCNT1   PORTIO_8(IO_BASE + 0xad)   /* PWM Channel Counter 1 */\r
220 #define  PWMCNT2   PORTIO_8(IO_BASE + 0xae)   /* PWM Channel Counter 2 */\r
221 #define  PWMCNT3   PORTIO_8(IO_BASE + 0xaf)   /* PWM Channel Counter 3 */\r
222 #define  PWMCNT4   PORTIO_8(IO_BASE + 0xb0)   /* PWM Channel Counter 4 */\r
223 #define  PWMCNT5   PORTIO_8(IO_BASE + 0xb1)   /* PWM Channel Counter 5 */\r
224 #define  PWMCNT6   PORTIO_8(IO_BASE + 0xb2)   /* PWM Channel Counter 6 */\r
225 #define  PWMCNT7   PORTIO_8(IO_BASE + 0xb3)   /* PWM Channel Counter 7 */\r
226 #define  PWMPER0   PORTIO_8(IO_BASE + 0xb4)   /* PWM Channel Period 0 */\r
227 #define  PWMPER1   PORTIO_8(IO_BASE + 0xb5)   /* PWM Channel Period 1 */\r
228 #define  PWMPER2   PORTIO_8(IO_BASE + 0xb6)   /* PWM Channel Period 2 */\r
229 #define  PWMPER3   PORTIO_8(IO_BASE + 0xb7)   /* PWM Channel Period 3 */\r
230 #define  PWMPER4   PORTIO_8(IO_BASE + 0xb8)   /* PWM Channel Period 4 */\r
231 #define  PWMPER5   PORTIO_8(IO_BASE + 0xb9)   /* PWM Channel Period 5 */\r
232 #define  PWMPER6   PORTIO_8(IO_BASE + 0xba)   /* PWM Channel Period 6 */\r
233 #define  PWMPER7   PORTIO_8(IO_BASE + 0xbb)   /* PWM Channel Period 7 */\r
234 #define  PWMDTY0   PORTIO_8(IO_BASE + 0xbc)   /* PWM Channel Duty 0 */\r
235 #define  PWMDTY1   PORTIO_8(IO_BASE + 0xbd)   /* PWM Channel Duty 1 */\r
236 #define  PWMDTY2   PORTIO_8(IO_BASE + 0xbe)   /* PWM Channel Duty 2 */\r
237 #define  PWMDTY3   PORTIO_8(IO_BASE + 0xbf)   /* PWM Channel Duty 3 */\r
238 #define  PWMDTY4   PORTIO_8(IO_BASE + 0xc0)   /* PWM Channel Duty 4 */\r
239 #define  PWMDTY5   PORTIO_8(IO_BASE + 0xc1)   /* PWM Channel Duty 5 */\r
240 #define  PWMDTY6   PORTIO_8(IO_BASE + 0xc2)   /* PWM Channel Duty 6 */\r
241 #define  PWMDTY7   PORTIO_8(IO_BASE + 0xc3)   /* PWM Channel Duty 7 */\r
242 #define  PWMSDN    PORTIO_8(IO_BASE + 0xc4)   /* PWM shutdown register */\r
243 \r
244 /*      SCI register offsets\r
245    jeffs: Use these to offset any standard SCI base\r
246  */\r
247 #define  _SCIBD    0x0   /* SCI baud rate high */\r
248 #define  _SCIBDH   0x0   /* SCI baud rate high */\r
249 #define  _SCIBDL   0x1   /* SCI baud rate low */\r
250 #define  _SCICR1   0x2   /* SCI control register 1 */\r
251 #define  _SCICR2   0x3   /* SCI control register 2 */\r
252 #define  _SCISR1   0x4   /* SCI status register 1 */\r
253 #define  _SCISR2   0x5   /* SCI status register 2 */\r
254 #define  _SCIDRH   0x6   /* SCI data register high */\r
255 #define  _SCIDRL   0x7   /* SCI data register low */\r
256 \r
257 /*      SCI0 Module  \r
258    jeffs: Use symbols like SCI0_BASE to reference which SCI block\r
259  */\r
260 #define  SCI0_BASE (IO_BASE + 0xc8)\r
261 #define  SCI0BD    PORTIO_16(IO_BASE + 0xc8)   /* SCI 0 baud rate high */\r
262 #define  SCI0BDH   PORTIO_8(IO_BASE + 0xc8)   /* SCI 0 baud rate high */\r
263 #define  SCI0BDL   PORTIO_8(IO_BASE + 0xc9)   /* SCI 0 baud rate low */\r
264 #define  SCI0CR1   PORTIO_8(IO_BASE + 0xca)   /* SCI 0 control register 1 */\r
265 #define  SCI0CR2   PORTIO_8(IO_BASE + 0xcb)   /* SCI 0 control register 2 */\r
266 #define  SCI0SR1   PORTIO_8(IO_BASE + 0xcc)   /* SCI 0 status register 1 */\r
267 #define  SCI0SR2   PORTIO_8(IO_BASE + 0xcd)   /* SCI 0 status register 2 */\r
268 #define  SCI0DRH   PORTIO_8(IO_BASE + 0xce)   /* SCI 0 data register high */\r
269 #define  SCI0DRL   PORTIO_8(IO_BASE + 0xcf)   /* SCI 0 data register low */\r
270 \r
271 /*      SCI1 Module  \r
272  */\r
273 #define  SCI1_BASE (IO_BASE + 0xd0)\r
274 #define  SCI1BD    PORTIO_16(IO_BASE + 0xd0)   /* SCI 1 16bit baud rate */\r
275 #define  SCI1BDH   PORTIO_8(IO_BASE + 0xd0)   /* SCI 1 baud rate high */\r
276 #define  SCI1BDL   PORTIO_8(IO_BASE + 0xd1)   /* SCI 1 baud rate low */\r
277 #define  SCI1CR1   PORTIO_8(IO_BASE + 0xd2)   /* SCI 1 control register 1 */\r
278 #define  SCI1CR2   PORTIO_8(IO_BASE + 0xd3)   /* SCI 1 control register 2 */\r
279 #define  SCI1SR1   PORTIO_8(IO_BASE + 0xd4)   /* SCI 1 status register 1 */\r
280 #define  SCI1SR2   PORTIO_8(IO_BASE + 0xd5)   /* SCI 1 status register 2 */\r
281 #define  SCI1DRH   PORTIO_8(IO_BASE + 0xd6)   /* SCI 1 data register high */\r
282 #define  SCI1DRL   PORTIO_8(IO_BASE + 0xd7)   /* SCI 1 data register low */\r
283 \r
284 //SCInSR1\r
285 #define TDRE 0x80\r
286 #define RDRF 0x20\r
287 #define IDLE 0x10\r
288 \r
289 /*      SPI register offsets\r
290  */     \r
291 #define  _SPICR1   PORTIO_8(IO_BASE + 0x0)   /* SPI control register 1 */\r
292 #define  _SPICR2   PORTIO_8(IO_BASE + 0x1)   /* SPI control register 2 */\r
293 #define  _SPIBR    PORTIO_8(IO_BASE + 0x2)   /* SPI baud rate register */\r
294 #define  _SPISR    PORTIO_8(IO_BASE + 0x3)   /* SPI status register */\r
295 #define  _SPIDR    PORTIO_8(IO_BASE + 0x5)   /* SPI data register */\r
296 \r
297 /*      SPI0 Module  \r
298  */     \r
299 #define  SPI0_BASE (IO_BASE + 0xd8)\r
300 #define  SPI0CR1   PORTIO_8(IO_BASE + 0xd8)   /* SPI 0 control register 1 */\r
301 #define  SPI0CR2   PORTIO_8(IO_BASE + 0xd9)   /* SPI 0 control register 2 */\r
302 #define  SPI0BR    PORTIO_8(IO_BASE + 0xda)   /* SPI 0 baud rate register */\r
303 #define  SPI0SR    PORTIO_8(IO_BASE + 0xdb)   /* SPI 0 status register */\r
304 #define  SPI0DR    PORTIO_8(IO_BASE + 0xdd)   /* SPI 0 data register */\r
305 \r
306 //SPInCR1\r
307 #define SPIE  0x80\r
308 #define SPE   0x40\r
309 #define SPTIE 0x20\r
310 #define MSTR  0x10\r
311 #define CPOL  0x08\r
312 #define CPHA  0x04\r
313 #define SSOE  0x02\r
314 #define LSBFE 0x01\r
315 \r
316 //SPInSR\r
317 #define SPIF  0x80\r
318 #define SPTEF 0x20\r
319 #define MODF  0x10\r
320 \r
321 /*      I2C Module  \r
322  */\r
323 #define  IBAD      PORTIO_8(IO_BASE + 0xe0)   /* I2C address register */\r
324 #define  IBFD      PORTIO_8(IO_BASE + 0xe1)   /* I2C freqency divider reg */\r
325 #define  IBCR      PORTIO_8(IO_BASE + 0xe2)   /* I2C control register */\r
326 #define  IBSR      PORTIO_8(IO_BASE + 0xe3)   /* I2C status register */\r
327 #define  IBDR      PORTIO_8(IO_BASE + 0xe4)   /* I2C data register */\r
328 \r
329 //IBSR\r
330 #define TCF  0x80\r
331 #define IAAS 0x40\r
332 #define IBB  0x20\r
333 #define IBAL 0x10\r
334 #define SRW  0x04\r
335 #define IBIF 0x02\r
336 #define RXAK 0x01\r
337 \r
338 /*      BDLC Module  \r
339  */\r
340 #define  DLCBCR1   PORTIO_8(IO_BASE + 0xe8)   /* BDLC control register 1 */\r
341 #define  DLCBSVR   PORTIO_8(IO_BASE + 0xe9)   /* BDLC state vector register */\r
342 #define  DLCBCR2   PORTIO_8(IO_BASE + 0xea)   /* BDLC control register 2 */\r
343 #define  DLCBDR    PORTIO_8(IO_BASE + 0xeb)   /* BDLC data register */\r
344 #define  DLCBARD   PORTIO_8(IO_BASE + 0xec)   /* BDLC analog round trip delay */\r
345 #define  DLCBRSR   PORTIO_8(IO_BASE + 0xed)   /* BDLC rate select register */\r
346 #define  DLCSCR    PORTIO_8(IO_BASE + 0xee)   /* BDLC control register */\r
347 #define  DLCBSTAT  PORTIO_8(IO_BASE + 0xef)   /* BDLC status register */\r
348 \r
349 /*      SPI1 Module  \r
350  */     \r
351 #define  SPI1_BASE (IO_BASE + 0xf0)\r
352 #define  SPI1CR1   PORTIO_8(IO_BASE + 0xf0)   /* SPI 1 control register 1 */\r
353 #define  SPI1CR2   PORTIO_8(IO_BASE + 0xf1)   /* SPI 1 control register 2 */\r
354 #define  SPI1BR    PORTIO_8(IO_BASE + 0xf2)   /* SPI 1 baud rate register */\r
355 #define  SPI1SR    PORTIO_8(IO_BASE + 0xf3)   /* SPI 1 status register */\r
356 #define  SPI1DR    PORTIO_8(IO_BASE + 0xf5)   /* SPI 1 data register */\r
357 \r
358 /*      SPI2 Module  \r
359  */\r
360 #define  SPI2_BASE (IO_BASE + 0xf8)\r
361 #define  SPI2CR1   PORTIO_8(IO_BASE + 0xf8)   /* SPI 2 control register 1 */\r
362 #define  SPI2CR2   PORTIO_8(IO_BASE + 0xf9)   /* SPI 2 control register 2 */\r
363 #define  SPI2BR    PORTIO_8(IO_BASE + 0xfa)   /* SPI 2 baud rate register */\r
364 #define  SPI2SR    PORTIO_8(IO_BASE + 0xfb)   /* SPI 2 status register */\r
365 #define  SPI2DR    PORTIO_8(IO_BASE + 0xfd)   /* SPI 2 data register */\r
366 \r
367 /*      FLC Module\r
368  */\r
369 #define  FCLKDIV      PORTIO_8(IO_BASE + 0x100) /* flash clock divider */\r
370 #define  FSEC         PORTIO_8(IO_BASE + 0x101) /* flash security register */\r
371 #define  FCNFG        PORTIO_8(IO_BASE + 0x103) /* flash configuration register */\r
372 #define  FPROT        PORTIO_8(IO_BASE + 0x104) /* flash protection register */\r
373 #define  FSTAT        PORTIO_8(IO_BASE + 0x105) /* flash status register */\r
374 #define  FCMD         PORTIO_8(IO_BASE + 0x106) /* flash command register */\r
375 \r
376 /*      EEPROM Module\r
377  */\r
378 #define  ECLKDIV      PORTIO_8(IO_BASE + 0x110) /* eeprom clock divider */\r
379 #define  ECNFG        PORTIO_8(IO_BASE + 0x113) /* eeprom configuration register */\r
380 #define  EPROT        PORTIO_8(IO_BASE + 0x114) /* eeprom protection register */\r
381 #define  ESTAT        PORTIO_8(IO_BASE + 0x115) /* eeprom status register */\r
382 #define  ECMD         PORTIO_8(IO_BASE + 0x116) /* eeprom command register */\r
383 \r
384 /*      ATD1 Module  \r
385  */\r
386 #define ATD1_BASE    (IO_BASE + 0x120)\r
387 #define ATD1CTL0     PORTIO_8(IO_BASE + 0x120)  /* A/D1 control register 0 */\r
388 #define  ATD1CTL1     PORTIO_8(IO_BASE + 0x121) /* A/D1 control register 1 */\r
389 #define  ATD1CTL2     PORTIO_8(IO_BASE + 0x122) /* A/D1 control register 2 */\r
390 #define  ATD1CTL3     PORTIO_8(IO_BASE + 0x123) /* A/D1 control register 3 */\r
391 #define  ATD1CTL4     PORTIO_8(IO_BASE + 0x124) /* A/D1 control register 4 */\r
392 #define  ATD1CTL5     PORTIO_8(IO_BASE + 0x125) /* A/D1 control register 5 */\r
393 #define  ATD1STAT0    PORTIO_8(IO_BASE + 0x126) /* A/D1 status register 0 */\r
394 #define  ATD1STAT1    PORTIO_8(IO_BASE + 0x127) /* A/D1 status register 1 */\r
395 #define  ATD1TEST0    PORTIO_8(IO_BASE + 0x128) /* A/D1 test register 0 */\r
396 #define  ATD1TEST1    PORTIO_8(IO_BASE + 0x129) /* A/D1 test register 1 */\r
397 #define  ATD1DIEN     PORTIO_8(IO_BASE + 0x12d) /* A/D1 interrupt enable */\r
398 #define  PORTAD1      PORTIO_8(IO_BASE + 0x12f) /* port AD1 data input register */\r
399 #define  ATD1DR0      PORTIO_16(IO_BASE + 0x130)        /* A/D1 result 0 */\r
400 #define  ATD1DR0H     PORTIO_8(IO_BASE + 0x130)         /* A/D1 result 0 */\r
401 #define  ATD1DR1      PORTIO_16(IO_BASE + 0x132)        /* A/D1 result 1 */\r
402 #define  ATD1DR1H     PORTIO_8(IO_BASE + 0x132)         /* A/D1 result 1 */\r
403 #define  ATD1DR2      PORTIO_16(IO_BASE + 0x134)        /* A/D1 result 2 */\r
404 #define  ATD1DR2H     PORTIO_8(IO_BASE + 0x134)         /* A/D1 result 2 */\r
405 #define  ATD1DR3      PORTIO_16(IO_BASE + 0x136)        /* A/D1 result 3 */\r
406 #define  ATD1DR3H     PORTIO_8(IO_BASE + 0x136)         /* A/D1 result 3 */\r
407 #define  ATD1DR4      PORTIO_16(IO_BASE + 0x138)        /* A/D1 result 4 */\r
408 #define  ATD1DR4H     PORTIO_8(IO_BASE + 0x138)         /* A/D1 result 4 */\r
409 #define  ATD1DR5      PORTIO_16(IO_BASE + 0x13a)        /* A/D1 result 5 */\r
410 #define  ATD1DR5H     PORTIO_8(IO_BASE + 0x13a)         /* A/D1 result 5 */\r
411 #define  ATD1DR6      PORTIO_16(IO_BASE + 0x13c)        /* A/D1 result 6 */\r
412 #define  ATD1DR6H     PORTIO_8(IO_BASE + 0x13c)         /* A/D1 result 6 */\r
413 #define  ATD1DR7      PORTIO_16(IO_BASE + 0x13e)        /* A/D1 result 7 */\r
414 #define  ATD1DR7H     PORTIO_8(IO_BASE + 0x13e)         /* A/D1 result 7 */\r
415 \r
416 /*      CAN0 Module  \r
417  */\r
418 #define  CAN0_BASE    (IO_BASE + 0x140)\r
419 #define  CAN0CTL0     PORTIO_8(IO_BASE + 0x140) /* CAN0 control register 0 */\r
420 #define  CAN0CTL1     PORTIO_8(IO_BASE + 0x141) /* CAN0 control register 1 */\r
421 #define  CAN0BTR0     PORTIO_8(IO_BASE + 0x142) /* CAN0 bus timing register 0 */\r
422 #define  CAN0BTR1     PORTIO_8(IO_BASE + 0x143) /* CAN0 bus timing register 1 */\r
423 #define  CAN0RFLG     PORTIO_8(IO_BASE + 0x144) /* CAN0 receiver flag register */\r
424 #define  CAN0RIER     PORTIO_8(IO_BASE + 0x145) /* CAN0 receiver interrupt reg */\r
425 #define  CAN0TFLG     PORTIO_8(IO_BASE + 0x146) /* CAN0 transmitter flag reg */\r
426 #define  CAN0TIER     PORTIO_8(IO_BASE + 0x147) /* CAN0 transmitter control reg */\r
427 #define  CAN0TARQ     PORTIO_8(IO_BASE + 0x148) /* CAN0 transmitter abort request */\r
428 #define  CAN0TAAK     PORTIO_8(IO_BASE + 0x149) /* CAN0 transmitter abort acknowledge */\r
429 #define  CAN0TBSEL    PORTIO_8(IO_BASE + 0x14a) /* CAN0 transmit buffer selection */\r
430 #define  CAN0IDAC     PORTIO_8(IO_BASE + 0x14b) /* CAN0 identifier acceptance */\r
431 #define  CAN0RXERR    PORTIO_8(IO_BASE + 0x14e) /* CAN0 receive error counter */\r
432 #define  CAN0TXERR    PORTIO_8(IO_BASE + 0x14f) /* CAN0 transmit error counter */\r
433 #define  CAN0IDAR0    PORTIO_8(IO_BASE + 0x150) /* CAN0 id acceptance reg 0 */\r
434 #define  CAN0IDAR1    PORTIO_8(IO_BASE + 0x151) /* CAN0 id acceptance reg 1 */\r
435 #define  CAN0IDAR2    PORTIO_8(IO_BASE + 0x152) /* CAN0 id acceptance reg 2 */\r
436 #define  CAN0IDAR3    PORTIO_8(IO_BASE + 0x153) /* CAN0 id acceptance reg 3 */\r
437 #define  CAN0IDMR0    PORTIO_8(IO_BASE + 0x154) /* CAN0 id mask register 0 */\r
438 #define  CAN0IDMR1    PORTIO_8(IO_BASE + 0x155) /* CAN0 id mask register 1 */\r
439 #define  CAN0IDMR2    PORTIO_8(IO_BASE + 0x156) /* CAN0 id mask register 2 */\r
440 #define  CAN0IDMR3    PORTIO_8(IO_BASE + 0x157) /* CAN0 id mask register 3 */\r
441 #define  CAN0IDAR4    PORTIO_8(IO_BASE + 0x158) /* CAN0 id acceptance reg 4 */\r
442 #define  CAN0IDAR5    PORTIO_8(IO_BASE + 0x159) /* CAN0 id acceptance reg 5 */\r
443 #define  CAN0IDAR6    PORTIO_8(IO_BASE + 0x15a) /* CAN0 id acceptance reg 6 */\r
444 #define  CAN0IDAR7    PORTIO_8(IO_BASE + 0x15b) /* CAN0 id acceptance reg 7 */\r
445 #define  CAN0IDMR4    PORTIO_8(IO_BASE + 0x15c) /* CAN0 id mask register 4 */\r
446 #define  CAN0IDMR5    PORTIO_8(IO_BASE + 0x15d) /* CAN0 id mask register 5 */\r
447 #define  CAN0IDMR6    PORTIO_8(IO_BASE + 0x15e) /* CAN0 id mask register 6 */\r
448 #define  CAN0IDMR7    PORTIO_8(IO_BASE + 0x15f) /* CAN0 id mask register 7 */\r
449 #define  CAN0RXFG     PORTIO_8(IO_BASE + 0x160) /* CAN0 receive buffer */\r
450 #define  CAN0TXFG     PORTIO_8(IO_BASE + 0x170) /* CAN0 transmit buffer */\r
451 \r
452 /*      CAN1 Module  \r
453  */\r
454 #define  CAN1_BASE    (IO_BASE + 0x180)\r
455 #define  CAN1CTL0     PORTIO_8(IO_BASE + 0x180) /* CAN1 control register 0 */\r
456 #define  CAN1CTL1     PORTIO_8(IO_BASE + 0x181) /* CAN1 control register 1 */\r
457 #define  CAN1BTR0     PORTIO_8(IO_BASE + 0x182) /* CAN1 bus timing register 0 */\r
458 #define  CAN1BTR1     PORTIO_8(IO_BASE + 0x183) /* CAN1 bus timing register 1 */\r
459 #define  CAN1RFLG     PORTIO_8(IO_BASE + 0x184) /* CAN1 receiver flag register */\r
460 #define  CAN1RIER     PORTIO_8(IO_BASE + 0x185) /* CAN1 receiver interrupt reg */\r
461 #define  CAN1TFLG     PORTIO_8(IO_BASE + 0x186) /* CAN1 transmitter flag reg */\r
462 #define  CAN1TIER     PORTIO_8(IO_BASE + 0x187) /* CAN1 transmitter control reg */\r
463 #define  CAN1TARQ     PORTIO_8(IO_BASE + 0x188) /* CAN1 transmitter abort request */\r
464 #define  CAN1TAAK     PORTIO_8(IO_BASE + 0x189) /* CAN1 transmitter abort acknowledge */\r
465 #define  CAN1TBSEL    PORTIO_8(IO_BASE + 0x18a) /* CAN1 transmit buffer selection */\r
466 #define  CAN1IDAC     PORTIO_8(IO_BASE + 0x18b) /* CAN1 identifier acceptance */\r
467 #define  CAN1RXERR    PORTIO_8(IO_BASE + 0x18e) /* CAN1 transmitter control reg */\r
468 #define  CAN1TXERR    PORTIO_8(IO_BASE + 0x18f) /* CAN1 transmit error counter */\r
469 #define  CAN1IDAR0    PORTIO_8(IO_BASE + 0x190) /* CAN1 id acceptance reg 0 */\r
470 #define  CAN1IDAR1    PORTIO_8(IO_BASE + 0x191) /* CAN1 id acceptance reg 1 */\r
471 #define  CAN1IDAR2    PORTIO_8(IO_BASE + 0x192) /* CAN1 id acceptance reg 2 */\r
472 #define  CAN1IDAR3    PORTIO_8(IO_BASE + 0x193) /* CAN1 id acceptance reg 3 */\r
473 #define  CAN1IDMR0    PORTIO_8(IO_BASE + 0x194) /* CAN1 id mask register 0 */\r
474 #define  CAN1IDMR1    PORTIO_8(IO_BASE + 0x195) /* CAN1 id mask register 1 */\r
475 #define  CAN1IDMR2    PORTIO_8(IO_BASE + 0x196) /* CAN1 id mask register 2 */\r
476 #define  CAN1IDMR3    PORTIO_8(IO_BASE + 0x197) /* CAN1 id mask register 3 */\r
477 #define  CAN1IDAR4    PORTIO_8(IO_BASE + 0x198) /* CAN1 id acceptance reg 4 */\r
478 #define  CAN1IDAR5    PORTIO_8(IO_BASE + 0x199) /* CAN1 id acceptance reg 5 */\r
479 #define  CAN1IDAR6    PORTIO_8(IO_BASE + 0x19a) /* CAN1 id acceptance reg 6 */\r
480 #define  CAN1IDAR7    PORTIO_8(IO_BASE + 0x19b) /* CAN1 id acceptance reg 7 */\r
481 #define  CAN1IDMR4    PORTIO_8(IO_BASE + 0x19c) /* CAN1 id mask register 4 */\r
482 #define  CAN1IDMR5    PORTIO_8(IO_BASE + 0x19d) /* CAN1 id mask register 5 */\r
483 #define  CAN1IDMR6    PORTIO_8(IO_BASE + 0x19e) /* CAN1 id mask register 6 */\r
484 #define  CAN1IDMR7    PORTIO_8(IO_BASE + 0x19f) /* CAN1 id mask register 7 */\r
485 #define  CAN1RXFG     PORTIO_8(IO_BASE + 0x1a0) /* CAN1 receive buffer */\r
486 #define  CAN1TXFG     PORTIO_8(IO_BASE + 0x1b0) /* CAN1 transmit buffer */\r
487 \r
488 /*      CAN2 Module  \r
489  */\r
490 #define  CAN2_BASE    (IO_BASE + 0x1c0)\r
491 #define  CAN2CTL0     PORTIO_8(IO_BASE + 0x1c0) /* CAN2 control register 0 */\r
492 #define  CAN2CTL1     PORTIO_8(IO_BASE + 0x1c1) /* CAN2 control register 1 */\r
493 #define  CAN2BTR0     PORTIO_8(IO_BASE + 0x1c2) /* CAN2 bus timing register 0 */\r
494 #define  CAN2BTR1     PORTIO_8(IO_BASE + 0x1c3) /* CAN2 bus timing register 1 */\r
495 #define  CAN2RFLG     PORTIO_8(IO_BASE + 0x1c4) /* CAN2 receiver flag register */\r
496 #define  CAN2RIER     PORTIO_8(IO_BASE + 0x1c5) /* CAN2 receiver interrupt reg */\r
497 #define  CAN2TFLG     PORTIO_8(IO_BASE + 0x1c6) /* CAN2 transmitter flag reg */\r
498 #define  CAN2TIER     PORTIO_8(IO_BASE + 0x1c7) /* CAN2 transmitter control reg */\r
499 #define  CAN2TARQ     PORTIO_8(IO_BASE + 0x1c8) /* CAN2 transmitter abort request */\r
500 #define  CAN2TAAK     PORTIO_8(IO_BASE + 0x1c9) /* CAN2 transmitter abort acknowledge */\r
501 #define  CAN2TBSEL    PORTIO_8(IO_BASE + 0x1ca) /* CAN2 transmit buffer selection */\r
502 #define  CAN2IDAC     PORTIO_8(IO_BASE + 0x1cb) /* CAN2 identifier acceptance */\r
503 #define  CAN2RXERR    PORTIO_8(IO_BASE + 0x1ce) /* CAN2 transmitter control reg */\r
504 #define  CAN2TXERR    PORTIO_8(IO_BASE + 0x1cf) /* CAN2 transmit error counter */\r
505 #define  CAN2IDAR0    PORTIO_8(IO_BASE + 0x1d0) /* CAN2 id acceptance reg 0 */\r
506 #define  CAN2IDAR1    PORTIO_8(IO_BASE + 0x1d1) /* CAN2 id acceptance reg 1 */\r
507 #define  CAN2IDAR2    PORTIO_8(IO_BASE + 0x1d2) /* CAN2 id acceptance reg 2 */\r
508 #define  CAN2IDAR3    PORTIO_8(IO_BASE + 0x1d3) /* CAN2 id acceptance reg 3 */\r
509 #define  CAN2IDMR0    PORTIO_8(IO_BASE + 0x1d4) /* CAN2 id mask register 0 */\r
510 #define  CAN2IDMR1    PORTIO_8(IO_BASE + 0x1d5) /* CAN2 id mask register 1 */\r
511 #define  CAN2IDMR2    PORTIO_8(IO_BASE + 0x1d6) /* CAN2 id mask register 2 */\r
512 #define  CAN2IDMR3    PORTIO_8(IO_BASE + 0x1d7) /* CAN2 id mask register 3 */\r
513 #define  CAN2IDAR4    PORTIO_8(IO_BASE + 0x1d8) /* CAN2 id acceptance reg 4 */\r
514 #define  CAN2IDAR5    PORTIO_8(IO_BASE + 0x1d9) /* CAN2 id acceptance reg 5 */\r
515 #define  CAN2IDAR6    PORTIO_8(IO_BASE + 0x1da) /* CAN2 id acceptance reg 6 */\r
516 #define  CAN2IDAR7    PORTIO_8(IO_BASE + 0x1db) /* CAN2 id acceptance reg 7 */\r
517 #define  CAN2IDMR4    PORTIO_8(IO_BASE + 0x1dc) /* CAN2 id mask register 4 */\r
518 #define  CAN2IDMR5    PORTIO_8(IO_BASE + 0x1dd) /* CAN2 id mask register 5 */\r
519 #define  CAN2IDMR6    PORTIO_8(IO_BASE + 0x1de) /* CAN2 id mask register 6 */\r
520 #define  CAN2IDMR7    PORTIO_8(IO_BASE + 0x1df) /* CAN2 id mask register 7 */\r
521 #define  CAN2RXFG     PORTIO_8(IO_BASE + 0x1e0) /* CAN2 receive buffer */\r
522 #define  CAN2TXFG     PORTIO_8(IO_BASE + 0x1f0) /* CAN2 transmit buffer */\r
523 \r
524 /*      CAN3 Module  \r
525  */\r
526 #define  CAN3_BASE    (IO_BASE + 0x200)\r
527 #define  CAN3CTL0     PORTIO_8(IO_BASE + 0x200) /* CAN3 control register 0 */\r
528 #define  CAN3CTL1     PORTIO_8(IO_BASE + 0x201) /* CAN3 control register 1 */\r
529 #define  CAN3BTR0     PORTIO_8(IO_BASE + 0x202) /* CAN3 bus timing register 0 */\r
530 #define  CAN3BTR1     PORTIO_8(IO_BASE + 0x203) /* CAN3 bus timing register 1 */\r
531 #define  CAN3RFLG     PORTIO_8(IO_BASE + 0x204) /* CAN3 receiver flag register */\r
532 #define  CAN3RIER     PORTIO_8(IO_BASE + 0x205) /* CAN3 receiver interrupt reg */\r
533 #define  CAN3TFLG     PORTIO_8(IO_BASE + 0x206) /* CAN3 transmitter flag reg */\r
534 #define  CAN3TIER     PORTIO_8(IO_BASE + 0x207) /* CAN3 transmitter control reg */\r
535 #define  CAN3TARQ     PORTIO_8(IO_BASE + 0x208) /* CAN3 transmitter abort request */\r
536 #define  CAN3TAAK     PORTIO_8(IO_BASE + 0x209) /* CAN3 transmitter abort acknowledge */\r
537 #define  CAN3TBSEL    PORTIO_8(IO_BASE + 0x20a) /* CAN3 transmit buffer selection */\r
538 #define  CAN3IDAC     PORTIO_8(IO_BASE + 0x20b) /* CAN3 identifier acceptance */\r
539 #define  CAN3RXERR    PORTIO_8(IO_BASE + 0x20e) /* CAN3 transmitter control reg */\r
540 #define  CAN3TXERR    PORTIO_8(IO_BASE + 0x20f) /* CAN3 transmit error counter */\r
541 #define  CAN3IDAR0    PORTIO_8(IO_BASE + 0x210) /* CAN3 id acceptance reg 0 */\r
542 #define  CAN3IDAR1    PORTIO_8(IO_BASE + 0x211) /* CAN3 id acceptance reg 1 */\r
543 #define  CAN3IDAR2    PORTIO_8(IO_BASE + 0x212) /* CAN3 id acceptance reg 2 */\r
544 #define  CAN3IDAR3    PORTIO_8(IO_BASE + 0x213) /* CAN3 id acceptance reg 3 */\r
545 #define  CAN3IDMR0    PORTIO_8(IO_BASE + 0x214) /* CAN3 id mask register 0 */\r
546 #define  CAN3IDMR1    PORTIO_8(IO_BASE + 0x215) /* CAN3 id mask register 1 */\r
547 #define  CAN3IDMR2    PORTIO_8(IO_BASE + 0x216) /* CAN3 id mask register 2 */\r
548 #define  CAN3IDMR3    PORTIO_8(IO_BASE + 0x217) /* CAN3 id mask register 3 */\r
549 #define  CAN3IDAR4    PORTIO_8(IO_BASE + 0x218) /* CAN3 id acceptance reg 4 */\r
550 #define  CAN3IDAR5    PORTIO_8(IO_BASE + 0x219) /* CAN3 id acceptance reg 5 */\r
551 #define  CAN3IDAR6    PORTIO_8(IO_BASE + 0x21a) /* CAN3 id acceptance reg 6 */\r
552 #define  CAN3IDAR7    PORTIO_8(IO_BASE + 0x21b) /* CAN3 id acceptance reg 7 */\r
553 #define  CAN3IDMR4    PORTIO_8(IO_BASE + 0x21c) /* CAN3 id mask register 4 */\r
554 #define  CAN3IDMR5    PORTIO_8(IO_BASE + 0x21d) /* CAN3 id mask register 5 */\r
555 #define  CAN3IDMR6    PORTIO_8(IO_BASE + 0x21e) /* CAN3 id mask register 6 */\r
556 #define  CAN3IDMR7    PORTIO_8(IO_BASE + 0x21f) /* CAN3 id mask register 7 */\r
557 #define  CAN3RXFG     PORTIO_8(IO_BASE + 0x220) /* CAN3 receive buffer */\r
558 #define  CAN3TXFG     PORTIO_8(IO_BASE + 0x230) /* CAN3 transmit buffer */\r
559 \r
560 /*      PIM\r
561  */\r
562 \r
563 /*Port T register offsets\r
564 */\r
565 #define  PTT          PORTIO_8(IO_BASE + 0x240) /* port T data register */\r
566 #define  PTIT         PORTIO_8(IO_BASE + 0x241) /* port T input register */\r
567 #define  DDRT         PORTIO_8(IO_BASE + 0x242) /* port T data direction */\r
568 #define  RDRT         PORTIO_8(IO_BASE + 0x243) /* port T reduce drive */\r
569 #define  PERT         PORTIO_8(IO_BASE + 0x244) /* port T pull enable */\r
570 #define  PPST         PORTIO_8(IO_BASE + 0x245) /* port T polarity select */\r
571 \r
572 /*Port S\r
573  */\r
574 #define  PTS          PORTIO_8(IO_BASE + 0x248) /* port S data register */\r
575 #define  PTIS         PORTIO_8(IO_BASE + 0x249) /* port S input register */\r
576 #define  DDRS         PORTIO_8(IO_BASE + 0x24a) /* port S data direction */\r
577 #define  RDRS         PORTIO_8(IO_BASE + 0x24b) /* port S reduce drive */\r
578 #define  PERS         PORTIO_8(IO_BASE + 0x24c) /* port S pull enable */\r
579 #define  PPSS         PORTIO_8(IO_BASE + 0x24d) /* port S polarity select */\r
580 #define  WOMS         PORTIO_8(IO_BASE + 0x24e) /* port S wired-or mode */\r
581 \r
582 /*      Port M\r
583  */\r
584 #define  PTM          PORTIO_8(IO_BASE + 0x250) /* port M data register */\r
585 #define  PTIM         PORTIO_8(IO_BASE + 0x251) /* port M input register */\r
586 #define  DDRM         PORTIO_8(IO_BASE + 0x252) /* port M data direction */\r
587 #define  RDRM         PORTIO_8(IO_BASE + 0x253) /* port M reduce drive */\r
588 #define  PERM         PORTIO_8(IO_BASE + 0x254) /* port M pull enable */\r
589 #define  PPSM         PORTIO_8(IO_BASE + 0x255) /* port M polarity select */\r
590 #define  WOMM         PORTIO_8(IO_BASE + 0x256) /* port M wired-or mode */\r
591 \r
592 /*      Port P\r
593  */\r
594 #define  PTP          PORTIO_8(IO_BASE + 0x258) /* port P data register */\r
595 #define  PTIP         PORTIO_8(IO_BASE + 0x259) /* port P input register */\r
596 #define  DDRP         PORTIO_8(IO_BASE + 0x25a) /* port P data direction */\r
597 #define  RDRP         PORTIO_8(IO_BASE + 0x25b) /* port P reduce drive */\r
598 #define  PERP         PORTIO_8(IO_BASE + 0x25c) /* port P pull enable */\r
599 #define  PPSP         PORTIO_8(IO_BASE + 0x25d) /* port P polarity select */\r
600 #define  PIEP         PORTIO_8(IO_BASE + 0x25e) /* port P interrupt enable */\r
601 #define  PIFP         PORTIO_8(IO_BASE + 0x25f) /* port P interrupt flag */\r
602 \r
603 /*      Port H\r
604  */\r
605 #define  PTH          PORTIO_8(IO_BASE + 0x260) /* port H data register */\r
606 #define  PTIH         PORTIO_8(IO_BASE + 0x261) /* port H input register */\r
607 #define  DDRH         PORTIO_8(IO_BASE + 0x262) /* port H data direction */\r
608 #define  RDRH         PORTIO_8(IO_BASE + 0x263) /* port H reduce drive */\r
609 #define  PERH         PORTIO_8(IO_BASE + 0x264) /* port H pull enable */\r
610 #define  PPSH         PORTIO_8(IO_BASE + 0x265) /* port H polarity select */\r
611 #define  PIEH         PORTIO_8(IO_BASE + 0x266) /* port H interrupt enable */\r
612 #define  PIFH         PORTIO_8(IO_BASE + 0x267) /* port H interrupt flag */\r
613 \r
614 /*      Port J\r
615  */\r
616 #define  PTJ          PORTIO_8(IO_BASE + 0x268) /* port J data register */\r
617 #define  PTIJ         PORTIO_8(IO_BASE + 0x269) /* port J input register */\r
618 #define  DDRJ         PORTIO_8(IO_BASE + 0x26a) /* port J data direction */\r
619 #define  RDRJ         PORTIO_8(IO_BASE + 0x26b) /* port J reduce drive */\r
620 #define  PERJ         PORTIO_8(IO_BASE + 0x26c) /* port J pull enable */\r
621 #define  PPSJ         PORTIO_8(IO_BASE + 0x26d) /* port J polarity select */\r
622 #define  PIEJ         PORTIO_8(IO_BASE + 0x26e) /* port J interrupt enable */\r
623 #define  PIFJ         PORTIO_8(IO_BASE + 0x26f) /* port J interrupt flag */\r
624 /*PIM end\r
625 */\r
626 \r
627 \r
628 /*      CAN4 Module  \r
629  */\r
630 #define  CAN4_BASE    (IO_BASE + 0x280)\r
631 #define  CAN4CTL0     PORTIO_8(IO_BASE + 0x280) /* CAN4 control register 0 */\r
632 #define  CAN4CTL1     PORTIO_8(IO_BASE + 0x281) /* CAN4 control register 1 */\r
633 #define  CAN4BTR0     PORTIO_8(IO_BASE + 0x282) /* CAN4 bus timing register 0 */\r
634 #define  CAN4BTR1     PORTIO_8(IO_BASE + 0x283) /* CAN4 bus timing register 1 */\r
635 #define  CAN4RFLG     PORTIO_8(IO_BASE + 0x284) /* CAN4 receiver flag register */\r
636 #define  CAN4RIER     PORTIO_8(IO_BASE + 0x285) /* CAN4 receiver interrupt reg */\r
637 #define  CAN4TFLG     PORTIO_8(IO_BASE + 0x286) /* CAN4 transmitter flag reg */\r
638 #define  CAN4TIER     PORTIO_8(IO_BASE + 0x287) /* CAN4 transmitter control reg */\r
639 #define  CAN4TARQ     PORTIO_8(IO_BASE + 0x288) /* CAN4 transmitter abort request */\r
640 #define  CAN4TAAK     PORTIO_8(IO_BASE + 0x289) /* CAN4 transmitter abort acknowledge */\r
641 #define  CAN4TBSEL    PORTIO_8(IO_BASE + 0x28a) /* CAN4 transmit buffer selection */\r
642 #define  CAN4IDAC     PORTIO_8(IO_BASE + 0x28b) /* CAN4 identifier acceptance */\r
643 #define  CAN4RXERR    PORTIO_8(IO_BASE + 0x28e) /* CAN4 transmitter control reg */\r
644 #define  CAN4TXERR    PORTIO_8(IO_BASE + 0x28f) /* CAN4 transmit error counter */\r
645 #define  CAN4IDAR0    PORTIO_8(IO_BASE + 0x290) /* CAN4 id acceptance reg 0 */\r
646 #define  CAN4IDAR1    PORTIO_8(IO_BASE + 0x291) /* CAN4 id acceptance reg 1 */\r
647 #define  CAN4IDAR2    PORTIO_8(IO_BASE + 0x292) /* CAN4 id acceptance reg 2 */\r
648 #define  CAN4IDAR3    PORTIO_8(IO_BASE + 0x293) /* CAN4 id acceptance reg 3 */\r
649 #define  CAN4IDMR0    PORTIO_8(IO_BASE + 0x294) /* CAN4 id mask register 0 */\r
650 #define  CAN4IDMR1    PORTIO_8(IO_BASE + 0x295) /* CAN4 id mask register 1 */\r
651 #define  CAN4IDMR2    PORTIO_8(IO_BASE + 0x296) /* CAN4 id mask register 2 */\r
652 #define  CAN4IDMR3    PORTIO_8(IO_BASE + 0x297) /* CAN4 id mask register 3 */\r
653 #define  CAN4IDAR4    PORTIO_8(IO_BASE + 0x298) /* CAN4 id acceptance reg 4 */\r
654 #define  CAN4IDAR5    PORTIO_8(IO_BASE + 0x299) /* CAN4 id acceptance reg 5 */\r
655 #define  CAN4IDAR6    PORTIO_8(IO_BASE + 0x29a) /* CAN4 id acceptance reg 6 */\r
656 #define  CAN4IDAR7    PORTIO_8(IO_BASE + 0x29b) /* CAN4 id acceptance reg 7 */\r
657 #define  CAN4IDMR4    PORTIO_8(IO_BASE + 0x29c) /* CAN4 id mask register 4 */\r
658 #define  CAN4IDMR5    PORTIO_8(IO_BASE + 0x29d) /* CAN4 id mask register 5 */\r
659 #define  CAN4IDMR6    PORTIO_8(IO_BASE + 0x29e) /* CAN4 id mask register 6 */\r
660 #define  CAN4IDMR7    PORTIO_8(IO_BASE + 0x29f) /* CAN4 id mask register 7 */\r
661 #define  CAN4RXFG     PORTIO_8(IO_BASE + 0x2a0) /* CAN4 receive buffer */\r
662 #define  CAN4TXFG     PORTIO_8(IO_BASE + 0x2b0) /* CAN4 transmit buffer */\r
663 \r
664 \r
665 #endif\r
666 \r