projects/linux·commit fd0d351d

Merge tag 'tty-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

fd0d351d · Linus Torvalds <[email protected]> · 2015-11-04 21:35:12 -08:00

Pull tty/serial driver updates from Greg KH:
 "Here is the big tty and serial driver update for 4.4-rc1.

  Lots of serial driver updates and a few small tty core changes.  Full
  details in the shortlog.

  All of these have been in linux-next for a while"

* tag 'tty-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (148 commits)
  tty: Use unbound workqueue for all input workers
  tty: Abstract tty buffer work
  tty: Prevent tty teardown during tty_write_message()
  tty: core: Use correct spinlock flavor in tiocspgrp()
  tty: Combine SIGTTOU/SIGTTIN handling
  serial: amba-pl011: fix incorrect integer size in pl011_fifo_to_tty()
  ttyFDC: Fix build problems due to use of module_{init,exit}
  tty: remove unneeded return statement
  serial: 8250_mid: add support for DMA engine handling from UART MMIO
  dmaengine: hsu: remove platform data
  dmaengine: hsu: introduce stubs for the exported functions
  dmaengine: hsu: make the UART driver in control of selecting this driver
  serial: fix mctrl helper functions
  serial: 8250_pci: Intel MID UART support to its own driver
  serial: fsl_lpuart: add earlycon support
  tty: disable unbind for old 74xx based serial/mpsc console port
  serial: pl011: Spelling s/clocks-names/clock-names/
  n_tty: Remove reader wakeups for TTY_BREAK/TTY_PARITY chars
  tty: synclink, fix indentation
  serial: at91, fix rs485 properties
  ...
Commit
fd0d351de7bbd718bc2b34d5846854831aa2b88c
Parents
3d6f4780 · e052c6d1

Merge commit. Changes below are compared with the first parent: 3d6f4780.

Changes

82 files changed · +2734 −1941

