diff options
author | Aseda Aboagye <aaboagye@google.com> | 2018-06-07 18:00:20 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-06-08 16:14:14 -0700 |
commit | f39c9fb0466ab5729aeba13ec4a52079d561f03b (patch) | |
tree | 89bb1670b6294192801b236bbefc64577b254ebc /power/intel_x86.c | |
parent | 3846871131d40790efcc9467eb3cfa01b859969e (diff) | |
download | chrome-ec-f39c9fb0466ab5729aeba13ec4a52079d561f03b.tar.gz |
power: Add CONFIG_* option for PROCHOT polarity.
The common x86 chipset code assumed that CPU_PROCHOT was active high,
however on some boards it's actually active low. This commit simply
adds a CONFIG_* option, CONFIG_CPU_PROCHOT_IS_ACTIVE_LOW, and inverts
the places where the signal is used.
BUG=b:109882953
BRANCH=poppy
TEST=Enable on nocturne; flash, verify that CPU_PROCHOT is not asserted
by default.
Change-Id: I6d871e4979b79333cf4897d77c995eadbb34fd43
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1092150
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'power/intel_x86.c')
-rw-r--r-- | power/intel_x86.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/power/intel_x86.c b/power/intel_x86.c index 7a2601c8ec..4617c91394 100644 --- a/power/intel_x86.c +++ b/power/intel_x86.c @@ -170,6 +170,9 @@ DECLARE_HOOK(HOOK_CHIPSET_RESET, handle_chipset_reset, HOOK_PRIO_FIRST); void chipset_throttle_cpu(int throttle) { +#ifdef CONFIG_CPU_PROCHOT_ACTIVE_LOW + throttle = !throttle; +#endif /* CONFIG_CPU_PROCHOT_ACTIVE_LOW */ if (chipset_in_state(CHIPSET_STATE_ON)) gpio_set_level(GPIO_CPU_PROCHOT, throttle); } @@ -368,7 +371,11 @@ enum power_state common_intel_x86_power_handle_state(enum power_state state) * Throttle CPU if necessary. This should only be asserted * when +VCCP is powered (it is by now). */ +#ifdef CONFIG_CPU_PROCHOT_ACTIVE_LOW + gpio_set_level(GPIO_CPU_PROCHOT, 1); +#else gpio_set_level(GPIO_CPU_PROCHOT, 0); +#endif /* CONFIG_CPU_PROCHOT_ACTIVE_LOW */ return POWER_S0; |