summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 16:55:57 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 16:55:57 -0700
commitcb1595563880a81dab6eab9a5ecb4520d2e76077 (patch)
tree042907fc859287a40a454d57c034015742e38cbf /include
parentc12e69c6aaf785fd307d05cb6f36ca0e7577ead7 (diff)
parent3a13884abea08a5043b98d9374486ec859d1e03a (diff)
Merge tag 'tty-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial driver update from Greg KH: "Here's the big tty/serial driver update for 3.15-rc1. Nothing major, a number of serial driver updates and a few tty core fixes as well. All have been in linux-next for a while" * tag 'tty-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (71 commits) tty/serial: omap: empty the RX FIFO at the end of half-duplex TX tty/serial: omap: fix RX interrupt enable/disable in half-duplex TX serial: sh-sci: Neaten dev_<level> uses serial: sh-sci: Replace hardcoded 3 by UART_PM_STATE_OFF serial: sh-sci: Add more register documentation serial: sh-sci: Remove useless casts serial: sh-sci: Replace printk() by pr_*() serial_core: Avoid NULL pointer dereference in uart_close() serial_core: Get a reference for port->tty in uart_remove_one_port() serial: clps711x: Give a chance to perform useful tasks during wait loop serial_core: Grammar s/ports/port's/ serial_core: Spelling s/contro/control/ serial: efm32: properly namespace location property serial: max310x: Add missing #include <linux/uaccess.h> synclink: fix info leak in ioctl serial: 8250: Clean up the locking for -rt serial: 8250_pci: change BayTrail default uartclk serial: 8250_pci: more BayTrail error-free bauds serial: sh-sci: Add missing call to uart_remove_one_port() in failure path serial_core: Unregister console in uart_remove_one_port() ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/platform_data/max310x.h64
-rw-r--r--include/linux/platform_data/serial-imx.h2
-rw-r--r--include/linux/serial_bcm63xx.h2
-rw-r--r--include/linux/serial_sci.h93
-rw-r--r--include/linux/tty.h2
-rw-r--r--include/linux/tty_ldisc.h1
6 files changed, 61 insertions, 103 deletions
diff --git a/include/linux/platform_data/max310x.h b/include/linux/platform_data/max310x.h
deleted file mode 100644
index dd11dcd1a184..000000000000
--- a/include/linux/platform_data/max310x.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Maxim (Dallas) MAX3107/8/9, MAX14830 serial driver
- *
- * Copyright (C) 2012 Alexander Shiyan <shc_work@mail.ru>
- *
- * Based on max3100.c, by Christian Pellegrin <chripell@evolware.org>
- * Based on max3110.c, by Feng Tang <feng.tang@intel.com>
- * Based on max3107.c, by Aavamobile
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-
-#ifndef _MAX310X_H_
-#define _MAX310X_H_
-
-/*
- * Example board initialization data:
- *
- * static struct max310x_pdata max3107_pdata = {
- * .driver_flags = MAX310X_EXT_CLK,
- * .uart_flags[0] = MAX310X_ECHO_SUPRESS | MAX310X_AUTO_DIR_CTRL,
- * .frequency = 3686400,
- * .gpio_base = -1,
- * };
- *
- * static struct spi_board_info spi_device_max3107[] = {
- * {
- * .modalias = "max3107",
- * .irq = IRQ_EINT3,
- * .bus_num = 1,
- * .chip_select = 1,
- * .platform_data = &max3107_pdata,
- * },
- * };
- */
-
-#define MAX310X_MAX_UARTS 4
-
-/* MAX310X platform data structure */
-struct max310x_pdata {
- /* Flags global to driver */
- const u8 driver_flags;
-#define MAX310X_EXT_CLK (0x00000001) /* External clock enable */
- /* Flags global to UART port */
- const u8 uart_flags[MAX310X_MAX_UARTS];
-#define MAX310X_LOOPBACK (0x00000001) /* Loopback mode enable */
-#define MAX310X_ECHO_SUPRESS (0x00000002) /* Enable echo supress */
-#define MAX310X_AUTO_DIR_CTRL (0x00000004) /* Enable Auto direction
- * control (RS-485)
- */
- /* Frequency (extrenal clock or crystal) */
- const int frequency;
- /* GPIO base number (can be negative) */
- const int gpio_base;
- /* Called during startup */
- void (*init)(void);
- /* Called before finish */
- void (*exit)(void);
-};
-
-#endif
diff --git a/include/linux/platform_data/serial-imx.h b/include/linux/platform_data/serial-imx.h
index 4adec9b154dd..3cc2e3c40914 100644
--- a/include/linux/platform_data/serial-imx.h
+++ b/include/linux/platform_data/serial-imx.h
@@ -23,8 +23,6 @@
#define IMXUART_IRDA (1<<1)
struct imxuart_platform_data {
- int (*init)(struct platform_device *pdev);
- void (*exit)(struct platform_device *pdev);
unsigned int flags;
void (*irda_enable)(int enable);
unsigned int irda_inv_rx:1;
diff --git a/include/linux/serial_bcm63xx.h b/include/linux/serial_bcm63xx.h
index 570e964dc899..a80aa1a5bee2 100644
--- a/include/linux/serial_bcm63xx.h
+++ b/include/linux/serial_bcm63xx.h
@@ -116,4 +116,6 @@
UART_FIFO_PARERR_MASK | \
UART_FIFO_BRKDET_MASK)
+#define UART_REG_SIZE 24
+
#endif /* _LINUX_SERIAL_BCM63XX_H */
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 @@
#define SCIx_NOT_SUPPORTED (-1)
-#define SCSCR_TIE (1 << 7)
-#define SCSCR_RIE (1 << 6)
-#define SCSCR_TE (1 << 5)
-#define SCSCR_RE (1 << 4)
-#define SCSCR_REIE (1 << 3) /* not supported by all parts */
-#define SCSCR_TOIE (1 << 2) /* not supported by all parts */
-#define SCSCR_CKE1 (1 << 1)
-#define SCSCR_CKE0 (1 << 0)
-
-/* SCxSR SCI */
-#define SCI_TDRE 0x80
-#define SCI_RDRF 0x40
-#define SCI_ORER 0x20
-#define SCI_FER 0x10
-#define SCI_PER 0x08
-#define SCI_TEND 0x04
+/* SCSMR (Serial Mode Register) */
+#define SCSMR_CHR (1 << 6) /* 7-bit Character Length */
+#define SCSMR_PE (1 << 5) /* Parity Enable */
+#define SCSMR_ODD (1 << 4) /* Odd Parity */
+#define SCSMR_STOP (1 << 3) /* Stop Bit Length */
+#define SCSMR_CKS 0x0003 /* Clock Select */
+
+/* Serial Control Register (@ = not supported by all parts) */
+#define SCSCR_TIE (1 << 7) /* Transmit Interrupt Enable */
+#define SCSCR_RIE (1 << 6) /* Receive Interrupt Enable */
+#define SCSCR_TE (1 << 5) /* Transmit Enable */
+#define SCSCR_RE (1 << 4) /* Receive Enable */
+#define SCSCR_REIE (1 << 3) /* Receive Error Interrupt Enable @ */
+#define SCSCR_TOIE (1 << 2) /* Timeout Interrupt Enable @ */
+#define SCSCR_CKE1 (1 << 1) /* Clock Enable 1 */
+#define SCSCR_CKE0 (1 << 0) /* Clock Enable 0 */
+/* SCIFA/SCIFB only */
+#define SCSCR_TDRQE (1 << 15) /* Tx Data Transfer Request Enable */
+#define SCSCR_RDRQE (1 << 14) /* Rx Data Transfer Request Enable */
+
+/* SCxSR (Serial Status Register) on SCI */
+#define SCI_TDRE 0x80 /* Transmit Data Register Empty */
+#define SCI_RDRF 0x40 /* Receive Data Register Full */
+#define SCI_ORER 0x20 /* Overrun Error */
+#define SCI_FER 0x10 /* Framing Error */
+#define SCI_PER 0x08 /* Parity Error */
+#define SCI_TEND 0x04 /* Transmit End */
#define SCI_DEFAULT_ERROR_MASK (SCI_PER | SCI_FER)
-/* SCxSR SCIF, HSCIF */
-#define SCIF_ER 0x0080
-#define SCIF_TEND 0x0040
-#define SCIF_TDFE 0x0020
-#define SCIF_BRK 0x0010
-#define SCIF_FER 0x0008
-#define SCIF_PER 0x0004
-#define SCIF_RDF 0x0002
-#define SCIF_DR 0x0001
+/* SCxSR (Serial Status Register) on SCIF, HSCIF */
+#define SCIF_ER 0x0080 /* Receive Error */
+#define SCIF_TEND 0x0040 /* Transmission End */
+#define SCIF_TDFE 0x0020 /* Transmit FIFO Data Empty */
+#define SCIF_BRK 0x0010 /* Break Detect */
+#define SCIF_FER 0x0008 /* Framing Error */
+#define SCIF_PER 0x0004 /* Parity Error */
+#define SCIF_RDF 0x0002 /* Receive FIFO Data Full */
+#define SCIF_DR 0x0001 /* Receive Data Ready */
#define SCIF_DEFAULT_ERROR_MASK (SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK)
-/* SCSPTR, optional */
-#define SCSPTR_RTSIO (1 << 7)
-#define SCSPTR_CTSIO (1 << 5)
-#define SCSPTR_SPB2IO (1 << 1)
-#define SCSPTR_SPB2DT (1 << 0)
+/* SCFCR (FIFO Control Register) */
+#define SCFCR_LOOP (1 << 0) /* Loopback Test */
+
+/* SCSPTR (Serial Port Register), optional */
+#define SCSPTR_RTSIO (1 << 7) /* Serial Port RTS Pin Input/Output */
+#define SCSPTR_CTSIO (1 << 5) /* Serial Port CTS Pin Input/Output */
+#define SCSPTR_SPB2IO (1 << 1) /* Serial Port Break Input/Output */
+#define SCSPTR_SPB2DT (1 << 0) /* Serial Port Break Data */
/* HSSRR HSCIF */
-#define HSCIF_SRE 0x8000
+#define HSCIF_SRE 0x8000 /* Sampling Rate Register Enable */
enum {
SCIx_PROBE_REGTYPE,
@@ -73,10 +87,19 @@ enum {
* Not all registers will exist on all parts.
*/
enum {
- SCSMR, SCBRR, SCSCR, SCxSR,
- SCFCR, SCFDR, SCxTDR, SCxRDR,
- SCLSR, SCTFDR, SCRFDR, SCSPTR,
- HSSRR,
+ SCSMR, /* Serial Mode Register */
+ SCBRR, /* Bit Rate Register */
+ SCSCR, /* Serial Control Register */
+ SCxSR, /* Serial Status Register */
+ SCFCR, /* FIFO Control Register */
+ SCFDR, /* FIFO Data Count Register */
+ SCxTDR, /* Transmit (FIFO) Data Register */
+ SCxRDR, /* Receive (FIFO) Data Register */
+ SCLSR, /* Line Status Register */
+ SCTFDR, /* Transmit FIFO Data Count Register */
+ SCRFDR, /* Receive FIFO Data Count Register */
+ SCSPTR, /* Serial Port Register */
+ HSSRR, /* Sampling Rate Register */
SCIx_NR_REGS,
};
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 90b4fdc8a61f..b90b5c221ff0 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -208,7 +208,7 @@ struct tty_port {
wait_queue_head_t delta_msr_wait; /* Modem status change */
unsigned long flags; /* TTY flags ASY_*/
unsigned char console:1, /* port is a console */
- low_latency:1; /* direct buffer flush */
+ low_latency:1; /* optional: tune for latency */
struct mutex mutex; /* Locking */
struct mutex buf_mutex; /* Buffer alloc lock */
unsigned char *xmit_buf; /* Optional buffer */
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h
index b8347c207cb8..add26da2faeb 100644
--- a/include/linux/tty_ldisc.h
+++ b/include/linux/tty_ldisc.h
@@ -126,7 +126,6 @@
#include <linux/fs.h>
#include <linux/wait.h>
-#include <linux/wait.h>
/*