FileStatusAddDelContent
Documentation/devicetree/bindings/serial/ingenic,uart.txtmodified+2−1View file
Documentation/devicetree/bindings/serial/pl011.txtmodified+1−1View file
Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txtmodified+6−0View file
Documentation/devicetree/bindings/serial/renesas,sci-serial.txtmodified+2−0View file
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txtmodified+3−0View file
Documentation/kernel-parameters.txtmodified+7−0View file
Documentation/serial/drivermodified+9−1View file
Documentation/serial/tty.txtmodified+39−21View file
arch/arm64/include/asm/dcc.hadded+55−0View file
drivers/char/pcmcia/synclink_cs.cmodified+0−9View file
drivers/dma/hsu/Kconfigmodified+2−7View file
drivers/dma/hsu/hsu.cmodified+7−17View file
drivers/dma/hsu/hsu.hmodified+1−0View file
drivers/dma/hsu/pci.cmodified+1−1View file
drivers/isdn/i4l/isdn_tty.cmodified+1−1View file
drivers/tty/cyclades.cmodified+0−9View file
drivers/tty/hvc/Kconfigmodified+1−1View file
drivers/tty/hvc/hvc_console.cmodified+2−18View file
drivers/tty/hvc/hvc_dcc.cmodified+11−4View file
drivers/tty/hvc/hvcs.cmodified+1−1View file
drivers/tty/mips_ejtag_fdc.cmodified+3−36View file
drivers/tty/n_r3964.cmodified+16−12View file
drivers/tty/n_tty.cmodified+3−29View file
drivers/tty/pty.cmodified+5−2View file
drivers/tty/rocket.cmodified+0−13View file
drivers/tty/serial/68328serial.cmodified+2−3View file
drivers/tty/serial/8250/8250_core.cmodified+20−6View file
drivers/tty/serial/8250/8250_dma.cmodified+0−6View file
drivers/tty/serial/8250/8250_dw.cmodified+132−156View file
drivers/tty/serial/8250/8250_early.cmodified+4−0View file
drivers/tty/serial/8250/8250_ingenic.cmodified+84−4View file
drivers/tty/serial/8250/8250_mid.cadded+326−0View file
drivers/tty/serial/8250/8250_omap.cmodified+5−3View file
drivers/tty/serial/8250/8250_pci.cmodified+7−222View file
drivers/tty/serial/8250/8250_port.cmodified+49−37View file
drivers/tty/serial/8250/Kconfigmodified+18−7View file
drivers/tty/serial/8250/Makefilemodified+1−0View file
drivers/tty/serial/Kconfigmodified+7−5View file
drivers/tty/serial/altera_uart.cmodified+2−24View file
drivers/tty/serial/amba-pl011.cmodified+2−2View file
drivers/tty/serial/apbuart.cmodified+1−0View file
drivers/tty/serial/atmel_serial.cmodified+16−11View file
drivers/tty/serial/clps711x.cmodified+1−1View file
drivers/tty/serial/cpm_uart/cpm_uart_core.cmodified+1−0View file
drivers/tty/serial/crisv10.cmodified+1−33View file
drivers/tty/serial/fsl_lpuart.cmodified+39−0View file
drivers/tty/serial/imx.cmodified+103−72View file
drivers/tty/serial/lpc32xx_hs.cmodified+4−3View file
drivers/tty/serial/men_z135_uart.cmodified+15−8View file
drivers/tty/serial/mpc52xx_uart.cmodified+7−0View file
drivers/tty/serial/mpsc.cmodified+6−35View file
drivers/tty/serial/msm_serial.cmodified+570−52View file
drivers/tty/serial/msm_serial.hmodified+31−22View file
drivers/tty/serial/mxs-auart.cmodified+1−1View file
drivers/tty/serial/of_serial.cmodified+10−0View file
drivers/tty/serial/omap-serial.cmodified+2−0View file
drivers/tty/serial/samsung.cmodified+21−45View file
drivers/tty/serial/sc16is7xx.cmodified+6−1View file
drivers/tty/serial/serial-tegra.cmodified+28−66View file
drivers/tty/serial/serial_core.cmodified+6−3View file
drivers/tty/serial/serial_mctrl_gpio.cmodified+129−4View file
drivers/tty/serial/serial_mctrl_gpio.hmodified+38−2View file
drivers/tty/serial/sh-sci.cmodified+762−698View file
drivers/tty/serial/sh-sci.hmodified+16−33View file
drivers/tty/serial/sprd_serial.cmodified+1−0View file
drivers/tty/serial/st-asc.cmodified+1−1View file
drivers/tty/serial/stm32-usart.cmodified+1−2View file
drivers/tty/synclink.cmodified+5−15View file
drivers/tty/synclink_gt.cmodified+2−12View file
drivers/tty/synclinkmp.cmodified+2−12View file
drivers/tty/sysrq.cmodified+5−1View file
drivers/tty/tty_buffer.cmodified+11−1View file
drivers/tty/tty_io.cmodified+29−30View file
drivers/tty/tty_ldisc.cmodified+1−1View file
drivers/tty/tty_port.cmodified+4−24View file
drivers/usb/gadget/function/u_serial.cmodified+4−2View file
include/linux/dma/hsu.hmodified+10−1View file
include/linux/n_r3964.hmodified+3−5View file
include/linux/platform_data/atmel.hmodified+0−6View file
include/linux/platform_data/dma-hsu.hmodified+0−4View file
include/linux/tty.hmodified+3−45View file
net/irda/ircomm/ircomm_tty.cmodified+1−30View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/devicetree/bindings/serial/ingenic,uart.txt

View file
diff --git a/Documentation/devicetree/bindings/serial/ingenic,uart.txt b/Documentation/devicetree/bindings/serial/ingenic,uart.txt
index c2d3b3a..02cb7fe 100644
--- a/Documentation/devicetree/bindings/serial/ingenic,uart.txt
+++ b/Documentation/devicetree/bindings/serial/ingenic,uart.txt
@@ -1,7 +1,8 @@
* Ingenic SoC UART
Required properties:
-- compatible : "ingenic,jz4740-uart" or "ingenic,jz4780-uart"
+- compatible : "ingenic,jz4740-uart", "ingenic,jz4760-uart",
+ "ingenic,jz4775-uart" or "ingenic,jz4780-uart"
- reg : offset and length of the register set for the device.
- interrupts : should contain uart interrupt.
- clocks : phandles to the module & baud clocks.

Documentation/devicetree/bindings/serial/pl011.txt

View file
diff --git a/Documentation/devicetree/bindings/serial/pl011.txt b/Documentation/devicetree/bindings/serial/pl011.txt
index cbae3d9..77863ae 100644
--- a/Documentation/devicetree/bindings/serial/pl011.txt
+++ b/Documentation/devicetree/bindings/serial/pl011.txt
@@ -19,7 +19,7 @@ Optional properties:
must correspond to the PCLK clocking the internal logic
of the block. Just listing one clock (the first one) is
deprecated.
-- clocks-names:
+- clock-names:
When present, the first clock listed must be named
"uartclk" and the second clock listed must be named
"apb_pclk"

Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt

