Skip to content
Snippets Groups Projects
  1. Aug 09, 2014
    • Daniel Schwierzeck's avatar
      MAINTAINERS: add initial version · 00f141cc
      Daniel Schwierzeck authored
      MAINTAINERS contains all currently known custodians based on
      infos from wiki [1] and u-boot git forks [2].
      
      [1] http://www.denx.de/wiki/U-Boot/Custodians
      [2] http://git.denx.de/?p=u-boot.git;a=forks
      
      
      
      Signed-off-by: default avatarDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
      00f141cc
    • Stephen Warren's avatar
      lib: lmb: fix overflow in __lmb_alloc_base w/ large RAM · ad3fda52
      Stephen Warren authored
      
      If a 32-bit system has 2GB of RAM, and the base address of that RAM is
      2GB, then start+size will overflow a 32-bit value (to a value of 0).
      
      __lmb_alloc_base is affected by this; it calculates the minimum of
      (start+size of RAM) and max_addr. However, when start+size is 0, it
      is always less than max_addr, which causes the value of max_addr not
      to be taken into account when restricting the allocation's location.
      
      Fix this by calculating start+size separately, and if that calculation
      underflows, using -1 (interpreted as the max unsigned value) as the
      value instead, and then taking the min of that and max_addr. Now that
      start+size doesn't overflow, it's typically large, and max_addr
      dominates the min() call, and is taken into account.
      
      The user-visible symptom of this bug is that CONFIG_BOOTMAP_SZ is ignored
      on Tegra124 systems with 2GB of RAM, which in turn causes the DT to be
      relocated at the very end of RAM, which the ARM Linux kernel doesn't map
      during early boot, and which causes boot failures. With this fix,
      CONFIG_BOOTMAP_SZ correctly restricts the relocated DT to a much lower
      address, and everything works.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      ad3fda52
    • Stephen Warren's avatar
      ARM: rpi_b: use new generic $bootcmd · ed1127e4
      Stephen Warren authored
      
      Replace the custom $bootcmd with that from <config_distro_bootcmd.h>.
      There should be no functional change, since the new generic $bootcmd was
      derived strongly from tegra-common-post.h, after which this part of
      rpi_b.h was modelled.
      
      The #defines to enable/disable U-Boot commands/features were moved
      earlier in rpi_b.h, so they are set up before config_distro_bootcmd.h
      is included, since it tests whether certain features should be included
      based on those defines.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      ed1127e4
    • Stephen Warren's avatar
      ARM: tegra: use new generic $bootcmd · 8dca9ff4
      Stephen Warren authored
      
      Replace the custom $bootcmd with that from <config_distro_bootcmd.h>.
      There should be no functional change, since the new generic $bootcmd was
      derived strongly from tegra-common-post.h.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      8dca9ff4
    • Dennis Gilmore's avatar
      config: introduce a generic $bootcmd · 2a43201a
      Dennis Gilmore authored
      
      This generic $bootcmd, and associated support macros, automatically
      searches a defined set of storage devices (or network protocols) for an
      extlinux configuration file or U-Boot boot script in various standardized
      locations. Distros that install such a boot config file/script in those
      standard locations will get easy-to-set-up booting on HW that enables
      this generic $bootcmd.
      
      Boards can define the set of devices from which boot is attempted, and
      the order in which they are attempted. Users may later customize this
      set/order by edting $boot_targets.
      
      Users may interrupt the boot process and boot from a specific device
      simply by executing e.g.:
      
      $ run bootcmd_mmc1
      or:
      $ run bootcmd_pxe
      
      This patch was originally written by Dennis Gilmore based on Tegra and
      rpi_b boot scripts. I have made the following modifications since then:
      
      * Boards must define the BOOT_TARGET_DEVICES macro in order to specify
        the set of devices (and order) from which to attempt boot. If needed,
        we can define a default directly in config_distro_bootcmd.h.
      
      * Removed $env_import and related variables; nothing used them, and I
        think it's better for boards to pre-load an environment customization
        file using CONFIG_PREBOOT if they need.
      
      * Renamed a bunch of variables to suit my whims:-)
      
      Signed-off-by: default avatarDennis Gilmore <dennis@ausil.us>
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Reviewed-by: default avatarMarek Vasut <marex@denx.de>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      2a43201a
    • Simon Glass's avatar
      rsa: Fix two errors in the implementation · 54267162
      Simon Glass authored
      
      1. Failure to set the return code correctly
      2. Failure to detect the loop end condition when the value is equal to
      the modulus.
      
      Reported-by: default avatarJeroen Hofstee <jeroen@myspectrum.nl>
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      54267162
    • Masahiro Yamada's avatar
      omap: clean-up dead configs · 8ac22a60
      Masahiro Yamada authored
      
      The following configs are not defined at all.
      
       - CONFIG_OMAP1510
       - CONFIG_OMAP_1510P1
       - CONFIG_OMAP_SX1
       - CONFIG_OMAP3_DMA
       - CONFIG_OMAP3_ZOOM2
       - CONFIG_OMAP_INNOVATOR
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      Cc: Tom Rini <trini@ti.com>
      8ac22a60
    • Simon Glass's avatar
      fdt: Sync up with libfdt · 0596d35d
      Simon Glass authored
      
      This brings in changes up to commit f9e91a48 in the libfdt repo.
      Mostly this is whitespace/minor changes. But there are a few new
      features:
      
      - fdt_size_cells() and fdt_address_cells()
      - fdt_resize()
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      0596d35d
    • Simon Glass's avatar
      fdt: Rename fdt_resize() to fdt_shrink_to_minimum() · 5bf58ccc
      Simon Glass authored
      
      Since libfdt now has an fdt_resize() function, we need to rename the
      U-Boot one.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      5bf58ccc
    • Masahiro Yamada's avatar
      cosmetic: update doc/README.scrapyard · 0b6cc51e
      Masahiro Yamada authored
      
      - Add 'p1023rds' to the list since commit d0bc5140 dropped
         the board support but missed to update this file
       - Fill the Commit and Removed Date fields for boards removed
         by earlier commits
       - Move 'incaip' to keep the list sorted in reverse
         chronological order
       - Describe the soring rule in the comment block:
         "The list should be sorted in reverse chronological order."
       - Fix typos in the comment block
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      0b6cc51e
    • Pavel Machek's avatar
      ext4load: fix help text · 2a72dcce
      Pavel Machek authored
      
      Fix ext4load help text.
      
      Signed-off-by: default avatarPavel Machek <pavel@denx.de>
      2a72dcce
    • Simon Glass's avatar
      git-mailrc: Add myself as dm maintainer · 960c3cac
      Simon Glass authored
      
      Add a subsystem entry for dm with myself as maintainer.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      960c3cac
    • Simon Glass's avatar
      git-mailrc: Change fdt maintainer · fd5058ee
      Simon Glass authored
      
      Add myself as fdt maintainer.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      fd5058ee
    • Stephen Warren's avatar
      net: BOOTP retry timeout improvements · f59be6e8
      Stephen Warren authored
      
      Currently, the BOOTP code sends out its initial request as soon as the
      Ethernet driver indicates "link up". If this packet is lost or not
      replied to for some reason, the code waits for a 1s timeout before
      retrying. For some reason, such early packets are often lost on my
      system, so this causes an annoying delay.
      
      To optimize this, modify the BOOTP code to have very short timeouts for
      the first packet transmitted, but gradually increase the timeout each
      time a timeout occurs. This way, if the first packet is lost, the second
      packet is transmitted quite quickly and hence the overall delay is low.
      However, if there's still no response, we don't keep spewing out packets
      at an insane speed.
      
      It's arguably more correct to try and find out why the first packet is
      lost. However, it seems to disappear inside my Ethenet chip; the TX chip
      indicates no error during TX (not that it has much in the way of
      reporting...), yet wireshark on the RX side doesn't see any packet.
      FWIW, I'm using an ASIX USB Ethernet adapter. Perhaps "link up" is
      reported too early or based on the wrong condition in HW, and we should
      add some fixed extra delay into the driver. However, this would slow down
      every link up event even if it ends up not being needed in some cases.
      Having BOOTP retry quickly applies the fix/WAR to every possible
      Ethernet device, and is quite simple to implement, so seems a better
      solution.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarJoe Hershberger <joe.hershberger@ni.com>
      f59be6e8
    • maxin.john@enea.com's avatar
      emif.h: remove duplicated argument to | · 194c1ed4
      maxin.john@enea.com authored
      Remove the duplicated argument to | in two places. Reported
      by Coccinelle (http://coccinelle.lip6.fr/
      
      ).
      
      Signed-off-by: default avatarMaxin B. John <maxin.john@enea.com>
      194c1ed4
    • maxin.john@enea.com's avatar
      vitesse: remove duplicated argument to || · 79e86ccb
      maxin.john@enea.com authored
      
      Remove the duplicated argument to || check
      
      Signed-off-by: default avatarMaxin B. John <maxin.john@enea.com>
      79e86ccb
    • Ian Campbell's avatar
      board_r: Add missing return to initr_doc · 19ad527d
      Ian Campbell authored
      
      I happened to spot this while working in the area.
      
      Signed-off-by: default avatarIan Campbell <ijc@hellion.org.uk>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      Cc: Simon Glass <sjg@chromium.org>
      19ad527d
    • Chris Packham's avatar
      Makefile: use u-boot.map for binary_size_check · 3ce7a4fe
      Chris Packham authored
      u-boot.map is generated automatically by the compiler and more
      importantly can handle addresses >4GB.
      3ce7a4fe
    • Chris Packham's avatar
      Makefile: use $(shell ...) for determining file_size · 67b060b4
      Chris Packham authored
      
      file_size was being calculated using back-ticks but map_size uses
      $(shell ...). Update the file_size calculation to use $(shell ...).
      
      From: Jeroen Hofstee <jeroen@myspectrum.nl>
      
      The binary_size_check target relies on stat -c %s
      to return the size of u-boot.bin. This only works
      with GNU stat though. Use wc instead.
      
      Signed-off-by: default avatarChris Packham <judge.packham@gmail.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      67b060b4
    • Stephen Warren's avatar
      pxe: clear Bootfile before returning · ded2e20e
      Stephen Warren authored
      
      When "pxe boot" downloads the initrd/kernel/DTB, netboot_common() saves
      the downloaded filename to global variable BootFile. If the boot
      operation is aborted, this global state is not cleared. If "dhcp" is
      executed later without any arguments, BootFile is not cleared, and when
      the DHCP response is received, BootpCopyNetParams() writes the value into
      environment variable bootfile.
      
      This causes the following scenario:
      
      * Boot script executes dhcp; pxe get; pxe boot
      
      * User CTRL-C's the PXE menu, which causes the first menu item to be
        booted, which causes some file to be downloaded.
      
        (This boot-on-CTRL-C behaviour is arguably a bug too, but it's a
        separate bug and the bug this patch fixes would still exist if the user
        simply waited to press CTRL-C until "pxe boot" started downloading
        files)
      
      * User CTRL-C's the file downloads, but the filename is still written to
        the bootfile environment variable.
      
      * User re-runs the boot command, which in my case executes "dhcp; pxe get;
        pxe boot" again, and "dhcp" picks up the saved bootfile environment
        variable and proceeds to download a file that it shouldn't.
      
      To solve this, modify the implementation of "pxe get" to clear BootFile
      if the whole boot operation fails, which avoids this whole mess.
      
      An alternative would be to modify netboot_common() such that the no-
      arguments case explicitly clears the global variable BootFile. However,
      that would prevent the following command sequences from working:
      
      $ dhcp filename # downloads "filename"
      $ dhcp          # downloads $bootfile, i.e. "filename"
      
      or:
      $ setenv bootfile filename
      $ dhcp          # downloads $bootfile, i.e. "filename"
      
      ... and I assume someone relies on U-Boot working that way.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarJoe Hershberger <joe.hershberger@ni.com>
      ded2e20e
    • Barnes, Clifton A's avatar
      doc: README.android-fastboot: Add note about vendor ID · 183cbff7
      Barnes, Clifton A authored
      
      The Android fastboot client only communicates with specific vendor IDs.
      This addition to the documentation points out that fact so everyone is
      aware that not just any vendor ID will work and where to find the IDs
      that will.
      
      Signed-off-by: default avatarClifton Barnes <cabarnes@indesign-llc.com>
      Cc: Rob Herring <robh@kernel.org>
      183cbff7
    • Łukasz Majewski's avatar
      ext4: trats: trats2: Modify dfu_alt_info's file names to have absolute path · dcb7eb66
      Łukasz Majewski authored
      
      After the clean up performed in the commit 1151b7ac10b81ecbb the DFU subsystem
      requires absolute patch for correct operation.
      
      Signed-off-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      dcb7eb66
    • Michael van der Westhuizen's avatar
      Implement generalised RSA public exponents for verified boot · e0f2f155
      Michael van der Westhuizen authored
      
      Remove the verified boot limitation that only allows a single
      RSA public exponent of 65537 (F4).  This change allows use with
      existing PKI infrastructure and has been tested with HSM-based
      PKI.
      
      Change the configuration OF tree format to store the RSA public
      exponent as a 64 bit integer and implement backward compatibility
      for verified boot configuration trees without this extra field.
      
      Parameterise vboot_test.sh to test different public exponents.
      
      Mathematics and other hard work by Andrew Bott.
      
      Tested with the following public exponents: 3, 5, 17, 257, 39981,
      50457, 65537 and 4294967297.
      
      Signed-off-by: default avatarAndrew Bott <Andrew.Bott@ipaccess.com>
      Signed-off-by: default avatarAndrew Wishart <Andrew.Wishart@ipaccess.com>
      Signed-off-by: default avatarNeil Piercy <Neil.Piercy@ipaccess.com>
      Signed-off-by: default avatarMichael van der Westhuizen <michael@smart-africa.com>
      Cc: Simon Glass <sjg@chromium.org>
      e0f2f155
    • Nobuhiro Iwamatsu's avatar
      serial: sh: Add support External Clock mode · 53022c31
      Nobuhiro Iwamatsu authored
      
      R8A7780 and R7A7791 of rmobile supports External Clock mode, and these uses
      different from Internal Clock mode registers and calculations to the baud rate
      setting. This adds function for External Clock mode.
      
      Signed-off-by: default avatarNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
      Signed-off-by: default avatarNobuhiro Iwamatsu <iwamatsu@nigauri.org>
      53022c31
    • Nobuhiro Iwamatsu's avatar
      serial: sh: Add support DL and CKS register for R8A7794 · 1a223c93
      Nobuhiro Iwamatsu authored
      
      R8A7794 has DL and CKS register, and these registers are used in external clock
      mode. This adds support these for R8A7794.
      
      Signed-off-by: default avatarNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
      Signed-off-by: default avatarNobuhiro Iwamatsu <iwamatsu@nigauri.org>
      1a223c93
    • Nobuhiro Iwamatsu's avatar
      usb: ehci: rmobile: Remove xHCI address · 5906fade
      Nobuhiro Iwamatsu authored
      
      echi-rmobile does not support xHCI. This removes xHCI address
      from address table. And this revise a value of CONFIG_USB_MAX_CONTROLLER_COUNT
      for lager board and koelsh board.
      
      Signed-off-by: default avatarNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
      5906fade
    • Nobuhiro Iwamatsu's avatar
      usb: ehci: rmobile: Add support R8A7794 · ed7ce836
      Nobuhiro Iwamatsu authored
      
      R8A7794 has same IP of USB controller as R8A7790 and R8A7791.
      This addes support for R8A7794.
      
      Signed-off-by: default avatarNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
      ed7ce836
    • Stephen Warren's avatar
      dfu: fix readback buffer overflow test · 67ab0a5e
      Stephen Warren authored
      
      The buffer is too small if it's < size to read, not if it's <= the size.
      This fixes the 1MB test case on Tegra, which has a 1MB buffer.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      67ab0a5e
    • Stephen Warren's avatar
      test: dfu: add some more test cases · 54ce79c8
      Stephen Warren authored
      
      On Tegra, the DFU buffer size is 1M. Consequently, the 8M test always
      fails. Add tests for the 1M size, and one byte less as a corner case,
      so that some large tests are executed and expected to pass.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      54ce79c8
    • Stephen Warren's avatar
      test: dfu: cleanup before execution · c0e6663b
      Stephen Warren authored
      
      Call cleanup() before running tests too. If a previous test was CTRL-C'd
      some stale files may have been left around. dfu-util refuses to receive
      a file to a filename that already exists, which results in false test
      failures if the files aren't cleaned up first.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      c0e6663b
    • Łukasz Majewski's avatar
      thor: defer parsing of device string to IO backend · 90fadb57
      Łukasz Majewski authored
      
      Commit d4f5ef59cc7 "dfu: defer parsing of device string to IO backend" changed
      the function signature of dfu_init_env_entities(). Adjust cmd_thordown.c
      to match that change.
      
      Also, apply the same change as commit d6d37d737b58e "dfu: free entities
      when parsing fails" to cmd_thordown.c.
      
      Fixes: d4f5ef59cc7 ("dfu: defer parsing of device string to IO backend")
      Signed-off-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      Reviewed-by: default avatarStephen Warren <swarren@nvidia.com>
      90fadb57
    • Łukasz Majewski's avatar
      test:dfu: README file update · 50a35321
      Łukasz Majewski authored
      
      Signed-off-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      50a35321
    • Stephen Warren's avatar
      test: dfu: script enhancements · 7ad67e55
      Stephen Warren authored
      
      Various misc enhancements to dfu_gadget_test.sh:
      
      * After every write (download), perform a write to a different file
        with different data. This ensures that the DFU buffer's content is
        replaced, so that if the read (upload) succeeds, we know that the
        correct data was actually read from the storage device, rather than
        simply being left over in the DFU buffer. This requires two alt
        setting names to be passed to the script, and a dummy data file to
        be generated by dfu_gadget_test_init.sh.
      
      * Fix the assumption that dfu_gadget_test.sh is run from the directory
        that contains it, by cd'ing to that directory before invoking
        ./dfu_gadget_test_init.sh.
      
      * Use $DIR$RCV_DIR consistently, rather than using plain $RCV_DIR in
        some places.
      
      * Add 959, 961 test file sizes, to be consistent with having one
        more than and one less than all the other "round" sizes 64, 128, and
        4096.
      
      * Remove references to $BKP_DIR from dfu_gadget_test_init.sh, since it
        isn't used.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      7ad67e55
    • Łukasz Majewski's avatar
      test:dfu: Add test scripts for testing DFU regression · a4c86bbb
      Łukasz Majewski authored
      
      This commit adds test scripts for testing if any commit has introduced
      regression to the DFU subsystem.
      
      It uses md5 to test if sent and received file is correct.
      The test detailed description is available at README file.
      
      Signed-off-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      a4c86bbb
    • Stephen Warren's avatar
      dfu: add SF backend · 6f12ebf6
      Stephen Warren authored
      
      This allows SPI Flash to be programmed using DFU.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      6f12ebf6
    • Stephen Warren's avatar
      dfu: add free_entity() to struct dfu_entity · cb7bd2e0
      Stephen Warren authored
      
      This allows the backend to free any resources allocated during the
      relevant dfu_fill_entity_*() call. This will soon be used by the
      SF backend.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      cb7bd2e0
    • Stephen Warren's avatar
      dfu: allow backend to specify a maximum buffer size · 7ac1b410
      Stephen Warren authored
      
      CONFIG_SYS_DFU_DATA_BUF_SIZE may be large to allow for FAT/ext layouts
      to transfer large files. However, this means that individual write
      operations will take a long time. Allow backends to specify a maximum
      buffer size, so that each write operation is limited to a smaller data
      block. This prevents the DFU protocol from timing out when e.g. writing
      to SPI flash. I would guess that NAND might benefit from setting this
      value too, but I can't test that.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      7ac1b410
    • 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: add write error handling · 3ee9593f
      Stephen Warren authored
      
      Fix calls to dfu_write() and dfu_flush() to detect errors in the I/O
      itself. This could happen due to problems with the storage medium, or
      simply when trying to write a FAT/ext file that is larger than the buffer
      dfu_mmc.c maintains for this purpose.
      
      Signal the error by switching the DFU state/status. This will be picked
      up by the DFU client when it sends the next DFU request. Note that errors
      can't simply be returned from e.g. dnload_request_complete(), since that
      function has no way to pass errors back to the DFU client; a call to
      dnload_request_complete() simply means that a USB OUT completed.
      
      This error state/status needs to be cleared when the next DFU client
      connects. While there is a DFU_CLRSTATUS request, no DFU client seems to
      send this. Hence, clear this when selecting the USB alternate setting on
      the USB interface.
      
      Finally, dfu.c relies on a call to dfu_flush() to clear up the internal
      state of the write transaction. Now that errors in dfu_write() are
      detected, dfu_flush() may no longer be called for every transaction.
      Separate out the cleanup code into a new function, and call it whenever
      dfu_write() fails, as well as from any call to dfu_flush().
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      3ee9593f
    • 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
Loading