Skip to content

Commit

Permalink
Merge tag 'tty-4.15-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 updates from Greg KH:
 "Here is the big tty/serial driver pull request for 4.15-rc1.

  Lots of serial driver updates in here, some small vt cleanups, and a
  raft of SPDX and license boilerplate cleanups, messing up the diffstat
  a bit.

  Nothing major, with no realy functional changes except better hardware
  support for some platforms.

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'tty-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (110 commits)
  tty: ehv_bytechan: fix spelling mistake
  tty: serial: meson: allow baud-rates lower than 9600
  serial: 8250_fintek: Fix crash with baud rate B0
  serial: 8250_fintek: Disable delays for ports != 0
  serial: 8250_fintek: Return -EINVAL on invalid configuration
  tty: Remove redundant license text
  tty: serdev: Remove redundant license text
  tty: hvc: Remove redundant license text
  tty: serial: Remove redundant license text
  tty: add SPDX identifiers to all remaining files in drivers/tty/
  tty: serial: jsm: remove redundant pointer ts
  tty: serial: jsm: add space before the open parenthesis '('
  tty: serial: jsm: fix coding style
  tty: serial: jsm: delete space between function name and '('
  tty: serial: jsm: add blank line after declarations
  tty: serial: jsm: change the type of local variable
  tty: serial: imx: remove dead code imx_dma_rxint
  tty: serial: imx: disable ageing timer interrupt if dma in use
  serial: 8250: fix potential deadlock in rs485-mode
  serial: m32r_sio: Drop redundant .data assignment
  ...
  • Loading branch information
Linus Torvalds committed Nov 14, 2017
2 parents 449fcf3 + 57f5d64 commit fb0255f
Show file tree
Hide file tree
Showing 202 changed files with 1,276 additions and 1,668 deletions.
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/dma/stm32-dma.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ channel: a phandle to the DMA controller plus the following four integer cells:
Example:

