Go to the documentation of this file.
16 #define BYTE_REF(addr) (*((volatile unsigned char*)addr))
17 #define WORD_REF(addr) (*((volatile unsigned short*)addr))
18 #define LONG_REF(addr) (*((volatile unsigned long*)addr))
20 #define PUT_FIELD(field, val) (((val) << field##_SHIFT) & field##_MASK)
21 #define GET_FIELD(reg, field) (((reg) & field##_MASK) >> field##_SHIFT)
32 #define SCR_ADDR 0xfffff000
33 #define SCR BYTE_REF(SCR_ADDR)
35 #define SCR_WDTH8 0x01
38 #define SCR_BETEN 0x10
46 #define MRR_ADDR 0xfffff004
47 #define MRR LONG_REF(MRR_ADDR)
58 #define CSGBA_ADDR 0xfffff100
59 #define CSGBB_ADDR 0xfffff102
61 #define CSGBC_ADDR 0xfffff104
62 #define CSGBD_ADDR 0xfffff106
64 #define CSGBA WORD_REF(CSGBA_ADDR)
65 #define CSGBB WORD_REF(CSGBB_ADDR)
66 #define CSGBC WORD_REF(CSGBC_ADDR)
67 #define CSGBD WORD_REF(CSGBD_ADDR)
72 #define CSA_ADDR 0xfffff110
73 #define CSB_ADDR 0xfffff112
74 #define CSC_ADDR 0xfffff114
75 #define CSD_ADDR 0xfffff116
77 #define CSA WORD_REF(CSA_ADDR)
78 #define CSB WORD_REF(CSB_ADDR)
79 #define CSC WORD_REF(CSC_ADDR)
80 #define CSD WORD_REF(CSD_ADDR)
83 #define CSA_SIZ_MASK 0x000e
84 #define CSA_SIZ_SHIFT 1
85 #define CSA_WS_MASK 0x0070
86 #define CSA_WS_SHIFT 4
87 #define CSA_BSW 0x0080
88 #define CSA_FLASH 0x0100
92 #define CSB_SIZ_MASK 0x000e
93 #define CSB_SIZ_SHIFT 1
94 #define CSB_WS_MASK 0x0070
95 #define CSB_WS_SHIFT 4
96 #define CSB_BSW 0x0080
97 #define CSB_FLASH 0x0100
98 #define CSB_UPSIZ_MASK 0x1800
99 #define CSB_UPSIZ_SHIFT 11
100 #define CSB_ROP 0x2000
101 #define CSB_SOP 0x4000
102 #define CSB_RO 0x8000
104 #define CSC_EN 0x0001
105 #define CSC_SIZ_MASK 0x000e
106 #define CSC_SIZ_SHIFT 1
107 #define CSC_WS_MASK 0x0070
108 #define CSC_WS_SHIFT 4
109 #define CSC_BSW 0x0080
110 #define CSC_FLASH 0x0100
111 #define CSC_UPSIZ_MASK 0x1800
112 #define CSC_UPSIZ_SHIFT 11
113 #define CSC_ROP 0x2000
114 #define CSC_SOP 0x4000
115 #define CSC_RO 0x8000
117 #define CSD_EN 0x0001
118 #define CSD_SIZ_MASK 0x000e
119 #define CSD_SIZ_SHIFT 1
120 #define CSD_WS_MASK 0x0070
121 #define CSD_WS_SHIFT 4
122 #define CSD_BSW 0x0080
123 #define CSD_FLASH 0x0100
124 #define CSD_DRAM 0x0200
125 #define CSD_COMB 0x0400
126 #define CSD_UPSIZ_MASK 0x1800
127 #define CSD_UPSIZ_SHIFT 11
128 #define CSD_ROP 0x2000
129 #define CSD_SOP 0x4000
130 #define CSD_RO 0x8000
135 #define EMUCS_ADDR 0xfffff118
136 #define EMUCS WORD_REF(EMUCS_ADDR)
138 #define EMUCS_WS_MASK 0x0070
139 #define EMUCS_WS_SHIFT 4
150 #define PLLCR_ADDR 0xfffff200
151 #define PLLCR WORD_REF(PLLCR_ADDR)
153 #define PLLCR_DISPLL 0x0008
154 #define PLLCR_CLKEN 0x0010
155 #define PLLCR_PRESC 0x0020
156 #define PLLCR_SYSCLK_SEL_MASK 0x0700
157 #define PLLCR_SYSCLK_SEL_SHIFT 8
158 #define PLLCR_LCDCLK_SEL_MASK 0x3800
159 #define PLLCR_LCDCLK_SEL_SHIFT 11
162 #define PLLCR_PIXCLK_SEL_MASK PLLCR_LCDCLK_SEL_MASK
163 #define PLLCR_PIXCLK_SEL_SHIFT PLLCR_LCDCLK_SEL_SHIFT
168 #define PLLFSR_ADDR 0xfffff202
169 #define PLLFSR WORD_REF(PLLFSR_ADDR)
171 #define PLLFSR_PC_MASK 0x00ff
172 #define PLLFSR_PC_SHIFT 0
173 #define PLLFSR_QC_MASK 0x0f00
174 #define PLLFSR_QC_SHIFT 8
175 #define PLLFSR_PROT 0x4000
176 #define PLLFSR_CLK32 0x8000
181 #define PCTRL_ADDR 0xfffff207
182 #define PCTRL BYTE_REF(PCTRL_ADDR)
184 #define PCTRL_WIDTH_MASK 0x1f
185 #define PCTRL_WIDTH_SHIFT 0
186 #define PCTRL_PCEN 0x80
197 #define IVR_ADDR 0xfffff300
198 #define IVR BYTE_REF(IVR_ADDR)
200 #define IVR_VECTOR_MASK 0xF8
205 #define ICR_ADDR 0xfffff302
206 #define ICR WORD_REF(ICR_ADDR)
208 #define ICR_POL5 0x0080
209 #define ICR_ET6 0x0100
210 #define ICR_ET3 0x0200
211 #define ICR_ET2 0x0400
212 #define ICR_ET1 0x0800
213 #define ICR_POL6 0x1000
214 #define ICR_POL3 0x2000
215 #define ICR_POL2 0x4000
216 #define ICR_POL1 0x8000
221 #define IMR_ADDR 0xfffff304
222 #define IMR LONG_REF(IMR_ADDR)
228 #define SPI_IRQ_NUM 0
229 #define TMR_IRQ_NUM 1
230 #define UART_IRQ_NUM 2
231 #define WDT_IRQ_NUM 3
232 #define RTC_IRQ_NUM 4
234 #define PWM_IRQ_NUM 7
235 #define INT0_IRQ_NUM 8
236 #define INT1_IRQ_NUM 9
237 #define INT2_IRQ_NUM 10
238 #define INT3_IRQ_NUM 11
239 #define IRQ1_IRQ_NUM 16
240 #define IRQ2_IRQ_NUM 17
241 #define IRQ3_IRQ_NUM 18
242 #define IRQ6_IRQ_NUM 19
243 #define IRQ5_IRQ_NUM 20
244 #define SAM_IRQ_NUM 22
245 #define EMIQ_IRQ_NUM 23
248 #define SPIM_IRQ_NUM SPI_IRQ_NUM
249 #define TMR1_IRQ_NUM TMR_IRQ_NUM
254 #define IMR_MSPI (1 << SPI_IRQ_NUM)
255 #define IMR_MTMR (1 << TMR_IRQ_NUM)
256 #define IMR_MUART (1 << UART_IRQ_NUM)
257 #define IMR_MWDT (1 << WDT_IRQ_NUM)
258 #define IMR_MRTC (1 << RTC_IRQ_NUM)
259 #define IMR_MKB (1 << KB_IRQ_NUM)
260 #define IMR_MPWM (1 << PWM_IRQ_NUM)
261 #define IMR_MINT0 (1 << INT0_IRQ_NUM)
262 #define IMR_MINT1 (1 << INT1_IRQ_NUM)
263 #define IMR_MINT2 (1 << INT2_IRQ_NUM)
264 #define IMR_MINT3 (1 << INT3_IRQ_NUM)
265 #define IMR_MIRQ1 (1 << IRQ1_IRQ_NUM)
266 #define IMR_MIRQ2 (1 << IRQ2_IRQ_NUM)
267 #define IMR_MIRQ3 (1 << IRQ3_IRQ_NUM)
268 #define IMR_MIRQ6 (1 << IRQ6_IRQ_NUM)
269 #define IMR_MIRQ5 (1 << IRQ5_IRQ_NUM)
270 #define IMR_MSAM (1 << SAM_IRQ_NUM)
271 #define IMR_MEMIQ (1 << EMIQ_IRQ_NUM)
274 #define IMR_MSPIM IMR_MSPI
275 #define IMR_MTMR1 IMR_MTMR
280 #define ISR_ADDR 0xfffff30c
281 #define ISR LONG_REF(ISR_ADDR)
283 #define ISR_SPI (1 << SPI_IRQ_NUM)
284 #define ISR_TMR (1 << TMR_IRQ_NUM)
285 #define ISR_UART (1 << UART_IRQ_NUM)
286 #define ISR_WDT (1 << WDT_IRQ_NUM)
287 #define ISR_RTC (1 << RTC_IRQ_NUM)
288 #define ISR_KB (1 << KB_IRQ_NUM)
289 #define ISR_PWM (1 << PWM_IRQ_NUM)
290 #define ISR_INT0 (1 << INT0_IRQ_NUM)
291 #define ISR_INT1 (1 << INT1_IRQ_NUM)
292 #define ISR_INT2 (1 << INT2_IRQ_NUM)
293 #define ISR_INT3 (1 << INT3_IRQ_NUM)
294 #define ISR_IRQ1 (1 << IRQ1_IRQ_NUM)
295 #define ISR_IRQ2 (1 << IRQ2_IRQ_NUM)
296 #define ISR_IRQ3 (1 << IRQ3_IRQ_NUM)
297 #define ISR_IRQ6 (1 << IRQ6_IRQ_NUM)
298 #define ISR_IRQ5 (1 << IRQ5_IRQ_NUM)
299 #define ISR_SAM (1 << SAM_IRQ_NUM)
300 #define ISR_EMIQ (1 << EMIQ_IRQ_NUM)
303 #define ISR_SPIM ISR_SPI
304 #define ISR_TMR1 ISR_TMR
309 #define IPR_ADDR 0xfffff30c
310 #define IPR LONG_REF(IPR_ADDR)
312 #define IPR_SPI (1 << SPI_IRQ_NUM)
313 #define IPR_TMR (1 << TMR_IRQ_NUM)
314 #define IPR_UART (1 << UART_IRQ_NUM)
315 #define IPR_WDT (1 << WDT_IRQ_NUM)
316 #define IPR_RTC (1 << RTC_IRQ_NUM)
317 #define IPR_KB (1 << KB_IRQ_NUM)
318 #define IPR_PWM (1 << PWM_IRQ_NUM)
319 #define IPR_INT0 (1 << INT0_IRQ_NUM)
320 #define IPR_INT1 (1 << INT1_IRQ_NUM)
321 #define IPR_INT2 (1 << INT2_IRQ_NUM)
322 #define IPR_INT3 (1 << INT3_IRQ_NUM)
323 #define IPR_IRQ1 (1 << IRQ1_IRQ_NUM)
324 #define IPR_IRQ2 (1 << IRQ2_IRQ_NUM)
325 #define IPR_IRQ3 (1 << IRQ3_IRQ_NUM)
326 #define IPR_IRQ6 (1 << IRQ6_IRQ_NUM)
327 #define IPR_IRQ5 (1 << IRQ5_IRQ_NUM)
328 #define IPR_SAM (1 << SAM_IRQ_NUM)
329 #define IPR_EMIQ (1 << EMIQ_IRQ_NUM)
332 #define IPR_SPIM IPR_SPI
333 #define IPR_TMR1 IPR_TMR
344 #define PADIR_ADDR 0xfffff400
345 #define PADATA_ADDR 0xfffff401
346 #define PAPUEN_ADDR 0xfffff402
348 #define PADIR BYTE_REF(PADIR_ADDR)
349 #define PADATA BYTE_REF(PADATA_ADDR)
350 #define PAPUEN BYTE_REF(PAPUEN_ADDR)
352 #define PA(x) (1 << (x))
357 #define PBDIR_ADDR 0xfffff408
358 #define PBDATA_ADDR 0xfffff409
359 #define PBPUEN_ADDR 0xfffff40a
360 #define PBSEL_ADDR 0xfffff40b
362 #define PBDIR BYTE_REF(PBDIR_ADDR)
363 #define PBDATA BYTE_REF(PBDATA_ADDR)
364 #define PBPUEN BYTE_REF(PBPUEN_ADDR)
365 #define PBSEL BYTE_REF(PBSEL_ADDR)
367 #define PB(x) (1 << (x))
371 #define PB_CSC0_RAS0 0x04
372 #define PB_CSC1_RAS1 0x08
373 #define PB_CSD0_CAS0 0x10
374 #define PB_CSD1_CAS1 0x20
375 #define PB_TIN_TOUT 0x40
381 #define PCDIR_ADDR 0xfffff410
382 #define PCDATA_ADDR 0xfffff411
383 #define PCPDEN_ADDR 0xfffff412
384 #define PCSEL_ADDR 0xfffff413
386 #define PCDIR BYTE_REF(PCDIR_ADDR)
387 #define PCDATA BYTE_REF(PCDATA_ADDR)
388 #define PCPDEN BYTE_REF(PCPDEN_ADDR)
389 #define PCSEL BYTE_REF(PCSEL_ADDR)
391 #define PC(x) (1 << (x))
405 #define PDDIR_ADDR 0xfffff418
406 #define PDDATA_ADDR 0xfffff419
407 #define PDPUEN_ADDR 0xfffff41a
408 #define PDSEL_ADDR 0xfffff41b
409 #define PDPOL_ADDR 0xfffff41c
410 #define PDIRQEN_ADDR 0xfffff41d
411 #define PDKBEN_ADDR 0xfffff41e
412 #define PDIQEG_ADDR 0xfffff41f
414 #define PDDIR BYTE_REF(PDDIR_ADDR)
415 #define PDDATA BYTE_REF(PDDATA_ADDR)
416 #define PDPUEN BYTE_REF(PDPUEN_ADDR)
417 #define PDSEL BYTE_REF(PDSEL_ADDR)
418 #define PDPOL BYTE_REF(PDPOL_ADDR)
419 #define PDIRQEN BYTE_REF(PDIRQEN_ADDR)
420 #define PDKBEN BYTE_REF(PDKBEN_ADDR)
421 #define PDIQEG BYTE_REF(PDIQEG_ADDR)
423 #define PD(x) (1 << (x))
437 #define PEDIR_ADDR 0xfffff420
438 #define PEDATA_ADDR 0xfffff421
439 #define PEPUEN_ADDR 0xfffff422
440 #define PESEL_ADDR 0xfffff423
442 #define PEDIR BYTE_REF(PEDIR_ADDR)
443 #define PEDATA BYTE_REF(PEDATA_ADDR)
444 #define PEPUEN BYTE_REF(PEPUEN_ADDR)
445 #define PESEL BYTE_REF(PESEL_ADDR)
447 #define PE(x) (1 << (x))
449 #define PE_SPMTXD 0x01
450 #define PE_SPMRXD 0x02
451 #define PE_SPMCLK 0x04
461 #define PFDIR_ADDR 0xfffff428
462 #define PFDATA_ADDR 0xfffff429
463 #define PFPUEN_ADDR 0xfffff42a
464 #define PFSEL_ADDR 0xfffff42b
466 #define PFDIR BYTE_REF(PFDIR_ADDR)
467 #define PFDATA BYTE_REF(PFDATA_ADDR)
468 #define PFPUEN BYTE_REF(PFPUEN_ADDR)
469 #define PFSEL BYTE_REF(PFSEL_ADDR)
471 #define PF(x) (1 << (x))
473 #define PF_LCONTRAST 0x01
485 #define PGDIR_ADDR 0xfffff430
486 #define PGDATA_ADDR 0xfffff431
487 #define PGPUEN_ADDR 0xfffff432
488 #define PGSEL_ADDR 0xfffff433
490 #define PGDIR BYTE_REF(PGDIR_ADDR)
491 #define PGDATA BYTE_REF(PGDATA_ADDR)
492 #define PGPUEN BYTE_REF(PGPUEN_ADDR)
493 #define PGSEL BYTE_REF(PGSEL_ADDR)
495 #define PG(x) (1 << (x))
497 #define PG_BUSW_DTACK 0x01
499 #define PG_EMUIRQ 0x04
500 #define PG_HIZ_P_D 0x08
501 #define PG_EMUCS 0x10
502 #define PG_EMUBRK 0x20
513 #define PWMC_ADDR 0xfffff500
514 #define PWMC WORD_REF(PWMC_ADDR)
516 #define PWMC_CLKSEL_MASK 0x0003
517 #define PWMC_CLKSEL_SHIFT 0
518 #define PWMC_REPEAT_MASK 0x000c
519 #define PWMC_REPEAT_SHIFT 2
520 #define PWMC_EN 0x0010
521 #define PMNC_FIFOAV 0x0020
522 #define PWMC_IRQEN 0x0040
523 #define PWMC_IRQ 0x0080
524 #define PWMC_PRESCALER_MASK 0x7f00
525 #define PWMC_PRESCALER_SHIFT 8
526 #define PWMC_CLKSRC 0x8000
529 #define PWMC_PWMEN PWMC_EN
534 #define PWMS_ADDR 0xfffff502
535 #define PWMS WORD_REF(PWMS_ADDR)
540 #define PWMP_ADDR 0xfffff504
541 #define PWMP BYTE_REF(PWMP_ADDR)
546 #define PWMCNT_ADDR 0xfffff505
547 #define PWMCNT BYTE_REF(PWMCNT_ADDR)
558 #define TCTL_ADDR 0xfffff600
559 #define TCTL WORD_REF(TCTL_ADDR)
561 #define TCTL_TEN 0x0001
562 #define TCTL_CLKSOURCE_MASK 0x000e
563 #define TCTL_CLKSOURCE_STOP 0x0000
564 #define TCTL_CLKSOURCE_SYSCLK 0x0002
565 #define TCTL_CLKSOURCE_SYSCLK_16 0x0004
566 #define TCTL_CLKSOURCE_TIN 0x0006
567 #define TCTL_CLKSOURCE_32KHZ 0x0008
568 #define TCTL_IRQEN 0x0010
569 #define TCTL_OM 0x0020
570 #define TCTL_CAP_MASK 0x00c0
571 #define TCTL_CAP_RE 0x0040
572 #define TCTL_CAP_FE 0x0080
573 #define TCTL_FRR 0x0010
576 #define TCTL1_ADDR TCTL_ADDR
582 #define TPRER_ADDR 0xfffff602
583 #define TPRER WORD_REF(TPRER_ADDR)
586 #define TPRER1_ADDR TPRER_ADDR
592 #define TCMP_ADDR 0xfffff604
593 #define TCMP WORD_REF(TCMP_ADDR)
596 #define TCMP1_ADDR TCMP_ADDR
602 #define TCR_ADDR 0xfffff606
603 #define TCR WORD_REF(TCR_ADDR)
606 #define TCR1_ADDR TCR_ADDR
612 #define TCN_ADDR 0xfffff608
613 #define TCN WORD_REF(TCN_ADDR)
616 #define TCN1_ADDR TCN_ADDR
622 #define TSTAT_ADDR 0xfffff60a
623 #define TSTAT WORD_REF(TSTAT_ADDR)
625 #define TSTAT_COMP 0x0001
626 #define TSTAT_CAPT 0x0001
629 #define TSTAT1_ADDR TSTAT_ADDR
641 #define SPIMDATA_ADDR 0xfffff800
642 #define SPIMDATA WORD_REF(SPIMDATA_ADDR)
647 #define SPIMCONT_ADDR 0xfffff802
648 #define SPIMCONT WORD_REF(SPIMCONT_ADDR)
650 #define SPIMCONT_BIT_COUNT_MASK 0x000f
651 #define SPIMCONT_BIT_COUNT_SHIFT 0
652 #define SPIMCONT_POL 0x0010
653 #define SPIMCONT_PHA 0x0020
654 #define SPIMCONT_IRQEN 0x0040
655 #define SPIMCONT_IRQ 0x0080
656 #define SPIMCONT_XCH 0x0100
657 #define SPIMCONT_ENABLE 0x0200
658 #define SPIMCONT_DATA_RATE_MASK 0xe000
659 #define SPIMCONT_DATA_RATE_SHIFT 13
662 #define SPIMCONT_SPIMIRQ SPIMCONT_IRQ
663 #define SPIMCONT_SPIMEN SPIMCONT_ENABLE
674 #define USTCNT_ADDR 0xfffff900
675 #define USTCNT WORD_REF(USTCNT_ADDR)
677 #define USTCNT_TXAE 0x0001
678 #define USTCNT_TXHE 0x0002
679 #define USTCNT_TXEE 0x0004
680 #define USTCNT_RXRE 0x0008
681 #define USTCNT_RXHE 0x0010
682 #define USTCNT_RXFE 0x0020
683 #define USTCNT_CTSD 0x0040
684 #define USTCNT_ODEN 0x0080
685 #define USTCNT_8_7 0x0100
686 #define USTCNT_STOP 0x0200
687 #define USTCNT_ODD 0x0400
688 #define USTCNT_PEN 0x0800
689 #define USTCNT_CLKM 0x1000
690 #define USTCNT_TXEN 0x2000
691 #define USTCNT_RXEN 0x4000
692 #define USTCNT_UEN 0x8000
695 #define USTCNT_TXAVAILEN USTCNT_TXAE
696 #define USTCNT_TXHALFEN USTCNT_TXHE
697 #define USTCNT_TXEMPTYEN USTCNT_TXEE
698 #define USTCNT_RXREADYEN USTCNT_RXRE
699 #define USTCNT_RXHALFEN USTCNT_RXHE
700 #define USTCNT_RXFULLEN USTCNT_RXFE
701 #define USTCNT_CTSDELTAEN USTCNT_CTSD
702 #define USTCNT_ODD_EVEN USTCNT_ODD
703 #define USTCNT_PARITYEN USTCNT_PEN
704 #define USTCNT_CLKMODE USTCNT_CLKM
705 #define USTCNT_UARTEN USTCNT_UEN
710 #define UBAUD_ADDR 0xfffff902
711 #define UBAUD WORD_REF(UBAUD_ADDR)
713 #define UBAUD_PRESCALER_MASK 0x003f
714 #define UBAUD_PRESCALER_SHIFT 0
715 #define UBAUD_DIVIDE_MASK 0x0700
716 #define UBAUD_DIVIDE_SHIFT 8
717 #define UBAUD_BAUD_SRC 0x0800
718 #define UBAUD_UCLKDIR 0x2000
723 #define URX_ADDR 0xfffff904
724 #define URX WORD_REF(URX_ADDR)
726 #define URX_RXDATA_ADDR 0xfffff905
727 #define URX_RXDATA BYTE_REF(URX_RXDATA_ADDR)
729 #define URX_RXDATA_MASK 0x00ff
730 #define URX_RXDATA_SHIFT 0
731 #define URX_PARITY_ERROR 0x0100
732 #define URX_BREAK 0x0200
733 #define URX_FRAME_ERROR 0x0400
734 #define URX_OVRUN 0x0800
735 #define URX_OLD_DATA 0x1000
736 #define URX_DATA_READY 0x2000
737 #define URX_FIFO_HALF 0x4000
738 #define URX_FIFO_FULL 0x8000
743 #define UTX_ADDR 0xfffff906
744 #define UTX WORD_REF(UTX_ADDR)
746 #define UTX_TXDATA_ADDR 0xfffff907
747 #define UTX_TXDATA BYTE_REF(UTX_TXDATA_ADDR)
749 #define UTX_TXDATA_MASK 0x00ff
750 #define UTX_TXDATA_SHIFT 0
751 #define UTX_CTS_DELTA 0x0100
752 #define UTX_CTS_STAT 0x0200
753 #define UTX_BUSY 0x0400
754 #define UTX_NOCTS 0x0800
755 #define UTX_SEND_BREAK 0x1000
756 #define UTX_TX_AVAIL 0x2000
757 #define UTX_FIFO_HALF 0x4000
758 #define UTX_FIFO_EMPTY 0x8000
761 #define UTX_CTS_STATUS UTX_CTS_STAT
762 #define UTX_IGNORE_CTS UTX_NOCTS
767 #define UMISC_ADDR 0xfffff908
768 #define UMISC WORD_REF(UMISC_ADDR)
770 #define UMISC_TX_POL 0x0004
771 #define UMISC_RX_POL 0x0008
772 #define UMISC_IRDA_LOOP 0x0010
773 #define UMISC_IRDA_EN 0x0020
774 #define UMISC_RTS 0x0040
775 #define UMISC_RTSCONT 0x0080
776 #define UMISC_IR_TEST 0x0400
777 #define UMISC_BAUD_RESET 0x0800
778 #define UMISC_LOOP 0x1000
779 #define UMISC_FORCE_PERR 0x2000
780 #define UMISC_CLKSRC 0x4000
781 #define UMISC_BAUD_TEST 0x8000
786 #define NIPR_ADDR 0xfffff90a
787 #define NIPR WORD_REF(NIPR_ADDR)
789 #define NIPR_STEP_VALUE_MASK 0x00ff
790 #define NIPR_STEP_VALUE_SHIFT 0
791 #define NIPR_SELECT_MASK 0x0700
792 #define NIPR_SELECT_SHIFT 8
793 #define NIPR_PRE_SEL 0x8000
797 typedef volatile struct {
798 volatile unsigned short int ustcnt;
799 volatile unsigned short int ubaud;
801 volatile unsigned short int w;
803 volatile unsigned char status;
804 volatile unsigned char rxdata;
808 volatile unsigned short int w;
810 volatile unsigned char status;
811 volatile unsigned char txdata;
814 volatile unsigned short int umisc;
815 volatile unsigned short int nipr;
816 volatile unsigned short int pad1;
817 volatile unsigned short int pad2;
830 #define LSSA_ADDR 0xfffffa00
831 #define LSSA LONG_REF(LSSA_ADDR)
833 #define LSSA_SSA_MASK 0x1ffffffe
838 #define LVPW_ADDR 0xfffffa05
839 #define LVPW BYTE_REF(LVPW_ADDR)
844 #define LXMAX_ADDR 0xfffffa08
845 #define LXMAX WORD_REF(LXMAX_ADDR)
847 #define LXMAX_XM_MASK 0x02f0
852 #define LYMAX_ADDR 0xfffffa0a
853 #define LYMAX WORD_REF(LYMAX_ADDR)
855 #define LYMAX_YM_MASK 0x01ff
860 #define LCXP_ADDR 0xfffffa18
861 #define LCXP WORD_REF(LCXP_ADDR)
863 #define LCXP_CC_MASK 0xc000
864 #define LCXP_CC_TRAMSPARENT 0x0000
865 #define LCXP_CC_BLACK 0x4000
866 #define LCXP_CC_REVERSED 0x8000
867 #define LCXP_CC_WHITE 0xc000
868 #define LCXP_CXP_MASK 0x02ff
873 #define LCYP_ADDR 0xfffffa1a
874 #define LCYP WORD_REF(LCYP_ADDR)
876 #define LCYP_CYP_MASK 0x01ff
881 #define LCWCH_ADDR 0xfffffa1c
882 #define LCWCH WORD_REF(LCWCH_ADDR)
884 #define LCWCH_CH_MASK 0x001f
885 #define LCWCH_CH_SHIFT 0
886 #define LCWCH_CW_MASK 0x1f00
887 #define LCWCH_CW_SHIFT 8
892 #define LBLKC_ADDR 0xfffffa1f
893 #define LBLKC BYTE_REF(LBLKC_ADDR)
895 #define LBLKC_BD_MASK 0x7f
896 #define LBLKC_BD_SHIFT 0
897 #define LBLKC_BKEN 0x80
902 #define LPICF_ADDR 0xfffffa20
903 #define LPICF BYTE_REF(LPICF_ADDR)
905 #define LPICF_GS_MASK 0x03
906 #define LPICF_GS_BW 0x00
907 #define LPICF_GS_GRAY_4 0x01
908 #define LPICF_GS_GRAY_16 0x02
909 #define LPICF_PBSIZ_MASK 0x0c
910 #define LPICF_PBSIZ_1 0x00
911 #define LPICF_PBSIZ_2 0x04
912 #define LPICF_PBSIZ_4 0x08
917 #define LPOLCF_ADDR 0xfffffa21
918 #define LPOLCF BYTE_REF(LPOLCF_ADDR)
920 #define LPOLCF_PIXPOL 0x01
921 #define LPOLCF_LPPOL 0x02
922 #define LPOLCF_FLMPOL 0x04
923 #define LPOLCF_LCKPOL 0x08
928 #define LACDRC_ADDR 0xfffffa23
929 #define LACDRC BYTE_REF(LACDRC_ADDR)
931 #define LACDRC_ACDSLT 0x80
932 #define LACDRC_ACD_MASK 0x0f
933 #define LACDRC_ACD_SHIFT 0
938 #define LPXCD_ADDR 0xfffffa25
939 #define LPXCD BYTE_REF(LPXCD_ADDR)
941 #define LPXCD_PCD_MASK 0x3f
942 #define LPXCD_PCD_SHIFT 0
947 #define LCKCON_ADDR 0xfffffa27
948 #define LCKCON BYTE_REF(LCKCON_ADDR)
950 #define LCKCON_DWS_MASK 0x0f
951 #define LCKCON_DWS_SHIFT 0
952 #define LCKCON_DWIDTH 0x40
953 #define LCKCON_LCDON 0x80
956 #define LCKCON_DW_MASK LCKCON_DWS_MASK
957 #define LCKCON_DW_SHIFT LCKCON_DWS_SHIFT
962 #define LRRA_ADDR 0xfffffa29
963 #define LRRA BYTE_REF(LRRA_ADDR)
968 #define LPOSR_ADDR 0xfffffa2d
969 #define LPOSR BYTE_REF(LPOSR_ADDR)
971 #define LPOSR_POS_MASK 0x0f
972 #define LPOSR_POS_SHIFT 0
977 #define LFRCM_ADDR 0xfffffa31
978 #define LFRCM BYTE_REF(LFRCM_ADDR)
980 #define LFRCM_YMOD_MASK 0x0f
981 #define LFRCM_YMOD_SHIFT 0
982 #define LFRCM_XMOD_MASK 0xf0
983 #define LFRCM_XMOD_SHIFT 4
988 #define LGPMR_ADDR 0xfffffa33
989 #define LGPMR BYTE_REF(LGPMR_ADDR)
991 #define LGPMR_G1_MASK 0x0f
992 #define LGPMR_G1_SHIFT 0
993 #define LGPMR_G2_MASK 0xf0
994 #define LGPMR_G2_SHIFT 4
999 #define PWMR_ADDR 0xfffffa36
1000 #define PWMR WORD_REF(PWMR_ADDR)
1002 #define PWMR_PW_MASK 0x00ff
1003 #define PWMR_PW_SHIFT 0
1004 #define PWMR_CCPEN 0x0100
1005 #define PWMR_SRC_MASK 0x0600
1006 #define PWMR_SRC_LINE 0x0000
1007 #define PWMR_SRC_PIXEL 0x0200
1008 #define PWMR_SRC_LCD 0x4000
1019 #define RTCTIME_ADDR 0xfffffb00
1020 #define RTCTIME LONG_REF(RTCTIME_ADDR)
1022 #define RTCTIME_SECONDS_MASK 0x0000003f
1023 #define RTCTIME_SECONDS_SHIFT 0
1024 #define RTCTIME_MINUTES_MASK 0x003f0000
1025 #define RTCTIME_MINUTES_SHIFT 16
1026 #define RTCTIME_HOURS_MASK 0x1f000000
1027 #define RTCTIME_HOURS_SHIFT 24
1032 #define RTCALRM_ADDR 0xfffffb04
1033 #define RTCALRM LONG_REF(RTCALRM_ADDR)
1035 #define RTCALRM_SECONDS_MASK 0x0000003f
1036 #define RTCALRM_SECONDS_SHIFT 0
1037 #define RTCALRM_MINUTES_MASK 0x003f0000
1038 #define RTCALRM_MINUTES_SHIFT 16
1039 #define RTCALRM_HOURS_MASK 0x1f000000
1040 #define RTCALRM_HOURS_SHIFT 24
1045 #define WATCHDOG_ADDR 0xfffffb0a
1046 #define WATCHDOG WORD_REF(WATCHDOG_ADDR)
1048 #define WATCHDOG_EN 0x0001
1049 #define WATCHDOG_ISEL 0x0002
1050 #define WATCHDOG_INTF 0x0080
1051 #define WATCHDOG_CNT_MASK 0x0300
1052 #define WATCHDOG_CNT_SHIFT 8
1057 #define RTCCTL_ADDR 0xfffffb0c
1058 #define RTCCTL WORD_REF(RTCCTL_ADDR)
1060 #define RTCCTL_XTL 0x0020
1061 #define RTCCTL_EN 0x0080
1064 #define RTCCTL_384 RTCCTL_XTL
1065 #define RTCCTL_ENABLE RTCCTL_EN
1070 #define RTCISR_ADDR 0xfffffb0e
1071 #define RTCISR WORD_REF(RTCISR_ADDR)
1073 #define RTCISR_SW 0x0001
1074 #define RTCISR_MIN 0x0002
1075 #define RTCISR_ALM 0x0004
1076 #define RTCISR_DAY 0x0008
1077 #define RTCISR_1HZ 0x0010
1078 #define RTCISR_HR 0x0020
1079 #define RTCISR_SAM0 0x0100
1080 #define RTCISR_SAM1 0x0200
1081 #define RTCISR_SAM2 0x0400
1082 #define RTCISR_SAM3 0x0800
1083 #define RTCISR_SAM4 0x1000
1084 #define RTCISR_SAM5 0x2000
1085 #define RTCISR_SAM6 0x4000
1086 #define RTCISR_SAM7 0x8000
1091 #define RTCIENR_ADDR 0xfffffb10
1092 #define RTCIENR WORD_REF(RTCIENR_ADDR)
1094 #define RTCIENR_SW 0x0001
1095 #define RTCIENR_MIN 0x0002
1096 #define RTCIENR_ALM 0x0004
1097 #define RTCIENR_DAY 0x0008
1098 #define RTCIENR_1HZ 0x0010
1099 #define RTCIENR_HR 0x0020
1100 #define RTCIENR_SAM0 0x0100
1101 #define RTCIENR_SAM1 0x0200
1102 #define RTCIENR_SAM2 0x0400
1103 #define RTCIENR_SAM3 0x0800
1104 #define RTCIENR_SAM4 0x1000
1105 #define RTCIENR_SAM5 0x2000
1106 #define RTCIENR_SAM6 0x4000
1107 #define RTCIENR_SAM7 0x8000
1112 #define STPWCH_ADDR 0xfffffb12
1113 #define STPWCH WORD_REF(STPWCH)
1115 #define STPWCH_CNT_MASK 0x003f
1116 #define SPTWCH_CNT_SHIFT 0
1121 #define DAYR_ADDR 0xfffffb1a
1122 #define DAYR WORD_REF(DAYR_ADDR)
1124 #define DAYR_DAYS_MASK 0x1ff
1125 #define DAYR_DAYS_SHIFT 0
1130 #define DAYALARM_ADDR 0xfffffb1c
1131 #define DAYALARM WORD_REF(DAYALARM_ADDR)
1133 #define DAYALARM_DAYSAL_MASK 0x01ff
1134 #define DAYALARM_DAYSAL_SHIFT 0
1145 #define DRAMMC_ADDR 0xfffffc00
1146 #define DRAMMC WORD_REF(DRAMMC_ADDR)
1148 #define DRAMMC_ROW12_MASK 0xc000
1149 #define DRAMMC_ROW12_PA10 0x0000
1150 #define DRAMMC_ROW12_PA21 0x4000
1151 #define DRAMMC_ROW12_PA23 0x8000
1152 #define DRAMMC_ROW0_MASK 0x3000
1153 #define DRAMMC_ROW0_PA11 0x0000
1154 #define DRAMMC_ROW0_PA22 0x1000
1155 #define DRAMMC_ROW0_PA23 0x2000
1156 #define DRAMMC_ROW11 0x0800
1157 #define DRAMMC_ROW10 0x0400
1158 #define DRAMMC_ROW9 0x0200
1159 #define DRAMMC_ROW8 0x0100
1160 #define DRAMMC_COL10 0x0080
1161 #define DRAMMC_COL9 0x0040
1162 #define DRAMMC_COL8 0x0020
1163 #define DRAMMC_REF_MASK 0x001f
1164 #define DRAMMC_REF_SHIFT 0
1169 #define DRAMC_ADDR 0xfffffc02
1170 #define DRAMC WORD_REF(DRAMC_ADDR)
1172 #define DRAMC_DWE 0x0001
1173 #define DRAMC_RST 0x0002
1174 #define DRAMC_LPR 0x0004
1175 #define DRAMC_SLW 0x0008
1176 #define DRAMC_LSP 0x0010
1177 #define DRAMC_MSW 0x0020
1178 #define DRAMC_WS_MASK 0x00c0
1179 #define DRAMC_WS_SHIFT 6
1180 #define DRAMC_PGSZ_MASK 0x0300
1181 #define DRAMC_PGSZ_SHIFT 8
1182 #define DRAMC_PGSZ_256K 0x0000
1183 #define DRAMC_PGSZ_512K 0x0100
1184 #define DRAMC_PGSZ_1024K 0x0200
1185 #define DRAMC_PGSZ_2048K 0x0300
1186 #define DRAMC_EDO 0x0400
1187 #define DRAMC_CLK 0x0800
1188 #define DRAMC_BC_MASK 0x3000
1189 #define DRAMC_BC_SHIFT 12
1190 #define DRAMC_RM 0x4000
1191 #define DRAMC_EN 0x8000
1203 #define ICEMACR_ADDR 0xfffffd00
1204 #define ICEMACR LONG_REF(ICEMACR_ADDR)
1209 #define ICEMAMR_ADDR 0xfffffd04
1210 #define ICEMAMR LONG_REF(ICEMAMR_ADDR)
1215 #define ICEMCCR_ADDR 0xfffffd08
1216 #define ICEMCCR WORD_REF(ICEMCCR_ADDR)
1218 #define ICEMCCR_PD 0x0001
1219 #define ICEMCCR_RW 0x0002
1224 #define ICEMCMR_ADDR 0xfffffd0a
1225 #define ICEMCMR WORD_REF(ICEMCMR_ADDR)
1227 #define ICEMCMR_PDM 0x0001
1228 #define ICEMCMR_RWM 0x0002
1233 #define ICEMCR_ADDR 0xfffffd0c
1234 #define ICEMCR WORD_REF(ICEMCR_ADDR)
1236 #define ICEMCR_CEN 0x0001
1237 #define ICEMCR_PBEN 0x0002
1238 #define ICEMCR_SB 0x0004
1239 #define ICEMCR_HMDIS 0x0008
1240 #define ICEMCR_BBIEN 0x0010
1245 #define ICEMSR_ADDR 0xfffffd0e
1246 #define ICEMSR WORD_REF(ICEMSR_ADDR)
1248 #define ICEMSR_EMUEN 0x0001
1249 #define ICEMSR_BRKIRQ 0x0002
1250 #define ICEMSR_BBIRQ 0x0004
1251 #define ICEMSR_EMIRQ 0x0008