1. 20 8月, 2017 1 次提交
  2. 12 7月, 2017 1 次提交
  3. 23 5月, 2017 1 次提交
    • S
      Kconfig: Add a CONFIG_IDE option · fc843a02
      Simon Glass 提交于
      At present IDE support is controlled by CONFIG_CMD_IDE. Add a separate
      CONFIG_IDE option so that IDE support can be enabled without requiring
      the 'ide' command.
      
      Update existing users and move the ide driver into drivers/block since
      it should not be in common/.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      fc843a02
  4. 29 1月, 2017 1 次提交
  5. 28 1月, 2017 1 次提交
  6. 28 12月, 2016 3 次提交
  7. 23 9月, 2016 1 次提交
  8. 17 5月, 2016 1 次提交
  9. 15 3月, 2016 4 次提交
  10. 14 1月, 2016 1 次提交
  11. 12 9月, 2015 3 次提交
    • Ł
      FIX: fat: Provide correct return code from disk_{read|write} to upper layers · 0a04ed86
      Łukasz Majewski 提交于
      It is very common that FAT code is using following pattern:
      if (disk_{read|write}() < 0)
              return -1;
      
      Up till now the above code was dead, since disk_{read|write) could only
      return value >= 0.
      As a result some errors from medium layer (i.e. eMMC/SD) were not caught.
      
      The above behavior was caused by block_{read|write|erase} declared at
      struct block_dev_desc (@part.h). It returns unsigned long, where 0
      indicates error and > 0 indicates that medium operation was correct.
      
      This patch as error regards 0 returned from block_{read|write|erase}
      when nr_blocks is grater than zero. Read/Write operation with nr_blocks=0
      should return 0 and hence is not considered as an error.
      Signed-off-by: NLukasz Majewski <l.majewski@samsung.com>
      
      Test HW: Odroid XU3 - Exynos 5433
      0a04ed86
    • S
      Move ALLOC_CACHE_ALIGN_BUFFER() to the new memalign.h header · cf92e05c
      Simon Glass 提交于
      Now that we have a new header file for cache-aligned allocation, we should
      move the stack-based allocation macro there also.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      cf92e05c
    • S
      fat: handle paths that include ../ · 18a10d46
      Stephen Warren 提交于
      The FAT code contains a special case to parse the root directory. This
      is needed since the root directory location/layout on disk is special
      cased for FAT12/16. In particular, the location and size of the FAT12/16
      root directory is hard-coded and contiguous, whereas all FAT12/16 non-root
      directories, and all FAT32 directories, are stored in a non-contiguous
      fashion, with the layout represented by a linked-list of clusters in the
      FAT.
      
      If a file path contains ../ (for example /extlinux/../bcm2835-rpi-cm.dtb),
      it is possible to need to parse the root directory for the first element
      in the path (requiring application of the special case), then a sub-
      directory (in the general way), then re-parse the root directory (again
      requiring the special case). However, the current code in U-Boot only
      applies the special case for the very first path element, and never for
      any later path element. When reparsing the root directory without
      applying the special case, any file in a sector (or cluster?) other than
      the first sector/cluster of the root directory will not be found.
      
      This change modifies the non-root-dir-parsing loop of do_fat_read_at()
      to detect if it's walked back to the root directory, and if so, jumps
      back to the special case code that handles parsing of the root directory.
      
      This change was tested using sandbox by executing:
      
      ./u-boot -c "host bind 0 ../sd-p1.bin; ls host 0:0"
      ./u-boot -c "host bind 0 ../sd-p1.bin; ls host 0:0 /"
      ./u-boot -c "host bind 0 ../sd-p1.bin; ls host 0:0 /extlinux"
      ./u-boot -c "host bind 0 ../sd-p1.bin; ls host 0:0 /extlinux/"
      ./u-boot -c "host bind 0 ../sd-p1.bin; ls host 0:0 /extlinux/.."
      ./u-boot -c "host bind 0 ../sd-p1.bin; ls host 0:0 /extlinux/../"
      ./u-boot -c "host bind 0 ../sd-p1.bin; ls host 0:0 /extlinux/../backup"
      ./u-boot -c "host bind 0 ../sd-p1.bin; ls host 0:0 /extlinux/../backup/"
      ./u-boot -c "host bind 0 ../sd-p1.bin; ls host 0:0 /extlinux/../backup/.."
      ./u-boot -c "host bind 0 ../sd-p1.bin; ls host 0:0 /extlinux/../backup/../"
      ./u-boot -c "host bind 0 ../sd-p1.bin; load host 0:0 0 /bcm2835-rpi-cm.dtb"
      ./u-boot -c "host bind 0 ../sd-p1.bin; load host 0:0 0 /extlinux/../bcm2835-rpi-cm.dtb"
      ./u-boot -c "host bind 0 ../sd-p1.bin; load host 0:0 0 /backup/../bcm2835-rpi-cm.dtb"
      ./u-boot -c "host bind 0 ../sd-p1.bin; load host 0:0 0 /extlinux/..backup/../bcm2835-rpi-cm.dtb"
      ./u-boot -c "host bind 0 ../sd-p1.bin; load host 0:0 0 /extlinux/../backup/../bcm2835-rpi-cm.dtb"
      
      (/extlinux and /backup are in different sectors so trigger some different
      cases, and bcm2835-rpi-cm.dtb is in a sector of the root directory other
      than the first).
      
      In all honesty, this change is a bit of a hack, using goto and all.
      However, as demonstrated above it appears to work well in practice, is
      quite minimal, likely doesn't introduce any risk of regressions, and
      hopefully doesn't introduce any maintenance issues.
      
      The correct fix would be to collapse the root and non-root loops in
      do_fat_read_at() and get_dentfromdir() into a single loop that has a
      small special-case when moving from one sector to the next, to handle
      the layout difference of root/non-root directories. AFAIK all other
      aspects of directory parsing are identical. However, that's a much
      larger change which needs significantly more thought before it's
      implemented.
      Signed-off-by: NStephen Warren <swarren@wwwdotorg.org>
      18a10d46
  12. 06 1月, 2015 1 次提交
    • P
      fs: fat: read: fix fat16 ls/read issue · 64f65e1e
      Przemyslaw Marczak 提交于
      The present fat implementation ignores FAT16 long name
      directory entries which aren't placed in a single sector.
      
      This was becouse of the buffer was always filled by the
      two sectors, and the loop was made also for two sectors.
      
      If some file long name entries are stored in two sectors,
      the we have two cases:
      
      Case 1:
      Both of sectors are in the buffer - all required data
      for long file name is in the buffer.
      - Read OK!
      
      Case 2:
      The current directory entry is placed at the end of the
      second buffered sector. And the next entries are placed
      in a sector which is not buffered yet. Then two next
      sectors are buffered and the mentioned entry is ignored.
      - Read fail!
      
      This commit fixes this issue by:
      - read two sectors after loop on each single is done
      - keep the last used sector as a first in the buffer
        before the read of two next
      
      The commit doesn't affects the fat32 imlementation,
      which works good as previous.
      Signed-off-by: NPrzemyslaw Marczak <p.marczak@samsung.com>
      Cc: Mikhail Zolotaryov <lebon@lebon.org.ua>
      Cc: Tom Rini <trini@ti.com>
      Cc: Stephen Warren <swarren@nvidia.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Suriyan Ramasami <suriyan.r@gmail.com>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Cc: Wolfgang Denk <wd@denx.de>
      Tested-by: NSimon Glass <sjg@chomium.org>
      64f65e1e
  13. 23 11月, 2014 3 次提交
  14. 09 8月, 2014 1 次提交
    • S
      fs: implement size/fatsize/ext4size · cf659819
      Stephen Warren 提交于
      These commands may be used to determine the size of a file without
      actually reading the whole file content into memory. This may be used
      to determine if the file will fit into the memory buffer that will
      contain it. In particular, the DFU code will use it for this purpose
      in the next commit.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      cf659819
  15. 19 2月, 2014 1 次提交
  16. 24 7月, 2013 1 次提交
  17. 05 3月, 2013 1 次提交
  18. 04 2月, 2013 2 次提交
  19. 01 2月, 2013 1 次提交
  20. 26 10月, 2012 3 次提交
  21. 17 10月, 2012 1 次提交
    • M
      fs: fat: Fix mkcksum() function parameters · ff04f6d1
      Marek Vasut 提交于
      The mkcksum() function now takes one parameter, the pointer to
      11-byte wide character array, which it then operates on.
      
      Currently, the function is wrongly passed (dir_entry)->name, which
      is only 8-byte wide character array. Though by further inspecting
      the dir_entry structure, it can be noticed that the name[8] entry
      is immediatelly followed by ext[3] entry. Thus, name[8] and ext[3]
      in the dir_entry structure actually work as this 11-byte wide array
      since they're placed right next to each other by current compiler
      behavior.
      
      Depending on this is obviously wrong, thus fix this by correctly
      passing both (dir_entry)->name and (dir_entry)->ext to the mkcksum()
      function and adjust the function appropriately.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Tom Rini <trini@ti.com>
      ff04f6d1
  22. 09 10月, 2012 1 次提交
    • S
      FAT: check for partition 0 not 1 for whole-disk fs · bd1a7e30
      Stephen Warren 提交于
      The recent switch to use get_device_and_partition() from do_fat_ls()
      broke the ability to access a FAT filesystem directly on a whole device;
      FAT only works within a partition on a device.
      
      This change makes e.g. "fatls mmc 0:0" work; explicitly requesting
      partition ID 0 is something that get_device_and_partition() fully
      supports. However, fat_register_device() expects partition ID 1 to be
      used in the full-disk case; partition ID 1 was previously implicitly
      specified when the user didn't actually specify a partition ID. Update
      fat_register_device() to expect the correct ID.
      
      This change does imply that if a user explicitly executes "fatls mmc 0:1"
      then this will fail, and may be a change in behaviour.
      
      Note that this still prevents "fatls mmc 0:auto" from working. The next
      patch will fix that.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      bd1a7e30
  23. 27 9月, 2012 1 次提交
  24. 19 9月, 2012 1 次提交
  25. 02 9月, 2012 4 次提交