-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'tty-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/…
…git/gregkh/tty Pull tty and serial updates from Greg KH: "Here is the big tty and serial patch set for 4.9-rc1. It also includes some drivers/dma/ changes, as those were needed by some serial drivers, and they were all acked by the DMA maintainer. Also in here is the long-suffering ACPI SPCR patchset, which was passed around from maintainer to maintainer like a hot-potato. Seems I was the sucker^Wlucky one. All of those patches have been acked by the various subsystem maintainers as well. All of this has been in linux-next with no reported issues" * tag 'tty-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (111 commits) Revert "serial: pl011: add console matching function" MAINTAINERS: update entry for atmel_serial driver serial: pl011: add console matching function ARM64: ACPI: enable ACPI_SPCR_TABLE ACPI: parse SPCR and enable matching console of/serial: move earlycon early_param handling to serial Revert "drivers/tty: Explicitly pass current to show_stack" tty: amba-pl011: Don't complain on -EPROBE_DEFER when no irq nios2: dts: 10m50: Add tx-threshold parameter serial: 8250: Set Altera 16550 TX FIFO Threshold serial: 8250: of: Load TX FIFO Threshold from DT Documentation: dt: serial: Add TX FIFO threshold parameter drivers/tty: Explicitly pass current to show_stack serial: imx: Fix DCD reading serial: stm32: mark symbols static where possible serial: xuartps: Add some register initialisation to cdns_early_console_setup() serial: xuartps: Removed unwanted checks while reading the error conditions serial: xuartps: Rewrite the interrupt handling logic serial: stm32: use mapbase instead of membase for DMA tty/serial: atmel: fix fractional baud rate computation ...
- Loading branch information
Showing
69 changed files
with
2,610 additions
and
1,269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
Documentation/devicetree/bindings/serial/st,stm32-usart.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
* STMicroelectronics STM32 USART | ||
|
||
Required properties: | ||
- compatible: Can be either "st,stm32-usart", "st,stm32-uart", | ||
"st,stm32f7-usart" or "st,stm32f7-uart" depending on whether | ||
the device supports synchronous mode and is compatible with | ||
stm32(f4) or stm32f7. | ||
- reg: The address and length of the peripheral registers space | ||
- interrupts: The interrupt line of the USART instance | ||
- clocks: The input clock of the USART instance | ||
|
||
Optional properties: | ||
- pinctrl: The reference on the pins configuration | ||
- st,hw-flow-ctrl: bool flag to enable hardware flow control. | ||
- dmas: phandle(s) to DMA controller node(s). Refer to stm32-dma.txt | ||
- dma-names: "rx" and/or "tx" | ||
|
||
Examples: | ||
usart4: serial@40004c00 { | ||
compatible = "st,stm32-uart"; | ||
reg = <0x40004c00 0x400>; | ||
interrupts = <52>; | ||
clocks = <&clk_pclk1>; | ||
pinctrl-names = "default"; | ||
pinctrl-0 = <&pinctrl_usart4>; | ||
}; | ||
|
||
usart2: serial@40004400 { | ||
compatible = "st,stm32-usart", "st,stm32-uart"; | ||
reg = <0x40004400 0x400>; | ||
interrupts = <38>; | ||
clocks = <&clk_pclk1>; | ||
st,hw-flow-ctrl; | ||
pinctrl-names = "default"; | ||
pinctrl-0 = <&pinctrl_usart2 &pinctrl_usart2_rtscts>; | ||
}; | ||
|
||
usart1: serial@40011000 { | ||
compatible = "st,stm32-usart", "st,stm32-uart"; | ||
reg = <0x40011000 0x400>; | ||
interrupts = <37>; | ||
clocks = <&rcc 0 164>; | ||
dmas = <&dma2 2 4 0x414 0x0>, | ||
<&dma2 7 4 0x414 0x0>; | ||
dma-names = "rx", "tx"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
/* | ||
* Copyright (c) 2012, Intel Corporation | ||
* Copyright (c) 2015, Red Hat, Inc. | ||
* Copyright (c) 2015, 2016 Linaro Ltd. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
* | ||
*/ | ||
|
||
#define pr_fmt(fmt) "ACPI: SPCR: " fmt | ||
|
||
#include <linux/acpi.h> | ||
#include <linux/console.h> | ||
#include <linux/kernel.h> | ||
#include <linux/serial_core.h> | ||
|
||
/** | ||
* parse_spcr() - parse ACPI SPCR table and add preferred console | ||
* | ||
* @earlycon: set up earlycon for the console specified by the table | ||
* | ||
* For the architectures with support for ACPI, CONFIG_ACPI_SPCR_TABLE may be | ||
* defined to parse ACPI SPCR table. As a result of the parsing preferred | ||
* console is registered and if @earlycon is true, earlycon is set up. | ||
* | ||
* When CONFIG_ACPI_SPCR_TABLE is defined, this function should be called | ||
* from arch inintialization code as soon as the DT/ACPI decision is made. | ||
* | ||
*/ | ||
int __init parse_spcr(bool earlycon) | ||
{ | ||
static char opts[64]; | ||
struct acpi_table_spcr *table; | ||
acpi_size table_size; | ||
acpi_status status; | ||
char *uart; | ||
char *iotype; | ||
int baud_rate; | ||
int err; | ||
|
||
if (acpi_disabled) | ||
return -ENODEV; | ||
|
||
status = acpi_get_table_with_size(ACPI_SIG_SPCR, 0, | ||
(struct acpi_table_header **)&table, | ||
&table_size); | ||
|
||
if (ACPI_FAILURE(status)) | ||
return -ENOENT; | ||
|
||
if (table->header.revision < 2) { | ||
err = -ENOENT; | ||
pr_err("wrong table version\n"); | ||
goto done; | ||
} | ||
|
||
iotype = table->serial_port.space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY ? | ||
"mmio" : "io"; | ||
|
||
switch (table->interface_type) { | ||
case ACPI_DBG2_ARM_SBSA_32BIT: | ||
iotype = "mmio32"; | ||
/* fall through */ | ||
case ACPI_DBG2_ARM_PL011: | ||
case ACPI_DBG2_ARM_SBSA_GENERIC: | ||
case ACPI_DBG2_BCM2835: | ||
uart = "pl011"; | ||
break; | ||
case ACPI_DBG2_16550_COMPATIBLE: | ||
case ACPI_DBG2_16550_SUBSET: | ||
uart = "uart"; | ||
break; | ||
default: | ||
err = -ENOENT; | ||
goto done; | ||
} | ||
|
||
switch (table->baud_rate) { | ||
case 3: | ||
baud_rate = 9600; | ||
break; | ||
case 4: | ||
baud_rate = 19200; | ||
break; | ||
case 6: | ||
baud_rate = 57600; | ||
break; | ||
case 7: | ||
baud_rate = 115200; | ||
break; | ||
default: | ||
err = -ENOENT; | ||
goto done; | ||
} | ||
|
||
snprintf(opts, sizeof(opts), "%s,%s,0x%llx,%d", uart, iotype, | ||
table->serial_port.address, baud_rate); | ||
|
||
pr_info("console: %s\n", opts); | ||
|
||
if (earlycon) | ||
setup_earlycon(opts); | ||
|
||
err = add_preferred_console(uart, 0, opts + strlen(uart) + 1); | ||
|
||
done: | ||
early_acpi_os_unmap_memory((void __iomem *)table, table_size); | ||
return err; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.