mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-19 08:28:51 +09:00
![Alexander Graf](/assets/img/avatar_default.png)
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>
26 lines
433 B
C
26 lines
433 B
C
/*
|
|
* (C) Copyright 2016 Stephen Warren <swarren@wwwdotorg.org>
|
|
*
|
|
* Derived from pl01x code:
|
|
* Copyright (c) 2014 Google, Inc
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#ifndef __serial_bcm283x_mu_h
|
|
#define __serial_bcm283x_mu_h
|
|
|
|
/*
|
|
*Information about a serial port
|
|
*
|
|
* @base: Register base address
|
|
*/
|
|
struct bcm283x_mu_serial_platdata {
|
|
unsigned long base;
|
|
unsigned int clock;
|
|
bool skip_init;
|
|
bool disabled;
|
|
};
|
|
|
|
#endif
|