From 601147b06a708900c5352dc3dcc5d64271bf0d62 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Mon, 15 Aug 2016 17:48:51 +0200 Subject: 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: Alexander Graf Acked-by: Stephen Warren Reviewed-by: Simon Glass --- configs/rpi_3_32b_defconfig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'configs/rpi_3_32b_defconfig') diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig index 922e01bfcb..c59474cdf0 100644 --- a/configs/rpi_3_32b_defconfig +++ b/configs/rpi_3_32b_defconfig @@ -20,3 +20,5 @@ CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_PHYS_TO_BUS=y CONFIG_OF_LIBFDT=y +# CONFIG_REQUIRE_SERIAL_CONSOLE is not set +CONFIG_SYS_MALLOC_F_LEN=0x2000 -- cgit v1.2.3