From 85063ee72dda24db2e211f01a567efe1fe6c6fb0 Mon Sep 17 00:00:00 2001 From: Todd Broch Date: Thu, 18 Sep 2014 10:19:43 -0700 Subject: [PATCH] Fixup for coreboot & portability. Removed include for sha1 and just hardcoded the #define for now. BRANCH=none BUG=chrome-os-partner:32108 TEST=manual, can compile EC & BIOS firmware for samus Change-Id: Iab03315041ec9ac12e85ca93f97b80b850c61377 Signed-off-by: Todd Broch Reviewed-on: https://chromium-review.googlesource.com/218809 Reviewed-by: Duncan Laurie Reviewed-by: Alec Berg --- include/ec_commands.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/ec_commands.h b/include/ec_commands.h index 951551769b..552fc5dfc0 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -2,7 +2,6 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#include "sha1.h" /* Host communication command constants for Chrome EC */ @@ -2559,8 +2558,6 @@ struct ec_params_reboot_ec { */ #define EC_CMD_VERSION0 0xdc -#endif /* !__ACPI__ */ - /*****************************************************************************/ /* * PD commands @@ -2639,12 +2636,12 @@ struct ec_params_usb_pd_fw_update { /* Write USB-PD Accessory RW_HASH table entry */ #define EC_CMD_USB_PD_RW_HASH_ENTRY 0x111 - +#define SHA1_DIGEST_SIZE 20 struct ec_params_usb_pd_rw_hash_entry { uint8_t dev_id; union { uint8_t b[SHA1_DIGEST_SIZE]; - uint32_t w[DIV_ROUND_UP(SHA1_DIGEST_SIZE, sizeof(uint32_t))]; + uint32_t w[SHA1_DIGEST_SIZE/4]; } dev_rw_hash; } __packed; @@ -2654,6 +2651,9 @@ struct ec_params_usb_pd_rw_hash_entry { struct ec_params_usb_pd_info_request { uint8_t port; } __packed; + +#endif /* !__ACPI__ */ + /*****************************************************************************/ /* * Passthru commands