diff mbox series

[U-Boot,4/4] common: Remove genimg_get_image()

Message ID 20171010185943.25696-5-tuomas.tynkkynen@iki.fi
State Accepted
Delegated to: Tom Rini
Headers show
Series Drop unused legacy DataFlash code | expand

Commit Message

Tuomas Tynkkynen Oct. 10, 2017, 6:59 p.m. UTC
Removal of the legacy DataFlash code turned genimg_get_image() into a
no-op. Drop all calls to it and the function itself.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
---
 common/bootm.c     |  3 ---
 common/image-fdt.c |  3 ---
 common/image.c     | 27 ---------------------------
 include/image.h    |  1 -
 4 files changed, 34 deletions(-)

Comments

Tom Rini Oct. 17, 2017, 12:47 a.m. UTC | #1
On Tue, Oct 10, 2017 at 09:59:43PM +0300, Tuomas Tynkkynen wrote:

> Removal of the legacy DataFlash code turned genimg_get_image() into a
> no-op. Drop all calls to it and the function itself.
> 
> Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/common/bootm.c b/common/bootm.c
index 32b3ea8e2d..9493a306cd 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -810,9 +810,6 @@  static const void *boot_get_kernel(cmd_tbl_t *cmdtp, int flag, int argc,
 
 	bootstage_mark(BOOTSTAGE_ID_CHECK_MAGIC);
 
-	/* copy from dataflash if needed */
-	img_addr = genimg_get_image(img_addr);
-
 	/* check image type, for FIT images get FIT kernel node */
 	*os_data = *os_len = 0;
 	buf = map_sysmem(img_addr, 0);
diff --git a/common/image-fdt.c b/common/image-fdt.c
index a2ef409836..1e946467e3 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -294,9 +294,6 @@  int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
 		debug("## Checking for 'FDT'/'FDT Image' at %08lx\n",
 		      fdt_addr);
 
-		/* copy from dataflash if needed */
-		fdt_addr = genimg_get_image(fdt_addr);
-
 		/*
 		 * Check if there is an FDT image at the
 		 * address provided in the second bootm argument
diff --git a/common/image.c b/common/image.c
index 01f48bf772..06fdca129c 100644
--- a/common/image.c
+++ b/common/image.c
@@ -385,9 +385,6 @@  void image_print_contents(const void *ptr)
  * flag. Verification done covers data and header integrity and os/type/arch
  * fields checking.
  *
- * If dataflash support is enabled routine checks for dataflash addresses
- * and handles required dataflash reads.
- *
  * returns:
  *     pointer to a ramdisk image header, if image was found and valid
  *     otherwise, return NULL
@@ -885,23 +882,6 @@  int genimg_get_format(const void *img_addr)
 	return IMAGE_FORMAT_INVALID;
 }
 
-/**
- * genimg_get_image - get image from special storage (if necessary)
- * @img_addr: image start address
- *
- * genimg_get_image() checks if provided image start address is located
- * in a dataflash storage. If so, image is moved to a system RAM memory.
- *
- * returns:
- *     image start address after possible relocation from special storage
- */
-ulong genimg_get_image(ulong img_addr)
-{
-	ulong ram_addr = img_addr;
-
-	return ram_addr;
-}
-
 /**
  * fit_has_config - check if there is a valid FIT configuration
  * @images: pointer to the bootm command headers structure
@@ -1034,9 +1014,6 @@  int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images,
 		}
 #endif
 
-		/* copy from dataflash if needed */
-		rd_addr = genimg_get_image(rd_addr);
-
 		/*
 		 * Check if there is an initrd image at the
 		 * address provided in the second bootm argument
@@ -1268,10 +1245,8 @@  int boot_get_fpga(int argc, char * const argv[], bootm_headers_t *images,
 
 	/*
 	 * Obtain the os FIT header from the images struct
-	 * copy from dataflash if needed
 	 */
 	tmp_img_addr = map_to_sysmem(images->fit_hdr_os);
-	tmp_img_addr = genimg_get_image(tmp_img_addr);
 	buf = map_sysmem(tmp_img_addr, 0);
 	/*
 	 * Check image type. For FIT images get FIT node
@@ -1380,10 +1355,8 @@  int boot_get_loadable(int argc, char * const argv[], bootm_headers_t *images,
 
 	/*
 	 * Obtain the os FIT header from the images struct
-	 * copy from dataflash if needed
 	 */
 	tmp_img_addr = map_to_sysmem(images->fit_hdr_os);
-	tmp_img_addr = genimg_get_image(tmp_img_addr);
 	buf = map_sysmem(tmp_img_addr, 0);
 	/*
 	 * Check image type. For FIT images get FIT node
diff --git a/include/image.h b/include/image.h
index 93451dd8a4..127cfc5148 100644
--- a/include/image.h
+++ b/include/image.h
@@ -558,7 +558,6 @@  ulong genimg_get_kernel_addr_fit(char * const img_addr,
 ulong genimg_get_kernel_addr(char * const img_addr);
 int genimg_get_format(const void *img_addr);
 int genimg_has_config(bootm_headers_t *images);
-ulong genimg_get_image(ulong img_addr);
 
 int boot_get_fpga(int argc, char * const argv[], bootm_headers_t *images,
 		uint8_t arch, const ulong *ld_start, ulong * const ld_len);