usart1: serial@40011000 {
compatible = "st,stm32-usart", "st,stm32-uart";
compatible = "st,stm32-uart";
reg = <0x40011000 0x400>;
interrupts = <37>;
clocks = <&clk_pclk2>;
Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/serial/atmel-usart.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Optional properties:
- dma-names: "rx" for RX channel, "tx" for TX channel.
- atmel,fifo-size: maximum number of data the RX and TX FIFOs can store for FIFO
capable USARTs.
- rs485-rts-delay, rs485-rx-during-tx, linux,rs485-enabled-at-boot-time: see rs485.txt

<chip> compatible description:
- at91rm9200: legacy USART support
Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/serial/fsl-imx-uart.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Optional properties:
- fsl,irda-mode : Indicate the uart supports irda mode
- fsl,dte-mode : Indicate the uart works in DTE mode. The uart works
in DCE mode by default.
- rs485-rts-delay, rs485-rx-during-tx, linux,rs485-enabled-at-boot-time: see rs485.txt

Please check Documentation/devicetree/bindings/serial/serial.txt
for the complete list of generic properties.
Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/serial/fsl-lpuart.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Required properties:
Optional properties:
- dmas: A list of two dma specifiers, one for each entry in dma-names.
- dma-names: should contain "tx" and "rx".
- rs485-rts-delay, rs485-rx-during-tx, linux,rs485-enabled-at-boot-time: see rs485.txt

Note: Optional properties for DMA support. Write them both or both not.

Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/serial/omap_serial.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Optional properties:
- dmas : DMA specifier, consisting of a phandle to the DMA controller
node and a DMA channel number.
- dma-names : "rx" for receive channel, "tx" for transmit channel.
- rs485-rts-delay, rs485-rx-during-tx, linux,rs485-enabled-at-boot-time: see rs485.txt

Example:

Expand Down
10 changes: 3 additions & 7 deletions Documentation/devicetree/bindings/serial/st,stm32-usart.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@

Required properties:
- compatible: can be either:
- "st,stm32-usart",
- "st,stm32-uart",
- "st,stm32f7-usart",
- "st,stm32f7-uart",
- "st,stm32h7-usart"
- "st,stm32h7-uart".
depending on whether the device supports synchronous mode
and is compatible with stm32(f4), stm32f7 or stm32h7.
depending is compatible with stm32(f4), stm32f7 or stm32h7.
- reg: The address and length of the peripheral registers space
- interrupts:
- The interrupt line for the USART instance,
Expand All @@ -33,7 +29,7 @@ usart4: serial@40004c00 {
};

usart2: serial@40004400 {
compatible = "st,stm32-usart", "st,stm32-uart";
compatible = "st,stm32-uart";
reg = <0x40004400 0x400>;
interrupts = <38>;
clocks = <&clk_pclk1>;
Expand All @@ -43,7 +39,7 @@ usart2: serial@40004400 {
};

usart1: serial@40011000 {
compatible = "st,stm32-usart", "st,stm32-uart";
compatible = "st,stm32-uart";
reg = <0x40011000 0x400>;
interrupts = <37>;
clocks = <&rcc 0 164>;
Expand Down
12 changes: 6 additions & 6 deletions arch/arm/boot/dts/stm32f429.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,15 @@
};

usart2: serial@40004400 {
compatible = "st,stm32-usart", "st,stm32-uart";
compatible = "st,stm32-uart";
reg = <0x40004400 0x400>;
interrupts = <38>;
clocks = <&rcc 0 STM32F4_APB1_CLOCK(UART2)>;
status = "disabled";
};

usart3: serial@40004800 {
compatible = "st,stm32-usart", "st,stm32-uart";
compatible = "st,stm32-uart";
reg = <0x40004800 0x400>;
interrupts = <39>;
clocks = <&rcc 0 STM32F4_APB1_CLOCK(UART3)>;
Expand Down Expand Up @@ -386,15 +386,15 @@
};

usart7: serial@40007800 {
compatible = "st,stm32-usart", "st,stm32-uart";
compatible = "st,stm32-uart";
reg = <0x40007800 0x400>;
interrupts = <82>;
clocks = <&rcc 0 STM32F4_APB1_CLOCK(UART7)>;
status = "disabled";
};

usart8: serial@40007c00 {
compatible = "st,stm32-usart", "st,stm32-uart";
compatible = "st,stm32-uart";
reg = <0x40007c00 0x400>;
interrupts = <83>;
clocks = <&rcc 0 STM32F4_APB1_CLOCK(UART8)>;
Expand Down Expand Up @@ -444,7 +444,7 @@
};

usart1: serial@40011000 {
compatible = "st,stm32-usart", "st,stm32-uart";
compatible = "st,stm32-uart";
reg = <0x40011000 0x400>;
interrupts = <37>;
clocks = <&rcc 0 STM32F4_APB2_CLOCK(USART1)>;
Expand All @@ -455,7 +455,7 @@
};

usart6: serial@40011400 {
compatible = "st,stm32-usart", "st,stm32-uart";
compatible = "st,stm32-uart";
reg = <0x40011400 0x400>;
interrupts = <71>;
clocks = <&rcc 0 STM32F4_APB2_CLOCK(USART6)>;
Expand Down
12 changes: 6 additions & 6 deletions arch/arm/boot/dts/stm32f746.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@
};

usart2: serial@40004400 {
compatible = "st,stm32f7-usart", "st,stm32f7-uart";
compatible = "st,stm32f7-uart";
reg = <0x40004400 0x400>;
interrupts = <38>;
clocks = <&rcc 1 CLK_USART2>;
status = "disabled";
};

usart3: serial@40004800 {
compatible = "st,stm32f7-usart", "st,stm32f7-uart";
compatible = "st,stm32f7-uart";
reg = <0x40004800 0x400>;
interrupts = <39>;
clocks = <&rcc 1 CLK_USART3>;
Expand Down Expand Up @@ -177,31 +177,31 @@
};

usart7: serial@40007800 {
compatible = "st,stm32f7-usart", "st,stm32f7-uart";
compatible = "st,stm32f7-uart";
reg = <0x40007800 0x400>;
interrupts = <82>;
clocks = <&rcc 1 CLK_UART7>;
status = "disabled";
};

usart8: serial@40007c00 {
compatible = "st,stm32f7-usart", "st,stm32f7-uart";
compatible = "st,stm32f7-uart";
reg = <0x40007c00 0x400>;
interrupts = <83>;
clocks = <&rcc 1 CLK_UART8>;
status = "disabled";
};

usart1: serial@40011000 {
compatible = "st,stm32f7-usart", "st,stm32f7-uart";
compatible = "st,stm32f7-uart";
reg = <0x40011000 0x400>;
interrupts = <37>;
clocks = <&rcc 1 CLK_USART1>;
status = "disabled";
};

usart6: serial@40011400 {
compatible = "st,stm32f7-usart", "st,stm32f7-uart";
compatible = "st,stm32f7-uart";
reg = <0x40011400 0x400>;
interrupts = <71>;
clocks = <&rcc 1 CLK_USART6>;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/stm32h743.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
};

usart2: serial@40004400 {
compatible = "st,stm32f7-usart", "st,stm32f7-uart";
compatible = "st,stm32f7-uart";
reg = <0x40004400 0x400>;
interrupts = <38>;
status = "disabled";
Expand Down Expand Up @@ -99,7 +99,7 @@
};

usart1: serial@40011000 {
compatible = "st,stm32f7-usart", "st,stm32f7-uart";
compatible = "st,stm32f7-uart";
reg = <0x40011000 0x400>;
interrupts = <37>;
status = "disabled";
Expand Down
37 changes: 17 additions & 20 deletions drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1505,41 +1505,38 @@ static void acpi_init_coherency(struct acpi_device *adev)
adev->flags.coherent_dma = cca;
}

static int acpi_check_spi_i2c_slave(struct acpi_resource *ares, void *data)
static int acpi_check_serial_bus_slave(struct acpi_resource *ares, void *data)
{
bool *is_spi_i2c_slave_p = data;
bool *is_serial_bus_slave_p = data;

if (ares->type != ACPI_RESOURCE_TYPE_SERIAL_BUS)
return 1;

/*
* devices that are connected to UART still need to be enumerated to
* platform bus
*/
if (ares->data.common_serial_bus.type != ACPI_RESOURCE_SERIAL_TYPE_UART)
*is_spi_i2c_slave_p = true;
*is_serial_bus_slave_p = true;

/* no need to do more checking */
return -1;
}

static bool acpi_is_spi_i2c_slave(struct acpi_device *device)
static bool acpi_is_serial_bus_slave(struct acpi_device *device)
{
struct list_head resource_list;
bool is_spi_i2c_slave = false;
bool is_serial_bus_slave = false;

/* Macs use device properties in lieu of _CRS resources */
if (x86_apple_machine &&
(fwnode_property_present(&device->fwnode, "spiSclkPeriod") ||
fwnode_property_present(&device->fwnode, "i2cAddress")))
fwnode_property_present(&device->fwnode, "i2cAddress") ||
fwnode_property_present(&device->fwnode, "baud")))
return true;

INIT_LIST_HEAD(&resource_list);
acpi_dev_get_resources(device, &resource_list, acpi_check_spi_i2c_slave,
&is_spi_i2c_slave);
acpi_dev_get_resources(device, &resource_list,
acpi_check_serial_bus_slave,
&is_serial_bus_slave);
acpi_dev_free_resource_list(&resource_list);

return is_spi_i2c_slave;
return is_serial_bus_slave;
}

