summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2012-05-22 19:36:50 +0000
committerVincent Palatin <vpalatin@chromium.org>2012-05-22 19:41:43 +0000
commit9ab7beb509382a7b2e881b29c077f4342cf2b3af (patch)
tree4719bffcf4bd88f396b78cf0b6ad8be49f0ca723
parentaa5397e48429ee7e272164923c3754025a9cd4a0 (diff)
downloadchrome-ec-9ab7beb509382a7b2e881b29c077f4342cf2b3af.tar.gz
stm32: fix sysjump on stm32f100
The warm boot condition was badly detected since we are tweaking the GPIO enables in board.c. The timer enable (TIM2) is a more reliable condition. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:8865 TEST=on Snow, boot Linux then type "sysjump A" in the EC console and see that AP & Linux are still alive. Change-Id: If375aa320c140360d313241b5d9219ffa8bcecd7
-rw-r--r--chip/stm32/gpio-stm32f100.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/chip/stm32/gpio-stm32f100.c b/chip/stm32/gpio-stm32f100.c
index 5b6db74c21..e1a28b8d7a 100644
--- a/chip/stm32/gpio-stm32f100.c
+++ b/chip/stm32/gpio-stm32f100.c
@@ -53,8 +53,8 @@ int gpio_pre_init(void)
int i;
uint32_t addr, cnf, mode, mask;
- if ((STM32_RCC_APB2ENR & 0x1fd) == 0x1fd) {
- /* This is a warm reboot */
+ if (STM32_RCC_APB1ENR & 1) {
+ /* This is a warm reboot : TIM2 is already active */
is_warm = 1;
} else {
/* Enable all GPIOs clocks