amdfwtool: Remove the option --list which nobody uses

It was used for printing the dependencies which is now taken by macro
DEP_FILES in soc/amd/common/Makefile.inc.

TEST=binary identical test on google/guybrush amd/chausie

Change-Id: I1b86df2cb2ed178cf0a263c50ccb3e2254a3852b
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73627
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c
index 1c7f6dc..ac5aa19 100644
--- a/util/amdfwtool/amdfwtool.c
+++ b/util/amdfwtool/amdfwtool.c
@@ -251,7 +251,6 @@
 	printf("\nGeneral options:\n");
 	printf("-c|--config <config file>      Config file\n");
 	printf("-d|--debug                     Print debug message\n");
-	printf("-l|--list                      List out the firmware files\n");
 	printf("-h|--help                      Show this help\n");
 }
 
@@ -1817,7 +1816,6 @@
 	AMDFW_OPT_CONFIG =	'c',
 	AMDFW_OPT_DEBUG =	'd',
 	AMDFW_OPT_HELP =	'h',
-	AMDFW_OPT_LIST_DEPEND =	'l',
 
 	AMDFW_OPT_XHCI = 128,
 	AMDFW_OPT_IMC,
@@ -1870,7 +1868,7 @@
 };
 
 static char const optstring[] = {AMDFW_OPT_CONFIG, ':',
-	AMDFW_OPT_DEBUG, AMDFW_OPT_HELP, AMDFW_OPT_LIST_DEPEND
+	AMDFW_OPT_DEBUG, AMDFW_OPT_HELP
 };
 
 static struct option long_options[] = {
@@ -1927,7 +1925,6 @@
 	{"config",           required_argument, 0, AMDFW_OPT_CONFIG },
 	{"debug",            no_argument,       0, AMDFW_OPT_DEBUG },
 	{"help",             no_argument,       0, AMDFW_OPT_HELP },
-	{"list",             no_argument,       0, AMDFW_OPT_LIST_DEPEND },
 	{NULL,               0,                 0,  0  }
 };
 
@@ -2157,7 +2154,7 @@
 	return bytes;
 }
 
-void open_process_config(char *config, amd_cb_config *cb_config, int list_deps, int debug)
+void open_process_config(char *config, amd_cb_config *cb_config, int debug)
 {
 	FILE *config_handle;
 
@@ -2168,7 +2165,7 @@
 				config, strerror(errno));
 			exit(1);
 		}
-		if (process_config(config_handle, cb_config, list_deps) == 0) {
+		if (process_config(config_handle, cb_config) == 0) {
 			fprintf(stderr, "Configuration file %s parsing error\n",
 					config);
 			fclose(config_handle);
@@ -2215,7 +2212,6 @@
 
 	amd_cb_config cb_config = { 0 };
 	int debug = 0;
-	int list_deps = 0;
 
 	ctx.current_pointer_saved = 0xFFFFFFFF;
 
@@ -2432,9 +2428,6 @@
 		case AMDFW_OPT_HELP:
 			usage();
 			return 0;
-		case AMDFW_OPT_LIST_DEPEND:
-			list_deps = 1;
-			break;
 		case AMDFW_OPT_BODY_LOCATION:
 			body_location = (uint32_t)strtoul(optarg, &tmp, 16);
 			if (*tmp != '\0') {
@@ -2449,23 +2442,23 @@
 		}
 	}
 
-	open_process_config(config, &cb_config, list_deps, debug);
+	open_process_config(config, &cb_config, debug);
 
 	if (!fuse_defined)
 		register_fw_fuse(DEFAULT_SOFT_FUSE_CHAIN);
 
-	if (!output && !list_deps) {
+	if (!output) {
 		fprintf(stderr, "Error: Output value is not specified.\n\n");
 		retval = 1;
 	}
 
-	if ((ctx.rom_size % 1024 != 0)  && !list_deps) {
+	if ((ctx.rom_size % 1024 != 0)) {
 		fprintf(stderr, "Error: ROM Size (%d bytes) should be a multiple of"
 			" 1024 bytes.\n\n", ctx.rom_size);
 		retval = 1;
 	}
 
-	if ((ctx.rom_size < MIN_ROM_KB * 1024)  && !list_deps) {
+	if ((ctx.rom_size < MIN_ROM_KB * 1024)) {
 		fprintf(stderr, "Error: ROM Size (%dKB) must be at least %dKB.\n\n",
 			ctx.rom_size / 1024, MIN_ROM_KB);
 		retval = 1;
@@ -2476,10 +2469,6 @@
 		return retval;
 	}
 
-	if (list_deps) {
-		return retval;
-	}
-
 	printf("    AMDFWTOOL  Using ROM size of %dKB\n", ctx.rom_size / 1024);
 
 	rom_base_address = 0xFFFFFFFF - ctx.rom_size + 1;
@@ -2636,7 +2625,7 @@
 		 */
 		if (cb_config.use_combo && combo_index > 0) {
 			open_process_config(combo_config[combo_index], &cb_config,
-				list_deps, debug);
+				debug);
 
 			/* In most cases, the address modes are same. */
 			if (cb_config.need_ish)
diff --git a/util/amdfwtool/amdfwtool.h b/util/amdfwtool/amdfwtool.h
index 42a2c1d..2dc25a2 100644
--- a/util/amdfwtool/amdfwtool.h
+++ b/util/amdfwtool/amdfwtool.h
@@ -409,7 +409,7 @@
 } amd_cb_config;
 
 void register_fw_fuse(char *str);
-uint8_t process_config(FILE *config, amd_cb_config *cb_config, uint8_t print_deps);
+uint8_t process_config(FILE *config, amd_cb_config *cb_config);
 
 #define OK 0
 
diff --git a/util/amdfwtool/data_parse.c b/util/amdfwtool/data_parse.c
index 8b6ecb70..aa4732f 100644
--- a/util/amdfwtool/data_parse.c
+++ b/util/amdfwtool/data_parse.c
@@ -643,7 +643,7 @@
 }
 
 static uint8_t process_one_line(char *oneline, regmatch_t *match, char *dir,
-	uint8_t print_deps, amd_cb_config *cb_config)
+	amd_cb_config *cb_config)
 {
 	char *path_filename, *fn = &(oneline[match[2].rm_so]);
 	char *fw_type_str = &(oneline[match[1].rm_so]);
@@ -664,13 +664,7 @@
 				fw_type_str, path_filename, ch_lvl, cb_config) == 0) {
 			fprintf(stderr, "Module's name \"%s\" is not valid\n", fw_type_str);
 			return 0; /* Stop parsing. */
-		} else {
-			if (print_deps)
-				printf(" %s ", path_filename);
 		}
-	} else {
-		if (print_deps)
-			printf(" %s ", path_filename);
 	}
 	return 1;
 }
@@ -710,7 +704,7 @@
 	0: The config file can not be parsed correctly.
 	1: The config file can be parsed correctly.
  */
-uint8_t process_config(FILE *config, amd_cb_config *cb_config, uint8_t print_deps)
+uint8_t process_config(FILE *config, amd_cb_config *cb_config)
 {
 	char oneline[MAX_LINE_SIZE];
 	regmatch_t match[N_MATCHES];
@@ -776,7 +770,7 @@
 				strcmp(&(oneline[match[1].rm_so]), "SOC_NAME") == 0) {
 				continue;
 			} else {
-				if (process_one_line(oneline, match, dir, print_deps,
+				if (process_one_line(oneline, match, dir,
 						cb_config) == 0)
 					return 0;
 			}