summaryrefslogtreecommitdiff
path: root/src/ec/google/chromeec/ec.h
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2017-05-04 12:32:52 -0500
committerAaron Durbin <adurbin@chromium.org>2017-05-05 23:23:58 +0200
commite68d22fbbc8bd1e2644e3fb75ec76b356502604a (patch)
tree904b963756776781554da50b36f33a6705188d8e /src/ec/google/chromeec/ec.h
parent44526cd1fc06f1a037fc74053db6ab6c7866d20e (diff)
ec/google/chromeec: provide reboot function
Provide a common function to issue reboot commands to the EC. Expose that function for external use and use it internal to the module. BUG=b:35580805 Change-Id: I1458bd7119b0df626a043ff3806c15ffb5446c9a Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/19573 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'src/ec/google/chromeec/ec.h')
-rw-r--r--src/ec/google/chromeec/ec.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h
index 71cea7ea8a..4a45f7f4ab 100644
--- a/src/ec/google/chromeec/ec.h
+++ b/src/ec/google/chromeec/ec.h
@@ -57,6 +57,10 @@ int google_chromeec_vstore_info(uint32_t *locked);
int google_chromeec_vstore_read(int slot, uint8_t *data);
int google_chromeec_vstore_write(int slot, uint8_t *data, size_t size);
+/* 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);
+
/* MEC uses 0x800/0x804 as register/index pair, thus an 8-byte resource. */
#define MEC_EMI_BASE 0x800
#define MEC_EMI_SIZE 8