From be5e7851b8755aad9c63086a853bd72175158b85 Mon Sep 17 00:00:00 2001 From: Yu-Ping Wu Date: Thu, 23 Jun 2022 10:23:29 +0800 Subject: ec/google/chromeec: Remove google_chromeec_vbnv_context() With CB:65012, google_chromeec_vbnv_context() is no longer used. Remove it from the codebase. BUG=b:178689388 TEST=./util/abuild/abuild -t GOOGLE_STOUT -a -x Change-Id: I717f600f0f73c3ca932b6a442a9d5b90c35c8f3b Signed-off-by: Yu-Ping Wu Reviewed-on: https://review.coreboot.org/c/coreboot/+/65326 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/ec/google/chromeec/ec.c | 39 --------------------------------------- src/ec/google/chromeec/ec.h | 1 - 2 files changed, 40 deletions(-) (limited to 'src') diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c index 5d5392609f..b0b4de7d45 100644 --- a/src/ec/google/chromeec/ec.c +++ b/src/ec/google/chromeec/ec.c @@ -949,45 +949,6 @@ uint32_t google_chromeec_get_sku_id(void) return resp.sku_id; } -int google_chromeec_vbnv_context(int is_read, uint8_t *data, int len) -{ - struct ec_params_vbnvcontext params = { - .op = is_read ? EC_VBNV_CONTEXT_OP_READ : - EC_VBNV_CONTEXT_OP_WRITE, - }; - struct ec_response_vbnvcontext resp = {}; - struct chromeec_command cmd = { - .cmd_code = EC_CMD_VBNV_CONTEXT, - .cmd_version = EC_VER_VBNV_CONTEXT, - .cmd_data_in = ¶ms, - .cmd_data_out = &resp, - .cmd_size_in = sizeof(params), - .cmd_size_out = is_read ? sizeof(resp) : 0, - .cmd_dev_index = 0, - }; - int retries = 3; - - if (len != EC_VBNV_BLOCK_SIZE) - return -1; - - if (!is_read) - memcpy(¶ms.block, data, EC_VBNV_BLOCK_SIZE); -retry: - - if (google_chromeec_command(&cmd)) { - printk(BIOS_ERR, "failed to %s vbnv_ec context: %d\n", - is_read ? "read" : "write", (int)cmd.cmd_code); - mdelay(10); /* just in case */ - if (--retries) - goto retry; - } - - if (is_read) - memcpy(data, &resp.block, EC_VBNV_BLOCK_SIZE); - - return cmd.cmd_code; -} - static uint16_t google_chromeec_get_uptime_info( struct ec_response_uptime_info *resp) { diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h index 131a46067e..821eaa3b34 100644 --- a/src/ec/google/chromeec/ec.h +++ b/src/ec/google/chromeec/ec.h @@ -77,7 +77,6 @@ uint64_t google_chromeec_get_events_b(void); int google_chromeec_clear_events_b(uint64_t mask); int google_chromeec_kbbacklight(int percent); void google_chromeec_post(uint8_t postcode); -int google_chromeec_vbnv_context(int is_read, uint8_t *data, int len); uint8_t google_chromeec_get_switches(void); bool google_chromeec_get_ap_watchdog_flag(void); -- cgit v1.2.3