flashrom.c: Allow to use select_erase_function() for explicit erase

When we are explicitly called to erase, we simply select every block
that overlaps the given region.

Change-Id: I2085855adb4406fdc6d6e813ea4bd912db13473d
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/72561
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/flashrom.c b/flashrom.c
index 3047017..a2d0e90 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -1082,6 +1082,10 @@
 	struct eraseblock_data *ll = &layout[findex].layout_list[block_num];
 	if (!findex) {
 		if (ll->start_addr <= info->region_end && ll->end_addr >= info->region_start) {
+			if (explicit_erase(info)) {
+				ll->selected = true;
+				return;
+			}
 			const chipoff_t write_start = MAX(info->region_start, ll->start_addr);
 			const chipoff_t write_end   = MIN(info->region_end, ll->end_addr);
 			const chipsize_t write_len  = write_end - write_start + 1;