[U-Boot] [PATCH 0/3] console: Tidy up console_dev_is_serial()

Simon Glass sjg at chromium.org
Thu Jul 27 15:31:01 UTC 2017


With driver model this function does not work correctly and when
CONFIG_DISPLAY_BOARDINFO_LATE is enabled we end up announcing U-Boot twice
on the serial port. This causes the pytest framework to fail as it looks
like a reset.

This series includes an interim patch to fix the test framework. However
the correct fix is to avoid displaying the banner twice. This happens with
driver model if the serial console device is not called "serial". Two
patches enhance the check to use the uclass instead of the device name.
This is a more reliable test.

We should not need to apply all three patches, but they are included in
this series to allow the immediate test breakage to be fixed with a pytest
change, while the other two patches are reviewed.


Simon Glass (3):
  test/py: Handle the banner being printed after relocation
  console: Unify the check for a serial console
  dm: console: Check for serial devices properly

 common/console.c               | 28 ++++++++++++++++++++++++++--
 drivers/serial/serial-uclass.c |  2 +-
 include/stdio_dev.h            |  1 +
 test/py/u_boot_console_base.py | 21 ++++++++++++++++++++-
 4 files changed, 48 insertions(+), 4 deletions(-)

-- 
2.14.0.rc0.400.g1c36432dff-goog



More information about the U-Boot mailing list