Skip to content

Commit 798804b

Browse files
committed
Merge tag 'tty-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial driver fixes from Greg KH: "Here are five small serial and tty and vt fixes for 6.16-rc4. Included in here are: - kerneldoc fixes for recent vt changes - imx serial driver fix - of_node sysfs fix for a regression - vt missing notification fix - 8250 dt bindings fix All of these have been in linux-next for a while with no reported issues" * tag 'tty-6.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: dt-bindings: serial: 8250: Make clocks and clock-frequency exclusive serial: imx: Restore original RXTL for console to fix data loss serial: core: restore of_node information in sysfs vt: fix kernel-doc warnings in ucs_get_fallback() vt: add missing notification when switching back to text mode
2 parents 3b1890e + 0981213 commit 798804b

File tree

5 files changed

+16
-7
lines changed

5 files changed

+16
-7
lines changed

Documentation/devicetree/bindings/serial/8250.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ allOf:
4545
- ns16550
4646
- ns16550a
4747
then:
48-
anyOf:
48+
oneOf:
4949
- required: [ clock-frequency ]
5050
- required: [ clocks ]
5151

drivers/tty/serial/imx.c

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ struct imx_port {
235235
enum imx_tx_state tx_state;
236236
struct hrtimer trigger_start_tx;
237237
struct hrtimer trigger_stop_tx;
238+
unsigned int rxtl;
238239
};
239240

240241
struct imx_port_ucrs {
@@ -1339,6 +1340,7 @@ static void imx_uart_clear_rx_errors(struct imx_port *sport)
13391340

13401341
#define TXTL_DEFAULT 8
13411342
#define RXTL_DEFAULT 8 /* 8 characters or aging timer */
1343+
#define RXTL_CONSOLE_DEFAULT 1
13421344
#define TXTL_DMA 8 /* DMA burst setting */
13431345
#define RXTL_DMA 9 /* DMA burst setting */
13441346

@@ -1457,7 +1459,7 @@ static void imx_uart_disable_dma(struct imx_port *sport)
14571459
ucr1 &= ~(UCR1_RXDMAEN | UCR1_TXDMAEN | UCR1_ATDMAEN);
14581460
imx_uart_writel(sport, ucr1, UCR1);
14591461

1460-
imx_uart_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT);
1462+
imx_uart_setup_ufcr(sport, TXTL_DEFAULT, sport->rxtl);
14611463

14621464
sport->dma_is_enabled = 0;
14631465
}
@@ -1482,7 +1484,12 @@ static int imx_uart_startup(struct uart_port *port)
14821484
return retval;
14831485
}
14841486

1485-
imx_uart_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT);
1487+
if (uart_console(&sport->port))
1488+
sport->rxtl = RXTL_CONSOLE_DEFAULT;
1489+
else
1490+
sport->rxtl = RXTL_DEFAULT;
1491+
1492+
imx_uart_setup_ufcr(sport, TXTL_DEFAULT, sport->rxtl);
14861493

14871494
/* disable the DREN bit (Data Ready interrupt enable) before
14881495
* requesting IRQs
@@ -1948,7 +1955,7 @@ static int imx_uart_poll_init(struct uart_port *port)
19481955
if (retval)
19491956
clk_disable_unprepare(sport->clk_ipg);
19501957

1951-
imx_uart_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT);
1958+
imx_uart_setup_ufcr(sport, TXTL_DEFAULT, sport->rxtl);
19521959

19531960
uart_port_lock_irqsave(&sport->port, &flags);
19541961

@@ -2040,7 +2047,7 @@ static int imx_uart_rs485_config(struct uart_port *port, struct ktermios *termio
20402047
/* If the receiver trigger is 0, set it to a default value */
20412048
ufcr = imx_uart_readl(sport, UFCR);
20422049
if ((ufcr & UFCR_RXTL_MASK) == 0)
2043-
imx_uart_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT);
2050+
imx_uart_setup_ufcr(sport, TXTL_DEFAULT, sport->rxtl);
20442051
imx_uart_start_rx(port);
20452052
}
20462053

@@ -2302,7 +2309,7 @@ imx_uart_console_setup(struct console *co, char *options)
23022309
else
23032310
imx_uart_console_get_options(sport, &baud, &parity, &bits);
23042311

2305-
imx_uart_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT);
2312+
imx_uart_setup_ufcr(sport, TXTL_DEFAULT, sport->rxtl);
23062313

23072314
retval = uart_set_options(&sport->port, co, baud, parity, bits, flow);
23082315

drivers/tty/serial/serial_base_bus.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ static int serial_base_device_init(struct uart_port *port,
7272
dev->parent = parent_dev;
7373
dev->bus = &serial_base_bus_type;
7474
dev->release = release;
75+
device_set_of_node_from_dev(dev, parent_dev);
7576

7677
if (!serial_base_initialized) {
7778
dev_dbg(port->dev, "uart_add_one_port() called before arch_initcall()?\n");

drivers/tty/vt/ucs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ static int ucs_page_entry_cmp(const void *key, const void *element)
206206

207207
/**
208208
* ucs_get_fallback() - Get a substitution for the provided Unicode character
209-
* @base: Base Unicode code point (UCS-4)
209+
* @cp: Unicode code point (UCS-4)
210210
*
211211
* Get a simpler fallback character for the provided Unicode character.
212212
* This is used for terminal display when corresponding glyph is unavailable.

drivers/tty/vt/vt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4650,6 +4650,7 @@ void do_unblank_screen(int leaving_gfx)
46504650
set_palette(vc);
46514651
set_cursor(vc);
46524652
vt_event_post(VT_EVENT_UNBLANK, vc->vc_num, vc->vc_num);
4653+
notify_update(vc);
46534654
}
46544655
EXPORT_SYMBOL(do_unblank_screen);
46554656

0 commit comments

Comments
 (0)