Skip to content

Commit

Permalink
Merge tag 'tty-3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/gregkh/tty

Pull tty/serial driver updates from Greg KH:
 "Here's the big tty/serial driver patchset for 3.18-rc1.

  Lots of little things in here, some good work from Peter Hurley on the
  tty core, and in lots of drivers.  There are also lots of other driver
  updates in here as well, full details in the changelogs.

  All have been in the linux-next tree for a while"

* tag 'tty-3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (99 commits)
  Revert "serial/core: Initialize the console pm state"
  tty: serial: 8250: use 32bit variable for rpm_tx_active
  tty: serial: msm: Add earlycon support
  serial/core: Initialize the console pm state
  serial: asc: Conditionally use readl_relaxed (COMPILE_TEST)
  serial: of-serial: add PM suspend/resume support
  m68k: AMIGA_BUILTIN_SERIAL should depend on TTY
  asm/uapi: Add definition of TIOC[SG]RS485
  tty/metag_da: Add console_poll module parameter
  serial: 8250_pci: remove rts_n override from Baytrail quirk
  serial: cadence: Add generic earlycon support
  serial: imx: change the wait even to interruptiable
  serial: imx: terminate the RX DMA when the UART is suspending
  serial: imx: fix throttle/unthrottle callbacks for hardware assisted flow control
  serial: 8250: Add Quark X1000 to 8250_pci.c
  tty: omap-serial: pull out calculation from baud_is_mode16
  tty: omap-serial: fix division by zero
  xen_hvc: no reason to write the type key on xenstore
  tty: serial: 8250_core: remove UART_IER_RDI in serial8250_stop_rx()
  tty: serial: 8250_core: use the ->line argument as a hint in serial8250_find_match_or_unused()
  ...
  • Loading branch information
torvalds committed Oct 8, 2014
2 parents b9af564 + 69784fa commit 683a52a
Show file tree
Hide file tree
Showing 69 changed files with 2,296 additions and 550 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Required properties:
- syscon: Phandle to SYSCON node, which contain UART control bits.

Optional properties:
- uart-use-ms: Indicate the UART has modem signal (DCD, DSR, CTS).
- {rts,cts,dtr,dsr,rng,dcd}-gpios: specify a GPIO for RTS/CTS/DTR/DSR/RI/DCD
line respectively.

Note: Each UART port should have an alias correctly numbered
in "aliases" node.
Expand All @@ -24,5 +25,7 @@ Example:
interrupts = <12 13>;
clocks = <&clks 11>;
syscon = <&syscon1>;
uart-use-ms;
cts-gpios = <&sysgpio 0 GPIO_ACTIVE_LOW>;
dsr-gpios = <&sysgpio 1 GPIO_ACTIVE_LOW>;
dcd-gpios = <&sysgpio 2 GPIO_ACTIVE_LOW>;
};
22 changes: 22 additions & 0 deletions Documentation/devicetree/bindings/serial/mtk-uart.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
* Mediatek Universal Asynchronous Receiver/Transmitter (UART)

Required properties:
- compatible should contain:
* "mediatek,mt6589-uart" for MT6589 compatible UARTS
* "mediatek,mt6582-uart" for MT6582 compatible UARTS
* "mediatek,mt6577-uart" for all compatible UARTS (MT6589, MT6582, MT6577)

- reg: The base address of the UART register bank.

- interrupts: A single interrupt specifier.

- clocks: Clock driving the hardware.

Example:

uart0: serial@11006000 {
compatible = "mediatek,mt6589-uart", "mediatek,mt6577-uart";
reg = <0x11006000 0x400>;
interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_LOW>;
clocks = <&uart_clk>;
};
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/serial/of-serial.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Required properties:
- "altr,16550-FIFO32"
- "altr,16550-FIFO64"
- "altr,16550-FIFO128"
- "fsl,16550-FIFO64"
- "serial" if the port type is unknown.
- reg : offset and length of the register set for the device.
- interrupts : should contain uart interrupt.
Expand All @@ -37,7 +38,6 @@ Optional properties:
- auto-flow-control: one way to enable automatic flow control support. The
driver is allowed to detect support for the capability even without this
property.
- has-hw-flow-control: the hardware has flow control capability.

Example:

