mirror of
https://github.com/torvalds/linux.git
synced 2025-11-30 23:16:01 +07:00
Merge tag 'tty-6.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial driver fixes from Greg KH: "Here are some small tty and serial driver fixes for reported issues. Included in here are: - sh-sci serial driver fixes - 8250_dw and _mtk driver fixes - sc16is7xx driver bugfix - new 8250_exar device ids added All of these have been in linux-next this past week with no reported issues" * tag 'tty-6.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: 8250_mtk: Enable baud clock and manage in runtime PM serial: 8250_dw: handle reset control deassert error dt-bindings: serial: sh-sci: Fix r8a78000 interrupts serial: sc16is7xx: remove useless enable of enhanced features serial: 8250_exar: add support for Advantech 2 port card with Device ID 0x0018 tty: serial: sh-sci: fix RSCI FIFO overrun handling
This commit is contained in:
@@ -197,6 +197,7 @@ allOf:
|
||||
- renesas,rcar-gen2-scif
|
||||
- renesas,rcar-gen3-scif
|
||||
- renesas,rcar-gen4-scif
|
||||
- renesas,rcar-gen5-scif
|
||||
then:
|
||||
properties:
|
||||
interrupts:
|
||||
|
||||
@@ -635,7 +635,9 @@ static int dw8250_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(data->rst))
|
||||
return PTR_ERR(data->rst);
|
||||
|
||||
reset_control_deassert(data->rst);
|
||||
err = reset_control_deassert(data->rst);
|
||||
if (err)
|
||||
return dev_err_probe(dev, err, "failed to deassert resets\n");
|
||||
|
||||
err = devm_add_action_or_reset(dev, dw8250_reset_control_assert, data->rst);
|
||||
if (err)
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
#define PCI_DEVICE_ID_ACCESSIO_COM_4SM 0x10db
|
||||
#define PCI_DEVICE_ID_ACCESSIO_COM_8SM 0x10ea
|
||||
|
||||
#define PCI_DEVICE_ID_ADVANTECH_XR17V352 0x0018
|
||||
|
||||
#define PCI_DEVICE_ID_COMMTECH_4224PCI335 0x0002
|
||||
#define PCI_DEVICE_ID_COMMTECH_4222PCI335 0x0004
|
||||
#define PCI_DEVICE_ID_COMMTECH_2324PCI335 0x000a
|
||||
@@ -1622,6 +1624,12 @@ static const struct exar8250_board pbn_fastcom35x_8 = {
|
||||
.exit = pci_xr17v35x_exit,
|
||||
};
|
||||
|
||||
static const struct exar8250_board pbn_adv_XR17V352 = {
|
||||
.num_ports = 2,
|
||||
.setup = pci_xr17v35x_setup,
|
||||
.exit = pci_xr17v35x_exit,
|
||||
};
|
||||
|
||||
static const struct exar8250_board pbn_exar_XR17V4358 = {
|
||||
.num_ports = 12,
|
||||
.setup = pci_xr17v35x_setup,
|
||||
@@ -1696,6 +1704,9 @@ static const struct pci_device_id exar_pci_tbl[] = {
|
||||
USR_DEVICE(XR17C152, 2980, pbn_exar_XR17C15x),
|
||||
USR_DEVICE(XR17C152, 2981, pbn_exar_XR17C15x),
|
||||
|
||||
/* ADVANTECH devices */
|
||||
EXAR_DEVICE(ADVANTECH, XR17V352, pbn_adv_XR17V352),
|
||||
|
||||
/* Exar Corp. XR17C15[248] Dual/Quad/Octal UART */
|
||||
EXAR_DEVICE(EXAR, XR17C152, pbn_exar_XR17C15x),
|
||||
EXAR_DEVICE(EXAR, XR17C154, pbn_exar_XR17C15x),
|
||||
|
||||
@@ -435,6 +435,7 @@ static int __maybe_unused mtk8250_runtime_suspend(struct device *dev)
|
||||
while
|
||||
(serial_in(up, MTK_UART_DEBUG0));
|
||||
|
||||
clk_disable_unprepare(data->uart_clk);
|
||||
clk_disable_unprepare(data->bus_clk);
|
||||
|
||||
return 0;
|
||||
@@ -445,6 +446,7 @@ static int __maybe_unused mtk8250_runtime_resume(struct device *dev)
|
||||
struct mtk8250_data *data = dev_get_drvdata(dev);
|
||||
|
||||
clk_prepare_enable(data->bus_clk);
|
||||
clk_prepare_enable(data->uart_clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -475,13 +477,13 @@ static int mtk8250_probe_of(struct platform_device *pdev, struct uart_port *p,
|
||||
int dmacnt;
|
||||
#endif
|
||||
|
||||
data->uart_clk = devm_clk_get(&pdev->dev, "baud");
|
||||
data->uart_clk = devm_clk_get_enabled(&pdev->dev, "baud");
|
||||
if (IS_ERR(data->uart_clk)) {
|
||||
/*
|
||||
* For compatibility with older device trees try unnamed
|
||||
* clk when no baud clk can be found.
|
||||
*/
|
||||
data->uart_clk = devm_clk_get(&pdev->dev, NULL);
|
||||
data->uart_clk = devm_clk_get_enabled(&pdev->dev, NULL);
|
||||
if (IS_ERR(data->uart_clk)) {
|
||||
dev_warn(&pdev->dev, "Can't get uart clock\n");
|
||||
return PTR_ERR(data->uart_clk);
|
||||
|
||||
@@ -588,13 +588,6 @@ static int sc16is7xx_set_baud(struct uart_port *port, int baud)
|
||||
div /= prescaler;
|
||||
}
|
||||
|
||||
/* Enable enhanced features */
|
||||
sc16is7xx_efr_lock(port);
|
||||
sc16is7xx_port_update(port, SC16IS7XX_EFR_REG,
|
||||
SC16IS7XX_EFR_ENABLE_BIT,
|
||||
SC16IS7XX_EFR_ENABLE_BIT);
|
||||
sc16is7xx_efr_unlock(port);
|
||||
|
||||
/* If bit MCR_CLKSEL is set, the divide by 4 prescaler is activated. */
|
||||
sc16is7xx_port_update(port, SC16IS7XX_MCR_REG,
|
||||
SC16IS7XX_MCR_CLKSEL_BIT,
|
||||
|
||||
@@ -1014,16 +1014,18 @@ static int sci_handle_fifo_overrun(struct uart_port *port)
|
||||
struct sci_port *s = to_sci_port(port);
|
||||
const struct plat_sci_reg *reg;
|
||||
int copied = 0;
|
||||
u16 status;
|
||||
u32 status;
|
||||
|
||||
reg = sci_getreg(port, s->params->overrun_reg);
|
||||
if (!reg->size)
|
||||
return 0;
|
||||
if (s->type != SCI_PORT_RSCI) {
|
||||
reg = sci_getreg(port, s->params->overrun_reg);
|
||||
if (!reg->size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
status = sci_serial_in(port, s->params->overrun_reg);
|
||||
status = s->ops->read_reg(port, s->params->overrun_reg);
|
||||
if (status & s->params->overrun_mask) {
|
||||
status &= ~s->params->overrun_mask;
|
||||
sci_serial_out(port, s->params->overrun_reg, status);
|
||||
s->ops->write_reg(port, s->params->overrun_reg, status);
|
||||
|
||||
port->icount.overrun++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user