summaryrefslogtreecommitdiff
path: root/chip/it83xx/system.c
diff options
context:
space:
mode:
authorDino Li <dino.li@ite.com.tw>2015-06-29 17:48:54 +0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-06-30 17:18:54 +0000
commite881d99fde5bc818b72bea91ce8cd1daa70bc760 (patch)
tree47a3c44e7c40e01e0150e1af0eaf295932eab569 /chip/it83xx/system.c
parent362174b49b50fcd5d8a2542662e576b7e69321a1 (diff)
downloadchrome-ec-e881d99fde5bc818b72bea91ce8cd1daa70bc760.tar.gz
it8380dev: add pin 3.3v/1.8v selection
add GPIO_SEL_1P8V flag for 1.8v/3.3v selection. Signed-off-by: Dino Li <dino.li@ite.com.tw> BRANCH=none BUG=none TEST=1. To configure 1.8V/3.3V pin to 1.8V, set GPIO_SEL_1P8V flag in gpio.inc. 2. The corresponding bit will be set as default value if the pin is not listed in gpio.inc. Change-Id: Ica02aabe40b83fcb4d33bd28d717a0633bdef5f3 Reviewed-on: https://chromium-review.googlesource.com/281842 Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Queue: Dino Li <dino.li@ite.com.tw> Tested-by: Dino Li <dino.li@ite.com.tw>
Diffstat (limited to 'chip/it83xx/system.c')
-rw-r--r--chip/it83xx/system.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/chip/it83xx/system.c b/chip/it83xx/system.c
index e5110c83e1..ffeae356fe 100644
--- a/chip/it83xx/system.c
+++ b/chip/it83xx/system.c
@@ -55,11 +55,30 @@ static void check_reset_cause(void)
system_set_reset_flags(flags);
}
+int gpio_is_reboot_warm(void)
+{
+ uint32_t reset_flags;
+ /*
+ * Check reset cause here,
+ * gpio_pre_init is executed faster than system_pre_init
+ */
+ check_reset_cause();
+ reset_flags = system_get_reset_flags();
+
+ if ((reset_flags & RESET_FLAG_RESET_PIN) ||
+ (reset_flags & RESET_FLAG_POWER_ON) ||
+ (reset_flags & RESET_FLAG_WATCHDOG) ||
+ (reset_flags & RESET_FLAG_HARD) ||
+ (reset_flags & RESET_FLAG_SOFT))
+ return 0;
+ else
+ return 1;
+}
+
void system_pre_init(void)
{
/* TODO(crosbug.com/p/23575): IMPLEMENT ME ! */
- check_reset_cause();
}
void system_reset(int flags)