diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2017-08-31 18:36:17 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-09-07 15:01:05 -0700 |
commit | 0898c7a63a4ccb0f11c1c61bb085d8d062f664ab (patch) | |
tree | 328298c6608da573904a497af5985db7280d686f /board/samus | |
parent | 096ea20ed18095a967e1829b6ae60b13453416be (diff) | |
download | chrome-ec-0898c7a63a4ccb0f11c1c61bb085d8d062f664ab.tar.gz |
cleanup: Remove jtag_pre_init()
Use our newly-created chip_pre_init() for doing JTAG initialization.
BUG=chromium:747629
BRANCH=None
TEST=`make buildall -j`
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: Ic5771895a214a9f1aa9bd289eef576f52adf973f
Reviewed-on: https://chromium-review.googlesource.com/629676
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'board/samus')
-rw-r--r-- | board/samus/board.c | 21 | ||||
-rw-r--r-- | board/samus/board.h | 3 |
2 files changed, 23 insertions, 1 deletions
diff --git a/board/samus/board.c b/board/samus/board.c index 32fef8ff26..37ecbfeee3 100644 --- a/board/samus/board.c +++ b/board/samus/board.c @@ -26,7 +26,6 @@ #include "hooks.h" #include "host_command.h" #include "i2c.h" -#include "jtag.h" #include "keyboard_scan.h" #include "lid_switch.h" #include "lightbar.h" @@ -39,6 +38,7 @@ #include "pwm_chip.h" #include "registers.h" #include "switch.h" +#include "system.h" #include "task.h" #include "temp_sensor.h" #include "temp_sensor_chip.h" @@ -422,3 +422,22 @@ struct motion_sensor_t motion_sensors[] = { }; const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); + +#ifdef CONFIG_LOW_POWER_IDLE +void jtag_interrupt(enum gpio_signal signal) +{ + /* + * This interrupt is the first sign someone is trying to use + * the JTAG. Disable slow speed sleep so that the JTAG action + * can take place. + */ + disable_sleep(SLEEP_MASK_JTAG); + + /* + * Once we get this interrupt, disable it from occurring again + * to avoid repeated interrupts when debugging via JTAG. + */ + gpio_disable_interrupt(GPIO_JTAG_TCK); +} +#endif /* CONFIG_LOW_POWER_IDLE */ + diff --git a/board/samus/board.h b/board/samus/board.h index 82dc062518..26c06b46af 100644 --- a/board/samus/board.h +++ b/board/samus/board.h @@ -198,6 +198,9 @@ void board_reset_pd_mcu(void); /* Backboost detected interrupt */ void bkboost_det_interrupt(enum gpio_signal signal); +/* Interrupt handler for JTAG clock */ +void jtag_interrupt(enum gpio_signal signal); + /* Bit masks for turning on PP5000 rail in G3 */ #define PP5000_IN_G3_AC (1 << 0) #define PP5000_IN_G3_LIGHTBAR (1 << 1) |