public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v3 0/7] Add rkmtd command
@ 2023-10-12 20:49 Johan Jonker
  2023-10-12 20:51 ` [PATCH v3 2/7] rockchip: dm: prepare rkmtd UCLASS Johan Jonker
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Johan Jonker @ 2023-10-12 20:49 UTC (permalink / raw)
  To: kever.yang; +Cc: sjg, philipp.tomsich, dario.binacchi, michael, u-boot

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 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 (7):
  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: disable bounce buffer support for rkmtd
  rockchip: cmd: add rkmtd command
  rockchip: test: dm: add rkmtd test
  rockchip: doc: add rkmtd.rst

 cmd/Kconfig                         |    8 +
 cmd/Makefile                        |    1 +
 cmd/rkmtd.c                         |  204 +++++
 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          |    7 +-
 drivers/block/rkmtd.c               | 1138 +++++++++++++++++++++++++++
 drivers/mtd/nand/raw/Kconfig        |    9 +
 drivers/mtd/nand/raw/rockchip_nfc.c |    3 +
 include/dm/uclass-id.h              |    1 +
 include/rkmtd.h                     |  190 +++++
 test/dm/Makefile                    |    1 +
 test/dm/rkmtd.c                     |  201 +++++
 16 files changed, 1879 insertions(+), 3 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


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-10-15  7:54 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-12 20:49 [PATCH v3 0/7] Add rkmtd command Johan Jonker
2023-10-12 20:51 ` [PATCH v3 2/7] rockchip: dm: prepare rkmtd UCLASS Johan Jonker
2023-10-13 16:57   ` Simon Glass
2023-10-13 17:27     ` Johan Jonker
2023-10-12 20:51 ` [PATCH v3 3/7] rockchip: block: add rkmtd class and drivers Johan Jonker
2023-10-13  7:15   ` Kever Yang
2023-10-12 20:51 ` [PATCH v3 4/7] rockchip: block: blk-uclass: disable bounce buffer support for rkmtd Johan Jonker
2023-10-13  7:15   ` Kever Yang
2023-10-12 20:52 ` [PATCH v3 5/7] rockchip: cmd: add rkmtd command Johan Jonker
2023-10-13 15:14   ` Simon Glass
2023-10-12 20:52 ` [PATCH v3 6/7] rockchip: test: dm: add rkmtd test Johan Jonker
2023-10-13  7:15   ` Kever Yang
2023-10-14 18:19     ` Simon Glass
2023-10-12 20:52 ` [PATCH v3 7/7] rockchip: doc: add rkmtd.rst Johan Jonker
2023-10-13  7:16   ` Kever Yang
2023-10-13 15:15   ` Simon Glass
2023-10-14  4:21 ` [PATCH v3] rockchip: configs: sandbox: enable rkmtd command Johan Jonker
2023-10-14 18:20   ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox