diff options
author | Victor Ding <victording@google.com> | 2021-07-21 17:37:12 +1000 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2021-09-22 13:22:21 +0000 |
commit | e3f55a13ba256bf643aa47084db16a98c3fe60e6 (patch) | |
tree | a39e1c8324c10fe861243331391607f034640aad /tests | |
parent | bbe9a77343952e50015468dfc67f141f5ed4a4a3 (diff) | |
download | flashrom-e3f55a13ba256bf643aa47084db16a98c3fe60e6.tar.gz flashrom-e3f55a13ba256bf643aa47084db16a98c3fe60e6.tar.bz2 flashrom-e3f55a13ba256bf643aa47084db16a98c3fe60e6.zip |
ene_lpc: remove ENE LPC programmer
Best efforts were made to upstream older Chromebook support for good
intentions for folks interested. However, we no longer have the hardware
available to test and maintain the code as the hardware is now end of
life. Therefore the code state has sadly fallen into a unknown state.
BUG=none
BRANCH=none
TEST=builds and ninja test passes
Signed-off-by: Victor Ding <victording@google.com>
Change-Id: I3f40db22c42c04ce029c4defd837e05ebb550c9b
Reviewed-on: https://review.coreboot.org/c/flashrom/+/56475
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/init_shutdown.c | 63 | ||||
-rw-r--r-- | tests/tests.c | 1 | ||||
-rw-r--r-- | tests/tests.h | 1 |
3 files changed, 0 insertions, 65 deletions
diff --git a/tests/init_shutdown.c b/tests/init_shutdown.c index 3236b22c..d5c951be 100644 --- a/tests/init_shutdown.c +++ b/tests/init_shutdown.c @@ -134,69 +134,6 @@ void dediprog_init_and_shutdown_test_success(void **state) #endif } -struct ene_lpc_io_state { - unsigned char outb_val; - int pause_cmd; -}; - -void ene_lpc_outb_kb932(void *state, unsigned char value, unsigned short port) -{ - struct ene_lpc_io_state *io_state = state; - - io_state->outb_val = value; - if (value == 0x59 /* ENE_KB932.ec_pause_cmd */) - io_state->pause_cmd = 1; -} - -unsigned char ene_lpc_inb_kb932(void *state, unsigned short port) -{ - struct ene_lpc_io_state *io_state = state; - unsigned char ene_hwver_offset = 0; /* REG_EC_HWVER & 0xff */ - unsigned char ene_ediid_offset = 0x24; /* REG_EC_EDIID & 0xff */ - unsigned char ec_status_buf_offset = 0x54; /* ENE_KB932.ec_status_buf & 0xff */ - - if (port == 0xfd63 /* ENE_KB932.port_io_base + port_ene_data */) { - if (io_state->outb_val == ene_hwver_offset) - return 0xa2; /* ENE_KB932.hwver */ - if (io_state->outb_val == ene_ediid_offset) - return 0x02; /* ENE_KB932.ediid */ - if (io_state->outb_val == ec_status_buf_offset) { - if (io_state->pause_cmd == 1) { - io_state->pause_cmd = 0; - return 0x33; /* ENE_KB932.ec_is_pausing mask */ - } else { - return 0x00; /* ENE_KB932.ec_is_running mask */ - } - } - } - - return 0; -} - -void ene_lpc_init_and_shutdown_test_success(void **state) -{ -#if CONFIG_ENE_LPC == 1 - /* - * Current implementation tests for chip ENE_KB932. - * Another chip which is not tested here is ENE_KB94X. - */ - struct ene_lpc_io_state ene_lpc_io_state = { 0, 0 }; - const struct io_mock ene_lpc_io = { - .state = &ene_lpc_io_state, - .outb = ene_lpc_outb_kb932, - .inb = ene_lpc_inb_kb932, - }; - - io_mock_register(&ene_lpc_io); - - run_lifecycle(state, &programmer_ene_lpc, ""); - - io_mock_register(NULL); -#else - skip(); -#endif -} - struct linux_mtd_io_state { char *fopen_path; }; diff --git a/tests/tests.c b/tests/tests.c index 4965fe1c..0611f6e8 100644 --- a/tests/tests.c +++ b/tests/tests.c @@ -339,7 +339,6 @@ int main(void) cmocka_unit_test(mec1308_init_and_shutdown_test_success), cmocka_unit_test(nicrealtek_init_and_shutdown_test_success), cmocka_unit_test(dediprog_init_and_shutdown_test_success), - cmocka_unit_test(ene_lpc_init_and_shutdown_test_success), cmocka_unit_test(linux_mtd_init_and_shutdown_test_success), cmocka_unit_test(linux_spi_init_and_shutdown_test_success), cmocka_unit_test(realtek_mst_init_and_shutdown_test_success), diff --git a/tests/tests.h b/tests/tests.h index df4a41cc..ef7a399a 100644 --- a/tests/tests.h +++ b/tests/tests.h @@ -45,7 +45,6 @@ void dummy_init_and_shutdown_test_success(void **state); void mec1308_init_and_shutdown_test_success(void **state); void nicrealtek_init_and_shutdown_test_success(void **state); void dediprog_init_and_shutdown_test_success(void **state); -void ene_lpc_init_and_shutdown_test_success(void **state); void linux_mtd_init_and_shutdown_test_success(void **state); void linux_spi_init_and_shutdown_test_success(void **state); void realtek_mst_init_and_shutdown_test_success(void **state); |