tools: kwbimage: Fix generating image with multiple DATA_DELAY commands
authorPali Rohár <pali@kernel.org>
Wed, 12 Jan 2022 17:20:37 +0000 (18:20 +0100)
committerStefan Roese <sr@denx.de>
Fri, 14 Jan 2022 10:39:16 +0000 (11:39 +0100)
commitd737d5d2c1e9aaea830c1cc469091ed9c13b2b2a
tree448bbe6d2cb9e04b66ad793baabe49a54f3943b4
parent9ac1def0207c0b3e01eee203b138fba4ca299ef0
tools: kwbimage: Fix generating image with multiple DATA_DELAY commands

Register set header consists of sequence of DATA commands followed by
exactly one DATA_DELAY command. Thus if we are generating image with
multiple DATA_DELAY commands, we need to create more register set headers.

Fix calculation of image size with multiple DATA_DELAY commands and
correctly set pointer to struct register_set_hdr_v1 when initializing new
register set header.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
tools/kwbimage.c