fix a kmap leak in virtio_console
[linux/fpc-iii.git] / drivers / tty / serial / sh-sci.h
blobd5db81a0a4303fda5c5fd4d5041eff822202c3da
1 #include <linux/serial_core.h>
2 #include <linux/io.h>
3 #include <linux/gpio.h>
5 #define SCxSR_TEND(port) (((port)->type == PORT_SCI) ? SCI_TEND : SCIF_TEND)
6 #define SCxSR_RDxF(port) (((port)->type == PORT_SCI) ? SCI_RDRF : SCIF_RDF)
7 #define SCxSR_TDxE(port) (((port)->type == PORT_SCI) ? SCI_TDRE : SCIF_TDFE)
8 #define SCxSR_FER(port) (((port)->type == PORT_SCI) ? SCI_FER : SCIF_FER)
9 #define SCxSR_PER(port) (((port)->type == PORT_SCI) ? SCI_PER : SCIF_PER)
10 #define SCxSR_BRK(port) (((port)->type == PORT_SCI) ? 0x00 : SCIF_BRK)
12 #define SCxSR_ERRORS(port) (to_sci_port(port)->error_mask)
14 #if defined(CONFIG_CPU_SUBTYPE_SH7705) || \
15 defined(CONFIG_CPU_SUBTYPE_SH7720) || \
16 defined(CONFIG_CPU_SUBTYPE_SH7721) || \
17 defined(CONFIG_ARCH_SH73A0) || \
18 defined(CONFIG_ARCH_SH7372) || \
19 defined(CONFIG_ARCH_R8A7740)
21 # define SCxSR_RDxF_CLEAR(port) (serial_port_in(port, SCxSR) & 0xfffc)
22 # define SCxSR_ERROR_CLEAR(port) (serial_port_in(port, SCxSR) & 0xfd73)
23 # define SCxSR_TDxE_CLEAR(port) (serial_port_in(port, SCxSR) & 0xffdf)
24 # define SCxSR_BREAK_CLEAR(port) (serial_port_in(port, SCxSR) & 0xffe3)
25 #else
26 # define SCxSR_RDxF_CLEAR(port) (((port)->type == PORT_SCI) ? 0xbc : 0x00fc)
27 # define SCxSR_ERROR_CLEAR(port) (((port)->type == PORT_SCI) ? 0xc4 : 0x0073)
28 # define SCxSR_TDxE_CLEAR(port) (((port)->type == PORT_SCI) ? 0x78 : 0x00df)
29 # define SCxSR_BREAK_CLEAR(port) (((port)->type == PORT_SCI) ? 0xc4 : 0x00e3)
30 #endif
32 /* SCFCR */
33 #define SCFCR_RFRST 0x0002
34 #define SCFCR_TFRST 0x0004
35 #define SCFCR_MCE 0x0008
37 #define SCI_MAJOR 204
38 #define SCI_MINOR_START 8