summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVictor Ding <victording@google.com>2021-07-21 18:01:55 +1000
committerNico Huber <nico.h@gmx.de>2021-09-22 13:22:42 +0000
commitcce29a485552052ce922ed1354c26674884a7857 (patch)
treee789faf74f58a126007ee532ae939963d8c97325 /tests
parente3f55a13ba256bf643aa47084db16a98c3fe60e6 (diff)
downloadflashrom-cce29a485552052ce922ed1354c26674884a7857.tar.gz
flashrom-cce29a485552052ce922ed1354c26674884a7857.tar.bz2
flashrom-cce29a485552052ce922ed1354c26674884a7857.zip
mec1308: remove MEC1308 EC 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: I535b6380846734c999474519e9e60a73eb6a2ec4 Reviewed-on: https://review.coreboot.org/c/flashrom/+/56476 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.c44
-rw-r--r--tests/tests.c1
-rw-r--r--tests/tests.h1
3 files changed, 0 insertions, 46 deletions
diff --git a/tests/init_shutdown.c b/tests/init_shutdown.c
index d5c951be0..90bde1e3c 100644
--- a/tests/init_shutdown.c
+++ b/tests/init_shutdown.c
@@ -47,50 +47,6 @@ void dummy_init_and_shutdown_test_success(void **state)
#endif
}
-struct mec1308_io_state {
- unsigned char outb_val;
-};
-
-void mec1308_outb(void *state, unsigned char value, unsigned short port)
-{
- struct mec1308_io_state *io_state = state;
-
- io_state->outb_val = value;
-}
-
-unsigned char mec1308_inb(void *state, unsigned short port)
-{
- struct mec1308_io_state *io_state = state;
-
- return ((port == 0x2e /* MEC1308_SIO_PORT1 */
- || port == 0x4e /* MEC1308_SIO_PORT2 */)
- ? 0x20 /* MEC1308_DEVICE_ID_REG */
- : ((io_state->outb_val == 0x84 /* MEC1308_MBX_DATA_START */)
- ? 0xaa /* MEC1308_CMD_PASSTHRU_SUCCESS */
- : 0));
-}
-
-void mec1308_init_and_shutdown_test_success(void **state)
-{
-#if CONFIG_MEC1308 == 1
- struct mec1308_io_state mec1308_io_state = { 0 };
- const struct io_mock mec1308_io = {
- .state = &mec1308_io_state,
- .outb = mec1308_outb,
- .inb = mec1308_inb,
- };
-
- io_mock_register(&mec1308_io);
-
- will_return_always(__wrap_sio_read, 0x4d); /* MEC1308_DEVICE_ID_VAL */
- run_lifecycle(state, &programmer_mec1308, "");
-
- io_mock_register(NULL);
-#else
- skip();
-#endif
-}
-
void nicrealtek_init_and_shutdown_test_success(void **state)
{
#if CONFIG_NICREALTEK == 1
diff --git a/tests/tests.c b/tests/tests.c
index 0611f6e8b..5ca5b66d2 100644
--- a/tests/tests.c
+++ b/tests/tests.c
@@ -336,7 +336,6 @@ int main(void)
const struct CMUnitTest init_shutdown_tests[] = {
cmocka_unit_test(dummy_init_and_shutdown_test_success),
- 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(linux_mtd_init_and_shutdown_test_success),
diff --git a/tests/tests.h b/tests/tests.h
index ef7a399a9..8e1b6da60 100644
--- a/tests/tests.h
+++ b/tests/tests.h
@@ -42,7 +42,6 @@ void probe_spi_st95_test_success(void **state); /* spi95.c */
/* init_shutdown.c */
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 linux_mtd_init_and_shutdown_test_success(void **state);