diff loadtools/flmisc.c @ 410:81d387690063

Intel flash: clear SR before programming
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Tue, 17 Jun 2014 03:40:49 +0000
parents 23ab8fe81764
children
line wrap: on
line diff
--- a/loadtools/flmisc.c	Tue Jun 17 03:18:02 2014 +0000
+++ b/loadtools/flmisc.c	Tue Jun 17 03:40:49 2014 +0000
@@ -187,13 +187,13 @@
 	char *targv[4], targ_base[10];
 	int stat;
 
-	if (flash_get_cfi(bank) < 0)
-		return(-1);
 	if (argc != 4) {
 		fprintf(stderr, "usage: %s %s hex-offset hex-data-string\n",
 			argv[0], argv[1]);
 		return(-1);
 	}
+	if (flash_get_cfi(bank) < 0)
+		return(-1);
 	bi = flash_bank_info + bank;
 	sprintf(targ_base, "%lx", (u_long) bi->base_addr);
 	targv[0] = bi->ops->loadagent_setbase_cmd;