diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2015-04-30 12:21:25 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-10 13:06:38 -0400 |
commit | c27ffc1080179c3f3b85e1e194fa61f1c9923b62 (patch) | |
tree | e415b75c62f58f5a136c5905165dfdebc1a0a819 /include/linux/serial_sci.h | |
parent | f9ce5ccfd97a61ed318eb52cbb358f1aa826d82f (diff) |
serial: sh-sci: Move private definitions to private header file
Move private register definitions and enums from the public
<linux/serial_sci.h> header file to the driver private "sh-sci.h" header
file.
The common Serial Control Register definitions are left in the public
header file, as they're needed to fill in plat_sci_port.scscr on legacy
systems not using DT.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
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 | 67 |
1 files changed, 1 insertions, 66 deletions
diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 6c5e3bb282b0..395fceb8c060 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h | |||
@@ -10,13 +10,6 @@ | |||
10 | 10 | ||
11 | #define SCIx_NOT_SUPPORTED (-1) | 11 | #define SCIx_NOT_SUPPORTED (-1) |
12 | 12 | ||
13 | /* SCSMR (Serial Mode Register) */ | ||
14 | #define SCSMR_CHR (1 << 6) /* 7-bit Character Length */ | ||
15 | #define SCSMR_PE (1 << 5) /* Parity Enable */ | ||
16 | #define SCSMR_ODD (1 << 4) /* Odd Parity */ | ||
17 | #define SCSMR_STOP (1 << 3) /* Stop Bit Length */ | ||
18 | #define SCSMR_CKS 0x0003 /* Clock Select */ | ||
19 | |||
20 | /* Serial Control Register (@ = not supported by all parts) */ | 13 | /* Serial Control Register (@ = not supported by all parts) */ |
21 | #define SCSCR_TIE (1 << 7) /* Transmit Interrupt Enable */ | 14 | #define SCSCR_TIE (1 << 7) /* Transmit Interrupt Enable */ |
22 | #define SCSCR_RIE (1 << 6) /* Receive Interrupt Enable */ | 15 | #define SCSCR_RIE (1 << 6) /* Receive Interrupt Enable */ |
@@ -26,43 +19,7 @@ | |||
26 | #define SCSCR_TOIE (1 << 2) /* Timeout Interrupt Enable @ */ | 19 | #define SCSCR_TOIE (1 << 2) /* Timeout Interrupt Enable @ */ |
27 | #define SCSCR_CKE1 (1 << 1) /* Clock Enable 1 */ | 20 | #define SCSCR_CKE1 (1 << 1) /* Clock Enable 1 */ |
28 | #define SCSCR_CKE0 (1 << 0) /* Clock Enable 0 */ | 21 | #define SCSCR_CKE0 (1 << 0) /* Clock Enable 0 */ |
29 | /* SCIFA/SCIFB only */ | 22 | |
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 */ | ||
40 | |||
41 | #define SCI_DEFAULT_ERROR_MASK (SCI_PER | SCI_FER) | ||
42 | |||
43 | /* SCxSR (Serial Status Register) on SCIF, HSCIF */ | ||
44 | #define SCIF_ER 0x0080 /* Receive Error */ | ||
45 | #define SCIF_TEND 0x0040 /* Transmission End */ | ||
46 | #define SCIF_TDFE 0x0020 /* Transmit FIFO Data Empty */ | ||
47 | #define SCIF_BRK 0x0010 /* Break Detect */ | ||
48 | #define SCIF_FER 0x0008 /* Framing Error */ | ||
49 | #define SCIF_PER 0x0004 /* Parity Error */ | ||
50 | #define SCIF_RDF 0x0002 /* Receive FIFO Data Full */ | ||
51 | #define SCIF_DR 0x0001 /* Receive Data Ready */ | ||
52 | |||
53 | #define SCIF_DEFAULT_ERROR_MASK (SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK) | ||
54 | |||
55 | /* SCFCR (FIFO Control Register) */ | ||
56 | #define SCFCR_LOOP (1 << 0) /* Loopback Test */ | ||
57 | |||
58 | /* SCSPTR (Serial Port Register), optional */ | ||
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 */ | ||
63 | |||
64 | /* HSSRR HSCIF */ | ||
65 | #define HSCIF_SRE 0x8000 /* Sampling Rate Register Enable */ | ||
66 | 23 | ||
67 | enum { | 24 | enum { |
68 | SCIx_PROBE_REGTYPE, | 25 | SCIx_PROBE_REGTYPE, |
@@ -82,28 +39,6 @@ enum { | |||
82 | SCIx_NR_REGTYPES, | 39 | SCIx_NR_REGTYPES, |
83 | }; | 40 | }; |
84 | 41 | ||
85 | /* | ||
86 | * SCI register subset common for all port types. | ||
87 | * Not all registers will exist on all parts. | ||
88 | */ | ||
89 | enum { | ||
90 | SCSMR, /* Serial Mode Register */ | ||
91 | SCBRR, /* Bit Rate Register */ | ||
92 | SCSCR, /* Serial Control Register */ | ||
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 */ | ||
103 | |||
104 | SCIx_NR_REGS, | ||
105 | }; | ||
106 | |||
107 | struct device; | 42 | struct device; |
108 | 43 | ||
109 | struct plat_sci_port_ops { | 44 | struct plat_sci_port_ops { |