Expand Down
17 changes: 0 additions & 17 deletions Documentation/devicetree/bindings/serial/via,vt8500-uart.txt

This file was deleted.

3 changes: 2 additions & 1 deletion Documentation/devicetree/bindings/serial/vt8500-uart.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
* VIA VT8500 and WonderMedia WM8xxx UART Controller

Required properties:
- compatible: should be "via,vt8500-uart"
- compatible: should be "via,vt8500-uart" (for VIA/WonderMedia chips up to and
including WM8850/WM8950), or "wm,wm8880-uart" (for WM8880 and later)

- reg: base physical address of the controller and length of memory mapped
region.
Expand Down
18 changes: 18 additions & 0 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.

earlycon= [KNL] Output early console device and options.

cdns,<addr>
Start an early, polled-mode console on a cadence serial
port at the specified address. The cadence serial port
must already be setup and configured. Options are not
yet supported.

uart[8250],io,<addr>[,options]
uart[8250],mmio,<addr>[,options]
uart[8250],mmio32,<addr>[,options]
Expand All @@ -936,6 +942,18 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
must already be setup and configured. Options are not
yet supported.

msm_serial,<addr>
Start an early, polled-mode console on an msm serial
port at the specified address. The serial port
must already be setup and configured. Options are not
yet supported.

msm_serial_dm,<addr>
Start an early, polled-mode console on an msm serial
dm port at the specified address. The serial port
must already be setup and configured. Options are not
yet supported.

smh Use ARM semihosting calls for early console.

earlyprintk= [X86,SH,BLACKFIN,ARM,M68k]
Expand Down
2 changes: 2 additions & 0 deletions Documentation/serial/driver
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ hardware.
will append the character to the circular buffer and then call
start_tx() / stop_tx() to flush the data out.

Do not transmit if ch == '\0' (__DISABLED_CHAR).

Locking: none.
Interrupts: caller dependent.

Expand Down
2 changes: 2 additions & 0 deletions arch/alpha/include/uapi/asm/ioctls.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
#define TIOCSBRK 0x5427 /* BSD compatibility */
#define TIOCCBRK 0x5428 /* BSD compatibility */
#define TIOCGSID 0x5429 /* Return the session ID of FD */
#define TIOCGRS485 _IOR('T', 0x2E, struct serial_rs485)
#define TIOCSRS485 _IOWR('T', 0x2F, struct serial_rs485)
#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */
Expand Down
2 changes: 2 additions & 0 deletions arch/mips/include/uapi/asm/ioctls.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
#define TCSETS2 _IOW('T', 0x2B, struct termios2)
#define TCSETSW2 _IOW('T', 0x2C, struct termios2)
#define TCSETSF2 _IOW('T', 0x2D, struct termios2)
#define TIOCGRS485 _IOR('T', 0x2E, struct serial_rs485)
#define TIOCSRS485 _IOWR('T', 0x2F, struct serial_rs485)
#define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
#define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */
#define TIOCGDEV _IOR('T', 0x32, unsigned int) /* Get primary device node of /dev/console */
Expand Down
2 changes: 2 additions & 0 deletions arch/parisc/include/uapi/asm/ioctls.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
#define TCSETS2 _IOW('T',0x2B, struct termios2)
#define TCSETSW2 _IOW('T',0x2C, struct termios2)
#define TCSETSF2 _IOW('T',0x2D, struct termios2)
#define TIOCGRS485 _IOR('T', 0x2E, struct serial_rs485)
#define TIOCSRS485 _IOWR('T', 0x2F, struct serial_rs485)
#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
#define TIOCGDEV _IOR('T',0x32, int) /* Get primary device node of /dev/console */
Expand Down
2 changes: 2 additions & 0 deletions arch/sh/include/uapi/asm/ioctls.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
#define TCSETS2 _IOW('T', 43, struct termios2)
#define TCSETSW2 _IOW('T', 44, struct termios2)
#define TCSETSF2 _IOW('T', 45, struct termios2)
#define TIOCGRS485 _IOR('T', 46, struct serial_rs485)
#define TIOCSRS485 _IOWR('T', 47, struct serial_rs485)
#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */
Expand Down
2 changes: 2 additions & 0 deletions arch/sparc/include/uapi/asm/ioctls.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */
#define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */
#define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */
#define TIOCGRS485 _IOR('T', 0x41, struct serial_rs485)
#define TIOCSRS485 _IOWR('T', 0x42, struct serial_rs485)

