Skip to content

Commit bcee634

Browse files
committed
Merge tag 'tty-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
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 ...
2 parents de4fe30 + 8bc661b commit bcee634

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+752
-1368
lines changed

Documentation/devicetree/bindings/serial/atmel-usart.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Required properties:
66
additional mode or an USART new feature.
77
- reg: Should contain registers location and length
88
- interrupts: Should contain interrupt
9+
- clock-names: tuple listing input clock names.
10+
Required elements: "usart"
11+
- clocks: phandles to input clocks.
912

1013
Optional properties:
1114
- atmel,use-dma-rx: use of PDC or DMA for receiving data
@@ -26,6 +29,8 @@ Example:
2629
compatible = "atmel,at91sam9260-usart";
2730
reg = <0xfff8c000 0x4000>;
2831
interrupts = <7>;
32+
clocks = <&usart0_clk>;
33+
clock-names = "usart";
2934
atmel,use-dma-rx;
3035
atmel,use-dma-tx;
3136
};
@@ -35,6 +40,8 @@ Example:
3540
compatible = "atmel,at91sam9260-usart";
3641
reg = <0xf001c000 0x100>;
3742
interrupts = <12 4 5>;
43+
clocks = <&usart0_clk>;
44+
clock-names = "usart";
3845
atmel,use-dma-rx;
3946
atmel,use-dma-tx;
4047
dmas = <&dma0 2 0x3>,
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
* Cirrus Logic CLPS711X Universal Asynchronous Receiver/Transmitter (UART)
2+
3+
Required properties:
4+
- compatible: Should be "cirrus,clps711x-uart".
5+
- reg: Address and length of the register set for the device.
6+
- interrupts: Should contain UART TX and RX interrupt.
7+
- clocks: Should contain UART core clock number.
8+
- syscon: Phandle to SYSCON node, which contain UART control bits.
9+
10+
Optional properties:
11+
- uart-use-ms: Indicate the UART has modem signal (DCD, DSR, CTS).
12+
13+
Note: Each UART port should have an alias correctly numbered
14+
in "aliases" node.
15+
16+
Example:
17+
aliases {
18+
serial0 = &uart1;
19+
};
20+
21+
uart1: uart@80000480 {
22+
compatible = "cirrus,clps711x-uart";
23+
reg = <0x80000480 0x80>;
24+
interrupts = <12 13>;
25+
clocks = <&clks 11>;
26+
syscon = <&syscon1>;
27+
uart-use-ms;
28+
};

arch/arm/mach-clps711x/devices.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,29 @@ static void __init clps711x_add_syscon(void)
6161
&clps711x_syscon_res[i], 1);
6262
}
6363

64+
static const struct resource clps711x_uart1_res[] __initconst = {
65+
DEFINE_RES_MEM(CLPS711X_PHYS_BASE + UARTDR1, SZ_128),
66+
DEFINE_RES_IRQ(IRQ_UTXINT1),
67+
DEFINE_RES_IRQ(IRQ_URXINT1),
68+
};
69+
70+
static const struct resource clps711x_uart2_res[] __initconst = {
71+
DEFINE_RES_MEM(CLPS711X_PHYS_BASE + UARTDR2, SZ_128),
72+
DEFINE_RES_IRQ(IRQ_UTXINT2),
73+
DEFINE_RES_IRQ(IRQ_URXINT2),
74+
};
75+
76+
static void __init clps711x_add_uart(void)
77+
{
78+
platform_device_register_simple("clps711x-uart", 0, clps711x_uart1_res,
79+
ARRAY_SIZE(clps711x_uart1_res));
80+
platform_device_register_simple("clps711x-uart", 1, clps711x_uart2_res,
81+
ARRAY_SIZE(clps711x_uart2_res));
82+
};
83+
6484
void __init clps711x_devices_init(void)
6585
{
6686
clps711x_add_gpio();
6787
clps711x_add_syscon();
88+
clps711x_add_uart();
6889
}

drivers/char/pcmcia/synclink_cs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2511,8 +2511,8 @@ static int mgslpc_open(struct tty_struct *tty, struct file * filp)
25112511

