]> git.baikalelectronics.ru Git - kernel.git/commit
tty: serial: uartlite: Prevent changing fixed parameters
authorSean Anderson <sean.anderson@seco.com>
Thu, 26 Aug 2021 19:21:54 +0000 (15:21 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Sep 2021 08:05:32 +0000 (10:05 +0200)
commit7d6bb6b89468ec64749d3e53e47318324327bea3
treebed2ebea57836b31eddd4a655b54dea106e482cf
parent711ff322ba9a22a4add706440af682c04527bc5f
tty: serial: uartlite: Prevent changing fixed parameters

This device does not support changing baud, parity, data bits, stop
bits, or detecting breaks. Disable "changing" these settings to prevent
their termios from diverging from the actual state of the uart.

In order to determine the correct parameters to enforce, we read the
various new devicetree parameters to discover how the uart was
configured when it was synthesized. The defaults match
ulite_console_setup. xlnx,use-parity, xlnx,odd-parity, and
xlnx,data-bits are optional since there were in-tree users (and
presumably out-of-tree users) who did not set them.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Link: https://lore.kernel.org/r/20210826192154.3202269-5-sean.anderson@seco.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/uartlite.c