Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bcee6348 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull tty/serial driver updates from Greg KH:
 "Here's the big tty/serial driver pull request for 3.14-rc1

  There are a number of n_tty fixes and cleanups, and some serial driver
  bugfixes, and we got rid of one obsolete driver, making this series
  remove more lines than added, always a nice surprise.

  All of these have been in linux-next with no reports of issues"

* tag 'tty-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (60 commits)
  tty/serial: at91: disable uart timer at start of shutdown
  serial: 8250: enable UART_BUG_NOMSR for Tegra
  tty/serial: at91: reset rx_ring when port is shutdown
  tty/serial: at91: fix race condition in atmel_serial_remove
  tty/serial: at91: Handle shutdown more safely
  serial: sirf: correct condition for fetching dma buffer into tty
  serial: sirf: provide pm entries of uart_ops
  serial: sirf: use PM macro initialize PM functions
  serial: clps711x: Enable driver compilation with COMPILE_TEST
  serial: clps711x: Add support for N_IRDA line discipline
  tty: synclink: avoid sleep_on race
  tty/amiserial: avoid interruptible_sleep_on
  tty: delete non-required instances of include <linux/init.h>
  tty: an overflow of multiplication in drivers/tty/cyclades.c
  serial: Remove old SC26XX driver
  serial: add support for 200 v3 series Titan card
  serial: 8250: Fix initialisation of Quatech cards with the AMCC PCI chip
  tty: Removing the deprecated function tty_vhangup_locked()
  TTY/n_gsm: Removing the wrong tty_unlock/lock() in gsm_dlci_release()
  tty/serial: at91: document clock properties
  ...
parents de4fe30a 8bc661bf
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -6,6 +6,9 @@ Required properties:
  additional mode or an USART new feature.
- reg: Should contain registers location and length
- interrupts: Should contain interrupt
- clock-names: tuple listing input clock names.
	Required elements: "usart"
- clocks: phandles to input clocks.

Optional properties:
- atmel,use-dma-rx: use of PDC or DMA for receiving data
@@ -26,6 +29,8 @@ Example:
		compatible = "atmel,at91sam9260-usart";
		reg = <0xfff8c000 0x4000>;
		interrupts = <7>;
		clocks = <&usart0_clk>;
		clock-names = "usart";
		atmel,use-dma-rx;
		atmel,use-dma-tx;
	};
@@ -35,6 +40,8 @@ Example:
		compatible = "atmel,at91sam9260-usart";
		reg = <0xf001c000 0x100>;
		interrupts = <12 4 5>;
		clocks = <&usart0_clk>;
		clock-names = "usart";
		atmel,use-dma-rx;
		atmel,use-dma-tx;
		dmas = <&dma0 2 0x3>,
+28 −0
Original line number Diff line number Diff line
* Cirrus Logic CLPS711X Universal Asynchronous Receiver/Transmitter (UART)

Required properties:
- compatible: Should be "cirrus,clps711x-uart".
- reg: Address and length of the register set for the device.
- interrupts: Should contain UART TX and RX interrupt.
- clocks: Should contain UART core clock number.
- syscon: Phandle to SYSCON node, which contain UART control bits.

Optional properties:
- uart-use-ms: Indicate the UART has modem signal (DCD, DSR, CTS).

Note: Each UART port should have an alias correctly numbered
in "aliases" node.

Example:
	aliases {
		serial0 = &uart1;
	};

	uart1: uart@80000480 {
		compatible = "cirrus,clps711x-uart";
		reg = <0x80000480 0x80>;
		interrupts = <12 13>;
		clocks = <&clks 11>;
		syscon = <&syscon1>;
		uart-use-ms;
	};
+21 −0
Original line number Diff line number Diff line
@@ -61,8 +61,29 @@ static void __init clps711x_add_syscon(void)
						&clps711x_syscon_res[i], 1);
}

static const struct resource clps711x_uart1_res[] __initconst = {
	DEFINE_RES_MEM(CLPS711X_PHYS_BASE + UARTDR1, SZ_128),
	DEFINE_RES_IRQ(IRQ_UTXINT1),
	DEFINE_RES_IRQ(IRQ_URXINT1),
};

static const struct resource clps711x_uart2_res[] __initconst = {
	DEFINE_RES_MEM(CLPS711X_PHYS_BASE + UARTDR2, SZ_128),
	DEFINE_RES_IRQ(IRQ_UTXINT2),
	DEFINE_RES_IRQ(IRQ_URXINT2),
};

static void __init clps711x_add_uart(void)
{
	platform_device_register_simple("clps711x-uart", 0, clps711x_uart1_res,
					ARRAY_SIZE(clps711x_uart1_res));
	platform_device_register_simple("clps711x-uart", 1, clps711x_uart2_res,
					ARRAY_SIZE(clps711x_uart2_res));
};

void __init clps711x_devices_init(void)
{
	clps711x_add_gpio();
	clps711x_add_syscon();
	clps711x_add_uart();
}
+2 −2
Original line number Diff line number Diff line
@@ -2511,8 +2511,8 @@ static int mgslpc_open(struct tty_struct *tty, struct file * filp)

	/* If port is closing, signal caller to try again */
	if (tty_hung_up_p(filp) || port->flags & ASYNC_CLOSING){
		if (port->flags & ASYNC_CLOSING)
			interruptible_sleep_on(&port->close_wait);
		wait_event_interruptible_tty(tty, port->close_wait,
					     !(port->flags & ASYNC_CLOSING));
		retval = ((port->flags & ASYNC_HUP_NOTIFY) ?
			-EAGAIN : -ERESTARTSYS);
		goto cleanup;
+15 −13
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ static void serport_ldisc_receive(struct tty_struct *tty, const unsigned char *c
{
	struct serport *serport = (struct serport*) tty->disc_data;
	unsigned long flags;
	unsigned int ch_flags;
	unsigned int ch_flags = 0;
	int i;

	spin_lock_irqsave(&serport->lock, flags);
@@ -133,6 +133,7 @@ static void serport_ldisc_receive(struct tty_struct *tty, const unsigned char *c
		goto out;

	for (i = 0; i < count; i++) {
		if (fp) {
			switch (fp[i]) {
			case TTY_FRAME:
				ch_flags = SERIO_FRAME;
@@ -146,6 +147,7 @@ static void serport_ldisc_receive(struct tty_struct *tty, const unsigned char *c
				ch_flags = 0;
				break;
			}
		}

		serio_interrupt(serport->serio, cp[i], ch_flags);
	}
Loading