void acpi_init_device_object(struct acpi_device *device, acpi_handle handle,
Expand All @@ -1557,7 +1554,7 @@ void acpi_init_device_object(struct acpi_device *device, acpi_handle handle,
acpi_bus_get_flags(device);
device->flags.match_driver = false;
device->flags.initialized = true;
device->flags.spi_i2c_slave = acpi_is_spi_i2c_slave(device);
device->flags.serial_bus_slave = acpi_is_serial_bus_slave(device);
acpi_device_clear_enumerated(device);
device_initialize(&device->dev);
dev_set_uevent_suppress(&device->dev, true);
Expand Down Expand Up @@ -1841,10 +1838,10 @@ static acpi_status acpi_bus_check_add(acpi_handle handle, u32 lvl_not_used,
static void acpi_default_enumeration(struct acpi_device *device)
{
/*
* Do not enumerate SPI/I2C slaves as they will be enumerated by their
* respective parents.
* Do not enumerate SPI/I2C/UART slaves as they will be enumerated by
* their respective parents.
*/
if (!device->flags.spi_i2c_slave) {
if (!device->flags.serial_bus_slave) {
acpi_create_platform_device(device, NULL);
acpi_device_set_enumerated(device);
} else {
Expand Down Expand Up @@ -1941,7 +1938,7 @@ static void acpi_bus_attach(struct acpi_device *device)
return;

device->flags.match_driver = true;
if (ret > 0 && !device->flags.spi_i2c_slave) {
if (ret > 0 && !device->flags.serial_bus_slave) {
acpi_device_set_enumerated(device);
goto ok;
}
Expand All @@ -1950,7 +1947,7 @@ static void acpi_bus_attach(struct acpi_device *device)
if (ret < 0)
return;

if (!device->pnp.type.platform_id && !device->flags.spi_i2c_slave)
if (!device->pnp.type.platform_id && !device->flags.serial_bus_slave)
acpi_device_set_enumerated(device);
else
acpi_default_enumeration(device);
Expand Down
1 change: 1 addition & 0 deletions drivers/tty/amiserial.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Serial driver for the amiga builtin port.
*
Expand Down
3 changes: 1 addition & 2 deletions drivers/tty/bfin_jtag_comm.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* TTY over Blackfin JTAG Communication
*
* Copyright 2008-2009 Analog Devices Inc.
*
* Enter bugs at http://blackfin.uclinux.org/
*
* Licensed under the GPL-2 or later.
*/

#define DRV_NAME "bfin-jtag-comm"
Expand Down
17 changes: 7 additions & 10 deletions drivers/tty/cyclades.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#undef BLOCKMOVE
#define Z_WAKE
#undef Z_EXT_CHARS_IN_BUFFER
Expand Down Expand Up @@ -286,8 +287,7 @@ static long cyz_polling_cycle = CZ_DEF_POLL;
static DEFINE_TIMER(cyz_timerlist, cyz_poll);

#else /* CONFIG_CYZ_INTR */
static void cyz_rx_restart(unsigned long);
static struct timer_list cyz_rx_full_timer[NR_PORTS];
static void cyz_rx_restart(struct timer_list *);
#endif /* CONFIG_CYZ_INTR */

static void cyy_writeb(struct cyclades_port *port, u32 reg, u8 val)
Expand Down Expand Up @@ -992,10 +992,8 @@ static void cyz_handle_rx(struct cyclades_port *info)
else
char_count = rx_put - rx_get + rx_bufsize;
if (char_count >= readl(&buf_ctrl->rx_threshold) &&
!timer_pending(&cyz_rx_full_timer[
info->line]))
mod_timer(&cyz_rx_full_timer[info->line],
jiffies + 1);
!timer_pending(&info->rx_full_timer))
mod_timer(&info->rx_full_timer, jiffies + 1);
#endif
info->idle_stats.recv_idle = jiffies;
tty_schedule_flip(&info->port);
Expand Down Expand Up @@ -1197,9 +1195,9 @@ static irqreturn_t cyz_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
} /* cyz_interrupt */

static void cyz_rx_restart(unsigned long arg)
static void cyz_rx_restart(struct timer_list *t)
{
struct cyclades_port *info = (struct cyclades_port *)arg;
struct cyclades_port *info = from_timer(info, t, rx_full_timer);
struct cyclades_card *card = info->card;
int retval;
__u32 channel = info->line - card->first_line;
Expand Down Expand Up @@ -3097,8 +3095,7 @@ static int cy_init_card(struct cyclades_card *cinfo)
else
info->xmit_fifo_size = 4 * CYZ_FIFO_SIZE;
#ifdef CONFIG_CYZ_INTR
setup_timer(&cyz_rx_full_timer[port],
cyz_rx_restart, (unsigned long)info);
timer_setup(&info->rx_full_timer, cyz_rx_restart, 0);
#endif
} else {
unsigned short chip_number;
Expand Down
9 changes: 3 additions & 6 deletions drivers/tty/ehv_bytechan.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
/* ePAPR hypervisor byte channel device driver
*
* Copyright 2009-2011 Freescale Semiconductor, Inc.
*
* Author: Timur Tabi <timur@freescale.com>
*
* This file is licensed under the terms of the GNU General Public License
* version 2. This program is licensed "as is" without any warranty of any
* kind, whether express or implied.
*
* This driver support three distinct interfaces, all of which are related to
* ePAPR hypervisor byte channels.
*
Expand Down Expand Up @@ -328,7 +325,7 @@ console_initcall(ehv_bc_console_init);
/******************************** TTY DRIVER ********************************/

/*
* byte channel receive interupt handler
* byte channel receive interrupt handler
*
* This ISR is called whenever data is available on a byte channel.
*/
Expand Down Expand Up @@ -428,7 +425,7 @@ static void ehv_bc_tx_dequeue(struct ehv_bc_data *bc)
}

/*
* byte channel transmit interupt handler
* byte channel transmit interrupt handler
*
* This ISR is called whenever space becomes available for transmitting
* characters on a byte channel.
Expand Down
Loading

0 comments on commit fb0255f

Please sign in to comment.