Skip to content

Commit 225a389

Browse files
committed
Merge tag 'tty-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull TTY fixes from Greg Kroah-Hartman: "Here are 4 tiny patches, each fixing a serial driver problem that people have reported. Signed-off-by: Greg Kroah-Hartman <[email protected]>" * tag 'tty-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: pmac_zilog,kdb: Fix console poll hook to return instead of loop serial: mxs-auart: fix the wrong RTS hardware flow control serial: ifx6x60: fix paging fault on spi_register_driver serial: Change Kconfig entry for CLPS711X-target
2 parents 557e2e2 + 38f8eef commit 225a389

File tree

4 files changed

+24
-14
lines changed

4 files changed

+24
-14
lines changed

drivers/tty/serial/Kconfig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,12 @@ config SERIAL_KS8695_CONSOLE
160160

161161
config SERIAL_CLPS711X
162162
tristate "CLPS711X serial port support"
163-
depends on ARM && ARCH_CLPS711X
163+
depends on ARCH_CLPS711X
164164
select SERIAL_CORE
165+
default y
165166
help
166-
::: To be written :::
167+
This enables the driver for the on-chip UARTs of the Cirrus
168+
Logic EP711x/EP721x/EP731x processors.
167169

168170
config SERIAL_CLPS711X_CONSOLE
169171
bool "Support for console on CLPS711X serial port"
@@ -173,9 +175,7 @@ config SERIAL_CLPS711X_CONSOLE
173175
Even if you say Y here, the currently visible virtual console
174176
(/dev/tty0) will still be used as the system console by default, but
175177
you can alter that using a kernel command line option such as
176-
"console=ttyCL1". (Try "man bootparam" or see the documentation of
177-
your boot loader (lilo or loadlin) about how to pass options to the
178-
kernel at boot time.)
178+
"console=ttyCL1".
179179

180180
config SERIAL_SAMSUNG
181181
tristate "Samsung SoC serial support"

drivers/tty/serial/ifx6x60.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1331,7 +1331,7 @@ static const struct spi_device_id ifx_id_table[] = {
13311331
MODULE_DEVICE_TABLE(spi, ifx_id_table);
13321332

13331333
/* spi operations */
1334-
static const struct spi_driver ifx_spi_driver = {
1334+
static struct spi_driver ifx_spi_driver = {
13351335
.driver = {
13361336
.name = DRVNAME,
13371337
.pm = &ifx_spi_pm,

drivers/tty/serial/mxs-auart.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
#define AUART_CTRL0_CLKGATE (1 << 30)
7474

7575
#define AUART_CTRL2_CTSEN (1 << 15)
76+
#define AUART_CTRL2_RTSEN (1 << 14)
7677
#define AUART_CTRL2_RTS (1 << 11)
7778
#define AUART_CTRL2_RXE (1 << 9)
7879
#define AUART_CTRL2_TXE (1 << 8)
@@ -259,9 +260,12 @@ static void mxs_auart_set_mctrl(struct uart_port *u, unsigned mctrl)
259260

260261
u32 ctrl = readl(u->membase + AUART_CTRL2);
261262

262-
ctrl &= ~AUART_CTRL2_RTS;
263-
if (mctrl & TIOCM_RTS)
264-
ctrl |= AUART_CTRL2_RTS;
263+
ctrl &= ~AUART_CTRL2_RTSEN;
264+
if (mctrl & TIOCM_RTS) {
265+
if (u->state->port.flags & ASYNC_CTS_FLOW)
266+
ctrl |= AUART_CTRL2_RTSEN;
267+
}
268+
265269
s->ctrl = mctrl;
266270
writel(ctrl, u->membase + AUART_CTRL2);
267271
}
@@ -359,9 +363,9 @@ static void mxs_auart_settermios(struct uart_port *u,
359363

360364
/* figure out the hardware flow control settings */
361365
if (cflag & CRTSCTS)
362-
ctrl2 |= AUART_CTRL2_CTSEN;
366+
ctrl2 |= AUART_CTRL2_CTSEN | AUART_CTRL2_RTSEN;
363367
else
364-
ctrl2 &= ~AUART_CTRL2_CTSEN;
368+
ctrl2 &= ~(AUART_CTRL2_CTSEN | AUART_CTRL2_RTSEN);
365369

366370
/* set baud rate */
367371
baud = uart_get_baud_rate(u, termios, old, 0, u->uartclk);

drivers/tty/serial/pmac_zilog.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,10 +1348,16 @@ static int pmz_verify_port(struct uart_port *port, struct serial_struct *ser)
13481348
static int pmz_poll_get_char(struct uart_port *port)
13491349
{
13501350
struct uart_pmac_port *uap = (struct uart_pmac_port *)port;
1351+
int tries = 2;
13511352

1352-
while ((read_zsreg(uap, R0) & Rx_CH_AV) == 0)
1353-
udelay(5);
1354-
return read_zsdata(uap);
1353+
while (tries) {
1354+
if ((read_zsreg(uap, R0) & Rx_CH_AV) != 0)
1355+
return read_zsdata(uap);
1356+
if (tries--)
1357+
udelay(5);
1358+
}
1359+
1360+
return NO_POLL_CHAR;
13551361
}
13561362

13571363
static void pmz_poll_put_char(struct uart_port *port, unsigned char c)

0 commit comments

Comments
 (0)