View file
diff --git a/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt b/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt
index a2114c2..182777f 100644
--- a/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt
+++ b/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt
@@ -26,6 +26,12 @@ Required properties:
Optional properties:
- dmas: Should contain dma specifiers for transmit and receive channels
- dma-names: Should contain "tx" for transmit and "rx" for receive channels
+- qcom,tx-crci: Identificator <u32> for Client Rate Control Interface to be
+ used with TX DMA channel. Required when using DMA for transmission
+ with UARTDM v1.3 and bellow.
+- qcom,rx-crci: Identificator <u32> for Client Rate Control Interface to be
+ used with RX DMA channel. Required when using DMA for reception
+ with UARTDM v1.3 and bellow.
Note: Aliases may be defined to ensure the correct ordering of the UARTs.
The alias serialN will result in the UART being assigned port N. If any

Documentation/devicetree/bindings/serial/renesas,sci-serial.txt

View file
diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
index e84b13a..73f825e 100644
--- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
+++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
@@ -23,6 +23,8 @@ Required properties:
- "renesas,scifa-r8a7794" for R8A7794 (R-Car E2) SCIFA compatible UART.
- "renesas,scifb-r8a7794" for R8A7794 (R-Car E2) SCIFB compatible UART.
- "renesas,hscif-r8a7794" for R8A7794 (R-Car E2) HSCIF compatible UART.
+ - "renesas,scif-r8a7795" for R8A7795 (R-Car H3) SCIF compatible UART.
+ - "renesas,hscif-r8a7795" for R8A7795 (R-Car H3) HSCIF compatible UART.
- "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART.
- "renesas,scifb-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFB compatible UART.
- "renesas,scif" for generic SCIF compatible UART.

Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt

View file
diff --git a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt
index 289c40e..12bbe9f 100644
--- a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt
+++ b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt
@@ -15,6 +15,9 @@ The supplying peripheral clock can also be handled, needing a second property
Required elements: "baudclk", "apb_pclk"
Optional properties:
+- snps,uart-16550-compatible : reflects the value of UART_16550_COMPATIBLE
+ configuration parameter. Define this if your UART does not implement the busy
+ functionality.
- resets : phandle to the parent reset controller.
- reg-shift : quantity to shift the register offsets by. If this property is
not present then the register offsets are not shifted.

Documentation/kernel-parameters.txt

View file
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index c76200a..6263a2d 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1024,6 +1024,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
serial port must already be setup and configured.
Options are not yet supported.
+ lpuart,<addr>
+ lpuart32,<addr>
+ Use early console provided by Freescale LP UART driver
+ found on Freescale Vybrid and QorIQ LS1021A processors.
+ A valid base address must be provided, and the serial
+ port must already be setup and configured.
+
earlyprintk= [X86,SH,BLACKFIN,ARM,M68k]
earlyprintk=vga
earlyprintk=efi

Documentation/serial/driver

View file
diff --git a/Documentation/serial/driver b/Documentation/serial/driver
index c415b0e..379468e 100644
--- a/Documentation/serial/driver
+++ b/Documentation/serial/driver
@@ -439,11 +439,13 @@ Modem control lines via GPIO
Some helpers are provided in order to set/get modem control lines via GPIO.
-mctrl_gpio_init(dev, idx):
+mctrl_gpio_init(port, idx):
This will get the {cts,rts,...}-gpios from device tree if they are
present and request them, set direction etc, and return an
allocated structure. devm_* functions are used, so there's no need
to call mctrl_gpio_free().
+ As this sets up the irq handling make sure to not handle changes to the
+ gpio input lines in your driver, too.
mctrl_gpio_free(dev, gpios):
This will free the requested gpios in mctrl_gpio_init().
@@ -458,3 +460,9 @@ mctrl_gpio_set(gpios, mctrl):
mctrl_gpio_get(gpios, mctrl):
This will update mctrl with the gpios values.
+
+mctrl_gpio_enable_ms(gpios):
+ Enables irqs and handling of changes to the ms lines.
+
+mctrl_gpio_disable_ms(gpios):
+ Disables irqs and handling of changes to the ms lines.

