Skip to content

Improve DFU support, enable for am335x_evm

Tom Rini u-boot 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest9 patches 0 repliesNew
  2. v59 patches 0 repliesSuperseded

Changes in v6 from the cover letter

- Correct the check for attempting to write out of bounds on RAW MMC.
- Pass correct buffer when reading a file from MMC.
- Drop 1 line helper functions that were called only twice in dfu_mmc.c
- Remove offset from MMC file ops as it was unused.
- Fix checkpatch new checkpatch warnings
- Update dfu_nand.c based on Scott's feedback

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9README: Document current DFU CONFIG optionsREADME+13 -00 replies
2/9dfu: Support larger than memory transfers.README drivers/dfu/dfu.c drivers/dfu/dfu_mmc.c +1 more+292 -920 replies
3/9dfu: Change indentation of defines in <dfu.h>include/dfu.h+2 -20 replies
4/9nand: Extend nand_(read|write)_skip_bad with *actual and limit parameterscommon/cmd_nand.c common/env_nand.c drivers/mtd/nand/nand_util.c +1 more+95 -330 replies
4/9nand: Extend nand_(read|write)_skip_bad with *actual and limit parametersboard/cm_t35/cm_t35.c+2 -01 reply
4/9nand: Extend nand_(read|write)_skip_bad with *actual and limit parameters+0 -00 replies
5/9cmd_nand.c: Fix CONFIG_CMD_NAND_YAFFScommon/cmd_nand.c+1 -11 reply
6/9dfu: NAND specific routines for DFU operationREADME drivers/dfu/Makefile drivers/dfu/dfu.c +2 more+222 -01 reply
7/9am335x_evm: Define CONFIG_SYS_CACHELINE_SIZEinclude/configs/am335x_evm.h+2 -00 replies
8/9am335x_evm: Add CONFIG_CMD_MTDPARTS and relevant defaultsinclude/configs/am335x_evm.h+9 -00 replies
9/9am335x_evm: Enable DFU for NAND and MMC, provide example alt_infosinclude/configs/am335x_evm.h+39 -20 replies

Reviews trailers per patch

6 of 11 patches have a Reviewed-by or Acked-by.

PatchTom RiniScott WoodIgor Grinberg
1/9
2/9
3/9
4/9A-b
4/9A-b
4/9A-b
5/9A-b
6/9A-b
7/9A-b
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v6 thread

Cover letter [U-Boot] [PATCH v6 0/9] Improve DFU support, enable for am335x_evm

This series does a few things. I've updated Pantelis Antoniou's patch that allows for transfering of files larger than 4MiB to still allow for filesystem writes to work. I also document the existing DFU CONFIG options, and then the new options this series adds. Then we update nand_(read|write)_skip_bad so that we can add DFU support for NAND (started by Pantelis). Finally, we enable all of this for am335x_evm. This series has been compile-tested on all ARM and PowerPC targets and run-time tested on am335x_evm for NAND and MMC and eMMC.

This series depends on u-boot-usb/master but with a09f955 removed (as we replace that patch here).

--
Tom

Changes in v6:
- Correct the check for attempting to write out of bounds on RAW MMC.
- Pass correct buffer when reading a file from MMC.
- Drop 1 line helper functions that were called only twice in dfu_mmc.c
- Remove offset from MMC file ops as it was unused.
- Fix checkpatch new checkpatch warnings
- Update dfu_nand.c based on Scott's feedback

Changes in v5:
- New patch to document existing DFU CONFIG options
- Rework Pantelis' "dfu: Support larger than memory transfers" to not break filesystem writing
- New patch to re-align defines in <dfu.h>
- Document CONFIG_DFU_NAND in README
- Add RAW MMC examples to include/configs/am335x_evm.h

Changes in v4:
- Further reword nand_util.c comments, from Scott
- In nand_write_skip_bad make sure *actual is 0 for YAFFS2 errors too, reminded by Scott.
- In cmd_nand.c don't drop the size is less than maxsize check in arg_off_size as other nand functions need this still (Scott).
- Add patch to fix CONFIG_CMD_NAND_YAFFS

Changes in v3:
- Reworked skip_check_len changes to just add accounting for *used to the logic.
- Allow for actual to be NULL in nand_(read|write)_skip_bad, only DFU calls this with a non-NULL parameter. Make sure the comments for both functions explain the parameters and their behavior.
- Other style changes requested by Scott.
- As nand_(write|read)_skip_bad passes back just a used length now.
- Rework logic in nand_block_op for nand_(read|write)_skip_bad returning just a size for actual used length.
- Remove unused externs from drivers/dfu/dfu_nand.c
- Fix checkpatch.pl warnings in include/configs/am335x_evm.h

Changes in v2:
- NAND skip_check_len changes reworked to allow nand_(read|write)_skip_bad to return this information to the caller.
- nand_block_op calls nand_(read|write)_skip_bad directly.
- Bugfix in dfu_nand to make sure we set dfu->skip_bad to 0 on each iteration.
- Add CONFIG_CMD_MTDPARTS and relevant information to am335x_evm
- Enable DFU for NAND and MMC, set dfu_alt_info_(nand|mmc) as examples for both in am335x_evm.h
- Increase CONFIG_SYS_MAXARGS due to hush parsing bugs that would otherwise prevent 'setenv dfu_alt_info ${dfu_alt_info_nand}' on am335x_evm

Pantelis Antoniou (4):
dfu: Support larger than memory transfers.
dfu: NAND specific routines for DFU operation
am335x_evm: Define CONFIG_SYS_CACHELINE_SIZE
am335x_evm: Enable DFU for NAND and MMC, provide example alt_infos

Tom Rini (5):
README: Document current DFU CONFIG options
dfu: Change indentation of defines in <dfu.h>
nand: Extend nand_(read|write)_skip_bad with *actual and limit
parameters
cmd_nand.c: Fix CONFIG_CMD_NAND_YAFFS
am335x_evm: Add CONFIG_CMD_MTDPARTS and relevant defaults

 README                       |   23 ++++
 common/cmd_nand.c            |   55 ++++++----
 common/env_nand.c            |    3 +-
 drivers/dfu/Makefile         |    1 +
 drivers/dfu/dfu.c            |  249 +++++++++++++++++++++++++++++++++---------
 drivers/dfu/dfu_mmc.c        |  108 ++++++++++++------
 drivers/dfu/dfu_nand.c       |  187 +++++++++++++++++++++++++++++++
 drivers/mtd/nand/nand_util.c |   68 ++++++++++--
 include/configs/am335x_evm.h |   52 ++++++++-
 include/dfu.h                |   53 ++++++++-
 include/nand.h               |    4 +-
 11 files changed, 674 insertions(+), 129 deletions(-)
 create mode 100644 drivers/dfu/dfu_nand.c
Signature · 1 line
1.7.9.5