Martin L Roth has submitted this change. ( https://review.coreboot.org/c/coreboot/+/69373 )
(
1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: ec/google/chromeec: Deprecate dev_index from google_chromeec_reboot ......................................................................
ec/google/chromeec: Deprecate dev_index from google_chromeec_reboot
This removes the dev_index argument from the google_chromeec_reboot API. It's always set to 0, so don't bother passing it.
BUG=b:258126464 BRANCH=none TEST=none
Change-Id: Iadc3d7c6c1e048e4b1ab8f8cec3cb8eb8db38e6a Signed-off-by: Caveh Jalali caveh@chromium.org Reviewed-on: https://review.coreboot.org/c/coreboot/+/69373 Reviewed-by: Yu-Ping Wu yupingso@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/ec/google/chromeec/ec.c M src/ec/google/chromeec/ec.h M src/mainboard/google/herobrine/reset.c M src/mainboard/google/trogdor/reset.c M src/security/vboot/ec_sync.c 5 files changed, 29 insertions(+), 9 deletions(-)
Approvals: build bot (Jenkins): Verified Yu-Ping Wu: Looks good to me, approved
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c index 9c78404..646dd29 100644 --- a/src/ec/google/chromeec/ec.c +++ b/src/ec/google/chromeec/ec.c @@ -790,7 +790,7 @@ } #endif
-int google_chromeec_reboot(int dev_idx, enum ec_reboot_cmd type, uint8_t flags) +int google_chromeec_reboot(enum ec_reboot_cmd type, uint8_t flags) { struct ec_params_reboot_ec params = { .cmd = type, @@ -804,7 +804,7 @@ .cmd_data_out = &resp, .cmd_size_in = sizeof(params), .cmd_size_out = 0, /* ignore response, if any */ - .cmd_dev_index = dev_idx, + .cmd_dev_index = 0, };
return google_chromeec_command(&cmd); diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h index 821eaa3..4232660 100644 --- a/src/ec/google/chromeec/ec.h +++ b/src/ec/google/chromeec/ec.h @@ -88,7 +88,7 @@
/* Issue reboot command to EC with specified type and flags. Returns 0 on success, < 0 otherwise. */ -int google_chromeec_reboot(int dev_idx, enum ec_reboot_cmd type, uint8_t flags); +int google_chromeec_reboot(enum ec_reboot_cmd type, uint8_t flags);
/** * Get data from Cros Board Info diff --git a/src/mainboard/google/herobrine/reset.c b/src/mainboard/google/herobrine/reset.c index 9b5810f..d64c650 100644 --- a/src/mainboard/google/herobrine/reset.c +++ b/src/mainboard/google/herobrine/reset.c @@ -7,5 +7,5 @@ but this works well enough for our purposes. */ void do_board_reset(void) { - google_chromeec_reboot(0, EC_REBOOT_COLD, 0); + google_chromeec_reboot(EC_REBOOT_COLD, 0); } diff --git a/src/mainboard/google/trogdor/reset.c b/src/mainboard/google/trogdor/reset.c index 9b5810f..d64c650 100644 --- a/src/mainboard/google/trogdor/reset.c +++ b/src/mainboard/google/trogdor/reset.c @@ -7,5 +7,5 @@ but this works well enough for our purposes. */ void do_board_reset(void) { - google_chromeec_reboot(0, EC_REBOOT_COLD, 0); + google_chromeec_reboot(EC_REBOOT_COLD, 0); } diff --git a/src/security/vboot/ec_sync.c b/src/security/vboot/ec_sync.c index b3b17dd..47a6dbd 100644 --- a/src/security/vboot/ec_sync.c +++ b/src/security/vboot/ec_sync.c @@ -56,7 +56,7 @@
case VB2_REQUEST_REBOOT_EC_TO_RO: printk(BIOS_INFO, "EC Reboot requested. Doing cold reboot\n"); - if (google_chromeec_reboot(0, EC_REBOOT_COLD, 0)) + if (google_chromeec_reboot(EC_REBOOT_COLD, 0)) printk(BIOS_EMERG, "Failed to get EC to cold reboot\n");
halt(); @@ -65,7 +65,7 @@ /* Only for EC-EFS */ case VB2_REQUEST_REBOOT_EC_SWITCH_RW: printk(BIOS_INFO, "Switch EC slot requested. Doing cold reboot\n"); - if (google_chromeec_reboot(0, EC_REBOOT_COLD, + if (google_chromeec_reboot(EC_REBOOT_COLD, EC_REBOOT_FLAG_SWITCH_RW_SLOT)) printk(BIOS_EMERG, "Failed to get EC to cold reboot\n");
@@ -510,7 +510,7 @@ */ vb2_error_t vb2ex_ec_disable_jump(void) { - if (google_chromeec_reboot(0, EC_REBOOT_DISABLE_JUMP, 0)) + if (google_chromeec_reboot(EC_REBOOT_DISABLE_JUMP, 0)) return VB2_ERROR_UNKNOWN;
return VB2_SUCCESS; @@ -531,7 +531,7 @@ { struct stopwatch sw;
- if (google_chromeec_reboot(0, EC_REBOOT_JUMP_RW, 0)) + if (google_chromeec_reboot(EC_REBOOT_JUMP_RW, 0)) return VB2_ERROR_UNKNOWN;
/* Give the EC 3 seconds to sysjump */