mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 15:12:36 +02:00
cli_classic: Use flashrom_init() from API
flashrom_init() already does delay calibration and self-checking via the canonical libflashrom API. Port the cli implementation to go via the libflashrom API entry-point natively. BUG=b:208132085 TEST=```sudo ./flashrom -p internal --flash-size <snip> Found Programmer flash chip "Opaque flash chip" (16384 kB, Programmer-specific) mapped at physical address 0x0000000000000000. 16777216 ``` Change-Id: I07faeed876f678c35355621a080c7852eed16824 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/61582 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
f79618d535
commit
2740a52dbd
@ -350,7 +350,8 @@ int main(int argc, char *argv[])
|
|||||||
print_version();
|
print_version();
|
||||||
print_banner();
|
print_banner();
|
||||||
|
|
||||||
if (selfcheck())
|
/* FIXME: Delay calibration should happen in programmer code. */
|
||||||
|
if (flashrom_init(1))
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
setbuf(stdout, NULL);
|
setbuf(stdout, NULL);
|
||||||
@ -661,9 +662,6 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: Delay calibration should happen in programmer code. */
|
|
||||||
myusec_calibrate_delay();
|
|
||||||
|
|
||||||
if (programmer_init(prog, pparam)) {
|
if (programmer_init(prog, pparam)) {
|
||||||
msg_perr("Error: Programmer initialization failed.\n");
|
msg_perr("Error: Programmer initialization failed.\n");
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user