Root/target/linux/amazon/files/include/asm-mips/amazon/serial.h

1/* incaAscSio.h - (AMAZON) ASC UART tty driver header */
2
3#ifndef __AMAZON_ASC_H
4#define __AMAZON_ASC_H
5
6/* channel operating modes */
7#define ASCOPT_CSIZE 0x00000003
8#define ASCOPT_CS7 0x00000001
9#define ASCOPT_CS8 0x00000002
10#define ASCOPT_PARENB 0x00000004
11#define ASCOPT_STOPB 0x00000008
12#define ASCOPT_PARODD 0x00000010
13#define ASCOPT_CREAD 0x00000020
14
15#define ASC_OPTIONS (ASCOPT_CREAD | ASCOPT_CS8)
16
17/* ASC input select (0 or 1) */
18#define CONSOLE_TTY 0
19
20/* use fractional divider for baudrate settings */
21#define AMAZONASC_USE_FDV
22
23#ifdef AMAZONASC_USE_FDV
24   #define AMAZONASC_FDV_LOW_BAUDRATE 71
25#ifdef CONFIG_USE_IKOS
26   #define AMAZONASC_FDV_HIGH_BAUDRATE 443
27#else
28   #define AMAZONASC_FDV_HIGH_BAUDRATE 498
29#endif //CONFIG_USE_IKOS
30#endif /*AMAZONASC_USE_FDV*/
31
32
33#define AMAZONASC_TXFIFO_FL 1
34#define AMAZONASC_RXFIFO_FL 1
35#define AMAZONASC_TXFIFO_FULL 16
36
37/* interrupt lines masks for the ASC device interrupts*/
38/* change these macroses if it's necessary */
39#define AMAZONASC_IRQ_LINE_ALL 0x000F0000 /* all IRQs */
40
41#define AMAZONASC_IRQ_LINE_TIR 0x00010000 /* TIR - Tx */
42#define AMAZONASC_IRQ_LINE_RIR 0x00020000 /* RIR - Rx */
43#define AMAZONASC_IRQ_LINE_EIR 0x00040000 /* EIR - Err */
44#define AMAZONASC_IRQ_LINE_TBIR 0x00080000 /* TBIR - Tx Buf*/
45
46/* CLC register's bits and bitfields */
47#define ASCCLC_DISR 0x00000001
48#define ASCCLC_DISS 0x00000002
49#define ASCCLC_RMCMASK 0x0000FF00
50#define ASCCLC_RMCOFFSET 8
51
52/* CON register's bits and bitfields */
53#define ASCCON_MODEMASK 0x0007
54    #define ASCCON_M_8SYNC 0x0
55    #define ASCCON_M_8ASYNC 0x1
56    #define ASCCON_M_8IRDAASYNC 0x2
57    #define ASCCON_M_7ASYNCPAR 0x3
58    #define ASCCON_M_9ASYNC 0x4
59    #define ASCCON_M_8WAKEUPASYNC 0x5
60    #define ASCCON_M_8ASYNCPAR 0x7
61#define ASCCON_STP 0x0008
62#define ASCCON_REN 0x0010
63#define ASCCON_PEN 0x0020
64#define ASCCON_FEN 0x0040
65#define ASCCON_OEN 0x0080
66#define ASCCON_PE 0x0100
67#define ASCCON_FE 0x0200
68#define ASCCON_OE 0x0400
69#define ASCCON_FDE 0x0800
70#define ASCCON_ODD 0x1000
71#define ASCCON_BRS 0x2000
72#define ASCCON_LB 0x4000
73#define ASCCON_R 0x8000
74#define ASCCON_ANY (ASCCON_PE|ASCCON_FE|ASCCON_OE)
75
76/* WHBCON register's bits and bitfields */
77#define ASCWHBCON_CLRREN 0x0010
78#define ASCWHBCON_SETREN 0x0020
79#define ASCWHBCON_CLRPE 0x0100
80#define ASCWHBCON_CLRFE 0x0200
81#define ASCWHBCON_CLROE 0x0400
82#define ASCWHBCON_SETPE 0x0800
83#define ASCWHBCON_SETFE 0x1000
84#define ASCWHBCON_SETOE 0x2000
85
86/* ABCON register's bits and bitfields */
87#define ASCABCON_ABEN 0x0001
88#define ASCABCON_AUREN 0x0002
89#define ASCABCON_ABSTEN 0x0004
90#define ASCABCON_ABDETEN 0x0008
91#define ASCABCON_FCDETEN 0x0010
92#define ASCABCON_EMMASK 0x0300
93    #define ASCABCON_EMOFF 8
94        #define ASCABCON_EM_DISAB 0x0
95        #define ASCABCON_EM_DURAB 0x1
96        #define ASCABCON_EM_ALWAYS 0x2
97#define ASCABCON_TXINV 0x0400
98#define ASCABCON_RXINV 0x0800
99
100/* FDV register mask, offset and bitfields*/
101#define ASCFDV_VALUE_MASK 0x000001FF
102
103/* WHBABCON register's bits and bitfields */
104#define ASCWHBABCON_SETABEN 0x0001
105#define ASCWHBABCON_CLRABEN 0x0002
106
107/* ABSTAT register's bits and bitfields */
108#define ASCABSTAT_FCSDET 0x0001
109#define ASCABSTAT_FCCDET 0x0002
110#define ASCABSTAT_SCSDET 0x0004
111#define ASCABSTAT_SCCDET 0x0008
112#define ASCABSTAT_DETWAIT 0x0010
113
114/* WHBABSTAT register's bits and bitfields */
115#define ASCWHBABSTAT_CLRFCSDET 0x0001
116#define ASCWHBABSTAT_SETFCSDET 0x0002
117#define ASCWHBABSTAT_CLRFCCDET 0x0004
118#define ASCWHBABSTAT_SETFCCDET 0x0008
119#define ASCWHBABSTAT_CLRSCSDET 0x0010
120#define ASCWHBABSTAT_SETSCSDET 0x0020
121#define ASCWHBABSTAT_SETSCCDET 0x0040
122#define ASCWHBABSTAT_CLRSCCDET 0x0080
123#define ASCWHBABSTAT_CLRDETWAIT 0x0100
124#define ASCWHBABSTAT_SETDETWAIT 0x0200
125
126/* TXFCON register's bits and bitfields */
127#define ASCTXFCON_TXFEN 0x0001
128#define ASCTXFCON_TXFFLU 0x0002
129#define ASCTXFCON_TXTMEN 0x0004
130#define ASCTXFCON_TXFITLMASK 0x3F00
131#define ASCTXFCON_TXFITLOFF 8
132
133/* RXFCON register's bits and bitfields */
134#define ASCRXFCON_RXFEN 0x0001
135#define ASCRXFCON_RXFFLU 0x0002
136#define ASCRXFCON_RXTMEN 0x0004
137#define ASCRXFCON_RXFITLMASK 0x3F00
138#define ASCRXFCON_RXFITLOFF 8
139
140/* FSTAT register's bits and bitfields */
141#define ASCFSTAT_RXFFLMASK 0x003F
142#define ASCFSTAT_TXFFLMASK 0x3F00
143#define ASCFSTAT_TXFFLOFF 8
144
145#endif /* __AMAZON_ASC_H */
146
147

Archive Download this file



interactive