serial: 8250: Add CAP_MINI, set for bcm2835aux
authorPhil Elwell <phil@raspberrypi.org>
Fri, 19 May 2017 14:07:27 +0000 (15:07 +0100)
committerRaspbian kernel package updater <root@raspbian.org>
Sat, 31 Mar 2018 14:54:15 +0000 (15:54 +0100)
commit3792dd925c797d259830a7c4781a67b845c0c061
treeae9f1490be49f17b39fa0de2e2ef30273f2263d5
parent48b9a0f591de1e228d9256337c1acbe393f99ac4
serial: 8250: Add CAP_MINI, set for bcm2835aux

The AUX/mini-UART in the BCM2835 family of procesors is a cut-down
8250 clone. In particular it is lacking support for the following
features: CSTOPB PARENB PARODD CMSPAR CS5 CS6

Add a new capability (UART_CAP_MINI) that exposes the restrictions to
the user of the termios API by turning off the unsupported features in
the request.

N.B. It is almost possible to automatically discover the missing
features by reading back the LCR register, but the CSIZE bits don't
cooperate (contrary to the documentation, both bits are significant,
but CS5 and CS6 are mapped to CS7) and the code is much longer.

See: https://github.com/raspberrypi/linux/issues/1561

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
drivers/tty/serial/8250/8250.h
drivers/tty/serial/8250/8250_bcm2835aux.c
drivers/tty/serial/8250/8250_port.c