diff options
author | Duncan Laurie <dlaurie@chromium.org> | 2013-08-19 15:55:02 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-08-19 16:27:34 -0700 |
commit | 6f83d4b1f484ca7e1fe2ebd3af844dc86697df7c (patch) | |
tree | c808b53186b9dd44b60e895f0129fae75d2c636e | |
parent | 495192cee9b615c033e4553a2c9f67b6bec8c9a0 (diff) | |
download | chrome-ec-6f83d4b1f484ca7e1fe2ebd3af844dc86697df7c.tar.gz |
falco: Use PROCHOT to throttle instead of asking host nicely
Rather than trying to be graceful when throttling just use
the big PROCHOT hammer.
The chipset_throttle_cpu() function is implemented and the
falco specific charger code now calls this instead of the
host_throttle_cpu() function.
BUG=chrome-os-partner:20739
BRANCH=falco
TEST=manual: emerge-falco chromeos-ec
Change-Id: I2fb80e3b346d700a86f531da23699e5fa37ba881
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/66258
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r-- | common/chipset_haswell.c | 8 | ||||
-rw-r--r-- | common/extpower_falco.c | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/common/chipset_haswell.c b/common/chipset_haswell.c index f4417ce2a1..49428ff52f 100644 --- a/common/chipset_haswell.c +++ b/common/chipset_haswell.c @@ -105,7 +105,13 @@ void chipset_reset(int cold_reset) void chipset_throttle_cpu(int throttle) { - /* FIXME CPRINTF("[%T %s(%d)]\n", __func__, throttle);*/ + if (throttle_cpu != throttle) + CPRINTF("[%T %s(%d)]\n", __func__, throttle); + throttle_cpu = throttle; + + /* Immediately set throttling if CPU is on */ + if (chipset_in_state(CHIPSET_STATE_ON)) + gpio_set_level(GPIO_CPU_PROCHOT, throttle); } enum x86_state x86_chipset_init(void) diff --git a/common/extpower_falco.c b/common/extpower_falco.c index d7f1509a3a..51f0f1c28d 100644 --- a/common/extpower_falco.c +++ b/common/extpower_falco.c @@ -188,7 +188,8 @@ bad: test_export_static int ap_is_throttled; static void set_throttle(int on) { - host_throttle_cpu(on); + /* Use the big ugly PROCHOT hammer to throttle the CPU */ + chipset_throttle_cpu(on); ap_is_throttled = on; } |