diff options
author | Geert Uytterhoeven <geert+renesas@linux-m68k.org> | 2014-03-11 06:11:19 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-17 19:20:49 -0400 |
commit | 26de4f1b2fb45e53a9e8f4f913b9cdf6c294070b (patch) | |
tree | f6c8dfd434165527fcd7a022878d691cfafed3ea /include/linux/serial_sci.h | |
parent | ff43da00e0d407cd8e7faaf2ac150001d29827e4 (diff) |
serial: sh-sci: Add more register documentation
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Acked-by: Simon Horman <horms@verge.net.au>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/serial_sci.h')
-rw-r--r-- | include/linux/serial_sci.h | 93 |
1 files changed, 58 insertions, 35 deletions
diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 22b3640c9424..6c5e3bb282b0 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h | |||
@@ -10,45 +10,59 @@ | |||
10 | 10 | ||
11 | #define SCIx_NOT_SUPPORTED (-1) | 11 | #define SCIx_NOT_SUPPORTED (-1) |
12 | 12 | ||
13 | #define SCSCR_TIE (1 << 7) | 13 | /* SCSMR (Serial Mode Register) */ |
14 | #define SCSCR_RIE (1 << 6) | 14 | #define SCSMR_CHR (1 << 6) /* 7-bit Character Length */ |
15 | #define SCSCR_TE (1 << 5) | 15 | #define SCSMR_PE (1 << 5) /* Parity Enable */ |
16 | #define SCSCR_RE (1 << 4) | 16 | #define SCSMR_ODD (1 << 4) /* Odd Parity */ |
17 | #define SCSCR_REIE (1 << 3) /* not supported by all parts */ | 17 | #define SCSMR_STOP (1 << 3) /* Stop Bit Length */ |
18 | #define SCSCR_TOIE (1 << 2) /* not supported by all parts */ | 18 | #define SCSMR_CKS 0x0003 /* Clock Select */ |
19 | #define SCSCR_CKE1 (1 << 1) | 19 | |
20 | #define SCSCR_CKE0 (1 << 0) | 20 | /* Serial Control Register (@ = not supported by all parts) */ |
21 | 21 | #define SCSCR_TIE (1 << 7) /* Transmit Interrupt Enable */ | |
22 | /* SCxSR SCI */ | 22 | #define SCSCR_RIE (1 << 6) /* Receive Interrupt Enable */ |
23 | #define SCI_TDRE 0x80 | 23 | #define SCSCR_TE (1 << 5) /* Transmit Enable */ |
24 | #define SCI_RDRF 0x40 | 24 | #define SCSCR_RE (1 << 4) /* Receive Enable */ |
25 | #define SCI_ORER 0x20 | 25 | #define SCSCR_REIE (1 << 3) /* Receive Error Interrupt Enable @ */ |
26 | #define SCI_FER 0x10 | 26 | #define SCSCR_TOIE (1 << 2) /* Timeout Interrupt Enable @ */ |
27 | #define SCI_PER 0x08 | 27 | #define SCSCR_CKE1 (1 << 1) /* Clock Enable 1 */ |
28 | #define SCI_TEND 0x04 | 28 | #define SCSCR_CKE0 (1 << 0) /* Clock Enable 0 */ |
29 | /* SCIFA/SCIFB only */ | ||
30 | #define SCSCR_TDRQE (1 << 15) /* Tx Data Transfer Request Enable */ | ||
31 | #define SCSCR_RDRQE (1 << 14) /* Rx Data Transfer Request Enable */ | ||
32 | |||
33 | /* SCxSR (Serial Status Register) on SCI */ | ||
34 | #define SCI_TDRE 0x80 /* Transmit Data Register Empty */ | ||
35 | #define SCI_RDRF 0x40 /* Receive Data Register Full */ | ||
36 | #define SCI_ORER 0x20 /* Overrun Error */ | ||
37 | #define SCI_FER 0x10 /* Framing Error */ | ||
38 | #define SCI_PER 0x08 /* Parity Error */ | ||
39 | #define SCI_TEND 0x04 /* Transmit End */ | ||
29 | 40 | ||
30 | #define SCI_DEFAULT_ERROR_MASK (SCI_PER | SCI_FER) | 41 | #define SCI_DEFAULT_ERROR_MASK (SCI_PER | SCI_FER) |
31 | 42 | ||
32 | /* SCxSR SCIF, HSCIF */ | 43 | /* SCxSR (Serial Status Register) on SCIF, HSCIF */ |
33 | #define SCIF_ER 0x0080 | 44 | #define SCIF_ER 0x0080 /* Receive Error */ |
34 | #define SCIF_TEND 0x0040 | 45 | #define SCIF_TEND 0x0040 /* Transmission End */ |
35 | #define SCIF_TDFE 0x0020 | 46 | #define SCIF_TDFE 0x0020 /* Transmit FIFO Data Empty */ |
36 | #define SCIF_BRK 0x0010 | 47 | #define SCIF_BRK 0x0010 /* Break Detect */ |
37 | #define SCIF_FER 0x0008 | 48 | #define SCIF_FER 0x0008 /* Framing Error */ |
38 | #define SCIF_PER 0x0004 | 49 | #define SCIF_PER 0x0004 /* Parity Error */ |
39 | #define SCIF_RDF 0x0002 | 50 | #define SCIF_RDF 0x0002 /* Receive FIFO Data Full */ |
40 | #define SCIF_DR 0x0001 | 51 | #define SCIF_DR 0x0001 /* Receive Data Ready */ |
41 | 52 | ||
42 | #define SCIF_DEFAULT_ERROR_MASK (SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK) | 53 | #define SCIF_DEFAULT_ERROR_MASK (SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK) |
43 | 54 | ||
44 | /* SCSPTR, optional */ | 55 | /* SCFCR (FIFO Control Register) */ |
45 | #define SCSPTR_RTSIO (1 << 7) | 56 | #define SCFCR_LOOP (1 << 0) /* Loopback Test */ |
46 | #define SCSPTR_CTSIO (1 << 5) | 57 | |
47 | #define SCSPTR_SPB2IO (1 << 1) | 58 | /* SCSPTR (Serial Port Register), optional */ |
48 | #define SCSPTR_SPB2DT (1 << 0) | 59 | #define SCSPTR_RTSIO (1 << 7) /* Serial Port RTS Pin Input/Output */ |
60 | #define SCSPTR_CTSIO (1 << 5) /* Serial Port CTS Pin Input/Output */ | ||
61 | #define SCSPTR_SPB2IO (1 << 1) /* Serial Port Break Input/Output */ | ||
62 | #define SCSPTR_SPB2DT (1 << 0) /* Serial Port Break Data */ | ||
49 | 63 | ||
50 | /* HSSRR HSCIF */ | 64 | /* HSSRR HSCIF */ |
51 | #define HSCIF_SRE 0x8000 | 65 | #define HSCIF_SRE 0x8000 /* Sampling Rate Register Enable */ |
52 | 66 | ||
53 | enum { | 67 | enum { |
54 | SCIx_PROBE_REGTYPE, | 68 | SCIx_PROBE_REGTYPE, |
@@ -73,10 +87,19 @@ enum { | |||
73 | * Not all registers will exist on all parts. | 87 | * Not all registers will exist on all parts. |
74 | */ | 88 | */ |
75 | enum { | 89 | enum { |
76 | SCSMR, SCBRR, SCSCR, SCxSR, | 90 | SCSMR, /* Serial Mode Register */ |
77 | SCFCR, SCFDR, SCxTDR, SCxRDR, | 91 | SCBRR, /* Bit Rate Register */ |
78 | SCLSR, SCTFDR, SCRFDR, SCSPTR, | 92 | SCSCR, /* Serial Control Register */ |
79 | HSSRR, | 93 | SCxSR, /* Serial Status Register */ |
94 | SCFCR, /* FIFO Control Register */ | ||
95 | SCFDR, /* FIFO Data Count Register */ | ||
96 | SCxTDR, /* Transmit (FIFO) Data Register */ | ||
97 | SCxRDR, /* Receive (FIFO) Data Register */ | ||
98 | SCLSR, /* Line Status Register */ | ||
99 | SCTFDR, /* Transmit FIFO Data Count Register */ | ||
100 | SCRFDR, /* Receive FIFO Data Count Register */ | ||
101 | SCSPTR, /* Serial Port Register */ | ||
102 | HSSRR, /* Sampling Rate Register */ | ||
80 | 103 | ||
81 | SCIx_NR_REGS, | 104 | SCIx_NR_REGS, |
82 | }; | 105 | }; |