Skip to content
Snippets Groups Projects
  1. Jan 19, 2022
  2. Jul 21, 2021
    • Simon Glass's avatar
      log: Allow padding of the function name · 72fa1ad8
      Simon Glass authored
      
      At present when function names are logged, the output is a little hard to
      read since every function is a different length. Add a way to pad the
      names so that the log messages line up vertically. This doesn't work if
      the function name is very long, but it makes a big difference in most
      cases.
      
      Use 20 characters as a default since this covers the vast majority of
      functions.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      72fa1ad8
  3. Jun 08, 2021
  4. Mar 12, 2021
  5. Feb 02, 2021
    • Simon Glass's avatar
      common: Drop asm/global_data.h from common header · 401d1c4f
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Move this out of the common header and include it only where needed.  In
      a number of cases this requires adding "struct udevice;" to avoid adding
      another large header or in other cases replacing / adding missing header
      files that had been pulled in, very indirectly.   Finally, we have a few
      cases where we did not need to include <asm/global_data.h> at all, so
      remove that include.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      401d1c4f
  6. Jan 29, 2021
  7. Jan 17, 2021
  8. Jan 15, 2021
  9. Oct 30, 2020
  10. Oct 27, 2020
  11. Oct 17, 2020
  12. Oct 10, 2020
    • Simon Glass's avatar
      log: Disable the syslog driver by default · c7f5b850
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      This driver interferes with other sandbox tests since it causes log output
      to be interspersed with "No ethernet found." messages. Disable this driver
      by default.
      
      Enable it for the syslog tests so that they still pass.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      c7f5b850
    • Simon Glass's avatar
      log: Add a way to enable/disable a log device · 3d03ab63
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      At present all log devices are enabled by default. Add a function to allow
      devices to be disabled or enabled at runtime.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      3d03ab63
    • Simon Glass's avatar
      log: Drop #ifdef in log_test · bd180db2
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      This is not needed as the Makefile only builds the file if CONFIG_LOG_TEST
      is enabled. Drop it.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      bd180db2
    • Simon Glass's avatar
      log: Allow LOG_DEBUG to always enable log output · 52d3df7f
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      At present if CONFIG_LOG enabled, putting LOG_DEBUG at the top of a file
      (before log.h inclusion) causes _log() to be executed for every log()
      call, regardless of the build- or run-time logging level.
      
      However there is no guarantee that the log record will actually be
      displayed. If the current log level is lower than LOGL_DEBUG then it will
      not be.
      
      Add a way to signal that the log record should always be displayed and
      update log_passes_filters() to handle this.
      
      With the new behaviour, log_debug() will always log if LOG_DEBUG is
      enabled.
      
      Move log_test_syslog_nodebug() into its own file since it cannot be made
      to work where it is, with LOG_DEBUG defined.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      52d3df7f
  13. Jul 10, 2020
  14. May 19, 2020
  15. May 18, 2020
    • Simon Glass's avatar
      command: Remove the cmd_tbl_t typedef · 09140113
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      We should not use typedefs in U-Boot. They cannot be used as forward
      declarations which means that header files must include the full header to
      access them.
      
      Drop the typedef and rename the struct to remove the _s suffix which is
      now not useful.
      
      This requires quite a few header-file additions.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      09140113
  16. May 08, 2020
    • Heinrich Schuchardt's avatar
      test: fix naming of test functions in the log test suite · be51c3ca
      Heinrich Schuchardt authored and Tom Rini's avatar Tom Rini committed
      
      Both the nolog as well as the syslog tests were not found by Python
      function generate_ut_subtest() due to not following the nameing
      requirements imposed by the regular expression used to find linker
      generated list entries in file u-boot.sym.
      
      Adjust the naming of test functions.
      
      With the patch the following tests are executed successfully for
      sandbox_defconfig:
      
      test/py/tests/test_ut.py::test_ut[ut_log_syslog_debug] PASSED
      test/py/tests/test_ut.py::test_ut[ut_log_syslog_err] PASSED
      test/py/tests/test_ut.py::test_ut[ut_log_syslog_info] PASSED
      test/py/tests/test_ut.py::test_ut[ut_log_syslog_nodebug] PASSED
      test/py/tests/test_ut.py::test_ut[ut_log_syslog_notice] PASSED
      test/py/tests/test_ut.py::test_ut[ut_log_syslog_warning] PASSED
      
      The nolog tests are only executed if CONFIG_LOG=n and
      CONFIG_CONSOLE_RECORD=y.
      
      Reported-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      be51c3ca
  17. Apr 16, 2020
  18. Oct 09, 2018
    • Simon Glass's avatar
      log: Add helpers for common log levels · cdd140af
      Simon Glass authored
      
      At present to output a log message you need something like:
      
         log(UCLASS_SPI, LOCL_INFO, "message1");
         log(UCLASS_SPI, LOCL_INFO, "message2");
      
      but many files use the same category throughout. Also it is helpful to
      shorten the length of log names, providing helpers for common logging
      levels. Add some macros so that it is possible to do:
      
         (top of file, before #includes)
         #define LOG_CATEGORY UCLASS_SPI
      
         (later in the file)
         log_info("message1");
         log_debug("message2");
         log_err("message3");
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      cdd140af
  19. May 07, 2018
    • Tom Rini's avatar
      SPDX: Convert all of our single license tags to Linux Kernel style · 83d290c5
      Tom Rini authored
      
      When U-Boot started using SPDX tags we were among the early adopters and
      there weren't a lot of other examples to borrow from.  So we picked the
      area of the file that usually had a full license text and replaced it
      with an appropriate SPDX-License-Identifier: entry.  Since then, the
      Linux Kernel has adopted SPDX tags and they place it as the very first
      line in a file (except where shebangs are used, then it's second line)
      and with slightly different comment styles than us.
      
      In part due to community overlap, in part due to better tag visibility
      and in part for other minor reasons, switch over to that style.
      
      This commit changes all instances where we have a single declared
      license in the tag as both the before and after are identical in tag
      contents.  There's also a few places where I found we did not have a tag
      and have introduced one.
      
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      83d290c5
  20. Dec 07, 2017
Loading