1. 16 Aug, 2021 1 commit
  2. 08 Aug, 2021 1 commit
    • Simon Glass's avatar
      dm: core: Don't allow uclass use before ready · 1e9ced28
      Simon Glass authored
      
      
      At present it is possible to call uclass_get() before driver model is
      inited. In fact this happens on x86 boards which use Intel FSPv1, since
      mrccache_get_region() tries to get the SPI flash device very early
      during init.
      
      This has always been undefined behaviour. Previously it generally worked,
      i.e. returned an error code without crashing, because gd->uclass_root_s
      is zeroed and the uclass can be added despite driver model not being
      ready, due to the way lists are implemented. With the change to use a
      gd->uclass_root pointer, this no-longer works. For example, it causes a
      hang on minnowmax.
      
      Fix this by adding a check that driver model is ready when uclass_get() is
      called. This function is called in the process of locating any device, so
      it is a good place to add the check.
      
      This fixes booting on minnowmax.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Fixes: 8a715530 ("dm: core: Allow the uclass list to move")
      1e9ced28
  3. 02 Aug, 2021 6 commits
  4. 01 Aug, 2021 4 commits
    • Simon Glass's avatar
      dtoc: Support widening a bool value · eec44c72
      Simon Glass authored
      
      
      At present if we see 'ranges' property (with no value) we assume it is a
      boolean, as per the devicetree spec.
      
      But another node may define 'ranges' with a value, forcing us to widen it
      to an int array. At present this is not supported and causes an error.
      
      Fix this and add some test cases.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Reported-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
      eec44c72
    • Simon Glass's avatar
      dtoc: Fix widening an int array to an int · ca04494d
      Simon Glass authored
      
      
      An int array can hold a single int so we should not need to do anything
      in the widening operation. However due to a quirk in the code, an int[3]
      widened with an int produced an int[4]. Fix this and add a test.
      
      Fix a comment typo while we are here.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Reported-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
      ca04494d
    • Simon Glass's avatar
      sandbox: Reduce keyed autoboot delay · cb897009
      Simon Glass authored
      
      
      The autoboot tests are a recent addition to U-Boot, providing much-needed
      coverage in this area.
      
      A side effect of the keyed autoboot test is that this feature is enabled
      in sandbox always. This changes the autoboot prompt and confuses the
      pytests. Some tests become slower, for example the vboot tests take about
      27s now instead of 3s.
      
      We don't actually need this feature enabled to be able to run the tests.
      Add a switch to allow sandbox to turn it on and off as needed. Use this
      in the one test that needs it.
      
      Add a command-line flag in case this is desired in normal use.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Fixes: 25c8b9f2
      
       ("test: add first autoboot unit tests")
      Reviewed-by: default avatarSteffen Jaeckel <jaeckel-floss@eyet-services.de>
      cb897009
    • Simon Glass's avatar
      sandbox: tpm: Support extending a PCR multiple times · 1c6608bd
      Simon Glass authored
      
      
      It is fairly easy to handle this case and it makes the emulator more
      useful, since PCRs are commonly extended several times.
      
      Add support for this, using U-Boot's sha256 support.
      
      For now sandbox only supports a single PCR, but that is enough for the
      tests that currently exist.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      1c6608bd
  5. 29 Jul, 2021 1 commit
  6. 27 Jul, 2021 3 commits
  7. 24 Jul, 2021 1 commit
  8. 23 Jul, 2021 7 commits
  9. 21 Jul, 2021 8 commits
  10. 15 Jul, 2021 3 commits
  11. 06 Jul, 2021 1 commit
    • Alper Nebi Yasak's avatar
      sandbox: cros-ec: Add tests for the Chromium OS EC PWM driver · e712245d
      Alper Nebi Yasak authored and Simon Glass's avatar Simon Glass committed
      
      
      This patch adds a limited pulse-width modulator to sandbox's Chromium OS
      Embedded Controller emulation. The emulated PWM device supports multiple
      channels but can only set a duty cycle for each, as the actual EC
      doesn't expose any functionality or information other than that. Though
      the EC supports specifying the PWM channel by its type (e.g. display
      backlight, keyboard backlight), this is not implemented in the emulation
      as nothing in U-Boot uses this type specification.
      
      This emulated PWM device is then used to test the Chromium OS PWM driver
      in sandbox. Adding the required device node to the sandbox test
      device-tree unfortunately makes it the first PWM device, so this also
      touches some other tests to make sure they still use the sandbox PWM.
      Signed-off-by: default avatarAlper Nebi Yasak <alpernebiyasak@gmail.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      e712245d
  12. 05 Jul, 2021 4 commits