mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-29 07:53:44 +02:00
dediprog: Reimplement target chip option
Change-Id: I594e2a6ee144260f8424d25b304f6ab41a9d3fad Signed-off-by: Nico Huber <nico.huber@secunet.com> Acked-by: David Hendricks <david.hendricks@gmail.com> Reviewed-on: https://review.coreboot.org/19350 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
parent
cd8329f804
commit
5e5e8213bb
17
dediprog.c
17
dediprog.c
@ -942,7 +942,7 @@ int dediprog_init(void)
|
|||||||
int spispeed_idx = 1;
|
int spispeed_idx = 1;
|
||||||
int millivolt = 3500;
|
int millivolt = 3500;
|
||||||
long usedevice = 0;
|
long usedevice = 0;
|
||||||
long target = 1;
|
long target = FLASH_TYPE_APPLICATION_FLASH_1;
|
||||||
int i, ret;
|
int i, ret;
|
||||||
|
|
||||||
spispeed = extract_programmer_param("spispeed");
|
spispeed = extract_programmer_param("spispeed");
|
||||||
@ -1014,7 +1014,18 @@ int dediprog_init(void)
|
|||||||
free(target_str);
|
free(target_str);
|
||||||
return 1;
|
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);
|
free(target_str);
|
||||||
|
|
||||||
@ -1073,7 +1084,7 @@ int dediprog_init(void)
|
|||||||
dediprog_set_leds(LED_ALL);
|
dediprog_set_leds(LED_ALL);
|
||||||
|
|
||||||
/* Select target/socket, frequency and VCC. */
|
/* 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_speed(spispeed_idx) ||
|
||||||
dediprog_set_spi_voltage(millivolt)) {
|
dediprog_set_spi_voltage(millivolt)) {
|
||||||
dediprog_set_leds(LED_ERROR);
|
dediprog_set_leds(LED_ERROR);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user