From 86bef29c3d1411c5dd9c3717432cd0bebb4fe45f Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Wed, 31 Jul 2013 09:37:58 -0700 Subject: 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 Reviewed-on: https://gerrit.chromium.org/gerrit/63909 Reviewed-by: Randall Spangler --- include/host_command.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/host_command.h') 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 */ -- cgit v1.2.1