25122512
/* If port is closing, signal caller to try again */
25132513
if (tty_hung_up_p(filp) || port->flags & ASYNC_CLOSING){
2514-
if (port->flags & ASYNC_CLOSING)
2515-
interruptible_sleep_on(&port->close_wait);
2514+
wait_event_interruptible_tty(tty, port->close_wait,
2515+
!(port->flags & ASYNC_CLOSING));
25162516
retval = ((port->flags & ASYNC_HUP_NOTIFY) ?
25172517
-EAGAIN : -ERESTARTSYS);
25182518
goto cleanup;

drivers/input/serio/serport.c

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static void serport_ldisc_receive(struct tty_struct *tty, const unsigned char *c
124124
{
125125
struct serport *serport = (struct serport*) tty->disc_data;
126126
unsigned long flags;
127-
unsigned int ch_flags;
127+
unsigned int ch_flags = 0;
128128
int i;
129129

130130
spin_lock_irqsave(&serport->lock, flags);
@@ -133,18 +133,20 @@ static void serport_ldisc_receive(struct tty_struct *tty, const unsigned char *c
133133
goto out;
134134

135135
for (i = 0; i < count; i++) {
136-
switch (fp[i]) {
137-
case TTY_FRAME:
138-
ch_flags = SERIO_FRAME;
139-
break;
140-
141-
case TTY_PARITY:
142-
ch_flags = SERIO_PARITY;
143-
break;
144-
145-
default:
146-
ch_flags = 0;
147-
break;
136+
if (fp) {
137+
switch (fp[i]) {
138+
case TTY_FRAME:
139+
ch_flags = SERIO_FRAME;
140+
break;
141+
142+
case TTY_PARITY:
143+
ch_flags = SERIO_PARITY;
144+
break;
145+
146+
default:
147+
ch_flags = 0;
148+
break;
149+
}
148150
}
149151

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

drivers/parport/parport_serial.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -596,13 +596,11 @@ static int parport_serial_pci_probe(struct pci_dev *dev,
596596

597597
err = pci_enable_device (dev);
598598
if (err) {
599-
pci_set_drvdata (dev, NULL);
600599
kfree (priv);
601600
return err;
602601
}
603602

604603
if (parport_register (dev, id)) {
605-
pci_set_drvdata (dev, NULL);
606604
kfree (priv);
607605
return -ENODEV;
608606
}
@@ -611,7 +609,6 @@ static int parport_serial_pci_probe(struct pci_dev *dev,
611609
int i;
612610
for (i = 0; i < priv->num_par; i++)
613611
parport_pc_unregister_port (priv->port[i]);
614-
pci_set_drvdata (dev, NULL);
615612
kfree (priv);
616613
return -ENODEV;
617614
}
@@ -624,8 +621,6 @@ static void parport_serial_pci_remove(struct pci_dev *dev)
624621
struct parport_serial_private *priv = pci_get_drvdata (dev);
625622
int i;
626623

627-
pci_set_drvdata(dev, NULL);
628-
629624
// Serial ports
630625
if (priv->serial)
631626
pciserial_remove_ports(priv->serial);

drivers/staging/fwserial/Kconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,23 @@ config FIREWIRE_SERIAL
99

1010
To compile this driver as a module, say M here: the module will
1111
be called firewire-serial.
12+
13+
if FIREWIRE_SERIAL
14+
15+
config FWTTY_MAX_TOTAL_PORTS
16+
int "Maximum number of serial ports supported"
17+
default "64"
18+
help
19+
Set this to the maximum number of serial ports you want the
20+
firewire-serial driver to support.
21+
22+
config FWTTY_MAX_CARD_PORTS
23+
int "Maximum number of serial ports supported per adapter"
24+
range 0 FWTTY_MAX_TOTAL_PORTS
25+
default "32"
26+
help
27+
Set this to the maximum number of serial ports each firewire
28+
adapter supports. The actual number of serial ports registered
29+
is set with the module parameter "ttys".
30+
31+
endif

0 commit comments

Comments
 (0)