/* Note that all the ioctls that are not available in Linux have a
* double underscore on the front to: a) avoid some programs to
Expand Down
2 changes: 2 additions & 0 deletions arch/xtensa/include/uapi/asm/ioctls.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@
#define TCSETS2 _IOW('T', 43, struct termios2)
#define TCSETSW2 _IOW('T', 44, struct termios2)
#define TCSETSF2 _IOW('T', 45, struct termios2)
#define TIOCGRS485 _IOR('T', 46, struct serial_rs485)
#define TIOCSRS485 _IOWR('T', 47, struct serial_rs485)
#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */
Expand Down
5 changes: 0 additions & 5 deletions drivers/isdn/i4l/isdn_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -1043,11 +1043,6 @@ isdn_tty_change_speed(modem_info *info)
if (!(cflag & PARODD))
cval |= UART_LCR_EPAR;

/* CTS flow control flag and modem status interrupts */
if (cflag & CRTSCTS) {
port->flags |= ASYNC_CTS_FLOW;
} else
port->flags &= ~ASYNC_CTS_FLOW;
if (cflag & CLOCAL)
port->flags &= ~ASYNC_CHECK_CD;
else {
Expand Down
13 changes: 0 additions & 13 deletions drivers/staging/dgnc/dgnc_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,6 @@ static struct pci_device_id dgnc_pci_tbl[] = {
{ DIGI_VID, PCI_DEVICE_CLASSIC_4_422_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 },
{ DIGI_VID, PCI_DEVICE_CLASSIC_8_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 },
{ DIGI_VID, PCI_DEVICE_CLASSIC_8_422_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 },
{ DIGI_VID, PCI_DEVICE_NEO_4_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 },
{ DIGI_VID, PCI_DEVICE_NEO_8_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5 },
{ DIGI_VID, PCI_DEVICE_NEO_2DB9_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6 },
{ DIGI_VID, PCI_DEVICE_NEO_2DB9PRI_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7 },
{ DIGI_VID, PCI_DEVICE_NEO_2RJ45_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 },
{ DIGI_VID, PCI_DEVICE_NEO_2RJ45PRI_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9 },
{ DIGI_VID, PCI_DEVICE_NEO_1_422_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 10 },
{ DIGI_VID, PCI_DEVICE_NEO_1_422_485_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 11 },
{ DIGI_VID, PCI_DEVICE_NEO_2_422_485_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12 },
{ DIGI_VID, PCI_DEVICE_NEO_EXPRESS_8_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13 },
{ DIGI_VID, PCI_DEVICE_NEO_EXPRESS_4_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14 },
{ DIGI_VID, PCI_DEVICE_NEO_EXPRESS_4RJ45_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 15 },
{ DIGI_VID, PCI_DEVICE_NEO_EXPRESS_8RJ45_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 16 },
{0,} /* 0 terminated list. */
};
MODULE_DEVICE_TABLE(pci, dgnc_pci_tbl);
Expand Down
3 changes: 0 additions & 3 deletions drivers/tty/hvc/hvc_xen.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,6 @@ static int xencons_connect_backend(struct xenbus_device *dev,
goto error_xenbus;
ret = xenbus_printf(xbt, dev->nodename, "port", "%u",
evtchn);
if (ret)
goto error_xenbus;
ret = xenbus_printf(xbt, dev->nodename, "type", "ioemu");
if (ret)
goto error_xenbus;
ret = xenbus_transaction_end(xbt, 0);
Expand Down
14 changes: 12 additions & 2 deletions drivers/tty/metag_da.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/kthread.h>
#include <linux/moduleparam.h>
#include <linux/mutex.h>
#include <linux/sched.h>
#include <linux/serial.h>
Expand Down Expand Up @@ -70,6 +71,15 @@ static struct tty_driver *channel_driver;
static struct timer_list put_timer;
static struct task_struct *dashtty_thread;

/*
* The console_poll parameter determines whether the console channel should be
* polled for input.
* By default the console channel isn't polled at all, in order to avoid the
* overhead, but that means it isn't possible to have a login on /dev/console.
*/
static bool console_poll;
module_param(console_poll, bool, S_IRUGO);

#define RX_BUF_SIZE 1024

enum {
Expand Down Expand Up @@ -353,7 +363,7 @@ static int dashtty_port_activate(struct tty_port *port, struct tty_struct *tty)
* possible to have a login on /dev/console.
*
*/
if (dport != &dashtty_ports[CONSOLE_CHANNEL])
if (console_poll || dport != &dashtty_ports[CONSOLE_CHANNEL])
if (atomic_inc_return(&num_channels_need_poll) == 1)
add_poll_timer(&poll_timer);

Expand All @@ -372,7 +382,7 @@ static void dashtty_port_shutdown(struct tty_port *port)
unsigned int count;

/* stop reading */
if (dport != &dashtty_ports[CONSOLE_CHANNEL])
if (console_poll || dport != &dashtty_ports[CONSOLE_CHANNEL])
if (atomic_dec_and_test(&num_channels_need_poll))
del_timer_sync(&poll_timer);

Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/moxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ static int __init moxa_init(void)
continue;
}

printk(KERN_INFO "MOXA isa board found at 0x%.8lu and "
printk(KERN_INFO "MOXA isa board found at 0x%.8lx and "
"ready (%u ports, firmware loaded)\n",
baseaddr[i], brd->numPorts);

Expand Down
8 changes: 4 additions & 4 deletions drivers/tty/n_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ static void n_tty_receive_break(struct tty_struct *tty)
}
put_tty_queue('\0', ldata);
if (waitqueue_active(&tty->read_wait))
wake_up_interruptible(&tty->read_wait);
wake_up_interruptible_poll(&tty->read_wait, POLLIN);
}

/**
Expand Down Expand Up @@ -1226,7 +1226,7 @@ static void n_tty_receive_parity_error(struct tty_struct *tty, unsigned char c)
} else
put_tty_queue(c, ldata);
if (waitqueue_active(&tty->read_wait))
wake_up_interruptible(&tty->read_wait);
wake_up_interruptible_poll(&tty->read_wait, POLLIN);
}

static void
Expand Down Expand Up @@ -1378,7 +1378,7 @@ n_tty_receive_char_special(struct tty_struct *tty, unsigned char c)
ldata->canon_head = ldata->read_head;
kill_fasync(&tty->fasync, SIGIO, POLL_IN);
if (waitqueue_active(&tty->read_wait))
wake_up_interruptible(&tty->read_wait);
wake_up_interruptible_poll(&tty->read_wait, POLLIN);
return 0;
}
}
Expand Down Expand Up @@ -1679,7 +1679,7 @@ static void __receive_buf(struct tty_struct *tty, const unsigned char *cp,
L_EXTPROC(tty)) {
kill_fasync(&tty->fasync, SIGIO, POLL_IN);
if (waitqueue_active(&tty->read_wait))
wake_up_interruptible(&tty->read_wait);
wake_up_interruptible_poll(&tty->read_wait, POLLIN);
}
}

Expand Down
6 changes: 3 additions & 3 deletions drivers/tty/nozomi.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ static u32 write_mem32(void __iomem *mem_addr_start, const u32 *buf,
}

/* Setup pointers to different channels and also setup buffer sizes. */
static void setup_memory(struct nozomi *dc)
static void nozomi_setup_memory(struct nozomi *dc)
{
void __iomem *offset = dc->base_addr + dc->config_table.dl_start;
/* The length reported is including the length field of 4 bytes,
Expand Down Expand Up @@ -671,7 +671,7 @@ static int nozomi_read_config_table(struct nozomi *dc)
int i;
DBG1("Second phase, configuring card");

setup_memory(dc);
nozomi_setup_memory(dc);

dc->port[PORT_MDM].toggle_ul = dc->config_table.toggle.mdm_ul;
dc->port[PORT_MDM].toggle_dl = dc->config_table.toggle.mdm_dl;
Expand Down Expand Up @@ -705,7 +705,7 @@ static int nozomi_read_config_table(struct nozomi *dc)
dc->config_table.version);

/* Here we should disable all I/O over F32. */
setup_memory(dc);
nozomi_setup_memory(dc);

/*
* We should send ALL channel pair tokens back along
Expand Down
Loading

0 comments on commit 683a52a

Please sign in to comment.