1. 25 10月, 2015 2 次提交
  2. 25 10月, 2014 1 次提交
  3. 25 9月, 2014 1 次提交
  4. 22 7月, 2014 1 次提交
  5. 24 6月, 2014 1 次提交
    • S
      sandbox: restore ability to access host fs through standard commands · 4d907025
      Stephen Warren 提交于
      Commit 95fac6ab "sandbox: Use os functions to read host device tree"
      removed the ability for get_device_and_partition() to handle the "host"
      device type, and redirect accesses to it to the host filesystem. This
      broke some unit tests that use this feature. So, revert that change. The
      code added back by this patch is slightly different to pacify checkpatch.
      
      However, we're then left with "host" being both:
      - A pseudo device that accesses the hosts real filesystem.
      - An emulated block device, which accesses "sectors" inside a file stored
        on the host.
      
      In order to resolve this discrepancy, rename the pseudo device from host
      to hostfs, and adjust the unit-tests for this change.
      
      The "help sb" output is modified to reflect this rename, and state where
      the host and hostfs devices should be used.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Tested-by: NJosh Wu <josh.wu@atmel.com>
      Acked-by: NSimon Glass <sjg@chromium.org>
      Tested-by: NSimon Glass <sjg@chromium.org>
      4d907025
  6. 12 6月, 2014 1 次提交
    • S
      disk: default to HW partition 0 if not specified · ecdd57e2
      Stephen Warren 提交于
      Currently, get_device()/get_dev_hwpart() for MMC devices does not select
      an explicit HW partition unless the user explicitly requests one, i.e. by
      requesting device "mmc 0.0" rather than just "mmc 0". I think it makes
      more sense if the default is to select HW partition 0 (main data area)
      if the user didn't request a specific partition. Otherwise, the following
      happens, which feels wrong:
      
      Select HW partition 1 (boot0):
      mmc dev 0 1
      
      Attempts to access SW partition 1 on HW partition 1 (boot0), rather than
      SW partition 1 on HW partition 0 (main data area):
      ls mmc 0:1 /
      
      With this patch, the second command above re-selects the main data area.
      
      Many device types don't support HW partitions at all, so if HW partition
      0 is selected (either explicitly or as the default) and there's no
      select_hwpart function, we simply skip attempting to select a HW
      partition.
      
      Some MMC devices (i.e. SD cards) don't support HW partitions. However,
      this patch still works, since mmc_start_init() sets the current
      partition number to 0, and mmc_select_hwpart() succeeds if the requested
      partition is already selected.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: NPantelis Antoniou <panto@antoniou-consulting.com>
      ecdd57e2
  7. 23 5月, 2014 2 次提交
  8. 18 3月, 2014 1 次提交
    • S
      sandbox: Use os functions to read host device tree · 95fac6ab
      Simon Glass 提交于
      At present we use U-Boot's filesystem layer to read the sandbox device tree,
      but this is problematic since it relies on a temporary feauture added
      there. Since we plan to implement proper block layer support for sandbox,
      change this code to use the os layer functions instead. Also use the new
      fdt_create_empty_tree() instead of our own code.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      95fac6ab
  9. 09 1月, 2014 1 次提交
  10. 24 7月, 2013 1 次提交
  11. 22 7月, 2013 1 次提交
    • L
      fs/ext4: fix log2blksz un-initialized error, by cacaulating its value from blksz · 50ffc3b6
      Lan Yixun (dlan) 提交于
      The problem here is that uboot can't mount ext4 filesystem with
      commit "50ce4c07" applied. We use hard-coded "SECTOR_SIZE"(512)
      before this commit, now we introduce (block_dev_desc_t *)->log2blksz
      to replace this macro. And after we calling do_ls()->fs_set_blk_dev(),
      the variable log2blksz is not initialized, which it's not correct.
      
      And this patch try to solve the problem by caculating the value of
      log2blksz from variable blksz.
      50ffc3b6
  12. 15 3月, 2013 1 次提交
  13. 05 3月, 2013 1 次提交
  14. 07 12月, 2012 1 次提交
  15. 22 10月, 2012 1 次提交
    • G
      disk: Make the disk partition code work with no specific partition types · 0c9c8fb5
      Gabe Black 提交于
      Currently, if the disk partition code is compiled with all of the parition
      types compiled out, it hits an #error which stops the build. This change
      adjusts that file so that those functions will fall through to their defaults
      in those cases instead of breaking the build. These functions are needed
      because other code calls them, and that code is needed because other config
      options are overly broad and bring in support we don't need along with
      support we do.
      
      Also reduce repetition of the 6-term #ifdef throughout the file.
      Signed-off-by: NGabe Black <gabeblack@chromium.org>
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      0c9c8fb5
  16. 20 10月, 2012 1 次提交
  17. 17 10月, 2012 1 次提交
    • S
      disk: get_device_and_partition() return value fixes · 71bba424
      Stephen Warren 提交于
      When no valid partitions are found, guarantee that we return -1. This
      most likely already happens, since the most recent get_partition_info()
      will have returned an error. However, it's best to be explicit.
      
      Remove an unnecessary assignment of ret=0 in the success case; this value
      is over-written with the processed partition ID later.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      71bba424
  18. 29 9月, 2012 1 次提交
  19. 26 9月, 2012 5 次提交
    • S
      disk: part_efi: parse and store partition UUID · 894bfbbf
      Stephen Warren 提交于
      Each EFI partition table entry contains a UUID. Extend U-Boot's struct
      disk_partition to be able to store this information, and modify
      get_partition_info_efi() to fill it in.
      
      The implementation of uuid_string() was derived from the Linux kernel,
      tag v3.6-rc4 file lib/vsprintf.c function uuid_string().
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      894bfbbf
    • S
      disk: get_device_and_partition() "auto" partition and cleanup · 10a37fd7
      Stephen Warren 提交于
      Rework get_device_and_partition() to:
      a) Implement a new partition ID of "auto", which requests that U-Boot
         search for the first "bootable" partition, and fall back to the first
         valid partition if none is found. This way, users don't need to
         specify an explicit partition in their commands.
      b) Make use of get_device().
      c) Add parameter to indicate whether returning a whole device is
         acceptable, or whether a partition is mandatory.
      d) Make error-checking of the user's device-/partition-specification
         more complete. In particular, if strtoul() doesn't convert all
         characters, it's an error rather than just ignored.
      
      The resultant device/partition returned by the function will be as
      follows, based on whether the disk has a partition table (ptable) or not,
      and whether the calling command allows the whole device to be returned
      or not.
      
      (D and P are integers, P >= 1)
      
      D
      D:
        No ptable:
          !allow_whole_dev: error
          allow_whole_dev: device D
        ptable:
          device D partition 1
      D:0
        !allow_whole_dev: error
        allow_whole_dev: device D
      D:P
        No ptable: error
        ptable: device D partition P
      D:auto
        No ptable:
          !allow_whole_dev: error
          allow_whole_dev: device D
        ptable:
          first partition in device D with bootable flag set.
          If none, first valid paratition in device D.
      
      Note: In order to review this patch, it's probably easiest to simply
      look at the file contents post-application, rather than reading the
      patch itself.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      [swarren: Rob implemented scanning for bootable partitions. I fixed a
      couple of issues there, switched the syntax to ":auto", added the
      error-checking rework, and ":0" syntax for the whole device]
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      10a37fd7
    • S
      disk: introduce get_device() · 2023e608
      Stephen Warren 提交于
      This patch introduces function get_device(). This looks up a
      block_dev_desc_t from an interface name (e.g. mmc) and device number
      (e.g. 0). This function is essentially the non-partition-specific
      prefix of get_device_and_partition().
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      2023e608
    • R
      disk/part: introduce get_device_and_partition · 99d2c205
      Rob Herring 提交于
      All block device related commands (scsiboot, fatload, ext2ls, etc.) have
      simliar duplicated device and partition parsing and selection code. This
      adds a common function to replace various implementations.
      
      The new function has an enhancement over current versions. If no device
      or partition is specified on the command line, the bootdevice env variable
      will be used (scsiboot does this).
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      99d2c205
    • S
      disk: make get_partition_info() always available to disk.c · 2f501646
      Stephen Warren 提交于
      Now that get_device_and_partition() always calls get_partition_info()
      when disk.c is compiled, we must always compile the function, rather
      than ifdef it away.
      
      The implementation must be conditional based on CONFIG_CMD_* etc., since
      that's what e.g. part_dos.c uses to ifdef out get_partition_info_dos();
      CONFIG_DOS_PARTITION can be enabled even without those commands being
      enabled.
      
      Technically, this change is required before Rob's "disk/part: introduce
      get_device_and_partition" patch. However, at least when the compiler
      optimizer is turned on, it isn't required before then in practice,
      since get_device_and_partition() calls get_dev(), which is stubbed out
      in disk.c under exactly the same conditions that get_partition_info()
      is not compiled, and hence the compiler never generates code for the
      call to the missing function. However, in my later patch "disk:
      get_device_and_partition() "auto" partition and cleanup", the optimizer
      doesn't succeed at this, and may attempt to reference the undefined
      function.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      2f501646
  20. 22 6月, 2012 1 次提交
  21. 27 3月, 2012 1 次提交
  22. 13 4月, 2011 1 次提交
  23. 30 10月, 2010 1 次提交
  24. 20 9月, 2010 1 次提交
  25. 19 9月, 2010 1 次提交
  26. 11 8月, 2010 1 次提交
  27. 09 12月, 2009 1 次提交
  28. 03 10月, 2009 1 次提交
  29. 16 5月, 2009 1 次提交
    • W
      IDE: bail out of dev_print() for unknown device types · af75a45d
      Wolfgang Denk 提交于
      Commit 574b3195 introduced a subtle bug by mixing a list of tests
      for "dev_desc->type" and "dev_desc->if_type" into one switch(), which
      then mostly did not work because "dev_desc->type" cannot take any
      "IF_*" type values. A later fix in commit 8ec6e332 changed the
      switch() into testing "dev_desc->if_type", but at this point the
      initial test for unknown device types was completely lost, which
      resulted in output like that for IDE ports without device attached:
      
        Device 1: Model:  Firm:  Ser#:
                  Type: # 1F #
                  Capacity: not available
      
      This patch re-introduces the missing test for unknown device types.
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Detlev Zundel <dzu@denx.de>
      Tested-by: NStefan Roese <sr@denx.de>
      af75a45d
  30. 04 4月, 2009 1 次提交
    • U
      mflash: Initial mflash support · 75eb82ec
      unsik Kim 提交于
      Mflash is fusion memory device mainly targeted consumer eletronic and
      mobile phone.
      Internally, it have nand flash and other hardware logics and supports
      some different operation (ATA, IO, XIP) modes.
      
      IO mode is custom mode for the host that doesn't have IDE interface.
      (Many mobile targeted SoC doesn't have IDE bus)
      
      This driver support mflash IO mode.
      
      Followings are brief descriptions about IO mode.
      
      1. IO mode based on ATA protocol and uses some custom command. (read
         confirm, write confirm)
      2. IO mode uses SRAM bus interface.
      Signed-off-by: Nunsik Kim <donari75@gmail.com>
      75eb82ec
  31. 21 3月, 2009 1 次提交
    • M
      vsprintf: pull updates from Linux kernel · 6c6166f5
      Mike Frysinger 提交于
      This brings in support for the %p modifier which allows us to easily print
      out things like ip addresses, mac addresses, and pointers.
      
      It also converts the rarely used 'q' length modifier to the common 'L'
      modifier when dealing with quad types.
      
      While this new code is a bit larger (~1k .text), most of it should be made
      up by converting the existing ip/mac address code to use format modifiers.
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      6c6166f5
  32. 19 10月, 2008 2 次提交
  33. 23 9月, 2008 1 次提交