diff options
author | Mary Ruthven <mruthven@chromium.org> | 2016-07-19 11:26:59 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-07-19 16:32:07 -0700 |
commit | 4cedfaab42ff020616a0445a96d13295f798d6ad (patch) | |
tree | 5657410295998c5acd67b92aa3e0f754e205031d | |
parent | 858cba298caa7047a76d477691ef1fcf62a3ac68 (diff) | |
download | chrome-ec-4cedfaab42ff020616a0445a96d13295f798d6ad.tar.gz |
g: initialize rdd based on current cc readings
Call rdd_attach or detach based on the current CC state and initialize
the debug map to the proper state.
BUG=none
BRANCH=none
TEST=reboot cr50 with suzyq plugged in and check ccd is initialized.
reboot cr50 with suzyq disconnected and verify ccd is disabled.
Change-Id: I61eb9f357ee4309030b06225502add4f5e43ac31
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/361596
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r-- | chip/g/rdd.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/chip/g/rdd.c b/chip/g/rdd.c index b2a7c8d9bc..f25405d923 100644 --- a/chip/g/rdd.c +++ b/chip/g/rdd.c @@ -53,11 +53,8 @@ void rdd_init(void) debug_detect = GREAD(RDD, PROG_DEBUG_STATE_MAP); - /* Initialize the detached debug state */ - rdd_detached(); - - /* Make sure the interrupt fires next time debug cable is connected. */ - GWRITE(RDD, PROG_DEBUG_STATE_MAP, debug_detect); + /* Initialize the debug state based on the current cc values */ + rdd_interrupt(); /* Enable RDD interrupts */ task_enable_irq(GC_IRQNUM_RDD0_INTR_DEBUG_STATE_DETECTED_INT); |