[U-Boot] [PATCH v4 2/2] serial: bcm283x_mu: Detect disabled serial device
Simon Glass
sjg at chromium.org
Tue Aug 16 06:52:08 CEST 2016
On 15 August 2016 at 21:30, Stephen Warren <swarren at wwwdotorg.org> wrote:
>
> On 08/15/2016 09:48 AM, 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.
>
>
> Acked-by: Stephen Warren <swarren at wwwdotorg.org>
>
> Nits:
>
> I'd hope for a core DM feature to disable statically created devices rather than re-implementing it per driver, so we don't have to re-invent this each time we need it. Still, we can refactor this later if it turns out to be more generally useful.
>
Agreed - yes let's wait until we have another case or two.
Reviewed-by: Simon Glass <sjg at chromium.org>
> Perhaps a separate patch for the raw serial driver feature (serial_bcm283x_mu.h, serial_bcm283x_mu.c), and the board-specific logic (all the other files)?
- Simon
More information about the U-Boot
mailing list