1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef KS8695_UART_H
15#define KS8695_UART_H
16
17#define KS8695_UART_OFFSET (0xF0000 + 0xE000)
18#define KS8695_UART_VA (KS8695_IO_VA + KS8695_UART_OFFSET)
19#define KS8695_UART_PA (KS8695_IO_PA + KS8695_UART_OFFSET)
20
21
22
23
24
25#define KS8695_URRB (0x00)
26#define KS8695_URTH (0x04)
27#define KS8695_URFC (0x08)
28#define KS8695_URLC (0x0C)
29#define KS8695_URMC (0x10)
30#define KS8695_URLS (0x14)
31#define KS8695_URMS (0x18)
32#define KS8695_URBD (0x1C)
33#define KS8695_USR (0x20)
34
35
36
37#define URFC_URFRT (3 << 6)
38#define URFC_URFRT_1 (0 << 6)
39#define URFC_URFRT_4 (1 << 6)
40#define URFC_URFRT_8 (2 << 6)
41#define URFC_URFRT_14 (3 << 6)
42#define URFC_URTFR (1 << 2)
43#define URFC_URRFR (1 << 1)
44#define URFC_URFE (1 << 0)
45
46
47#define URLC_URSBC (1 << 6)
48#define URLC_PARITY (7 << 3)
49#define URPE_NONE (0 << 3)
50#define URPE_ODD (1 << 3)
51#define URPE_EVEN (3 << 3)
52#define URPE_MARK (5 << 3)
53#define URPE_SPACE (7 << 3)
54#define URLC_URSB (1 << 2)
55#define URLC_URCL (3 << 0)
56#define URCL_5 (0 << 0)
57#define URCL_6 (1 << 0)
58#define URCL_7 (2 << 0)
59#define URCL_8 (3 << 0)
60
61
62#define URMC_URLB (1 << 4)
63#define URMC_UROUT2 (1 << 3)
64#define URMC_UROUT1 (1 << 2)
65#define URMC_URRTS (1 << 1)
66#define URMC_URDTR (1 << 0)
67
68
69#define URLS_URRFE (1 << 7)
70#define URLS_URTE (1 << 6)
71#define URLS_URTHRE (1 << 5)
72#define URLS_URBI (1 << 4)
73#define URLS_URFE (1 << 3)
74#define URLS_URPE (1 << 2)
75#define URLS_URROE (1 << 1)
76#define URLS_URDR (1 << 0)
77
78
79#define URMS_URDCD (1 << 7)
80#define URMS_URRI (1 << 6)
81#define URMS_URDSR (1 << 5)
82#define URMS_URCTS (1 << 4)
83#define URMS_URDDCD (1 << 3)
84#define URMS_URTERI (1 << 2)
85#define URMS_URDDST (1 << 1)
86#define URMS_URDCTS (1 << 0)
87
88
89#define USR_UTI (1 << 0)
90
91
92#endif
93