1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 14:11:15 +02:00

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>
This commit is contained in:
Victor Ding
2021-07-21 18:01:55 +10:00
committed by Nico Huber
parent e3f55a13ba
commit cce29a4855
9 changed files with 2 additions and 602 deletions

View File

@ -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

View File

@ -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),

View File

@ -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);