Documentation/serial/tty.txt

View file
diff --git a/Documentation/serial/tty.txt b/Documentation/serial/tty.txt
index 973c8ad..bc3842d 100644
--- a/Documentation/serial/tty.txt
+++ b/Documentation/serial/tty.txt
@@ -39,8 +39,13 @@ TTY side interfaces:
open() - Called when the line discipline is attached to
the terminal. No other call into the line
discipline for this tty will occur until it
- completes successfully. Returning an error will
- prevent the ldisc from being attached. Can sleep.
+ completes successfully. Should initialize any
+ state needed by the ldisc, and set receive_room
+ in the tty_struct to the maximum amount of data
+ the line discipline is willing to accept from the
+ driver with a single call to receive_buf().
+ Returning an error will prevent the ldisc from
+ being attached. Can sleep.
close() - This is called on a terminal when the line
discipline is being unplugged. At the point of
@@ -52,9 +57,16 @@ hangup() - Called when the tty line is hung up.
No further calls into the ldisc code will occur.
The return value is ignored. Can sleep.
-write() - A process is writing data through the line
- discipline. Multiple write calls are serialized
- by the tty layer for the ldisc. May sleep.
+read() - (optional) A process requests reading data from
+ the line. Multiple read calls may occur in parallel
+ and the ldisc must deal with serialization issues.
+ If not defined, the process will receive an EIO
+ error. May sleep.
+
+write() - (optional) A process requests writing data to the
+ line. Multiple write calls are serialized by the
+ tty layer for the ldisc. If not defined, the
+ process will receive an EIO error. May sleep.
flush_buffer() - (optional) May be called at any point between
open and close, and instructs the line discipline
@@ -69,27 +81,33 @@ set_termios() - (optional) Called on termios structure changes.
termios semaphore so allowed to sleep. Serialized
against itself only.
-read() - Move data from the line discipline to the user.
- Multiple read calls may occur in parallel and the
- ldisc must deal with serialization issues. May
- sleep.
-
-poll() - Check the status for the poll/select calls. Multiple
- poll calls may occur in parallel. May sleep.
+poll() - (optional) Check the status for the poll/select
+ calls. Multiple poll calls may occur in parallel.
+ May sleep.
-ioctl() - Called when an ioctl is handed to the tty layer
- that might be for the ldisc. Multiple ioctl calls
- may occur in parallel. May sleep.
+ioctl() - (optional) Called when an ioctl is handed to the
+ tty layer that might be for the ldisc. Multiple
+ ioctl calls may occur in parallel. May sleep.
-compat_ioctl() - Called when a 32 bit ioctl is handed to the tty layer
- that might be for the ldisc. Multiple ioctl calls
- may occur in parallel. May sleep.
+compat_ioctl() - (optional) Called when a 32 bit ioctl is handed
+ to the tty layer that might be for the ldisc.
+ Multiple ioctl calls may occur in parallel.
+ May sleep.
Driver Side Interfaces:
-receive_buf() - Hand buffers of bytes from the driver to the ldisc
- for processing. Semantics currently rather
- mysterious 8(
+receive_buf() - (optional) Called by the low-level driver to hand
+ a buffer of received bytes to the ldisc for
+ processing. The number of bytes is guaranteed not
+ to exceed the current value of tty->receive_room.
+ All bytes must be processed.
+
+receive_buf2() - (optional) Called by the low-level driver to hand
+ a buffer of received bytes to the ldisc for
+ processing. Returns the number of bytes processed.
+
+ If both receive_buf() and receive_buf2() are
+ defined, receive_buf2() should be preferred.
write_wakeup() - May be called at any point between open and close.
The TTY_DO_WRITE_WAKEUP flag indicates if a call

arch/arm64/include/asm/dcc.h

View file
diff --git a/arch/arm64/include/asm/dcc.h b/arch/arm64/include/asm/dcc.h
new file mode 100644
index 0000000..65e0190
--- /dev/null
+++ b/arch/arm64/include/asm/dcc.h
@@ -0,0 +1,55 @@
+/* Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * A call to __dcc_getchar() or __dcc_putchar() is typically followed by
+ * a call to __dcc_getstatus(). We want to make sure that the CPU does
+ * not speculative read the DCC status before executing the read or write
+ * instruction. That's what the ISBs are for.
+ *
+ * The 'volatile' ensures that the compiler does not cache the status bits,
+ * and instead reads the DCC register every time.
+ */
+#ifndef __ASM_DCC_H
+#define __ASM_DCC_H
+
+#include <asm/barrier.h>
+
+static inline u32 __dcc_getstatus(void)
+{
+ u32 ret;
+
+ asm volatile("mrs %0, mdccsr_el0" : "=r" (ret));
+
+ return ret;
+}
+
+static inline char __dcc_getchar(void)
+{
+ char c;
+
+ asm volatile("mrs %0, dbgdtrrx_el0" : "=r" (c));
+ isb();
+
+ return c;
+}
+
+static inline void __dcc_putchar(char c)
+{
+ /*
+ * The typecast is to make absolutely certain that 'c' is
+ * zero-extended.
+ */
+ asm volatile("msr dbgdtrtx_el0, %0"
+ : : "r" ((unsigned long)(unsigned char)c));
+ isb();
+}
+
+#endif

drivers/char/pcmcia/synclink_cs.c

View file
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index 7680d52..45df4bf 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -2507,15 +2507,6 @@ static int mgslpc_open(struct tty_struct *tty, struct file * filp)
printk("%s(%d):mgslpc_open(%s), old ref count = %d\n",
__FILE__, __LINE__, tty->driver->name, port->count);
- /* If port is closing, signal caller to try again */
- if (port->flags & ASYNC_CLOSING){
- wait_event_interruptible_tty(tty, port->close_wait,
- !(port->flags & ASYNC_CLOSING));
- retval = ((port->flags & ASYNC_HUP_NOTIFY) ?
- -EAGAIN : -ERESTARTSYS);
- goto cleanup;
- }
-
port->low_latency = (port->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
spin_lock_irqsave(&info->netlock, flags);

drivers/dma/hsu/Kconfig

View file
diff --git a/drivers/dma/hsu/Kconfig b/drivers/dma/hsu/Kconfig
index 2810dca..c708417 100644
--- a/drivers/dma/hsu/Kconfig
+++ b/drivers/dma/hsu/Kconfig
@@ -5,10 +5,5 @@ config HSU_DMA
select DMA_VIRTUAL_CHANNELS
config HSU_DMA_PCI
- tristate "High Speed UART DMA PCI driver"
- depends on PCI
- select HSU_DMA
- help
- Support the High Speed UART DMA on the platfroms that
- enumerate it as a PCI device. For example, Intel Medfield
- has integrated this HSU DMA controller.
+ tristate
+ depends on HSU_DMA && PCI

drivers/dma/hsu/hsu.c

View file
diff --git a/drivers/dma/hsu/hsu.c b/drivers/dma/hsu/hsu.c
index 7669c7d..823ad72 100644
--- a/drivers/dma/hsu/hsu.c
+++ b/drivers/dma/hsu/hsu.c
@@ -146,7 +146,7 @@ irqreturn_t hsu_dma_irq(struct hsu_dma_chip *chip, unsigned short nr)
u32 sr;
/* Sanity check */
- if (nr >= chip->pdata->nr_channels)
+ if (nr >= chip->hsu->nr_channels)
return IRQ_NONE;
hsuc = &chip->hsu->chan[nr];
@@ -375,7 +375,6 @@ static void hsu_dma_free_chan_resources(struct dma_chan *chan)
int hsu_dma_probe(struct hsu_dma_chip *chip)
{
struct hsu_dma *hsu;
- struct hsu_dma_platform_data *pdata = chip->pdata;
void __iomem *addr = chip->regs + chip->offset;
unsigned short i;
int ret;
@@ -386,25 +385,16 @@ int hsu_dma_probe(struct hsu_dma_chip *chip)
chip->hsu = hsu;
- if (!pdata) {
- pdata = devm_kzalloc(chip->dev, sizeof(*pdata), GFP_KERNEL);
- if (!pdata)
- return -ENOMEM;
+ /* Calculate nr_channels from the IO space length */
+ hsu->nr_channels = (chip->length - chip->offset) / HSU_DMA_CHAN_LENGTH;
- chip->pdata = pdata;
-
- /* Guess nr_channels from the IO space length */
- pdata->nr_channels = (chip->length - chip->offset) /
- HSU_DMA_CHAN_LENGTH;
- }
-
- hsu->chan = devm_kcalloc(chip->dev, pdata->nr_channels,
+ hsu->chan = devm_kcalloc(chip->dev, hsu->nr_channels,
sizeof(*hsu->chan), GFP_KERNEL);
if (!hsu->chan)
return -ENOMEM;
INIT_LIST_HEAD(&hsu->dma.channels);
- for (i = 0; i < pdata->nr_channels; i++) {
+ for (i = 0; i < hsu->nr_channels; i++) {
struct hsu_dma_chan *hsuc = &hsu->chan[i];
hsuc->vchan.desc_free = hsu_dma_desc_free;
@@ -440,7 +430,7 @@ int hsu_dma_probe(struct hsu_dma_chip *chip)
if (ret)
return ret;
- dev_info(chip->dev, "Found HSU DMA, %d channels\n", pdata->nr_channels);
+ dev_info(chip->dev, "Found HSU DMA, %d channels\n", hsu->nr_channels);
return 0;
}
EXPORT_SYMBOL_GPL(hsu_dma_probe);
@@ -452,7 +442,7 @@ int hsu_dma_remove(struct hsu_dma_chip *chip)
dma_async_device_unregister(&hsu->dma);
- for (i = 0; i < chip->pdata->nr_channels; i++) {
+ for (i = 0; i < hsu->nr_channels; i++) {
struct hsu_dma_chan *hsuc = &hsu->chan[i];
tasklet_kill(&hsuc->vchan.task);

drivers/dma/hsu/hsu.h

View file
diff --git a/drivers/dma/hsu/hsu.h b/drivers/dma/hsu/hsu.h
index eeb9fff..f06579c 100644
--- a/drivers/dma/hsu/hsu.h
+++ b/drivers/dma/hsu/hsu.h
@@ -107,6 +107,7 @@ struct hsu_dma {
/* channels */
struct hsu_dma_chan *chan;
+ unsigned short nr_channels;
};
static inline struct hsu_dma *to_hsu_dma(struct dma_device *ddev)

drivers/dma/hsu/pci.c

View file
diff --git a/drivers/dma/hsu/pci.c b/drivers/dma/hsu/pci.c
index 77879e6..e2db76b 100644
--- a/drivers/dma/hsu/pci.c
+++ b/drivers/dma/hsu/pci.c
@@ -31,7 +31,7 @@ static irqreturn_t hsu_pci_irq(int irq, void *dev)
irqreturn_t ret = IRQ_NONE;
dmaisr = readl(chip->regs + HSU_PCI_DMAISR);
- for (i = 0; i < chip->pdata->nr_channels; i++) {
+ for (i = 0; i < chip->hsu->nr_channels; i++) {
if (dmaisr & 0x1)
ret |= hsu_dma_irq(chip, i);
dmaisr >>= 1;

drivers/isdn/i4l/isdn_tty.c

View file
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
index bc91261..2175225 100644
--- a/drivers/isdn/i4l/isdn_tty.c
+++ b/drivers/isdn/i4l/isdn_tty.c
@@ -1582,7 +1582,7 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp)
* line status register.
*/
if (port->flags & ASYNC_INITIALIZED) {
- tty_wait_until_sent_from_close(tty, 3000); /* 30 seconds timeout */
+ tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */
/*
* Before we drop DTR, make sure the UART transmitter
* has completely drained; this is especially

drivers/tty/cyclades.c

View file
diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c
index 87f6578..d4a1331 100644
--- a/drivers/tty/cyclades.c
+++ b/drivers/tty/cyclades.c
@@ -1577,15 +1577,6 @@ static int cy_open(struct tty_struct *tty, struct file *filp)
#endif
/*
- * If the port is the middle of closing, bail out now
- */
- if (info->port.flags & ASYNC_CLOSING) {
- wait_event_interruptible_tty(tty, info->port.close_wait,
- !(info->port.flags & ASYNC_CLOSING));
- return (info->port.flags & ASYNC_HUP_NOTIFY) ? -EAGAIN: -ERESTARTSYS;
- }
-
- /*
* Start up serial port
*/
retval = cy_startup(info, tty);

drivers/tty/hvc/Kconfig

View file
diff --git a/drivers/tty/hvc/Kconfig b/drivers/tty/hvc/Kconfig
index 2509d05..574da15 100644
--- a/drivers/tty/hvc/Kconfig
+++ b/drivers/tty/hvc/Kconfig
@@ -81,7 +81,7 @@ config HVC_UDBG
config HVC_DCC
bool "ARM JTAG DCC console"
- depends on ARM
+ depends on ARM || ARM64
select HVC_DRIVER
help
This console uses the JTAG DCC on ARM to create a console under the HVC

drivers/tty/hvc/hvc_console.c

View file
diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
index 4e9c4cc..e46d628 100644
--- a/drivers/tty/hvc/hvc_console.c
+++ b/drivers/tty/hvc/hvc_console.c
@@ -29,7 +29,7 @@
#include <linux/kernel.h>
#include <linux/kthread.h>
#include <linux/list.h>
-#include <linux/module.h>
+#include <linux/init.h>
#include <linux/major.h>
#include <linux/atomic.h>
#include <linux/sysrq.h>
@@ -418,7 +418,7 @@ static void hvc_close(struct tty_struct *tty, struct file * filp)
* there is no buffered data otherwise sleeps on a wait queue
* waking periodically to check chars_in_buffer().
*/
- tty_wait_until_sent_from_close(tty, HVC_CLOSE_WAIT);
+ tty_wait_until_sent(tty, HVC_CLOSE_WAIT);
} else {
if (hp->port.count < 0)
printk(KERN_ERR "hvc_close %X: oops, count is %d\n",
@@ -1005,19 +1005,3 @@ put_tty:
out:
return err;
}
-
-/* This isn't particularly necessary due to this being a console driver
- * but it is nice to be thorough.
- */
-static void __exit hvc_exit(void)
-{
- if (hvc_driver) {
- kthread_stop(hvc_task);
-
- tty_unregister_driver(hvc_driver);
- /* return tty_struct instances allocated in hvc_init(). */
- put_tty_driver(hvc_driver);
- unregister_console(&hvc_console);
- }
-}
-module_exit(hvc_exit);

drivers/tty/hvc/hvc_dcc.c

View file
diff --git a/drivers/tty/hvc/hvc_dcc.c b/drivers/tty/hvc/hvc_dcc.c
index 809920d..82f240f 100644
--- a/drivers/tty/hvc/hvc_dcc.c
+++ b/drivers/tty/hvc/hvc_dcc.c
@@ -70,20 +70,27 @@ static const struct hv_ops hvc_dcc_get_put_ops = {
static int __init hvc_dcc_console_init(void)
{
+ int ret;
+
if (!hvc_dcc_check())
return -ENODEV;
- hvc_instantiate(0, 0, &hvc_dcc_get_put_ops);
- return 0;
+ /* Returns -1 if error */
+ ret = hvc_instantiate(0, 0, &hvc_dcc_get_put_ops);
+
+ return ret < 0 ? -ENODEV : 0;
}
console_initcall(hvc_dcc_console_init);
static int __init hvc_dcc_init(void)
{
+ struct hvc_struct *p;
+
if (!hvc_dcc_check())
return -ENODEV;
- hvc_alloc(0, 0, &hvc_dcc_get_put_ops, 128);
- return 0;
+ p = hvc_alloc(0, 0, &hvc_dcc_get_put_ops, 128);
+
+ return PTR_ERR_OR_ZERO(p);
}
device_initcall(hvc_dcc_init);

drivers/tty/hvc/hvcs.c

View file
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index f7ff97c..5997b17 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -1230,7 +1230,7 @@ static void hvcs_close(struct tty_struct *tty, struct file *filp)
irq = hvcsd->vdev->irq;
spin_unlock_irqrestore(&hvcsd->lock, flags);
- tty_wait_until_sent_from_close(tty, HVCS_CLOSE_WAIT);
+ tty_wait_until_sent(tty, HVCS_CLOSE_WAIT);
/*
* This line is important because it tells hvcs_open that this

drivers/tty/mips_ejtag_fdc.c

View file
diff --git a/drivers/tty/mips_ejtag_fdc.c b/drivers/tty/mips_ejtag_fdc.c
index a8c8cfd..a119176 100644
--- a/drivers/tty/mips_ejtag_fdc.c
+++ b/drivers/tty/mips_ejtag_fdc.c
@@ -977,7 +977,7 @@ static int mips_ejtag_fdc_tty_probe(struct mips_cdmm_device *dev)
/* Try requesting the IRQ */
if (priv->irq >= 0) {
/*
- * IRQF_SHARED, IRQF_NO_SUSPEND: The FDC IRQ may be shared with
+ * IRQF_SHARED, IRQF_COND_SUSPEND: The FDC IRQ may be shared with
* other local interrupts such as the timer which sets
* IRQF_TIMER (including IRQF_NO_SUSPEND).
*
@@ -987,7 +987,7 @@ static int mips_ejtag_fdc_tty_probe(struct mips_cdmm_device *dev)
*/
ret = devm_request_irq(priv->dev, priv->irq, mips_ejtag_fdc_isr,
IRQF_PERCPU | IRQF_SHARED |
- IRQF_NO_THREAD | IRQF_NO_SUSPEND,
+ IRQF_NO_THREAD | IRQF_COND_SUSPEND,
priv->fdc_name, priv);
if (ret)
priv->irq = -1;
@@ -1048,38 +1048,6 @@ err_destroy_ports:
return ret;
}
-static int mips_ejtag_fdc_tty_remove(struct mips_cdmm_device *dev)
-{
- struct mips_ejtag_fdc_tty *priv = mips_cdmm_get_drvdata(dev);
- struct mips_ejtag_fdc_tty_port *dport;
- int nport;
- unsigned int cfg;
-
- if (priv->irq >= 0) {
- raw_spin_lock_irq(&priv->lock);
- cfg = mips_ejtag_fdc_read(priv, REG_FDCFG);
- /* Disable interrupts */
- cfg &= ~(REG_FDCFG_TXINTTHRES | REG_FDCFG_RXINTTHRES);
- cfg |= REG_FDCFG_TXINTTHRES_DISABLED;
- cfg |= REG_FDCFG_RXINTTHRES_DISABLED;
- mips_ejtag_fdc_write(priv, REG_FDCFG, cfg);
- raw_spin_unlock_irq(&priv->lock);
- } else {
- priv->removing = true;
- del_timer_sync(&priv->poll_timer);
- }
- kthread_stop(priv->thread);
- if (dev->cpu == 0)
- mips_ejtag_fdc_con.tty_drv = NULL;
- tty_unregister_driver(priv->driver);
- for (nport = 0; nport < NUM_TTY_CHANNELS; nport++) {
- dport = &priv->ports[nport];
- tty_port_destroy(&dport->port);
- }
- put_tty_driver(priv->driver);
- return 0;
-}
-
static int mips_ejtag_fdc_tty_cpu_down(struct mips_cdmm_device *dev)
{
struct mips_ejtag_fdc_tty *priv = mips_cdmm_get_drvdata(dev);
@@ -1152,12 +1120,11 @@ static struct mips_cdmm_driver mips_ejtag_fdc_tty_driver = {
.name = "mips_ejtag_fdc",

This diff is incomplete. Download the complete patch.

drivers/tty/n_r3964.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/n_tty.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/pty.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/rocket.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/68328serial.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_dma.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_dw.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_early.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_ingenic.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_mid.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_omap.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_pci.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/8250_port.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/8250/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/altera_uart.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/amba-pl011.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/apbuart.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/atmel_serial.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/clps711x.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/cpm_uart/cpm_uart_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/crisv10.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/fsl_lpuart.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/imx.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/lpc32xx_hs.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/men_z135_uart.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/mpc52xx_uart.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/mpsc.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/msm_serial.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/msm_serial.h

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/mxs-auart.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/of_serial.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/omap-serial.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/samsung.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/sc16is7xx.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/serial-tegra.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/serial_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/serial_mctrl_gpio.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/serial_mctrl_gpio.h

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/sh-sci.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/sh-sci.h

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/sprd_serial.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/st-asc.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serial/stm32-usart.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/synclink.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/synclink_gt.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/synclinkmp.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/sysrq.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/tty_buffer.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/tty_io.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/tty_ldisc.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/tty_port.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/gadget/function/u_serial.c

View file

This diff is incomplete. Download the complete patch.

include/linux/dma/hsu.h

View file

This diff is incomplete. Download the complete patch.

include/linux/n_r3964.h

View file

This diff is incomplete. Download the complete patch.

include/linux/platform_data/atmel.h

View file

This diff is incomplete. Download the complete patch.

include/linux/platform_data/dma-hsu.h

View file

This diff is incomplete. Download the complete patch.

include/linux/tty.h

View file

This diff is incomplete. Download the complete patch.

net/irda/ircomm/ircomm_tty.c

View file

This diff is incomplete. Download the complete patch.