mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] scripts: imx-usb-loader: remove unnecessary check
@ 2020-02-13 10:43 Sascha Hauer
  2020-02-13 10:43 ` [PATCH 2/3] scripts: imx-usb-loader: download address is always the header address Sascha Hauer
  2020-02-13 10:43 ` [PATCH 3/3] scripts: imx-usb-loader: dladdr is unused, remove it Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Sascha Hauer @ 2020-02-13 10:43 UTC (permalink / raw)
  To: Barebox List

file_base is the address where the image would be loaded to if we were
not skipping the unused space before the header in the image. I can't
see any reason why this should be higher than the download address.
Drop this superfluous check.

Tested on i.MX51, i.MX53 and i.MX6

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 scripts/imx/imx-usb-loader.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c
index 16df1ec1d5..ebe0eea050 100644
--- a/scripts/imx/imx-usb-loader.c
+++ b/scripts/imx/imx-usb-loader.c
@@ -1401,11 +1401,6 @@ static int do_irom_download(struct usb_work *curr, int verify)
 		dladdr = header_addr;
 	}
 
-	if (file_base > dladdr) {
-		max_length -= (file_base - dladdr);
-		dladdr = file_base;
-	}
-
 	skip = dladdr - file_base;
 
 	image = buf + skip;
-- 
2.25.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-13 10:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 10:43 [PATCH 1/3] scripts: imx-usb-loader: remove unnecessary check Sascha Hauer
2020-02-13 10:43 ` [PATCH 2/3] scripts: imx-usb-loader: download address is always the header address Sascha Hauer
2020-02-13 10:43 ` [PATCH 3/3] scripts: imx-usb-loader: dladdr is unused, remove it Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox