aboutsummaryrefslogtreecommitdiff
path: root/src/ec/google/chromeec/ec.h
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2014-09-18 12:54:02 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-04-02 17:27:31 +0200
commitfc0f5175fbf8a60dbc1894484c69d8da246dd671 (patch)
tree2baf86a9935a7c8eff903db5a5b458b74965db04 /src/ec/google/chromeec/ec.h
parent8caa80b84feb421e2e08671d43bb9a8218ad8fa9 (diff)
chromeec: Add commands to check PD image type
Coreboot needs to be able to reboot the PD controller into RO image in recovery mode early in the boot process in order to avoid a lengthy recovery mode boot if it is only done at vboot software sync time. In order to do this a new device index field is added to the command structure which must be initaalized to zero for all EC transactions. This early init and image check code is only used in romstage so include it in the __PRE_RAM__ block. BUG=chrome-os-partner:30079 BRANCH=none TEST=build and boot on samus EVT in recovery mode and see that the PD is rebooted to RO mode early in the boot. Change-Id: Iee60aae4d49b83b4a377b71e41e8109858a90223 Signed-off-by: Stefan Reinauer <reinauer@chromium.org> Original-Commit-Id: b36cf37d9b5a7053ecbd15c748eac84836d413e1 Original-Change-Id: Iebc48709b527d3571618da775c849e1c3fcd6384 Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/218903 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/9204 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/ec/google/chromeec/ec.h')
-rw-r--r--src/ec/google/chromeec/ec.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h
index e0db8c17ee..cdf94dae16 100644
--- a/src/ec/google/chromeec/ec.h
+++ b/src/ec/google/chromeec/ec.h
@@ -36,10 +36,15 @@ int google_ec_running_ro(void);
void google_chromeec_init(void);
#endif
+#ifdef __PRE_RAM__
/* If recovery mode is enabled and EC is not running RO firmware reboot. */
void google_chromeec_early_init(void);
+void google_chromeec_early_pd_init(void);
/* Reboot if EC firmware is not expected type. */
void google_chromeec_check_ec_image(int expected_type);
+void google_chromeec_check_pd_image(int expected_type);
+#endif
+
uint8_t google_chromeec_calc_checksum(const uint8_t *data, int size);
u16 google_chromeec_get_board_version(void);
u32 google_chromeec_get_events_b(void);
@@ -67,6 +72,7 @@ struct chromeec_command {
uint16_t cmd_size_in; /* size of command data */
uint16_t cmd_size_out; /* expected size of command response in,
* actual received size out */
+ int cmd_dev_index;/* device index for passthru */
};
/*