Nico Huber has uploaded this change for review.
dediprog: Reimplement target chip option
Original-Change-Id: I594e2a6ee144260f8424d25b304f6ab41a9d3fad
Original-Acked-by: David Hendricks <david.hendricks@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/19350
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Change-Id: I94576967e2892e08295daa829caabace5a367fa0
Signed-off-by: Nico Huber <nico.huber@secunet.com>
---
M dediprog.c
1 file changed, 14 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/80/21780/1
diff --git a/dediprog.c b/dediprog.c
index 019de46..b7276e5 100644
--- a/dediprog.c
+++ b/dediprog.c
@@ -942,7 +942,7 @@
int spispeed_idx = 1;
int millivolt = 3500;
long usedevice = 0;
- long target = 1;
+ long target = FLASH_TYPE_APPLICATION_FLASH_1;
int i, ret;
spispeed = extract_programmer_param("spispeed");
@@ -1014,7 +1014,18 @@
free(target_str);
return 1;
}
- msg_pinfo("Using target %li.\n", target);
+ switch (target) {
+ case 1:
+ msg_pinfo("Using target %s.\n", "FLASH_TYPE_APPLICATION_FLASH_1");
+ target = FLASH_TYPE_APPLICATION_FLASH_1;
+ break;
+ case 2:
+ msg_pinfo("Using target %s.\n", "FLASH_TYPE_APPLICATION_FLASH_2");
+ target = FLASH_TYPE_APPLICATION_FLASH_2;
+ break;
+ default:
+ break;
+ }
}
free(target_str);
@@ -1073,7 +1084,7 @@
dediprog_set_leds(LED_ALL);
/* Select target/socket, frequency and VCC. */
- if (set_target_flash(FLASH_TYPE_APPLICATION_FLASH_1) ||
+ if (set_target_flash(target) ||
dediprog_set_spi_speed(spispeed_idx) ||
dediprog_set_spi_voltage(millivolt)) {
dediprog_set_leds(LED_ERROR);
To view, visit change 21780. To unsubscribe, visit settings.