aboutsummaryrefslogtreecommitdiff
path: root/tools/kwbimage.c
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2021-10-22 12:37:46 +0200
committerStefan Roese <sr@denx.de>2021-10-28 10:33:32 +0200
commit2fdba4f6585c31da748eee69a8dea1cf0a11d311 (patch)
tree595b9a3e2a8cc2e158fcff0026b439ba02c5fda5 /tools/kwbimage.c
parent59102987be25920b2180ebe2a18fbaf56c5a8278 (diff)
downloadu-boot-2fdba4f6585c31da748eee69a8dea1cf0a11d311.zip
u-boot-2fdba4f6585c31da748eee69a8dea1cf0a11d311.tar.gz
u-boot-2fdba4f6585c31da748eee69a8dea1cf0a11d311.tar.bz2
tools: kwbimage: Add support for NAND_PAGE_SIZE command also for v1 images
The NAND_PAGE_SIZE command is already supported by mkimage for v0 images, but not for v1 images. A38x and A39x BootROM supports reading NAND flash page size from v1 image in the same way as Kirkwood BootROM from v0 image. It it documented in A38x and A39x Functional Specification. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'tools/kwbimage.c')
-rw-r--r--tools/kwbimage.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/kwbimage.c b/tools/kwbimage.c
index e9324ba..67c0c62 100644
--- a/tools/kwbimage.c
+++ b/tools/kwbimage.c
@@ -1231,6 +1231,9 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params,
e = image_find_option(IMAGE_CFG_NAND_BLKSZ);
if (e)
main_hdr->nandblocksize = e->nandblksz / (64 * 1024);
+ e = image_find_option(IMAGE_CFG_NAND_PAGESZ);
+ if (e)
+ main_hdr->nandpagesize = cpu_to_le16(e->nandpagesz);
e = image_find_option(IMAGE_CFG_NAND_BADBLK_LOCATION);
if (e)
main_hdr->nandbadblklocation = e->nandbadblklocation;