diff options
author | Alexandru M Stan <amstan@chromium.org> | 2014-10-20 15:06:12 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-10-21 22:44:26 +0000 |
commit | 5d12e9b41058adda60f86a994c098046be6d86cf (patch) | |
tree | 78ba3fedd0b1f0f45338b4d8a103f934154deb7c | |
parent | 791d98d0b555c8dfd74f8767302502c838030dc5 (diff) | |
download | chrome-ec-5d12e9b41058adda60f86a994c098046be6d86cf.tar.gz |
stm32f0: Pinky: Fix power leak caused by SPI at startup
Seems like we were setting outputs too early during boot, sometimes causing a
power leak. SPI should only turn on power levels more active than S3, not on the
S5->S3 transition.
BUG=chrome-os-partner:32824
BRANCH=None
TEST=Pinky powers on, Scope VCC33_PMUIO and VCC33_IO, note that they're smooth
Change-Id: I05c3622d124c2539222b883b895bc9092c5f0b12
Signed-off-by: Alexandru M Stan <amstan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/224508
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r-- | chip/stm32/spi.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/chip/stm32/spi.c b/chip/stm32/spi.c index 7489701dd1..d8c88ba34f 100644 --- a/chip/stm32/spi.c +++ b/chip/stm32/spi.c @@ -598,7 +598,6 @@ static void spi_chipset_startup(void) enabled = 1; } -DECLARE_HOOK(HOOK_CHIPSET_PRE_INIT, spi_chipset_startup, HOOK_PRIO_DEFAULT); DECLARE_HOOK(HOOK_CHIPSET_RESUME, spi_chipset_startup, HOOK_PRIO_DEFAULT); static void spi_chipset_shutdown(void) @@ -612,7 +611,6 @@ static void spi_chipset_shutdown(void) /* Set SPI pins to inputs so we don't leak power when AP is off */ gpio_config_module(MODULE_SPI, 0); } -DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, spi_chipset_shutdown, HOOK_PRIO_DEFAULT); DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, spi_chipset_shutdown, HOOK_PRIO_DEFAULT); static void spi_init(void) |