diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2015-08-05 16:05:02 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-08-06 18:48:14 +0000 |
commit | a7bf7b9564bf952a229d1cb4bcef5b65be777c93 (patch) | |
tree | c60c4e39afedb95689c75bcaa693d9d504096d34 /board/oak/board.c | |
parent | 1e95466f3a0d022e0a77f55423e0384a9a243224 (diff) | |
download | chrome-ec-a7bf7b9564bf952a229d1cb4bcef5b65be777c93.tar.gz |
mediatek: Fix llama build
The llama AP_RESET GPIO differs in polarity from oak.
BUG=chromium:517250
TEST=`make buildall -j`
BRANCH=None
Change-Id: Id06bf39e758b528d154936a3e8561704fdf4cce9
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/290950
Commit-Queue: Rong Chang <rongchang@chromium.org>
Tested-by: Rong Chang <rongchang@chromium.org>
Diffstat (limited to 'board/oak/board.c')
-rw-r--r-- | board/oak/board.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/board/oak/board.c b/board/oak/board.c index 5468ae61a3..ba7858ffe1 100644 --- a/board/oak/board.c +++ b/board/oak/board.c @@ -27,6 +27,7 @@ #include "registers.h" #include "spi.h" #include "switch.h" +#include "system.h" #include "task.h" #include "temp_sensor.h" #include "temp_sensor_chip.h" @@ -385,3 +386,23 @@ static void check_ap_reset_second(void) } DECLARE_HOOK(HOOK_SECOND, check_ap_reset_second, HOOK_PRIO_DEFAULT); #endif + +/** + * Set AP reset. + * + * PMIC_WARM_RESET_H (PB3) is connected to PMIC RESET before rev < 3. + * AP_RESET_L (PC3, CPU_WARM_RESET_L) is connected to PMIC SYSRSTB + * after rev >= 3. + */ +void board_set_ap_reset(int asserted) +{ + if (system_get_board_version() < 3) { + /* Signal is active-high */ + CPRINTS("pmic warm reset(%d)", asserted); + gpio_set_level(GPIO_PMIC_WARM_RESET_H, asserted); + } else { + /* Signal is active-low */ + CPRINTS("ap warm reset(%d)", asserted); + gpio_set_level(GPIO_AP_RESET_L, !asserted); + } +} |