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. 01 Aug, 2021 2 commits
  4. 27 Jul, 2021 1 commit
  5. 23 Jul, 2021 2 commits
  6. 21 Jul, 2021 2 commits
  7. 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
  8. 24 Jun, 2021 2 commits
  9. 18 Jun, 2021 1 commit
    • Michael Walle's avatar
      net: use the same alias stem for ethernet as linux · 82a3c9ef
      Michael Walle authored and Ramon Fried's avatar Ramon Fried committed
      Linux uses the prefix "ethernet" whereas u-boot uses "eth". This is from
      the linux tree:
      
      $ grep "eth[0-9].*=.*&" arch/**/*dts{,i}|wc -l
      0
      $ grep "ethernet[0-9].*=.*&" arch/**/*dts{,i}|wc -l
      633
      
      In u-boot device trees both prefixes are used. Until recently the only
      user of the ethernet alias was the sandbox test device tree. This
      changed with commit fc054d56
      
       ("net: Introduce DSA class for Ethernet
      switches"). There, the MAC addresses are inherited based on the devices
      sequence IDs which is in turn given by the device tree.
      
      Before there are more users in u-boot and both worlds will differ even
      more, rename the alias prefix to "ethernet" to match the linux ones.
      Also adapt the test cases and rename any old aliases in the u-boot
      device trees.
      
      Cc: David Wu <david.wu@rock-chips.com>
      Signed-off-by: default avatarMichael Walle <michael@walle.cc>
      Reviewed-by: default avatarFabio Estevam <festevam@gmail.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      82a3c9ef
  10. 08 Jun, 2021 1 commit
  11. 05 Jun, 2021 1 commit
  12. 26 May, 2021 1 commit
  13. 24 May, 2021 1 commit
  14. 12 May, 2021 1 commit
  15. 04 May, 2021 2 commits
  16. 29 Apr, 2021 1 commit
  17. 28 Apr, 2021 1 commit
    • Neil Armstrong's avatar
      test: reset: Extend base reset test to catch error · 49f352dc
      Neil Armstrong authored and Stefan Roese's avatar Stefan Roese committed
      With this extended test, we get the following failure :
      
      => ut dm reset_base
      Test: dm_test_reset_base: reset.c
      test/dm/reset.c:52, dm_test_reset_base(): reset_method3.id == reset_method3_1.id: Expected 0x14 (20), got 0x2 (2)
      Test: dm_test_reset_base: reset.c (flat tree)
      test/dm/reset.c:52, dm_test_reset_base(): reset_method3.id == reset_method3_1.id: Expected 0x14 (20), got 0x2 (2)
      Failures: 2
      
      A fix is needed in reset_get_by_index_nodev() when introduced in [1].
      
      [1] ea9dc35a
      
       ("reset: Get the RESET by index without device")
      Signed-off-by: Neil Armstrong's avatarNeil Armstrong <narmstrong@baylibre.com>
      49f352dc
  18. 27 Apr, 2021 1 commit
    • Neil Armstrong's avatar
      test: reset: Extend base reset test to catch error · bdfe6907
      Neil Armstrong authored and Tom Rini's avatar Tom Rini committed
      With this extended test, we get the following failure :
      
      => ut dm reset_base
      Test: dm_test_reset_base: reset.c
      test/dm/reset.c:52, dm_test_reset_base(): reset_method3.id == reset_method3_1.id: Expected 0x14 (20), got 0x2 (2)
      Test: dm_test_reset_base: reset.c (flat tree)
      test/dm/reset.c:52, dm_test_reset_base(): reset_method3.id == reset_method3_1.id: Expected 0x14 (20), got 0x2 (2)
      Failures: 2
      
      A fix is needed in reset_get_by_index_nodev() when introduced in [1].
      
      [1] ea9dc35a
      
       ("reset: Get the RESET by index without device")
      Signed-off-by: Neil Armstrong's avatarNeil Armstrong <narmstrong@baylibre.com>
      bdfe6907
  19. 22 Apr, 2021 2 commits
  20. 20 Apr, 2021 1 commit
  21. 15 Apr, 2021 3 commits
  22. 12 Apr, 2021 5 commits
  23. 10 Apr, 2021 1 commit
  24. 27 Mar, 2021 1 commit
    • Simon Glass's avatar
      sf: Support querying write-protect · b3b60f59
      Simon Glass authored
      This feature was dropped from U-Boot some time ago:
      
         f12f96cf
      
       (sf: Drop spl_flash_get_sw_write_prot")
      
      However, we do need a way to see if a flash device is write-protected,
      since if it is, it may not be possible to write to do (i.e. failing to
      write is expected).
      
      I am not sure of the correct layer to implement this, so this patch is a
      stab at it. If spi-flash makes sense then I will add to the 'sf' also.
      
      Re the points mentioned in the removal commit:
      
          1) This kind of requirement can be achieved using existing
             flash operations and flash locking API calls instead of
             making a separate flash API.
      
      Which uclass is this?
      
          2) Technically there is no real hardware user for this API to
             use in the source tree.
      
      I do want coral (at least) to support this.
      
          3) Having a flash operations API for simple register read bits
             also make difficult to extend the flash operations.
      
      This new patch only mentions write-protect being on or off, rather than
      the actual mechanism.
      
          4) Instead of touching generic code, it is possible to have
             this functionality inside spinor operations in the form of
             flash hooks or fixups for associated flash chips.
      
      That sounds to me like what drivers are for. But we still need some sort
      of API for it to be accessible.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      b3b60f59
  25. 26 Mar, 2021 4 commits