summaryrefslogtreecommitdiff
path: root/drivers/serial/serial_bcm283x_mu.c
Commit message (Collapse)AuthorAgeLines
* dm: core: Replace of_offset with accessorSimon Glass2017-02-08-2/+3
| | | | | | | | | At present devices use a simple integer offset to record the device tree node associated with the device. In preparation for supporting a live device tree, which uses a node pointer instead, refactor existing code to access this field through an inline function. Signed-off-by: Simon Glass <sjg@chromium.org>
* serial: bcm283x_mu: support disabling after initializationFabian Vogt2016-11-28-2/+16
| | | | | | | | | For the Raspberry Pi 3 it needs to be possible to disable the serial device after initialization happens, as only after the GPIO device is available it is known whether the mini uart is usable. Signed-off-by: Fabian Vogt <fvogt@suse.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* serial: bcm283x_mu: add device tree supportFabian Vogt2016-11-28-0/+28
| | | | | | | This patch adds device tree support for the bcm283x mini-uart driver. Signed-off-by: Fabian Vogt <fvogt@suse.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* serial: bcm283x_mu: Detect disabled serial deviceAlexander Graf2016-09-06-0/+3
| | | | | | | | | | | | | | | | | | | | On the raspberry pi, you can disable the serial port to gain dynamic frequency scaling which can get handy at times. However, in such a configuration the serial controller gets its rx queue filled up with zero bytes which then happily get transmitted on to whoever calls getc() today. This patch adds detection logic for that case by checking whether the RX pin is mapped to GPIO15 and disables the mini uart if it is not mapped properly. That way we can leave the driver enabled in the tree and can determine during runtime whether serial is usable or not, having a single binary that allows for uart and non-uart operation. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* serial: bcm283x_mu: make pending values more explicitStephen Warren2016-04-18-2/+2
| | | | | | | | | | dm_serial_ops.pending should return the number of characters, not just a valid C Boolean integer value. The existing code does already does this, but only as an accident since BCM283X_MU_LSR_RX_READY happens to be BIT(0). Enhance the code to be more explicit about the values it returns. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
* serial: add BCM283x mini UART driverStephen Warren2016-03-27-0/+140
The RPi3 typically uses the regular UART for high-speed communication with the Bluetooth device, leaving us the mini UART to use for the serial console. Add support for this UART so we can use it. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>