From 9f1a7cffabacdb6022e4579a6229eb5d29e9bcf4 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 9 Jan 2014 14:28:05 -0600 Subject: chromeec: add function to reboot on unexpected image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's helpful to have a generic function that will tell the EC to reboot if the EC isn't running a specified image. Add that and implement google_chromeec_early_init() to utilize the new function still maintaing its semantics of if recvoery mode is enabled the EC should be running its RO image. There is a slight change in that no communication is done with the EC if not in recovery mode. BUG=chrome-os-partner:24133 BRANCH=rambi,squawks TEST=Built and boot with recovery request. Noted EC reboot. Change-Id: I22240f6a11231e39c33fd79796a52ec76b119397 Signed-off-by: Aaron Durbin Reviewed-on: https://chromium-review.googlesource.com/182060 Reviewed-by: Duncan Laurie Reviewed-on: http://review.coreboot.org/5039 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki --- src/ec/google/chromeec/ec.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ec/google/chromeec/ec.h') diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h index a037d0147d..d033bab73a 100644 --- a/src/ec/google/chromeec/ec.h +++ b/src/ec/google/chromeec/ec.h @@ -36,7 +36,10 @@ int google_ec_running_ro(void); void google_chromeec_init(void); #endif +/* If recovery mode is enabled and EC is not running RO firmware reboot. */ void google_chromeec_early_init(void); +/* Reboot if EC firmware is not expected type. */ +void google_chromeec_check_ec_image(int expected_type); 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); -- cgit v1.2.3