1. 11 Jun, 2014 1 commit
    • Lukasz Majewski's avatar
      dfu: Disable default calculation of CRC32 · 3d83e675
      Lukasz Majewski authored
      Patch (SHA1: bd694244
      
      )
      dfu: Introduction of the "dfu_hash_algo" env variable for checksum method
      setting
      
      already introduced more generic handling of the crc32 calculation.
      Up till now the CRC32 of received data was calculated unconditionally.
      This patch changes this and from now - by default the crc32 is NOT
      calculated anymore.
      Signed-off-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      Cc: Marek Vasut <marex@denx.de>
      3d83e675
  2. 01 Jun, 2014 1 commit
    • Lukasz Majewski's avatar
      dfu: Introduction of the "dfu_hash_algo" env variable for checksum method setting · bd694244
      Lukasz Majewski authored
      
      
      Up till now the CRC32 of received data was calculated unconditionally.
      The standard crc32 implementation causes long delay when large images
      were uploaded.
      
      The "dfu_hash_algo" environment variable gives the opportunity to
      disable on demand the hash (crc32) calculation.
      It can be done without the need to recompile the u-boot binary.
      
      By default the crc32 is calculated, which means that legacy behavior
      has been preserved.
      
      Tests results:
      400 MiB ums.img file
      With 		crc32 calculation: 65 sec [avg 6.29 MB/s]
      Without 		crc32 calculation: 25 sec [avg 16.17 MB/s]
      Signed-off-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      Cc: Marek Vasut <marex@denx.de>
      bd694244
  3. 14 May, 2014 1 commit
    • Przemyslaw Marczak's avatar
      drivers:dfu: dfu_flush(): add raw data flush to complete dfu write · 1aa4bdc8
      Przemyslaw Marczak authored
      
      
      Before dfu write and flush operations separation,
      dfu write data was flushed by host download request
      with len of zero size.
      
      Since above change manually calling dfu write with zero
      size has non sense (e.g. in THOR). This should be done by
      flush operation.
      So now dfu_write_buffer_drain() is called in dfu_flush().
      If there is any raw data to flush (like it can be in thor)
      then it will be physically written to medium.
      Signed-off-by: default avatarPrzemyslaw Marczak <p.marczak@samsung.com>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Marek Vasut <marex@denx.de>
      1aa4bdc8
  4. 30 Apr, 2014 1 commit
  5. 23 Mar, 2014 2 commits
    • Heiko Schocher's avatar
      usb: dfu: introduce dfuMANIFEST state · 001a8319
      Heiko Schocher authored
      on nand flash using ubi, after the download of the new image into
      the flash, the "rest" of the nand sectors get erased while flushing
      the medium. With current u-boot version dfu-util may show:
      
      Starting download: [##################################################] finished!
      state(7) = dfuMANIFEST, status(0) = No error condition is present
      unable to read DFU status
      
      as get_status is not answered while erasing sectors, if erasing
      needs some time.
      
      So do the following changes to prevent this:
      
      - introduce dfuManifest state
        According to dfu specification
        ( http://www.usb.org/developers/devclass_docs/usbdfu10.pdf
      
       ) section 7:
        "the device enters the dfuMANIFEST-SYNC state and awaits the solicitation
         of the status report by the host. Upon receipt of the anticipated
         DFU_GETSTATUS, the device enters the dfuMANIFEST state, where it
         completes its reprogramming operations."
      
      - when stepping into dfuManifest state, sending a PollTimeout
        DFU_MANIFEST_POLL_TIMEOUT in ms, to the host, so the host
        (dfu-util) waits the PollTimeout before sending a get_status again.
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      001a8319
    • Heiko Schocher's avatar
      usb, dfu: extract flush code into seperate function · a2199afe
      Heiko Schocher authored
      
      
      move the flushing code into an extra function dfu_flush(),
      so it can be used from other code.
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      a2199afe
  6. 13 Mar, 2014 1 commit
  7. 18 Dec, 2013 1 commit
  8. 08 Nov, 2013 2 commits
  9. 20 Oct, 2013 3 commits
  10. 24 Sep, 2013 3 commits
    • Afzal Mohammed's avatar
      dfu: ram support · a9479f04
      Afzal Mohammed authored
      
      
      DFU spec mentions it as a method to upgrade firmware (software stored
      in writable non-volatile memory). It also says other potential uses of
      DFU is beyond scope of the spec.
      
      Here such a beyond the scope use is being attempted - directly pumping
      binary images from host via USB to RAM. This facility is a developer
      centric one in that it gives advantage over upgrading non-volatile
      memory for testing new images every time during development and/or
      testing.
      
      Directly putting image onto RAM would speed up upgrade process. This and
      convenience was the initial thoughts that led to doing this, speed
      improvement over MMC was only 1 second though - 6 sec on RAM as opposed
      to 7 sec on MMC in beagle bone, perhaps enabling cache and/or optimizing
      DFU framework to avoid multiple copy for ram (if worth) may help, and
      on other platforms and other boot media like NAND maybe improvement
      would be higher.
      
      And for a platform that doesn't yet have proper DFU suppport for
      non-volatile media's, DFU to RAM can be used.
      
      Another minor advantage would be to increase life of mmc/nand as it
      would be less used during development/testing.
      
      usage: <image name> ram <start address> <size>
      eg. kernel ram 0x81000000 0x1000000
      
      Downloading images to RAM using DFU is not something new, this is
      acheived in openmoko also.
      
      DFU on RAM can be used for extracting RAM contents to host using dfu
      upload. Perhaps this can be extended to io for squeezing out register
      dump through usb, if it is worth.
      Signed-off-by: default avatarAfzal Mohammed <afzal.mohd.ma@gmail.com>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      Cc: Gerhard Sittig <gsi@denx.de>
      Acked-by: default avatarMarek Vasut <marex@denx.de>
      Acked-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      Acked-by: default avatarHeiko Schocher <hs@denx.de>
      a9479f04
    • Lukasz Majewski's avatar
      dfu: Extract common DFU code to handle "dfu_alt_info" environment variable · 765c5ae5
      Lukasz Majewski authored
      
      
      New dfu_init_env_entities() function has been extracted from cmd_dfu.c and
      stored at dfu core.
      
      This is a dfu centric code, so it shall be processed in the core.
      
      Change-Id: I756c5de922fa31399d8804eaadc004ee98844ec2
      Signed-off-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      Tested-by: default avatarHeiko Schocher <hs@denx.de>
      765c5ae5
    • Lukasz Majewski's avatar
      dfu:cosmetic: Fix printf text for buffer overflow condition · a7d2c3cd
      Lukasz Majewski authored
      
      
      Correct error message if overflow is detected.
      
      Change-Id: I8a915c7353d49822c046fbc36241237b370e6c98
      Signed-off-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      a7d2c3cd
  11. 29 Jul, 2013 1 commit
  12. 24 Jul, 2013 1 commit
  13. 03 Jul, 2013 1 commit
    • Łukasz Majewski's avatar
      dfu:ext4:fix Fix DFU upload functionality · 9df49553
      Łukasz Majewski authored
      
      
      For the first eMMC read of data for upload, use the "large" dfu_buf (now
      configurable) instead of usb request buffer allocated at composite layer
      (which is 4KiB) [*].
      
      For eMMC the whole file is read, which usually is larger than the buffer [*]
      provided with usb request.
      Signed-off-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      Cc: Tom Rini <trini@ti.com>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      9df49553
  14. 30 Jun, 2013 1 commit
    • Heiko Schocher's avatar
      dfu: make data buffer size configurable · e7e75c70
      Heiko Schocher authored
      
      
      Dfu transfer uses a buffer before writing data to the
      raw storage device. Make the size (in bytes) of this buffer
      configurable through environment variable "dfu_bufsiz".
      Defaut value is configurable through CONFIG_SYS_DFU_DATA_BUF_SIZE
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      Cc: Tom Rini <trini@ti.com>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Wolfgang Denk <wd@denx.de>
      Acked-by: default avatarTom Rini <trini@ti.com>
      e7e75c70
  15. 10 Apr, 2013 2 commits
  16. 01 Sep, 2012 1 commit