Skip to content
Snippets Groups Projects
  1. Mar 02, 2023
    • Simon Glass's avatar
      lib: Add an SPL config for LIB_UUID · 3b510807
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      This is selected by PARTITION_UUIDS which has a separate option for SPL.
      Add an SPL option for LIB_UUID also, so that we can keep them consistent.
      
      Also add one for PARTITION_TYPE_GUID to avoid a build error in part_efi.c
      which wants to call a uuid function in SPL.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      3b510807
  2. Feb 10, 2023
  3. Feb 09, 2023
  4. Jan 23, 2023
  5. Dec 02, 2022
  6. Nov 07, 2022
    • Simon Glass's avatar
      dm: sandbox: Switch over to using the new host uclass · 95201811
      Simon Glass authored
      
      Update the sandbox implementation to use UCLASS_HOST and adjust all
      the pieces to continue to work:
      
      - Update the 'host' command to use the new API
      - Replace various uses of UCLASS_ROOT with UCLASS_HOST
      - Disable test_eficonfig since it doesn't work (this should have a unit
        test to allow this to be debugged)
      - Update the blk test to use the new API
      - Drop the old header file
      
      Unfortunately it does not seem to be possible to split this change up
      further.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      95201811
  7. Oct 31, 2022
    • Simon Glass's avatar
      disk: Rename block_dev to desc · b55afa0c
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      The use of 'block_dev' in this context is confusing, since it is not a
      pointer to a device, just to some information about it. Rename this to
      'desc', as is more commonly used, since it is a block descriptor.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Acked-by: default avatarHeinrich Schuchardt <xypron.glplk@gmx.de>
      b55afa0c
    • Simon Glass's avatar
      disk: Rename block functions · 76c839fc
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Use the uclass type as the first part of the function name, to be
      consistent with the methods in other block drivers.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      76c839fc
    • Simon Glass's avatar
      disk: Drop debug messages in part_efi · 3e62adc4
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      This is monstrously verbose when something goes wrong. It should work by
      recording the problem and reporting it (once) at the command level. At
      present it sometimes outputs hundreds of lines of CRC mismatches.
      
      For now, just silence it all.
      
        GUID Partition Table Entry Array CRC is wrong: 0xaebfebf2 != 0xc916f712
        find_valid_gpt: *** ERROR: Invalid GPT ***
        find_valid_gpt: ***        Using Backup GPT ***
        GUID Partition Table Entry Array CRC is wrong: 0xaebfebf2 != 0xc916f712
        find_valid_gpt: *** ERROR: Invalid GPT ***
        find_valid_gpt: ***        Using Backup GPT ***
        ...
      
      While we are error, remove the '*** ERROR: ' text as it is already clear
      that this is unexpected
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Suggested-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      3e62adc4
  8. Oct 18, 2022
  9. Sep 25, 2022
  10. Sep 16, 2022
    • Simon Glass's avatar
      disk: Handle UCLASS_EFI_MEDIA in dev_print() · ef4b66bc
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      This is currently missing. Add it.
      
      Fix the code style for the function while we are here.
      
      Suggested-by: default avatarAKASHI Takahiro <takahiro.akashi@linaro.org>
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      ef4b66bc
    • 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
    • Simon Glass's avatar
      blk: Drop IF_TYPE_SD · 1dbe71fb
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      This is not really needed since it does the same things as MMC. Drop it.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      1dbe71fb
    • Simon Glass's avatar
      blk: Drop IF_TYPE_ATAPI · f512388e
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      This is not really needed since it does the same things as IDE. Drop it.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      f512388e
    • Simon Glass's avatar
      blk: Drop IF_TYPE_DOC · 1c2e2553
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      This doesn't seem to be used for anything and it isn't clear what it is.
      It dates from the first U-Boot commit.
      
      Drop it.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      1c2e2553
    • Simon Glass's avatar
      blk: Rename HAVE_BLOCK_DEVICE · 7f8967c2
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      This option is fact really related to SPL. For U-Boot proper we always use
      driver model for block devices, so CONFIG_BLK is enabled if block devices
      are in use.
      
      It is only for SPL that we have two cases:
      
      - SPL_BLK is enabled, in which case we use driver model and blk-uclass.c
      - SPL_BLK is not enabled, in which case (if we need block devices) we must
        use blk_legacy.c
      
      Rename the symbol to SPL_LEGACY_BLOCK to make this clear. This is
      different enough from BLK and SPL_BLK that there should be no confusion.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      7f8967c2
    • Simon Glass's avatar
      blk: Use a function for whether block devices are available · a51eb8de
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      At present we use HAVE_BLOCK_DEVICE to indicate when block devices are
      available.
      
      This is a very strange option, since it partially duplicates the BLK
      option used by driver model. It also covers both U-Boot proper and SPL,
      even though one might have block devices and another not.
      
      As a first step towards correcting this, create a new inline function
      called blk_enabled() which indicates if block devices are available.
      This cannot be used in Makefiles, or #if clauses, but can be used in C
      code.
      
      A function is useful because we cannot use CONFIG_IS_ENABLED(BLK) to
      decide if block devices are needed, since we must consider the legacy
      block interface, enabled by HAVE_BLOCK_DEVICE
      
      Update a few places where it can be used and drop some unnecessary #if
      checks around some functions in disk/part.c - rely on the compiler's
      dead-code elimination instead.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      a51eb8de
    • Simon Glass's avatar
      disk: Use Makefile to omit partition drivers · fc614d20
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      At present these files have an #ifdef covering the whole file. Move the
      condition to the Makefile instead.
      
      Add BLK to the condition since future patches will adjust things so that
      HAVE_BLOCK_DEVICE is only for SPL, but the partition drivers are needed
      in U-Boot proper too.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      fc614d20
    • Simon Glass's avatar
      disk: Correct help for TPL_PARTITIONS · e7b1018d
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Fix a few typos in this help text. Fix a typo in SPL_PARTITIONS while
      we are here.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      e7b1018d
  11. Aug 26, 2022
  12. Jul 21, 2022
  13. Jul 02, 2022
  14. May 28, 2022
  15. May 06, 2022
  16. Apr 23, 2022
    • AKASHI Takahiro's avatar
      dm: disk: add read/write interfaces with udevice · 59da9d47
      AKASHI Takahiro authored and Heinrich Schuchardt's avatar Heinrich Schuchardt committed
      
      In include/blk.h, Simon suggested:
      ===>
      /*
       * These functions should take struct udevice instead of struct blk_desc,
       * but this is convenient for migration to driver model. Add a 'd' prefix
       * to the function operations, so that blk_read(), etc. can be reserved for
       * functions with the correct arguments.
       */
      unsigned long blk_dread(struct blk_desc *block_dev, lbaint_t start,
                              lbaint_t blkcnt, void *buffer);
      unsigned long blk_dwrite(struct blk_desc *block_dev, lbaint_t start,
                               lbaint_t blkcnt, const void *buffer);
      unsigned long blk_derase(struct blk_desc *block_dev, lbaint_t start,
                               lbaint_t blkcnt);
      <===
      
      So new interfaces are provided with this patch.
      
      They are expected to be used everywhere in U-Boot at the end.
      The exceptions are block device drivers, partition drivers and efi_disk
      which should know details of blk_desc structure.
      
      Signed-off-by: default avatarAKASHI Takahiro <takahiro.akashi@linaro.org>
      59da9d47
    • AKASHI Takahiro's avatar
      dm: disk: add UCLASS_PARTITION · 43855fdb
      AKASHI Takahiro authored and Heinrich Schuchardt's avatar Heinrich Schuchardt committed
      
      NOTE: probably we have to update config dependencies,
      in particular, SPL/TPL_PRINTF?
      
      With this new function, UCLASS_PARTITION devices will be created as
      child nodes of UCLASS_BLK device.
      
      Signed-off-by: default avatarAKASHI Takahiro <takahiro.akashi@linaro.org>
      43855fdb
    • AKASHI Takahiro's avatar
      disk: don't compile in partition support for spl/tpl if not really necessary · 3fb6fa7a
      AKASHI Takahiro authored and Heinrich Schuchardt's avatar Heinrich Schuchardt committed
      
      Under the current Kconfigs, disk/part.c will be compiled in even if none of
      partition table types are enabled. This will lead to the size growth of SPL
      /TPL code.
      
      With this patch, CONFIG_PARTITIONS is selected only if, at least, one of
      CONFIG_*_PARTITION is enabled.
      
      Signed-off-by: default avatarAKASHI Takahiro <takahiro.akashi@linaro.org>
      3fb6fa7a
  17. Apr 12, 2022
  18. Apr 06, 2022
  19. Apr 01, 2022
    • Sean Anderson's avatar
      fs: Add semihosting filesystem · f676b451
      Sean Anderson authored and Tom Rini's avatar Tom Rini committed
      
      This adds a filesystem which is backed by the host's filesystem. It is
      modeled off of sandboxfs, which has very similar aims. Semihosting
      doesn't support listing directories (except with SYS_SYSTEM), so neither
      do we. it's possible to optimize a bit for the common case of reading a
      whole file by omitting a call to smh_seek, but this is left as a future
      optimization.
      
      Signed-off-by: default avatarSean Anderson <sean.anderson@seco.com>
      f676b451
  20. Mar 25, 2022
  21. Jan 19, 2022
  22. Jan 15, 2022
  23. Dec 18, 2021
  24. Dec 09, 2021
  25. Nov 28, 2021
  26. Nov 18, 2021
  27. Sep 30, 2021
Loading