summaryrefslogtreecommitdiff
path: root/include/host_command.h
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2013-07-31 09:37:58 -0700
committerChromeBot <chrome-bot@google.com>2013-07-31 12:33:31 -0700
commit86bef29c3d1411c5dd9c3717432cd0bebb4fe45f (patch)
tree29061a4eeca21983b7a4fa1a80a55f871b34a724 /include/host_command.h
parentaf777297370e971bd4ae64e0e947cb5a1774dbfe (diff)
downloadchrome-ec-86bef29c3d1411c5dd9c3717432cd0bebb4fe45f.tar.gz
Abstract polite AP throttling into a function
This wraps the EC_HOST_EVENT_THROTTLE_START/STOP host events in a new function called host_throttle_cpu(), similar to chipset_throttle_cpu(). That function requests the AP to throttle itself, which is less drastic than just smacking it down from the EC. BUG=chrome-os-partner:20805 BRANCH=falco,peppy TEST=manual This is a refactoring change only. All boards should still build, all tests should still pass. Change-Id: I871cce8f0e13230cb52eeb5e16955266f8461374 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/63909 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/host_command.h')
-rw-r--r--include/host_command.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/host_command.h b/include/host_command.h
index 4c994463f6..53e088e2e0 100644
--- a/include/host_command.h
+++ b/include/host_command.h
@@ -204,4 +204,12 @@ void host_packet_receive(struct host_packet *pkt);
__attribute__((section(".rodata.hcmds"))) \
= {routine, command, version_mask}
+
+/**
+ * Politely ask the CPU to enable/disable its own throttling.
+ *
+ * @param throttle Enable (!=0) or disable(0) throttling
+ */
+void host_throttle_cpu(int throttle);
+
#endif /* __CROS_EC_HOST_COMMAND_H */