Skip to content
Snippets Groups Projects
  1. May 16, 2023
  2. May 09, 2023
  3. Mar 02, 2023
  4. Feb 23, 2023
    • Marek Vasut's avatar
      env: mmc: Apply GPT only on eMMC user HW partition · 5b4acb0f
      Marek Vasut authored and Tom Rini's avatar Tom Rini committed
      
      Apply the GPT U-Boot environment GUID type look up only on eMMC user
      HW partition, do not apply the look up on eMMC boot HW partitions as
      mmc_offset_try_partition() assumes either SD partitions or eMMC user
      HW partition.
      
      This fixes environment operation on systems where CONFIG_SYS_MMC_ENV_PART
      is non-zero and CONFIG_SYS_REDUNDAND_ENVIRONMENT is set.
      
      Fixes: 80105d8f ("env: mmc: select GPT env partition by type guid")
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      5b4acb0f
  5. Feb 10, 2023
  6. Feb 07, 2023
  7. Feb 06, 2023
  8. Jan 11, 2023
  9. Jan 10, 2023
  10. Dec 23, 2022
  11. Dec 22, 2022
  12. Dec 05, 2022
  13. Sep 29, 2022
  14. Sep 26, 2022
  15. Sep 18, 2022
  16. Sep 16, 2022
    • Simon Glass's avatar
      blk: Switch over to using uclass IDs · e33a5c6b
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      We currently have an if_type (interface type) and a uclass id. These are
      closely related and we don't need to have both.
      
      Drop the if_type values and use the uclass ones instead.
      
      Maintain the existing, subtle, one-way conversion between UCLASS_USB and
      UCLASS_MASS_STORAGE for now, and add a comment.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      e33a5c6b
  17. Sep 13, 2022
  18. Aug 04, 2022
    • Tom Rini's avatar
      Audit <flash.h> inclusion · 17ead040
      Tom Rini authored
      
      A large number of files include <flash.h> as it used to be how various
      SPI flash related functions were found, or for other reasons entirely.
      In order to migrate some further CONFIG symbols to Kconfig we need to
      not include flash.h in cases where we don't have a NOR flash of some
      sort enabled.  Furthermore, in cases where we are in common code and it
      doesn't make sense to try and further refactor the code itself in to new
      files we need to guard this inclusion.
      
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      17ead040
  19. Jul 08, 2022
  20. Jun 28, 2022
  21. Jun 15, 2022
    • Patrick Delaunay's avatar
      env: mmc : align erase address and size on erase_grp_size · d7226704
      Patrick Delaunay authored and Jaehoon Chung's avatar Jaehoon Chung committed
      
      On eMMC device, the erase_grp_size > 1 so the address and size for the
      erase block command in env/mmc.c can be unaligned on erase group size and
      some strange trace occurs and the result is not guarantee by MMC devices.
      
      The SD-Card behavior doesn't change as erase_grp_size = 1 for SD-Card.
      
      For example, on eMMC present on STM32MP15C-EV1 and before the patch:
      
        STM32MP> env erase
      
        Erasing Environment on MMC...
      
        Caution! Your devices Erase group is 0x400
        The erase range would be change to 0x2000~0x27ff
      
        16 blocks erased: OK
      
        Caution! Your devices Erase group is 0x400
        The erase range would be change to 0x2000~0x23ff
      
        16 blocks erased: OK
        OK
      
      After this patch:
        STM32MP> env erase
        Erasing Environment on MMC...
        1024 blocks erased at 0x2000: OK
        1024 blocks erased at 0x2000: OK
        OK
      
      Here the 2 copies of U-Boot environment are in the same devices Erase
      group: it is erased twice.
      
      Signed-off-by: Patrick Delaunay's avatarPatrick Delaunay <patrick.delaunay@foss.st.com>
      Reviewed-by: Patrice Chotard's avatarPatrice Chotard <patrice.chotard@foss.st.com>
      d7226704
  22. May 23, 2022
    • Patrice Chotard's avatar
      spi: spi_flash_probe_bus_cs() rely on DT for spi speed and mode · 3feea0ba
      Patrice Chotard authored and Tom Rini's avatar Tom Rini committed
      
      Now, spi_flash_probe_bus_cs() relies on DT for spi speed and mode
      and logically calls spi_get_bus_and_cs(). In case spi mode and speed are
      not read from DT, make usage of spi_flash_probe() instead.
      
      To sum-up:
       - Previous call tree was:
          spi_flash_probe() -> spi_flash_probe_bus_cs() -> spi_get_bus_and_cs()
      
       - Current call tree is:
          spi_flash_probe() -> _spi_get_bus_and_cs()
          spi_flash_probe_bus_cs() -> spi_get_bus_and_cs()
      
      This patch impacts the following :
        - cmd/sf.c: if spi mode and/or speed is passed in argument of
          do_spi_flash_probe(), call spi_flash_probe() otherwise call
          spi_flash_probe_bus_cs().
      
        - drivers/net/fm/fm.c: as by default spi speed and mode was set to
          0 and a comment indicates that speed and mode are read from DT,
          use spi_flash_probe_bus_cs().
      
        - drivers/net/pfe_eth/pfe_firmware.c: spi speed and mode are not read
          from DT by all platforms using this driver, so keep legacy and replace
          spi_flash_probe_bus_cs() by spi_flash_probe();
      
        - drivers/net/sni_netsec.c : spi speed and mode are not read from DT,
          so replace spi_flash_probe_bus_cs() by spi_flash_probe().
      
        - drivers/usb/gadget/max3420_udc.c: Can't find any platform which make
          usage of this driver, nevertheless, keep legacy and replace
          spi_get_bus_and_cs() by _spi_get_bus_and_cs().
      
        - env/sf.c: a comment indicates that speed and mode are read
          from DT. So use spi_flash_probe_bus_cs().
      
      Signed-off-by: Patrice Chotard's avatarPatrice Chotard <patrice.chotard@foss.st.com>
      
      Cc: Marek Behun <marek.behun@nic.cz>
      Cc: Jagan Teki <jagan@amarulasolutions.com>
      Cc: Vignesh R <vigneshr@ti.com>
      Cc: Joe Hershberger <joe.hershberger@ni.com>
      Cc: Ramon Fried <rfried.dev@gmail.com>
      Cc: Lukasz Majewski <lukma@denx.de>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Wolfgang Denk <wd@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Stefan Roese <sr@denx.de>
      Cc: "Pali Rohár" <pali@kernel.org>
      Cc: Konstantin Porotchkin <kostap@marvell.com>
      Cc: Igal Liberman <igall@marvell.com>
      Cc: Bin Meng <bmeng.cn@gmail.com>
      Cc: Pratyush Yadav <p.yadav@ti.com>
      Cc: Sean Anderson <seanga2@gmail.com>
      Cc: Anji J <anji.jagarlmudi@nxp.com>
      Cc: Biwen Li <biwen.li@nxp.com>
      Cc: Priyanka Jain <priyanka.jain@nxp.com>
      Cc: Chaitanya Sakinam <chaitanya.sakinam@nxp.com>
      3feea0ba
  23. May 02, 2022
  24. Apr 21, 2022
    • Marek Vasut's avatar
      env: Implement lower priority arch_env_get_location() · de70e887
      Marek Vasut authored and Tom Rini's avatar Tom Rini committed
      
      Currently there is only one way to override desired environment location,
      by implementing env_get_location(). This is increasingly being conflated
      both on board level and architecture level, which leads to a problem on
      boards where this function is already implemented on architecture level,
      since those boards have no way to override this environment location on
      board level anymore.
      
      Implement arch_env_get_location() function which is architecture specific
      and should only ever be implemented in architecture code. This function
      has lower priority than env_get_location(), which should only ever be
      implemented in board code, and which overrides the arch_env_get_location()
      architecture environment selection.
      
      This way, architecture can define its default environment chooser, while
      board can now override it as needed at all times.
      
      There is no functional change, since env_get_location() simply returns
      arch_env_get_location(), and arch_env_get_location() implements the
      current env_get_location() default content.
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Adam Ford <aford173@gmail.com>
      Cc: Fabio Estevam <festevam@denx.de>
      Cc: Marek Behún <marek.behun@nic.cz>
      Cc: Peng Fan <peng.fan@nxp.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Tim Harvey <tharvey@gateworks.com>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Tommaso Merciai <tomm.merciai@gmail.com>
      Cc: Vladimir Oltean <vladimir.oltean@nxp.com>
      de70e887
  25. Apr 10, 2022
    • Marek Vasut's avatar
      Revert "env: Load env when ENV_IS_NOWHERE is only location selected" · 5c7399ec
      Marek Vasut authored and Tom Rini's avatar Tom Rini committed
      
      This reverts commit 8d61237e.
      
      This commit broke environment on literally every board I have access
      to, with this revert in place, environment works as it should again.
      The problem I observe with this patch is that saved environment in
      either SPI NOR or eMMC is never used, the system always falls back
      to default environment. The 'saveenv' command does succeed, but then
      after reset, the default env is again used.
      
      Furthermore, the commit introduced duplicate code in env_init(), this:
      "
      	if (!prio) {
      		gd->env_addr = (ulong)&default_environment[0];
      		gd->env_valid = ENV_INVALID;
      
      		return 0;
      	}
      
      	if (ret == -ENOENT) {
      		gd->env_addr = (ulong)&default_environment[0];
      		gd->env_valid = ENV_INVALID;
      
      		return 0;
      	}
      "
      
      Furthermore, the commit is missing DCO SoB line.
      
      Also note that upstream does not support UltraZed EG board, so
      this might have been a patch pulled from downstream which did
      depend on some other downstream behavior.
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Felix.Vietmeyer@jila.colorado.edu <felix.vietmeyer@jila.colorado.edu>
      Cc: Tom Rini <trini@konsulko.com>
      5c7399ec
  26. Apr 07, 2022
Loading