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>
diff --git a/boot/boot_fit.c b/boot/boot_fit.c
index dfc2a31..4a493b3 100644
--- a/boot/boot_fit.c
+++ b/boot/boot_fit.c
@@ -57,14 +57,14 @@
 
 void *locate_dtb_in_fit(const void *fit)
 {
-	struct image_header *header;
+	struct legacy_img_hdr *header;
 	int size;
 	int ret;
 
 	size = fdt_totalsize(fit);
 	size = (size + 3) & ~3;
 
-	header = (struct image_header *)fit;
+	header = (struct legacy_img_hdr *)fit;
 
 	if (image_get_magic(header) != FDT_MAGIC) {
 		debug("No FIT image appended to U-boot\n");
diff --git a/boot/bootm.c b/boot/bootm.c
index 2e41d78..5b20b41 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -825,9 +825,9 @@
  *     pointer to a legacy image header if valid image was found
  *     otherwise return NULL
  */
-static image_header_t *image_get_kernel(ulong img_addr, int verify)
+static struct legacy_img_hdr *image_get_kernel(ulong img_addr, int verify)
 {
-	image_header_t *hdr = (image_header_t *)img_addr;
+	struct legacy_img_hdr *hdr = (struct legacy_img_hdr *)img_addr;
 
 	if (!image_check_magic(hdr)) {
 		puts("Bad Magic Number\n");
@@ -882,7 +882,7 @@
 				   ulong *os_data, ulong *os_len)
 {
 #if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)
-	image_header_t	*hdr;
+	struct legacy_img_hdr	*hdr;
 #endif
 	ulong		img_addr;
 	const void *buf;
@@ -940,7 +940,7 @@
 		 * kernel decompression.
 		 */
 		memmove(&images->legacy_hdr_os_copy, hdr,
-			sizeof(image_header_t));
+			sizeof(struct legacy_img_hdr));
 
 		/* save pointer to image header */
 		images->legacy_hdr_os = hdr;
diff --git a/boot/bootm_os.c b/boot/bootm_os.c
index 649f92a..99ff0e6 100644
--- a/boot/bootm_os.c
+++ b/boot/bootm_os.c
@@ -67,8 +67,9 @@
 static int do_bootm_netbsd(int flag, int argc, char *const argv[],
 			   struct bootm_headers *images)
 {
-	void (*loader)(struct bd_info *, image_header_t *, char *, char *);
-	image_header_t *os_hdr, *hdr;
+	void (*loader)(struct bd_info *bd, struct legacy_img_hdr *hdr,
+		       char *console, char *cmdline);
+	struct legacy_img_hdr *os_hdr, *hdr;
 	ulong kernel_data, kernel_len;
 	char *cmdline;
 
@@ -115,7 +116,7 @@
 			cmdline = "";
 	}
 
-	loader = (void (*)(struct bd_info *, image_header_t *, char *, char *))images->ep;
+	loader = (void (*)(struct bd_info *, struct legacy_img_hdr *, char *, char *))images->ep;
 
 	printf("## Transferring control to NetBSD stage-2 loader (at address %08lx) ...\n",
 	       (ulong)loader);
diff --git a/boot/image-android.c b/boot/image-android.c
index 1fbbbba..2628db3 100644
--- a/boot/image-android.c
+++ b/boot/image-android.c
@@ -63,7 +63,7 @@
 			     ulong *os_data, ulong *os_len)
 {
 	u32 kernel_addr = android_image_get_kernel_addr(hdr);
-	const struct image_header *ihdr = (const struct image_header *)
+	const struct legacy_img_hdr *ihdr = (const struct legacy_img_hdr *)
 		((uintptr_t)hdr + hdr->page_size);
 
 	/*
@@ -159,8 +159,8 @@
 {
 	const void *p = (void *)((uintptr_t)hdr + hdr->page_size);
 
-	if (image_get_magic((image_header_t *)p) == IH_MAGIC)
-		return image_get_comp((image_header_t *)p);
+	if (image_get_magic((struct legacy_img_hdr *)p) == IH_MAGIC)
+		return image_get_comp((struct legacy_img_hdr *)p);
 	else if (get_unaligned_le32(p) == LZ4F_MAGIC)
 		return IH_COMP_LZ4;
 	else
diff --git a/boot/image-board.c b/boot/image-board.c
index fe44557..34d1e5f 100644
--- a/boot/image-board.c
+++ b/boot/image-board.c
@@ -40,10 +40,10 @@
  *     pointer to a ramdisk image header, if image was found and valid
  *     otherwise, return NULL
  */
-static const image_header_t *image_get_ramdisk(ulong rd_addr, u8 arch,
-					       int verify)
+static const struct legacy_img_hdr *image_get_ramdisk(ulong rd_addr, u8 arch,
+						      int verify)
 {
-	const image_header_t *rd_hdr = (const image_header_t *)rd_addr;
+	const struct legacy_img_hdr *rd_hdr = (const struct legacy_img_hdr *)rd_addr;
 
 	if (!image_check_magic(rd_hdr)) {
 		puts("Bad Magic Number\n");
@@ -273,9 +273,9 @@
 int genimg_get_format(const void *img_addr)
 {
 	if (CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)) {
-		const image_header_t *hdr;
+		const struct legacy_img_hdr *hdr;
 
-		hdr = (const image_header_t *)img_addr;
+		hdr = (const struct legacy_img_hdr *)img_addr;
 		if (image_check_magic(hdr))
 			return IMAGE_FORMAT_LEGACY;
 	}
@@ -389,7 +389,7 @@
 	switch (genimg_get_format(buf)) {
 	case IMAGE_FORMAT_LEGACY:
 		if (CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)) {
-			const image_header_t *rd_hdr;
+			const struct legacy_img_hdr *rd_hdr;
 
 			printf("## Loading init Ramdisk from Legacy Image at %08lx ...\n",
 			       rd_addr);
diff --git a/boot/image-fdt.c b/boot/image-fdt.c
index 78417bd..ca51796 100644
--- a/boot/image-fdt.c
+++ b/boot/image-fdt.c
@@ -37,9 +37,9 @@
 }
 
 #if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)
-static const image_header_t *image_get_fdt(ulong fdt_addr)
+static const struct legacy_img_hdr *image_get_fdt(ulong fdt_addr)
 {
-	const image_header_t *fdt_hdr = map_sysmem(fdt_addr, 0);
+	const struct legacy_img_hdr *fdt_hdr = map_sysmem(fdt_addr, 0);
 
 	image_print_contents(fdt_hdr);
 
@@ -358,7 +358,7 @@
 	switch (genimg_get_format(buf)) {
 #if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)
 	case IMAGE_FORMAT_LEGACY: {
-			const image_header_t *fdt_hdr;
+			const struct legacy_img_hdr *fdt_hdr;
 			ulong load, load_end;
 			ulong image_start, image_data, image_end;
 
diff --git a/boot/image.c b/boot/image.c
index a0d0cc2..9f95b32 100644
--- a/boot/image.c
+++ b/boot/image.c
@@ -220,11 +220,11 @@
 /*****************************************************************************/
 /* Legacy format routines */
 /*****************************************************************************/
-int image_check_hcrc(const image_header_t *hdr)
+int image_check_hcrc(const struct legacy_img_hdr *hdr)
 {
 	ulong hcrc;
 	ulong len = image_get_header_size();
-	image_header_t header;
+	struct legacy_img_hdr header;
 
 	/* Copy header so we can blank CRC field for re-calculation */
 	memmove(&header, (char *)hdr, image_get_header_size());
@@ -235,7 +235,7 @@
 	return (hcrc == image_get_hcrc(hdr));
 }
 
-int image_check_dcrc(const image_header_t *hdr)
+int image_check_dcrc(const struct legacy_img_hdr *hdr)
 {
 	ulong data = image_get_data(hdr);
 	ulong len = image_get_data_size(hdr);
@@ -257,7 +257,7 @@
  * returns:
  *     number of components
  */
-ulong image_multi_count(const image_header_t *hdr)
+ulong image_multi_count(const struct legacy_img_hdr *hdr)
 {
 	ulong i, count = 0;
 	uint32_t *size;
@@ -290,7 +290,7 @@
  *     data address and size of the component, if idx is valid
  *     0 in data and len, if idx is out of range
  */
-void image_multi_getimg(const image_header_t *hdr, ulong idx,
+void image_multi_getimg(const struct legacy_img_hdr *hdr, ulong idx,
 			ulong *data, ulong *len)
 {
 	int i;
@@ -326,7 +326,7 @@
 	}
 }
 
-static void image_print_type(const image_header_t *hdr)
+static void image_print_type(const struct legacy_img_hdr *hdr)
 {
 	const char __maybe_unused *os, *arch, *type, *comp;
 
@@ -352,7 +352,7 @@
  */
 void image_print_contents(const void *ptr)
 {
-	const image_header_t *hdr = (const image_header_t *)ptr;
+	const struct legacy_img_hdr *hdr = (const struct legacy_img_hdr *)ptr;
 	const char __maybe_unused *p;
 
 	p = IMAGE_INDENT_STRING;