Go to the documentation of this file.
15 #define BYTE_REF(addr) (*((volatile unsigned char*)addr))
16 #define WORD_REF(addr) (*((volatile unsigned short*)addr))
17 #define LONG_REF(addr) (*((volatile unsigned long*)addr))
19 #define PUT_FIELD(field, val) (((val) << field##_SHIFT) & field##_MASK)
20 #define GET_FIELD(reg, field) (((reg) & field##_MASK) >> field##_SHIFT)
31 #define SCR_ADDR 0xfffff000
32 #define SCR BYTE_REF(SCR_ADDR)
34 #define SCR_WDTH8 0x01
37 #define SCR_BETEN 0x10
45 #define MRR_ADDR 0xfffff004
46 #define MRR LONG_REF(MRR_ADDR)
63 #define GRPBASEA_ADDR 0xfffff100
64 #define GRPBASEB_ADDR 0xfffff102
65 #define GRPBASEC_ADDR 0xfffff104
66 #define GRPBASED_ADDR 0xfffff106
68 #define GRPBASEA WORD_REF(GRPBASEA_ADDR)
69 #define GRPBASEB WORD_REF(GRPBASEB_ADDR)
70 #define GRPBASEC WORD_REF(GRPBASEC_ADDR)
71 #define GRPBASED WORD_REF(GRPBASED_ADDR)
73 #define GRPBASE_V 0x0001
74 #define GRPBASE_GBA_MASK 0xfff0
79 #define GRPMASKA_ADDR 0xfffff108
80 #define GRPMASKB_ADDR 0xfffff10a
81 #define GRPMASKC_ADDR 0xfffff10c
82 #define GRPMASKD_ADDR 0xfffff10e
84 #define GRPMASKA WORD_REF(GRPMASKA_ADDR)
85 #define GRPMASKB WORD_REF(GRPMASKB_ADDR)
86 #define GRPMASKC WORD_REF(GRPMASKC_ADDR)
87 #define GRPMASKD WORD_REF(GRPMASKD_ADDR)
89 #define GRMMASK_GMA_MASK 0xfffff0
94 #define CSA0_ADDR 0xfffff110
95 #define CSA1_ADDR 0xfffff114
96 #define CSA2_ADDR 0xfffff118
97 #define CSA3_ADDR 0xfffff11c
99 #define CSA0 LONG_REF(CSA0_ADDR)
100 #define CSA1 LONG_REF(CSA1_ADDR)
101 #define CSA2 LONG_REF(CSA2_ADDR)
102 #define CSA3 LONG_REF(CSA3_ADDR)
104 #define CSA_WAIT_MASK 0x00000007
105 #define CSA_WAIT_SHIFT 0
106 #define CSA_RO 0x00000008
107 #define CSA_AM_MASK 0x0000ff00
108 #define CSA_AM_SHIFT 8
109 #define CSA_BUSW 0x00010000
110 #define CSA_AC_MASK 0xff000000
111 #define CSA_AC_SHIFT 24
116 #define CSB0_ADDR 0xfffff120
117 #define CSB1_ADDR 0xfffff124
118 #define CSB2_ADDR 0xfffff128
119 #define CSB3_ADDR 0xfffff12c
121 #define CSB0 LONG_REF(CSB0_ADDR)
122 #define CSB1 LONG_REF(CSB1_ADDR)
123 #define CSB2 LONG_REF(CSB2_ADDR)
124 #define CSB3 LONG_REF(CSB3_ADDR)
126 #define CSB_WAIT_MASK 0x00000007
127 #define CSB_WAIT_SHIFT 0
128 #define CSB_RO 0x00000008
129 #define CSB_AM_MASK 0x0000ff00
130 #define CSB_AM_SHIFT 8
131 #define CSB_BUSW 0x00010000
132 #define CSB_AC_MASK 0xff000000
133 #define CSB_AC_SHIFT 24
138 #define CSC0_ADDR 0xfffff130
139 #define CSC1_ADDR 0xfffff134
140 #define CSC2_ADDR 0xfffff138
141 #define CSC3_ADDR 0xfffff13c
143 #define CSC0 LONG_REF(CSC0_ADDR)
144 #define CSC1 LONG_REF(CSC1_ADDR)
145 #define CSC2 LONG_REF(CSC2_ADDR)
146 #define CSC3 LONG_REF(CSC3_ADDR)
148 #define CSC_WAIT_MASK 0x00000007
149 #define CSC_WAIT_SHIFT 0
150 #define CSC_RO 0x00000008
151 #define CSC_AM_MASK 0x0000fff0
152 #define CSC_AM_SHIFT 4
153 #define CSC_BUSW 0x00010000
154 #define CSC_AC_MASK 0xfff00000
155 #define CSC_AC_SHIFT 20
160 #define CSD0_ADDR 0xfffff140
161 #define CSD1_ADDR 0xfffff144
162 #define CSD2_ADDR 0xfffff148
163 #define CSD3_ADDR 0xfffff14c
165 #define CSD0 LONG_REF(CSD0_ADDR)
166 #define CSD1 LONG_REF(CSD1_ADDR)
167 #define CSD2 LONG_REF(CSD2_ADDR)
168 #define CSD3 LONG_REF(CSD3_ADDR)
170 #define CSD_WAIT_MASK 0x00000007
171 #define CSD_WAIT_SHIFT 0
172 #define CSD_RO 0x00000008
173 #define CSD_AM_MASK 0x0000fff0
174 #define CSD_AM_SHIFT 4
175 #define CSD_BUSW 0x00010000
176 #define CSD_AC_MASK 0xfff00000
177 #define CSD_AC_SHIFT 20
188 #define PLLCR_ADDR 0xfffff200
189 #define PLLCR WORD_REF(PLLCR_ADDR)
191 #define PLLCR_DISPLL 0x0008
192 #define PLLCR_CLKEN 0x0010
193 #define PLLCR_SYSCLK_SEL_MASK 0x0700
194 #define PLLCR_SYSCLK_SEL_SHIFT 8
195 #define PLLCR_PIXCLK_SEL_MASK 0x3800
196 #define PLLCR_PIXCLK_SEL_SHIFT 11
199 #define PLLCR_LCDCLK_SEL_MASK PLLCR_PIXCLK_SEL_MASK
200 #define PLLCR_LCDCLK_SEL_SHIFT PLLCR_PIXCLK_SEL_SHIFT
205 #define PLLFSR_ADDR 0xfffff202
206 #define PLLFSR WORD_REF(PLLFSR_ADDR)
208 #define PLLFSR_PC_MASK 0x00ff
209 #define PLLFSR_PC_SHIFT 0
210 #define PLLFSR_QC_MASK 0x0f00
211 #define PLLFSR_QC_SHIFT 8
212 #define PLLFSR_PROT 0x4000
213 #define PLLFSR_CLK32 0x8000
218 #define PCTRL_ADDR 0xfffff207
219 #define PCTRL BYTE_REF(PCTRL_ADDR)
221 #define PCTRL_WIDTH_MASK 0x1f
222 #define PCTRL_WIDTH_SHIFT 0
223 #define PCTRL_STOP 0x40
224 #define PCTRL_PCEN 0x80
235 #define IVR_ADDR 0xfffff300
236 #define IVR BYTE_REF(IVR_ADDR)
238 #define IVR_VECTOR_MASK 0xF8
243 #define ICR_ADRR 0xfffff302
244 #define ICR WORD_REF(ICR_ADDR)
246 #define ICR_ET6 0x0100
247 #define ICR_ET3 0x0200
248 #define ICR_ET2 0x0400
249 #define ICR_ET1 0x0800
250 #define ICR_POL6 0x1000
251 #define ICR_POL3 0x2000
252 #define ICR_POL2 0x4000
253 #define ICR_POL1 0x8000
258 #define IMR_ADDR 0xfffff304
259 #define IMR LONG_REF(IMR_ADDR)
265 #define SPIM_IRQ_NUM 0
266 #define TMR2_IRQ_NUM 1
267 #define UART_IRQ_NUM 2
268 #define WDT_IRQ_NUM 3
269 #define RTC_IRQ_NUM 4
271 #define PWM_IRQ_NUM 7
272 #define INT0_IRQ_NUM 8
273 #define INT1_IRQ_NUM 9
274 #define INT2_IRQ_NUM 10
275 #define INT3_IRQ_NUM 11
276 #define INT4_IRQ_NUM 12
277 #define INT5_IRQ_NUM 13
278 #define INT6_IRQ_NUM 14
279 #define INT7_IRQ_NUM 15
280 #define IRQ1_IRQ_NUM 16
281 #define IRQ2_IRQ_NUM 17
282 #define IRQ3_IRQ_NUM 18
283 #define IRQ6_IRQ_NUM 19
284 #define PEN_IRQ_NUM 20
285 #define SPIS_IRQ_NUM 21
286 #define TMR1_IRQ_NUM 22
287 #define IRQ7_IRQ_NUM 23
290 #define SPI_IRQ_NUM SPIM_IRQ_NUM
291 #define TMR_IRQ_NUM TMR1_IRQ_NUM
296 #define IMR_MSPIM (1 << SPIM _IRQ_NUM)
297 #define IMR_MTMR2 (1 << TMR2_IRQ_NUM)
298 #define IMR_MUART (1 << UART_IRQ_NUM)
299 #define IMR_MWDT (1 << WDT_IRQ_NUM)
300 #define IMR_MRTC (1 << RTC_IRQ_NUM)
301 #define IMR_MKB (1 << KB_IRQ_NUM)
302 #define IMR_MPWM (1 << PWM_IRQ_NUM)
303 #define IMR_MINT0 (1 << INT0_IRQ_NUM)
304 #define IMR_MINT1 (1 << INT1_IRQ_NUM)
305 #define IMR_MINT2 (1 << INT2_IRQ_NUM)
306 #define IMR_MINT3 (1 << INT3_IRQ_NUM)
307 #define IMR_MINT4 (1 << INT4_IRQ_NUM)
308 #define IMR_MINT5 (1 << INT5_IRQ_NUM)
309 #define IMR_MINT6 (1 << INT6_IRQ_NUM)
310 #define IMR_MINT7 (1 << INT7_IRQ_NUM)
311 #define IMR_MIRQ1 (1 << IRQ1_IRQ_NUM)
312 #define IMR_MIRQ2 (1 << IRQ2_IRQ_NUM)
313 #define IMR_MIRQ3 (1 << IRQ3_IRQ_NUM)
314 #define IMR_MIRQ6 (1 << IRQ6_IRQ_NUM)
315 #define IMR_MPEN (1 << PEN_IRQ_NUM)
316 #define IMR_MSPIS (1 << SPIS_IRQ_NUM)
317 #define IMR_MTMR1 (1 << TMR1_IRQ_NUM)
318 #define IMR_MIRQ7 (1 << IRQ7_IRQ_NUM)
321 #define IMR_MSPI IMR_MSPIM
322 #define IMR_MTMR IMR_MTMR1
327 #define IWR_ADDR 0xfffff308
328 #define IWR LONG_REF(IWR_ADDR)
330 #define IWR_SPIM (1 << SPIM _IRQ_NUM)
331 #define IWR_TMR2 (1 << TMR2_IRQ_NUM)
332 #define IWR_UART (1 << UART_IRQ_NUM)
333 #define IWR_WDT (1 << WDT_IRQ_NUM)
334 #define IWR_RTC (1 << RTC_IRQ_NUM)
335 #define IWR_KB (1 << KB_IRQ_NUM)
336 #define IWR_PWM (1 << PWM_IRQ_NUM)
337 #define IWR_INT0 (1 << INT0_IRQ_NUM)
338 #define IWR_INT1 (1 << INT1_IRQ_NUM)
339 #define IWR_INT2 (1 << INT2_IRQ_NUM)
340 #define IWR_INT3 (1 << INT3_IRQ_NUM)
341 #define IWR_INT4 (1 << INT4_IRQ_NUM)
342 #define IWR_INT5 (1 << INT5_IRQ_NUM)
343 #define IWR_INT6 (1 << INT6_IRQ_NUM)
344 #define IWR_INT7 (1 << INT7_IRQ_NUM)
345 #define IWR_IRQ1 (1 << IRQ1_IRQ_NUM)
346 #define IWR_IRQ2 (1 << IRQ2_IRQ_NUM)
347 #define IWR_IRQ3 (1 << IRQ3_IRQ_NUM)
348 #define IWR_IRQ6 (1 << IRQ6_IRQ_NUM)
349 #define IWR_PEN (1 << PEN_IRQ_NUM)
350 #define IWR_SPIS (1 << SPIS_IRQ_NUM)
351 #define IWR_TMR1 (1 << TMR1_IRQ_NUM)
352 #define IWR_IRQ7 (1 << IRQ7_IRQ_NUM)
357 #define ISR_ADDR 0xfffff30c
358 #define ISR LONG_REF(ISR_ADDR)
360 #define ISR_SPIM (1 << SPIM _IRQ_NUM)
361 #define ISR_TMR2 (1 << TMR2_IRQ_NUM)
362 #define ISR_UART (1 << UART_IRQ_NUM)
363 #define ISR_WDT (1 << WDT_IRQ_NUM)
364 #define ISR_RTC (1 << RTC_IRQ_NUM)
365 #define ISR_KB (1 << KB_IRQ_NUM)
366 #define ISR_PWM (1 << PWM_IRQ_NUM)
367 #define ISR_INT0 (1 << INT0_IRQ_NUM)
368 #define ISR_INT1 (1 << INT1_IRQ_NUM)
369 #define ISR_INT2 (1 << INT2_IRQ_NUM)
370 #define ISR_INT3 (1 << INT3_IRQ_NUM)
371 #define ISR_INT4 (1 << INT4_IRQ_NUM)
372 #define ISR_INT5 (1 << INT5_IRQ_NUM)
373 #define ISR_INT6 (1 << INT6_IRQ_NUM)
374 #define ISR_INT7 (1 << INT7_IRQ_NUM)
375 #define ISR_IRQ1 (1 << IRQ1_IRQ_NUM)
376 #define ISR_IRQ2 (1 << IRQ2_IRQ_NUM)
377 #define ISR_IRQ3 (1 << IRQ3_IRQ_NUM)
378 #define ISR_IRQ6 (1 << IRQ6_IRQ_NUM)
379 #define ISR_PEN (1 << PEN_IRQ_NUM)
380 #define ISR_SPIS (1 << SPIS_IRQ_NUM)
381 #define ISR_TMR1 (1 << TMR1_IRQ_NUM)
382 #define ISR_IRQ7 (1 << IRQ7_IRQ_NUM)
385 #define ISR_SPI ISR_SPIM
386 #define ISR_TMR ISR_TMR1
391 #define IPR_ADDR 0xfffff310
392 #define IPR LONG_REF(IPR_ADDR)
394 #define IPR_SPIM (1 << SPIM _IRQ_NUM)
395 #define IPR_TMR2 (1 << TMR2_IRQ_NUM)
396 #define IPR_UART (1 << UART_IRQ_NUM)
397 #define IPR_WDT (1 << WDT_IRQ_NUM)
398 #define IPR_RTC (1 << RTC_IRQ_NUM)
399 #define IPR_KB (1 << KB_IRQ_NUM)
400 #define IPR_PWM (1 << PWM_IRQ_NUM)
401 #define IPR_INT0 (1 << INT0_IRQ_NUM)
402 #define IPR_INT1 (1 << INT1_IRQ_NUM)
403 #define IPR_INT2 (1 << INT2_IRQ_NUM)
404 #define IPR_INT3 (1 << INT3_IRQ_NUM)
405 #define IPR_INT4 (1 << INT4_IRQ_NUM)
406 #define IPR_INT5 (1 << INT5_IRQ_NUM)
407 #define IPR_INT6 (1 << INT6_IRQ_NUM)
408 #define IPR_INT7 (1 << INT7_IRQ_NUM)
409 #define IPR_IRQ1 (1 << IRQ1_IRQ_NUM)
410 #define IPR_IRQ2 (1 << IRQ2_IRQ_NUM)
411 #define IPR_IRQ3 (1 << IRQ3_IRQ_NUM)
412 #define IPR_IRQ6 (1 << IRQ6_IRQ_NUM)
413 #define IPR_PEN (1 << PEN_IRQ_NUM)
414 #define IPR_SPIS (1 << SPIS_IRQ_NUM)
415 #define IPR_TMR1 (1 << TMR1_IRQ_NUM)
416 #define IPR_IRQ7 (1 << IRQ7_IRQ_NUM)
419 #define IPR_SPI IPR_SPIM
420 #define IPR_TMR IPR_TMR1
431 #define PADIR_ADDR 0xfffff400
432 #define PADATA_ADDR 0xfffff401
433 #define PASEL_ADDR 0xfffff403
435 #define PADIR BYTE_REF(PADIR_ADDR)
436 #define PADATA BYTE_REF(PADATA_ADDR)
437 #define PASEL BYTE_REF(PASEL_ADDR)
439 #define PA(x) (1 << (x))
440 #define PA_A(x) PA((x) - 16)
454 #define PBDIR_ADDR 0xfffff408
455 #define PBDATA_ADDR 0xfffff409
456 #define PBSEL_ADDR 0xfffff40b
458 #define PBDIR BYTE_REF(PBDIR_ADDR)
459 #define PBDATA BYTE_REF(PBDATA_ADDR)
460 #define PBSEL BYTE_REF(PBSEL_ADDR)
462 #define PB(x) (1 << (x))
463 #define PB_D(x) PB(x)
477 #define PCDIR_ADDR 0xfffff410
478 #define PCDATA_ADDR 0xfffff411
479 #define PCSEL_ADDR 0xfffff413
481 #define PCDIR BYTE_REF(PCDIR_ADDR)
482 #define PCDATA BYTE_REF(PCDATA_ADDR)
483 #define PCSEL BYTE_REF(PCSEL_ADDR)
485 #define PC(x) (1 << (x))
488 #define PC_DTACK PC(5)
489 #define PC_IRQ7 PC(4)
492 #define PC_MOCLK PC(0)
497 #define PDDIR_ADDR 0xfffff418
498 #define PDDATA_ADDR 0xfffff419
499 #define PDPUEN_ADDR 0xfffff41a
500 #define PDPOL_ADDR 0xfffff41c
501 #define PDIRQEN_ADDR 0xfffff41d
502 #define PDIQEG_ADDR 0xfffff41f
504 #define PDDIR BYTE_REF(PDDIR_ADDR)
505 #define PDDATA BYTE_REF(PDDATA_ADDR)
506 #define PDPUEN BYTE_REF(PDPUEN_ADDR)
507 #define PDPOL BYTE_REF(PDPOL_ADDR)
508 #define PDIRQEN BYTE_REF(PDIRQEN_ADDR)
509 #define PDIQEG BYTE_REF(PDIQEG_ADDR)
511 #define PD(x) (1 << (x))
512 #define PD_KB(x) PD(x)
526 #define PEDIR_ADDR 0xfffff420
527 #define PEDATA_ADDR 0xfffff421
528 #define PEPUEN_ADDR 0xfffff422
529 #define PESEL_ADDR 0xfffff423
531 #define PEDIR BYTE_REF(PEDIR_ADDR)
532 #define PEDATA BYTE_REF(PEDATA_ADDR)
533 #define PEPUEN BYTE_REF(PEPUEN_ADDR)
534 #define PESEL BYTE_REF(PESEL_ADDR)
536 #define PE(x) (1 << (x))
538 #define PE_CSA1 PE(1)
539 #define PE_CSA2 PE(2)
540 #define PE_CSA3 PE(3)
541 #define PE_CSB0 PE(4)
542 #define PE_CSB1 PE(5)
543 #define PE_CSB2 PE(6)
544 #define PE_CSB3 PE(7)
549 #define PFDIR_ADDR 0xfffff428
550 #define PFDATA_ADDR 0xfffff429
551 #define PFPUEN_ADDR 0xfffff42a
552 #define PFSEL_ADDR 0xfffff42b
554 #define PFDIR BYTE_REF(PFDIR_ADDR)
555 #define PFDATA BYTE_REF(PFDATA_ADDR)
556 #define PFPUEN BYTE_REF(PFPUEN_ADDR)
557 #define PFSEL BYTE_REF(PFSEL_ADDR)
559 #define PF(x) (1 << (x))
560 #define PF_A(x) PF((x) - 24)
574 #define PGDIR_ADDR 0xfffff430
575 #define PGDATA_ADDR 0xfffff431
576 #define PGPUEN_ADDR 0xfffff432
577 #define PGSEL_ADDR 0xfffff433
579 #define PGDIR BYTE_REF(PGDIR_ADDR)
580 #define PGDATA BYTE_REF(PGDATA_ADDR)
581 #define PGPUEN BYTE_REF(PGPUEN_ADDR)
582 #define PGSEL BYTE_REF(PGSEL_ADDR)
584 #define PG(x) (1 << (x))
586 #define PG_UART_TXD PG(0)
587 #define PG_UART_RXD PG(1)
588 #define PG_PWMOUT PG(2)
589 #define PG_TOUT2 PG(3)
590 #define PG_TIN2 PG(4)
591 #define PG_TOUT1 PG(5)
592 #define PG_TIN1 PG(6)
593 #define PG_RTCOUT PG(7)
598 #define PJDIR_ADDR 0xfffff438
599 #define PJDATA_ADDR 0xfffff439
600 #define PJSEL_ADDR 0xfffff43b
602 #define PJDIR BYTE_REF(PJDIR_ADDR)
603 #define PJDATA BYTE_REF(PJDATA_ADDR)
604 #define PJSEL BYTE_REF(PJSEL_ADDR)
606 #define PJ(x) (1 << (x))
608 #define PJ_CSD3 PJ(7)
613 #define PKDIR_ADDR 0xfffff440
614 #define PKDATA_ADDR 0xfffff441
615 #define PKPUEN_ADDR 0xfffff442
616 #define PKSEL_ADDR 0xfffff443
618 #define PKDIR BYTE_REF(PKDIR_ADDR)
619 #define PKDATA BYTE_REF(PKDATA_ADDR)
620 #define PKPUEN BYTE_REF(PKPUEN_ADDR)
621 #define PKSEL BYTE_REF(PKSEL_ADDR)
623 #define PK(x) (1 << (x))
628 #define PMDIR_ADDR 0xfffff438
629 #define PMDATA_ADDR 0xfffff439
630 #define PMPUEN_ADDR 0xfffff43a
631 #define PMSEL_ADDR 0xfffff43b
633 #define PMDIR BYTE_REF(PMDIR_ADDR)
634 #define PMDATA BYTE_REF(PMDATA_ADDR)
635 #define PMPUEN BYTE_REF(PMPUEN_ADDR)
636 #define PMSEL BYTE_REF(PMSEL_ADDR)
638 #define PM(x) (1 << (x))
649 #define PWMC_ADDR 0xfffff500
650 #define PWMC WORD_REF(PWMC_ADDR)
652 #define PWMC_CLKSEL_MASK 0x0007
653 #define PWMC_CLKSEL_SHIFT 0
654 #define PWMC_PWMEN 0x0010
655 #define PMNC_POL 0x0020
656 #define PWMC_PIN 0x0080
657 #define PWMC_LOAD 0x0100
658 #define PWMC_IRQEN 0x4000
659 #define PWMC_CLKSRC 0x8000
662 #define PWMC_EN PWMC_PWMEN
667 #define PWMP_ADDR 0xfffff502
668 #define PWMP WORD_REF(PWMP_ADDR)
673 #define PWMW_ADDR 0xfffff504
674 #define PWMW WORD_REF(PWMW_ADDR)
679 #define PWMCNT_ADDR 0xfffff506
680 #define PWMCNT WORD_REF(PWMCNT_ADDR)
691 #define TCTL1_ADDR 0xfffff600
692 #define TCTL1 WORD_REF(TCTL1_ADDR)
693 #define TCTL2_ADDR 0xfffff60c
694 #define TCTL2 WORD_REF(TCTL2_ADDR)
696 #define TCTL_TEN 0x0001
697 #define TCTL_CLKSOURCE_MASK 0x000e
698 #define TCTL_CLKSOURCE_STOP 0x0000
699 #define TCTL_CLKSOURCE_SYSCLK 0x0002
700 #define TCTL_CLKSOURCE_SYSCLK_16 0x0004
701 #define TCTL_CLKSOURCE_TIN 0x0006
702 #define TCTL_CLKSOURCE_32KHZ 0x0008
703 #define TCTL_IRQEN 0x0010
704 #define TCTL_OM 0x0020
705 #define TCTL_CAP_MASK 0x00c0
706 #define TCTL_CAP_RE 0x0040
707 #define TCTL_CAP_FE 0x0080
708 #define TCTL_FRR 0x0010
711 #define TCTL_ADDR TCTL1_ADDR
717 #define TPRER1_ADDR 0xfffff602
718 #define TPRER1 WORD_REF(TPRER1_ADDR)
719 #define TPRER2_ADDR 0xfffff60e
720 #define TPRER2 WORD_REF(TPRER2_ADDR)
723 #define TPRER_ADDR TPRER1_ADDR
729 #define TCMP1_ADDR 0xfffff604
730 #define TCMP1 WORD_REF(TCMP1_ADDR)
731 #define TCMP2_ADDR 0xfffff610
732 #define TCMP2 WORD_REF(TCMP2_ADDR)
735 #define TCMP_ADDR TCMP1_ADDR
741 #define TCR1_ADDR 0xfffff606
742 #define TCR1 WORD_REF(TCR1_ADDR)
743 #define TCR2_ADDR 0xfffff612
744 #define TCR2 WORD_REF(TCR2_ADDR)
747 #define TCR_ADDR TCR1_ADDR
753 #define TCN1_ADDR 0xfffff608
754 #define TCN1 WORD_REF(TCN1_ADDR)
755 #define TCN2_ADDR 0xfffff614
756 #define TCN2 WORD_REF(TCN2_ADDR)
759 #define TCN_ADDR TCN1_ADDR
765 #define TSTAT1_ADDR 0xfffff60a
766 #define TSTAT1 WORD_REF(TSTAT1_ADDR)
767 #define TSTAT2_ADDR 0xfffff616
768 #define TSTAT2 WORD_REF(TSTAT2_ADDR)
770 #define TSTAT_COMP 0x0001
771 #define TSTAT_CAPT 0x0001
774 #define TSTAT_ADDR TSTAT1_ADDR
780 #define WRR_ADDR 0xfffff61a
781 #define WRR WORD_REF(WRR_ADDR)
786 #define WCN_ADDR 0xfffff61c
787 #define WCN WORD_REF(WCN_ADDR)
792 #define WCSR_ADDR 0xfffff618
793 #define WCSR WORD_REF(WCSR_ADDR)
795 #define WCSR_WDEN 0x0001
796 #define WCSR_FI 0x0002
797 #define WCSR_WRST 0x0004
808 #define SPISR_ADDR 0xfffff700
809 #define SPISR WORD_REF(SPISR_ADDR)
811 #define SPISR_DATA_ADDR 0xfffff701
812 #define SPISR_DATA BYTE_REF(SPISR_DATA_ADDR)
814 #define SPISR_DATA_MASK 0x00ff
815 #define SPISR_DATA_SHIFT 0
816 #define SPISR_SPISEN 0x0100
817 #define SPISR_POL 0x0200
818 #define SPISR_PHA 0x0400
819 #define SPISR_OVWR 0x0800
820 #define SPISR_DATARDY 0x1000
821 #define SPISR_ENPOL 0x2000
822 #define SPISR_IRQEN 0x4000
823 #define SPISR_SPISIRQ 0x8000
834 #define SPIMDATA_ADDR 0xfffff800
835 #define SPIMDATA WORD_REF(SPIMDATA_ADDR)
840 #define SPIMCONT_ADDR 0xfffff802
841 #define SPIMCONT WORD_REF(SPIMCONT_ADDR)
843 #define SPIMCONT_BIT_COUNT_MASK 0x000f
844 #define SPIMCONT_BIT_COUNT_SHIFT 0
845 #define SPIMCONT_POL 0x0010
846 #define SPIMCONT_PHA 0x0020
847 #define SPIMCONT_IRQEN 0x0040
848 #define SPIMCONT_SPIMIRQ 0x0080
849 #define SPIMCONT_XCH 0x0100
850 #define SPIMCONT_RSPIMEN 0x0200
851 #define SPIMCONT_DATA_RATE_MASK 0xe000
852 #define SPIMCONT_DATA_RATE_SHIFT 13
855 #define SPIMCONT_IRQ SPIMCONT_SPIMIRQ
856 #define SPIMCONT_ENABLE SPIMCONT_SPIMEN
866 #define USTCNT_ADDR 0xfffff900
867 #define USTCNT WORD_REF(USTCNT_ADDR)
869 #define USTCNT_TXAVAILEN 0x0001
870 #define USTCNT_TXHALFEN 0x0002
871 #define USTCNT_TXEMPTYEN 0x0004
872 #define USTCNT_RXREADYEN 0x0008
873 #define USTCNT_RXHALFEN 0x0010
874 #define USTCNT_RXFULLEN 0x0020
875 #define USTCNT_CTSDELTAEN 0x0040
876 #define USTCNT_GPIODELTAEN 0x0080
877 #define USTCNT_8_7 0x0100
878 #define USTCNT_STOP 0x0200
879 #define USTCNT_ODD_EVEN 0x0400
880 #define USTCNT_PARITYEN 0x0800
881 #define USTCNT_CLKMODE 0x1000
882 #define USTCNT_TXEN 0x2000
883 #define USTCNT_RXEN 0x4000
884 #define USTCNT_UARTEN 0x8000
887 #define USTCNT_TXAE USTCNT_TXAVAILEN
888 #define USTCNT_TXHE USTCNT_TXHALFEN
889 #define USTCNT_TXEE USTCNT_TXEMPTYEN
890 #define USTCNT_RXRE USTCNT_RXREADYEN
891 #define USTCNT_RXHE USTCNT_RXHALFEN
892 #define USTCNT_RXFE USTCNT_RXFULLEN
893 #define USTCNT_CTSD USTCNT_CTSDELTAEN
894 #define USTCNT_ODD USTCNT_ODD_EVEN
895 #define USTCNT_PEN USTCNT_PARITYEN
896 #define USTCNT_CLKM USTCNT_CLKMODE
897 #define USTCNT_UEN USTCNT_UARTEN
902 #define UBAUD_ADDR 0xfffff902
903 #define UBAUD WORD_REF(UBAUD_ADDR)
905 #define UBAUD_PRESCALER_MASK 0x003f
906 #define UBAUD_PRESCALER_SHIFT 0
907 #define UBAUD_DIVIDE_MASK 0x0700
908 #define UBAUD_DIVIDE_SHIFT 8
909 #define UBAUD_BAUD_SRC 0x0800
910 #define UBAUD_GPIOSRC 0x1000
911 #define UBAUD_GPIODIR 0x2000
912 #define UBAUD_GPIO 0x4000
913 #define UBAUD_GPIODELTA 0x8000
918 #define URX_ADDR 0xfffff904
919 #define URX WORD_REF(URX_ADDR)
921 #define URX_RXDATA_ADDR 0xfffff905
922 #define URX_RXDATA BYTE_REF(URX_RXDATA_ADDR)
924 #define URX_RXDATA_MASK 0x00ff
925 #define URX_RXDATA_SHIFT 0
926 #define URX_PARITY_ERROR 0x0100
927 #define URX_BREAK 0x0200
928 #define URX_FRAME_ERROR 0x0400
929 #define URX_OVRUN 0x0800
930 #define URX_DATA_READY 0x2000
931 #define URX_FIFO_HALF 0x4000
932 #define URX_FIFO_FULL 0x8000
937 #define UTX_ADDR 0xfffff906
938 #define UTX WORD_REF(UTX_ADDR)
940 #define UTX_TXDATA_ADDR 0xfffff907
941 #define UTX_TXDATA BYTE_REF(UTX_TXDATA_ADDR)
943 #define UTX_TXDATA_MASK 0x00ff
944 #define UTX_TXDATA_SHIFT 0
945 #define UTX_CTS_DELTA 0x0100
946 #define UTX_CTS_STATUS 0x0200
947 #define UTX_IGNORE_CTS 0x0800
948 #define UTX_SEND_BREAK 0x1000
949 #define UTX_TX_AVAIL 0x2000
950 #define UTX_FIFO_HALF 0x4000
951 #define UTX_FIFO_EMPTY 0x8000
954 #define UTX_CTS_STAT UTX_CTS_STATUS
955 #define UTX_NOCTS UTX_IGNORE_CTS
960 #define UMISC_ADDR 0xfffff908
961 #define UMISC WORD_REF(UMISC_ADDR)
963 #define UMISC_TX_POL 0x0004
964 #define UMISC_RX_POL 0x0008
965 #define UMISC_IRDA_LOOP 0x0010
966 #define UMISC_IRDA_EN 0x0020
967 #define UMISC_RTS 0x0040
968 #define UMISC_RTSCONT 0x0080
969 #define UMISC_LOOP 0x1000
970 #define UMISC_FORCE_PERR 0x2000
971 #define UMISC_CLKSRC 0x4000
975 typedef volatile struct {
979 volatile unsigned short int w;
986 volatile unsigned short int w;
988 volatile unsigned char status;
993 volatile unsigned short int pad1;
994 volatile unsigned short int pad2;
995 volatile unsigned short int pad3;
1008 #define LSSA_ADDR 0xfffffa00
1009 #define LSSA LONG_REF(LSSA_ADDR)
1011 #define LSSA_SSA_MASK 0xfffffffe
1016 #define LVPW_ADDR 0xfffffa05
1017 #define LVPW BYTE_REF(LVPW_ADDR)
1022 #define LXMAX_ADDR 0xfffffa08
1023 #define LXMAX WORD_REF(LXMAX_ADDR)
1025 #define LXMAX_XM_MASK 0x02ff
1030 #define LYMAX_ADDR 0xfffffa0a
1031 #define LYMAX WORD_REF(LYMAX_ADDR)
1033 #define LYMAX_YM_MASK 0x02ff
1038 #define LCXP_ADDR 0xfffffa18
1039 #define LCXP WORD_REF(LCXP_ADDR)
1041 #define LCXP_CC_MASK 0xc000
1042 #define LCXP_CC_TRAMSPARENT 0x0000
1043 #define LCXP_CC_BLACK 0x4000
1044 #define LCXP_CC_REVERSED 0x8000
1045 #define LCXP_CC_WHITE 0xc000
1046 #define LCXP_CXP_MASK 0x02ff
1051 #define LCYP_ADDR 0xfffffa1a
1052 #define LCYP WORD_REF(LCYP_ADDR)
1054 #define LCYP_CYP_MASK 0x01ff
1059 #define LCWCH_ADDR 0xfffffa1c
1060 #define LCWCH WORD_REF(LCWCH_ADDR)
1062 #define LCWCH_CH_MASK 0x001f
1063 #define LCWCH_CH_SHIFT 0
1064 #define LCWCH_CW_MASK 0x1f00
1065 #define LCWCH_CW_SHIFT 8
1070 #define LBLKC_ADDR 0xfffffa1f
1071 #define LBLKC BYTE_REF(LBLKC_ADDR)
1073 #define LBLKC_BD_MASK 0x7f
1074 #define LBLKC_BD_SHIFT 0
1075 #define LBLKC_BKEN 0x80
1080 #define LPICF_ADDR 0xfffffa20
1081 #define LPICF BYTE_REF(LPICF_ADDR)
1083 #define LPICF_GS_MASK 0x01
1084 #define LPICF_GS_BW 0x00
1085 #define LPICF_GS_GRAY_4 0x01
1086 #define LPICF_PBSIZ_MASK 0x06
1087 #define LPICF_PBSIZ_1 0x00
1088 #define LPICF_PBSIZ_2 0x02
1089 #define LPICF_PBSIZ_4 0x04
1094 #define LPOLCF_ADDR 0xfffffa21
1095 #define LPOLCF BYTE_REF(LPOLCF_ADDR)
1097 #define LPOLCF_PIXPOL 0x01
1098 #define LPOLCF_LPPOL 0x02
1099 #define LPOLCF_FLMPOL 0x04
1100 #define LPOLCF_LCKPOL 0x08
1105 #define LACDRC_ADDR 0xfffffa23
1106 #define LACDRC BYTE_REF(LACDRC_ADDR)
1108 #define LACDRC_ACD_MASK 0x0f
1109 #define LACDRC_ACD_SHIFT 0
1114 #define LPXCD_ADDR 0xfffffa25
1115 #define LPXCD BYTE_REF(LPXCD_ADDR)
1117 #define LPXCD_PCD_MASK 0x3f
1118 #define LPXCD_PCD_SHIFT 0
1123 #define LCKCON_ADDR 0xfffffa27
1124 #define LCKCON BYTE_REF(LCKCON_ADDR)
1126 #define LCKCON_PCDS 0x01
1127 #define LCKCON_DWIDTH 0x02
1128 #define LCKCON_DWS_MASK 0x3c
1129 #define LCKCON_DWS_SHIFT 2
1130 #define LCKCON_DMA16 0x40
1131 #define LCKCON_LCDON 0x80
1134 #define LCKCON_DW_MASK LCKCON_DWS_MASK
1135 #define LCKCON_DW_SHIFT LCKCON_DWS_SHIFT
1140 #define LLBAR_ADDR 0xfffffa29
1141 #define LLBAR BYTE_REF(LLBAR_ADDR)
1143 #define LLBAR_LBAR_MASK 0x7f
1144 #define LLBAR_LBAR_SHIFT 0
1149 #define LOTCR_ADDR 0xfffffa2b
1150 #define LOTCR BYTE_REF(LOTCR_ADDR)
1155 #define LPOSR_ADDR 0xfffffa2d
1156 #define LPOSR BYTE_REF(LPOSR_ADDR)
1158 #define LPOSR_BOS 0x08
1159 #define LPOSR_POS_MASK 0x07
1160 #define LPOSR_POS_SHIFT 0
1165 #define LFRCM_ADDR 0xfffffa31
1166 #define LFRCM BYTE_REF(LFRCM_ADDR)
1168 #define LFRCM_YMOD_MASK 0x0f
1169 #define LFRCM_YMOD_SHIFT 0
1170 #define LFRCM_XMOD_MASK 0xf0
1171 #define LFRCM_XMOD_SHIFT 4
1176 #define LGPMR_ADDR 0xfffffa32
1177 #define LGPMR WORD_REF(LGPMR_ADDR)
1179 #define LGPMR_GLEVEL3_MASK 0x000f
1180 #define LGPMR_GLEVEL3_SHIFT 0
1181 #define LGPMR_GLEVEL2_MASK 0x00f0
1182 #define LGPMR_GLEVEL2_SHIFT 4
1183 #define LGPMR_GLEVEL0_MASK 0x0f00
1184 #define LGPMR_GLEVEL0_SHIFT 8
1185 #define LGPMR_GLEVEL1_MASK 0xf000
1186 #define LGPMR_GLEVEL1_SHIFT 12
1197 #define RTCTIME_ADDR 0xfffffb00
1198 #define RTCTIME LONG_REF(RTCTIME_ADDR)
1200 #define RTCTIME_SECONDS_MASK 0x0000003f
1201 #define RTCTIME_SECONDS_SHIFT 0
1202 #define RTCTIME_MINUTES_MASK 0x003f0000
1203 #define RTCTIME_MINUTES_SHIFT 16
1204 #define RTCTIME_HOURS_MASK 0x1f000000
1205 #define RTCTIME_HOURS_SHIFT 24
1210 #define RTCALRM_ADDR 0xfffffb04
1211 #define RTCALRM LONG_REF(RTCALRM_ADDR)
1213 #define RTCALRM_SECONDS_MASK 0x0000003f
1214 #define RTCALRM_SECONDS_SHIFT 0
1215 #define RTCALRM_MINUTES_MASK 0x003f0000
1216 #define RTCALRM_MINUTES_SHIFT 16
1217 #define RTCALRM_HOURS_MASK 0x1f000000
1218 #define RTCALRM_HOURS_SHIFT 24
1223 #define RTCCTL_ADDR 0xfffffb0c
1224 #define RTCCTL WORD_REF(RTCCTL_ADDR)
1226 #define RTCCTL_384 0x0020
1227 #define RTCCTL_ENABLE 0x0080
1230 #define RTCCTL_XTL RTCCTL_384
1231 #define RTCCTL_EN RTCCTL_ENABLE
1236 #define RTCISR_ADDR 0xfffffb0e
1237 #define RTCISR WORD_REF(RTCISR_ADDR)
1239 #define RTCISR_SW 0x0001
1240 #define RTCISR_MIN 0x0002
1241 #define RTCISR_ALM 0x0004
1242 #define RTCISR_DAY 0x0008
1243 #define RTCISR_1HZ 0x0010
1248 #define RTCIENR_ADDR 0xfffffb10
1249 #define RTCIENR WORD_REF(RTCIENR_ADDR)
1251 #define RTCIENR_SW 0x0001
1252 #define RTCIENR_MIN 0x0002
1253 #define RTCIENR_ALM 0x0004
1254 #define RTCIENR_DAY 0x0008
1255 #define RTCIENR_1HZ 0x0010
1260 #define STPWCH_ADDR 0xfffffb12
1261 #define STPWCH WORD_REF(STPWCH)
1263 #define STPWCH_CNT_MASK 0x00ff
1264 #define SPTWCH_CNT_SHIFT 0