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

Commit 8e3ae37a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull serial fixes from Greg KH:
 "Here are 3 serial driver fixes for issues that have been reported.

  Two are reverts, fixing problems that were in the big TTY/Serial
  driver merge in 4.6-rc1, and the last one is a simple bugfix for a
  regression that showed up in 4.6-rc1 as well.

  All have been in linux-next with no reported issues"

* tag 'tty-4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  Revert "serial: 8250: Add hardware dependency to RT288X option"
  tty/serial/8250: fix RS485 half-duplex RX
  Revert "serial-uartlite: Constify uartlite_be/uartlite_le"
parents f9d1e7f3 f077b736
Loading
Loading
Loading
Loading
+10 −1
Original line number Original line Diff line number Diff line
@@ -1403,9 +1403,18 @@ static void __do_stop_tx_rs485(struct uart_8250_port *p)
	/*
	/*
	 * Empty the RX FIFO, we are not interested in anything
	 * Empty the RX FIFO, we are not interested in anything
	 * received during the half-duplex transmission.
	 * received during the half-duplex transmission.
	 * Enable previously disabled RX interrupts.
	 */
	 */
	if (!(p->port.rs485.flags & SER_RS485_RX_DURING_TX))
	if (!(p->port.rs485.flags & SER_RS485_RX_DURING_TX)) {
		serial8250_clear_fifos(p);
		serial8250_clear_fifos(p);

		serial8250_rpm_get(p);

		p->ier |= UART_IER_RLSI | UART_IER_RDI;
		serial_port_out(&p->port, UART_IER, p->ier);

		serial8250_rpm_put(p);
	}
}
}


static void serial8250_em485_handle_stop_tx(unsigned long arg)
static void serial8250_em485_handle_stop_tx(unsigned long arg)
+0 −1
Original line number Original line Diff line number Diff line
@@ -324,7 +324,6 @@ config SERIAL_8250_EM
config SERIAL_8250_RT288X
config SERIAL_8250_RT288X
	bool "Ralink RT288x/RT305x/RT3662/RT3883 serial port support"
	bool "Ralink RT288x/RT305x/RT3662/RT3883 serial port support"
	depends on SERIAL_8250
	depends on SERIAL_8250
	depends on MIPS || COMPILE_TEST
	default y if MIPS_ALCHEMY || SOC_RT288X || SOC_RT305X || SOC_RT3883 || SOC_MT7620
	default y if MIPS_ALCHEMY || SOC_RT288X || SOC_RT305X || SOC_RT3883 || SOC_MT7620
	help
	help
	  Selecting this option will add support for the alternate register
	  Selecting this option will add support for the alternate register
+4 −4
Original line number Original line Diff line number Diff line
@@ -72,7 +72,7 @@ static void uartlite_outbe32(u32 val, void __iomem *addr)
	iowrite32be(val, addr);
	iowrite32be(val, addr);
}
}


static const struct uartlite_reg_ops uartlite_be = {
static struct uartlite_reg_ops uartlite_be = {
	.in = uartlite_inbe32,
	.in = uartlite_inbe32,
	.out = uartlite_outbe32,
	.out = uartlite_outbe32,
};
};
@@ -87,21 +87,21 @@ static void uartlite_outle32(u32 val, void __iomem *addr)
	iowrite32(val, addr);
	iowrite32(val, addr);
}
}


static const struct uartlite_reg_ops uartlite_le = {
static struct uartlite_reg_ops uartlite_le = {
	.in = uartlite_inle32,
	.in = uartlite_inle32,
	.out = uartlite_outle32,
	.out = uartlite_outle32,
};
};


static inline u32 uart_in32(u32 offset, struct uart_port *port)
static inline u32 uart_in32(u32 offset, struct uart_port *port)
{
{
	const struct uartlite_reg_ops *reg_ops = port->private_data;
	struct uartlite_reg_ops *reg_ops = port->private_data;


	return reg_ops->in(port->membase + offset);
	return reg_ops->in(port->membase + offset);
}
}


static inline void uart_out32(u32 val, u32 offset, struct uart_port *port)
static inline void uart_out32(u32 val, u32 offset, struct uart_port *port)
{
{
	const struct uartlite_reg_ops *reg_ops = port->private_data;
	struct uartlite_reg_ops *reg_ops = port->private_data;


	reg_ops->out(val, port->membase + offset);
	reg_ops->out(val, port->membase + offset);
}
}