From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Wed, 7 Sep 2016 13:57:21 -0400 Subject: [U-Boot] [U-Boot, v4, 2/2] serial: bcm283x_mu: Detect disabled serial device In-Reply-To: <1471276131-136827-1-git-send-email-agraf@suse.de> References: <1471276131-136827-1-git-send-email-agraf@suse.de> Message-ID: <20160907175721.GM4990@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Aug 15, 2016 at 05:48:51PM +0200, Alexander Graf wrote: > 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 Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: