Skip to content
Snippets Groups Projects
  1. Jun 09, 2016
  2. Jun 04, 2016
  3. Mar 31, 2015
  4. Aug 09, 2014
    • Stephen Warren's avatar
      dfu: defer parsing of device string to IO backend · dd64827e
      Stephen Warren authored
      
      Devices are not all identified by a single integer. To support
      this, defer the parsing of the device string to the IO backed, so that
      it can apply the appropriate rules.
      
      SPI devices are specified as controller:chip_select. SPI/SF support will
      be added soon.
      
      MMC devices can also be specified as controller[.hwpart][:partition] in
      many commands, although we don't support that syntax in DFU.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      dd64827e
    • Stephen Warren's avatar
      dfu: fix some issues with reads/uploads · 0e285b50
      Stephen Warren authored
      
      DFU read support appears to rely upon dfu->read_medium() updating the
      passed-by-reference len parameter to indicate the remaining size
      available for reading.
      
      dfu_read_medium_mmc() never does this, and the implementation of
      dfu_read_medium_nand() will only work if called just once; it hard-codes
      the value to the total size of the NAND device irrespective of read
      offset.
      
      I believe that overloading dfu->read_medium() is confusing. As such,
      this patch introduces a new function dfu->get_medium_size() which can
      be used to explicitly find out the medium size, and nothing else.
      dfu_read() is modified to use this function to set the initial value for
      dfu->r_left, rather than attempting to use the side-effects of
      dfu->read_medium() for this purpose.
      
      Due to this change, dfu_read() must initially set dfu->b_left to 0, since
      no data has been read.
      
      dfu_read_buffer_fill() must also be modified not to adjust dfu->r_left
      when simply copying data from dfu->i_buf_start to the upload request
      buffer. r_left represents the amount of data left to be read from HW.
      That value is not affected by the memcpy(), but only by calls to
      dfu->read_medium().
      
      After this change, I can read from either a 4MB or 1.5MB chunk of a 4MB
      eMMC boot partion with CONFIG_SYS_DFU_DATA_BUF_SIZE==1MB. Without this
      change, attempting to do that would result in DFU read returning no data
      at all due to r_left never being set.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      0e285b50
  5. May 08, 2014
  6. Nov 08, 2013
    • Bo Shen's avatar
      usb: dfu: make nand upload working · 47d79deb
      Bo Shen authored
      
      Nowhere pass a value to len, which always 0, make no transfer which
      cause uploading failed.
      
      This patch make nand upload working. However it needs enough malloc
      buffer to store read data, that means the buffer at least equal to
      the upload partition size, or else it doesn't work.
      
      Signed-off-by: default avatarBo Shen <voice.shen@atmel.com>
      47d79deb
  7. Sep 24, 2013
  8. Aug 26, 2013
  9. Jul 24, 2013
  10. Jun 24, 2013
  11. Apr 10, 2013
Loading