[U-Boot] [PATCH v2 1/7] serial: Use next serial device if probing fails

Alexander Graf agraf at suse.de
Wed Jan 17 22:02:37 UTC 2018



On 17.01.18 20:34, Simon Glass wrote:
> On 17 January 2018 at 00:54, Alexander Graf <agraf at suse.de> wrote:
>> Currently our serial device search chokes on the fact that the serial
>> probe function could fail. If it does, instead of searching for the next
>> usable serial device, it just quits.
>>
>> This patch changes the fallback logic so that even when a serial device
>> was not probed correctly, we just try the next ones until we find one that
>> works.
>>
>> Signed-off-by: Alexander Graf <agraf at suse.de>
>>
>> ---
>>
>> v1 -> v2:
>>
>>   - Make search logic easier to follow
>> ---
>>  drivers/serial/serial-uclass.c | 25 +++++++++++++++++++------
>>  1 file changed, 19 insertions(+), 6 deletions(-)
> 
> Reviewed-by: Simon Glass <sjg at chromium.org>
> 
> The fallback logic is getting more complicated. How come the DT does
> not specify the correct console?

By default the DT on the RPi does not specify any serial console.
However, users have grown accustomed to the fact that there is indeed
one :).

I guess it all boils down to the fact that Linux is terrible when it
comes to console selection. 99.9% of users that want a serial console
and have a graphical screen want to have *both* available as first class
citizen consoles. But Linux just can't do that, so we have a lot of
crude hacks all over the place.


Alex


More information about the U-Boot mailing list