]> git.baikalelectronics.ru Git - uboot.git/commit
tools: kwbimage: Fix dumping NAND_BLKSZ
authorPali Rohár <pali@kernel.org>
Sat, 14 Jan 2023 12:42:14 +0000 (13:42 +0100)
committerStefan Roese <sr@denx.de>
Wed, 1 Mar 2023 05:39:17 +0000 (06:39 +0100)
commite85dc2ed6b309055f24cb04230b7f9b848d8128c
treee4f75f13a6515b747ef5739b9f86c90995202007
parentb06b38c5660d7e377caa50aeee1316aa63d3c08f
tools: kwbimage: Fix dumping NAND_BLKSZ

kwbimage nandblocksize field is in 64 kB unit, but NAND_BLKSZ command
expects it in bytes. So do required unit conversion.

Also zero value in nandblocksize field has special meaning. When this field
is set to zero, the default block size is used. This default size is
defined by the NAND flash page size (16 KB for a 512B page or small page
NAND and 64 KB for a large page NAND flash).

Fixes: 7a800b3de2da ("tools: kwbimage: Dump kwbimage config file on '-p -1' option")
Signed-off-by: Pali Rohár <pali@kernel.org>
tools/kwbimage.c