Skip to content
Snippets Groups Projects
Commit 601147b0 authored by Alexander Graf's avatar Alexander Graf Committed by Tom Rini
Browse files

serial: bcm283x_mu: Detect disabled serial device


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: default avatarAlexander Graf <agraf@suse.de>
Acked-by: default avatarStephen Warren <swarren@wwwdotorg.org>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 04a993fe
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment