diff options
author | Namyoon Woo <namyoon@chromium.org> | 2020-02-07 15:30:14 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-13 23:06:10 +0000 |
commit | 4b22d02961ad266d588d31c2324a19f8ef650558 (patch) | |
tree | 6340c2e593cc0009eec6ac8d231e4cb2f15fbc7c /chip | |
parent | 085ab4d4603f7c1fd402adae6a8f10e8b569df81 (diff) | |
download | chrome-ec-4b22d02961ad266d588d31c2324a19f8ef650558.tar.gz |
use gpio_set_wakepin() to enable or disable wake pins
This uses gpio_set_wakepin() to setup the wake pins instead of writing
to the PINMUX EXITEN registers directly.
This patch reduces the flash usage by 248 bytes.
BUG=b:35587259
BRANCH=cr50
TEST=checked pinmux configuration hasn't changed on coral.
Checked firmware_Cr50DeviceState running good on coral.
Change-Id: Ic4ef1751e34b85ea2719f257ebd9b7ad52355eec
Signed-off-by: Namyoon Woo <namyoon@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2047923
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/g/sps.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/chip/g/sps.c b/chip/g/sps.c index 7f8b81de9b..b64e1d1a7b 100644 --- a/chip/g/sps.c +++ b/chip/g/sps.c @@ -255,10 +255,8 @@ static void sps_init(void) GWRITE_FIELD(PINMUX, DIOA10_CTL, IE, 0); /* SPS_MISO */ GWRITE_FIELD(PINMUX, DIOA12_CTL, IE, 1); /* SPS_CS_L */ - /* Allow SPS_CS_L to wake from sleep */ - GWRITE_FIELD(PINMUX, EXITEN0, DIOA12, 1); /* enable powerdown exit */ - GWRITE_FIELD(PINMUX, EXITEDGE0, DIOA12, 1); /* edge sensitive */ - GWRITE_FIELD(PINMUX, EXITINV0, DIOA12, 1); /* wake on low */ + /* Configure the SPS_CS_L signal, DIOA12, as wake falling */ + gpio_set_wakepin(GPIO_STRAP_B1, GPIO_HIB_WAKE_FALLING); } DECLARE_HOOK(HOOK_INIT, sps_init, HOOK_PRIO_DEFAULT); |