Skip to content

Add rkmtd command

Johan Jonker u-boot 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest8 patches 3 repliesIn review
  2. v48 patches 4 repliesSuperseded
  3. v37 patches 9 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v23 patches3 repliesSuperseded
v13 patches3 repliesSuperseded

Changes in v5 from the cover letter

Add bounce buffer flag
Use devres_alloc in bind
Restyle

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8mtd: nand: raw: rockchip_nfc: add NAND_SKIP_BBTSCAN optiondrivers/mtd/nand/raw/Kconfig drivers/mtd/nand/raw/rockchip_nfc.c+12 -00 replies
2/8rockchip: dm: prepare rkmtd UCLASSdisk/part.c drivers/block/blk-uclass.c include/dm/uclass-id.h+6 -01 reply
3/8rockchip: block: add rkmtd class and driversdrivers/block/Kconfig drivers/block/Makefile drivers/block/rkmtd.c +1 more+1352 -00 replies
4/8rockchip: block: blk-uclass: add bounce buffer flag to blk_descdrivers/block/blk-uclass.c drivers/scsi/scsi.c include/blk.h+7 -22 replies
5/8rockchip: cmd: add rkmtd commandcmd/Kconfig cmd/Makefile cmd/rkmtd.c+213 -00 replies
6/8rockchip: test: dm: add rkmtd testtest/dm/Makefile test/dm/rkmtd.c+201 -00 replies
7/8rockchip: doc: add rkmtd.rstdoc/board/rockchip/index.rst doc/board/rockchip/rkmtd.rst+106 -00 replies
8/8rockchip: configs: sandbox: enable rkmtd commandconfigs/sandbox64_defconfig configs/sandbox_defconfig+2 -00 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchKever YangSimon Glass
1/8R-b
2/8R-b R-b
3/8R-b
4/8R-b R-b
5/8R-b
6/8R-b R-b
7/8R-b R-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/8] Add rkmtd command

The command rkmtd creates a virtual block device to transfer Rockchip boot block data to and from NAND with block orientated tools like "ums" and "rockusb".

It uses the Rockchip MTD driver to scan for boot blocks and copies data from the first block in a GPT formatted virtual disk. Data must be written in U-boot "idbloader.img" format and start at partition "loader1" offset 64. The data header is parsed for length and offset. When the last sector is received it erases up to 5 erase blocks on NAND and writes boot blocks in a pattern depending on the NAND ID. Data is then verified. When a block turns out bad the block header is discarded.

Changed V5:
Add bounce buffer flag
Use devres_alloc in bind
Restyle

Changed V4:
Sort includes
Replace constant by define
Enable rkmtd command in sandbox defconfig
Fix minor things in test

Changed V3:
Add documetation
Add test
Split driver from command
Split header
Use devm_kzalloc
Remove out of memory debug
Restyle

Changed V2:
Rename to rkmtd

Johan Jonker (8):
mtd: nand: raw: rockchip_nfc: add NAND_SKIP_BBTSCAN option
rockchip: dm: prepare rkmtd UCLASS
rockchip: block: add rkmtd class and drivers
rockchip: block: blk-uclass: add bounce buffer flag to blk_desc
rockchip: cmd: add rkmtd command
rockchip: test: dm: add rkmtd test
rockchip: doc: add rkmtd.rst
rockchip: configs: sandbox: enable rkmtd command

 cmd/Kconfig                         |    8 +
 cmd/Makefile                        |    1 +
 cmd/rkmtd.c                         |  204 +++++
 configs/sandbox64_defconfig         |    1 +
 configs/sandbox_defconfig           |    1 +
 disk/part.c                         |    4 +
 doc/board/rockchip/index.rst        |    1 +
 doc/board/rockchip/rkmtd.rst        |  105 +++
 drivers/block/Kconfig               |    7 +
 drivers/block/Makefile              |    2 +
 drivers/block/blk-uclass.c          |    5 +-
 drivers/block/rkmtd.c               | 1152 +++++++++++++++++++++++++++
 drivers/mtd/nand/raw/Kconfig        |    9 +
 drivers/mtd/nand/raw/rockchip_nfc.c |    3 +
 drivers/scsi/scsi.c                 |    4 +
 include/blk.h                       |    1 +
 include/dm/uclass-id.h              |    1 +
 include/rkmtd.h                     |  191 +++++
 test/dm/Makefile                    |    1 +
 test/dm/rkmtd.c                     |  200 +++++
 20 files changed, 1899 insertions(+), 2 deletions(-)
 create mode 100644 cmd/rkmtd.c
 create mode 100644 doc/board/rockchip/rkmtd.rst
 create mode 100644 drivers/block/rkmtd.c
 create mode 100644 include/rkmtd.h
 create mode 100644 test/dm/rkmtd.c

--
2.39.2