aboutsummaryrefslogtreecommitdiff
path: root/tools/mtk_image.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-09-06 20:26:52 -0600
committerTom Rini <trini@konsulko.com>2022-09-29 16:07:57 -0400
commitf3543e69442ca393e52df253d9c5d45bc189d471 (patch)
tree99423df56b15a01188099161332c6c8aed301972 /tools/mtk_image.c
parentda79b2f25e5352a8e09b96ecef56df009f03c0b5 (diff)
downloadu-boot-f3543e69442ca393e52df253d9c5d45bc189d471.zip
u-boot-f3543e69442ca393e52df253d9c5d45bc189d471.tar.gz
u-boot-f3543e69442ca393e52df253d9c5d45bc189d471.tar.bz2
treewide: Drop image_header_t typedef
This is not needed and we should avoid typedefs. Use the struct instead and rename it to indicate that it really is a legacy struct. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/mtk_image.c')
-rw-r--r--tools/mtk_image.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/mtk_image.c b/tools/mtk_image.c
index 9b3136a..5ef9334 100644
--- a/tools/mtk_image.c
+++ b/tools/mtk_image.c
@@ -427,10 +427,10 @@ static uint32_t crc32be_cal(const void *data, size_t length)
static int mtk_image_verify_mt7621_header(const uint8_t *ptr, int print)
{
- const image_header_t *hdr = (const image_header_t *)ptr;
+ const struct legacy_img_hdr *hdr = (const struct legacy_img_hdr *)ptr;
struct mt7621_nand_header *nhdr;
uint32_t spl_size, crcval;
- image_header_t header;
+ struct legacy_img_hdr header;
int ret;
spl_size = image_get_size(hdr);
@@ -490,7 +490,7 @@ static int mtk_image_verify_mt7621_header(const uint8_t *ptr, int print)
static int mtk_image_verify_header(unsigned char *ptr, int image_size,
struct image_tool_params *params)
{
- image_header_t *hdr = (image_header_t *)ptr;
+ struct legacy_img_hdr *hdr = (struct legacy_img_hdr *)ptr;
union lk_hdr *lk = (union lk_hdr *)ptr;
/* nothing to verify for LK image header */
@@ -512,7 +512,7 @@ static int mtk_image_verify_header(unsigned char *ptr, int image_size,
static void mtk_image_print_header(const void *ptr)
{
- image_header_t *hdr = (image_header_t *)ptr;
+ struct legacy_img_hdr *hdr = (struct legacy_img_hdr *)ptr;
union lk_hdr *lk = (union lk_hdr *)ptr;
if (le32_to_cpu(lk->magic) == LK_PART_MAGIC) {
@@ -691,7 +691,7 @@ static void mtk_image_set_nand_header(void *ptr, off_t filesize,
static void mtk_image_set_mt7621_header(void *ptr, off_t filesize,
uint32_t loadaddr)
{
- image_header_t *hdr = (image_header_t *)ptr;
+ struct legacy_img_hdr *hdr = (struct legacy_img_hdr *)ptr;
struct mt7621_stage1_header *shdr;
struct mt7621_nand_header *nhdr;
uint32_t datasize, crcval;