diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2021-03-17 18:24:57 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-18 23:18:44 +0000 |
commit | a69dcfa71d60c5c8b4affbc16494577b1a81acf4 (patch) | |
tree | 08e6fd6568c3f1e4eaa8f5fec2080e91ca4c6401 /power | |
parent | ec4d035fd3d0cbf019de1c6a4da269309fa35b4a (diff) | |
download | chrome-ec-a69dcfa71d60c5c8b4affbc16494577b1a81acf4.tar.gz |
power: sc7180: move power signals definition to sc7180 common
Move the SC7180 power signals list from Trogdor baseboard directory to
common code under sc7180.{c,h}. This allows us to include this code
more directly for Zephyr builds, without needing to pull anything out
of the Trogdor baseboard directory.
BUG=b:183054226
BRANCH=none
TEST=make buildall && zmake testall
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I3657e7a1c1ee8b9593574e6f65d07eda1f7ec61c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2774360
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Diffstat (limited to 'power')
-rw-r--r-- | power/common.c | 1 | ||||
-rw-r--r-- | power/sc7180.c | 36 |
2 files changed, 37 insertions, 0 deletions
diff --git a/power/common.c b/power/common.c index 1ea6439563..34b5cd7b57 100644 --- a/power/common.c +++ b/power/common.c @@ -19,6 +19,7 @@ #include "lpc.h" #include "power.h" #include "power/intel_x86.h" +#include "power/sc7180.h" #include "system.h" #include "task.h" #include "timer.h" diff --git a/power/sc7180.c b/power/sc7180.c index c35d484213..81892c2894 100644 --- a/power/sc7180.c +++ b/power/sc7180.c @@ -29,6 +29,7 @@ #include "hooks.h" #include "lid_switch.h" #include "power.h" +#include "power/sc7180.h" #include "power_button.h" #include "system.h" #include "task.h" @@ -36,6 +37,41 @@ #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args) +/* Power signal list. Must match order of enum power_signal. */ +const struct power_signal_info power_signal_list[] = { + [SC7180_AP_RST_ASSERTED] = { + GPIO_AP_RST_L, + POWER_SIGNAL_ACTIVE_LOW | POWER_SIGNAL_DISABLE_AT_BOOT, + "AP_RST_ASSERTED", + }, + [SC7180_PS_HOLD] = { + GPIO_PS_HOLD, + POWER_SIGNAL_ACTIVE_HIGH, + "PS_HOLD", + }, + [SC7180_POWER_GOOD] = { + GPIO_POWER_GOOD, + POWER_SIGNAL_ACTIVE_HIGH, + "POWER_GOOD", + }, + [SC7180_WARM_RESET] = { + GPIO_WARM_RESET_L, + POWER_SIGNAL_ACTIVE_HIGH, + "WARM_RESET_L", + }, + [SC7180_AP_SUSPEND] = { + GPIO_AP_SUSPEND, + POWER_SIGNAL_ACTIVE_HIGH, + "AP_SUSPEND", + }, + [SC7180_DEPRECATED_AP_RST_REQ] = { + GPIO_DEPRECATED_AP_RST_REQ, + POWER_SIGNAL_ACTIVE_HIGH, + "DEPRECATED_AP_RST_REQ", + }, +}; +BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT); + /* Masks for power signals */ #define IN_POWER_GOOD POWER_SIGNAL_MASK(SC7180_POWER_GOOD) #define IN_AP_RST_ASSERTED POWER_SIGNAL_MASK(SC7180_AP_RST_ASSERTED) |