diff options
author | Bill Richardson <wfrichar@chromium.org> | 2016-04-01 17:09:01 -0700 |
---|---|---|
committer | Bill Richardson <wfrichar@chromium.org> | 2016-04-05 16:54:03 +0000 |
commit | 5aec786f4c698f264c868cef000d88b4d2e43100 (patch) | |
tree | f8fdd7224a5ee7774c91afdabafcf9dcbfdfdc2a /chip/g/idle.c | |
parent | 76850c555626c7b6efb13b02dac10f4635fe5bce (diff) | |
download | chrome-ec-5aec786f4c698f264c868cef000d88b4d2e43100.tar.gz |
Cr50: Specify pinmux wake sources in gpio.inc
This adds (and uses) some additional flags for gpio.inc's
PINMUX() macro, to configure specific pads as wake sources when
the SoC is sleeping.
BUG=chrome-os-partner:49955
BRANCH=none
TEST=make buildall; test on Cr50
The sleep/deep sleep behavior is unchanged. This just replaces
hard-coded wake sources with pads configured in gpio.inc and the
chip/g/sps.c module. Tests from previous CLs still pass.
Change-Id: I6608dc959524f42fd589feb804fa06f29cfd9b9c
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/336838
Reviewed-by: Dominic Rizzo <domrizzo@google.com>
Diffstat (limited to 'chip/g/idle.c')
-rw-r--r-- | chip/g/idle.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/chip/g/idle.c b/chip/g/idle.c index 4c7afe86b1..dc003d3eef 100644 --- a/chip/g/idle.c +++ b/chip/g/idle.c @@ -5,7 +5,7 @@ #include "common.h" #include "console.h" -#include "pmu.h" +#include "registers.h" #include "system.h" #include "task.h" #include "util.h" @@ -52,22 +52,6 @@ static void prepare_to_sleep(void) /* No task switching! */ interrupt_disable(); - /* - * Specify the PINMUX pads that can wake us. - * A1 is UART RX. Idle is high, so wake on low level - * A12 is SPS_CS_L. Also wake on low. - * HEY: Use something in gpio.inc to identify these! - */ - GREG32(PINMUX, EXITEN0) = - GC_PINMUX_EXITEN0_DIOA1_MASK | - GC_PINMUX_EXITEN0_DIOA12_MASK; - - GREG32(PINMUX, EXITEDGE0) = 0; /* level sensitive */ - - GREG32(PINMUX, EXITINV0) = /* low or falling */ - GC_PINMUX_EXITINV0_DIOA1_MASK | - GC_PINMUX_EXITINV0_DIOA12_MASK; - /* Enable all possible internal wake sources */ GR_PMU_EXITPD_MASK = GC_PMU_EXITPD_MASK_PIN_PD_EXIT_MASK | |