mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-03 23:13:18 +02:00
libflashrom: Deprecate probing v1 API
flashrom_flash_probe marked as deprecated and existing tests are updated to use probing v2 API Change-Id: I88f78ac0c93ce99a555b42f87aa0a695089e0b3f Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/88202 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
This commit is contained in:
@ -15,25 +15,6 @@
|
||||
|
||||
#include "lifecycle.h"
|
||||
|
||||
static void probe_chip(const struct programmer_entry *prog,
|
||||
struct flashrom_programmer *flashprog,
|
||||
const char *const chip_name,
|
||||
const char **expected_matched_names, /* unused in probe v1 */
|
||||
unsigned int expected_matched_count /* unused in probe v1 */)
|
||||
{
|
||||
struct flashrom_flashctx *flashctx;
|
||||
|
||||
printf("Testing flashrom_flash_probe for programmer=%s, chip=%s ... \n", prog->name, chip_name);
|
||||
|
||||
assert_int_equal(0, flashrom_flash_probe(&flashctx, flashprog, chip_name));
|
||||
if (chip_name)
|
||||
assert_int_equal(0, strcmp(chip_name, flashctx->chip->name));
|
||||
|
||||
printf("... flashrom_flash_probe for programmer=%s successful\n", prog->name);
|
||||
|
||||
flashrom_flash_release(flashctx); /* cleanup */
|
||||
}
|
||||
|
||||
static void probe_chip_v2(const struct programmer_entry *prog,
|
||||
struct flashrom_programmer *flashprog,
|
||||
const char *const chip_name,
|
||||
@ -103,16 +84,6 @@ void run_basic_lifecycle(void **state, const struct io_mock *io,
|
||||
NULL /* action */);
|
||||
}
|
||||
|
||||
void run_probe_lifecycle(void **state, const struct io_mock *io,
|
||||
const struct programmer_entry *prog, const char *param, const char *const chip_name)
|
||||
{
|
||||
/* Each probe lifecycle should run independently, without cache. */
|
||||
clear_spi_id_cache();
|
||||
run_lifecycle(state, io, prog, param, chip_name,
|
||||
NULL /* expected_matched_names, */, 0 /* expected_matched_count, */,
|
||||
&probe_chip);
|
||||
}
|
||||
|
||||
void run_probe_v2_lifecycle(void **state, const struct io_mock *io,
|
||||
const struct programmer_entry *prog, const char *param,
|
||||
const char *const chip_name,
|
||||
|
Reference in New Issue
Block a user