diff options
Diffstat (limited to 'board/zinger/runtime.c')
-rw-r--r-- | board/zinger/runtime.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/board/zinger/runtime.c b/board/zinger/runtime.c index 900c7b8c2f..19c33c7f0f 100644 --- a/board/zinger/runtime.c +++ b/board/zinger/runtime.c @@ -1,4 +1,4 @@ -/* Copyright 2014 The Chromium OS Authors. All rights reserved. +/* Copyright 2014 The ChromiumOS Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ @@ -106,7 +106,7 @@ static void zinger_config_hispeed_clock(void) STM32_RCC_CR |= BIT(24); /* Wait for PLL to be ready */ while (!(STM32_RCC_CR & BIT(25))) - ; + ; /* switch SYSCLK to PLL */ STM32_RCC_CFGR = 0x00288002; @@ -135,7 +135,7 @@ void runtime_init(void) * SET_RTC_MATCH_DELAY: max time to set RTC match alarm. if we set the alarm * in the past, it will never wake up and cause a watchdog. */ -#define STOP_MODE_LATENCY 300 /* us */ +#define STOP_MODE_LATENCY 300 /* us */ #define SET_RTC_MATCH_DELAY 200 /* us */ #define MAX_LATENCY (STOP_MODE_LATENCY + SET_RTC_MATCH_DELAY) @@ -161,10 +161,10 @@ uint32_t task_wait_event(int timeout_us) while (1) { /* set timeout on timer */ if (timeout_us < 0) { - asm volatile ("wfi"); + asm volatile("wfi"); } else if (timeout_us <= MAX_LATENCY || - t1.le.lo - timeout_us > t1.le.lo + MAX_LATENCY || - !DEEP_SLEEP_ALLOWED) { + t1.le.lo - timeout_us > t1.le.lo + MAX_LATENCY || + !DEEP_SLEEP_ALLOWED) { STM32_TIM32_CCR1(2) = STM32_TIM32_CNT(2) + timeout_us; STM32_TIM_DIER(2) = 3; /* match interrupt and UIE */ @@ -177,8 +177,8 @@ uint32_t task_wait_event(int timeout_us) /* set deep sleep bit */ CPU_SCB_SYSCTRL |= 0x4; - set_rtc_alarm(0, timeout_us - STOP_MODE_LATENCY, - &rtc0, 0); + set_rtc_alarm(0, timeout_us - STOP_MODE_LATENCY, &rtc0, + 0); asm volatile("wfi"); @@ -233,8 +233,7 @@ uint32_t task_wait_event_mask(uint32_t event_mask, int timeout_us) return evt & event_mask; } -noreturn -void __keep cpu_reset(void) +noreturn void __keep cpu_reset(void) { /* Disable interrupts */ interrupt_disable(); @@ -267,7 +266,8 @@ void exception_panic(void) "bl debug_printf\n" #endif "bl cpu_reset\n" - : : "r"("PANIC PC=%08x LR=%08x\n\n")); + : + : "r"("PANIC PC=%08x LR=%08x\n\n")); } void panic_reboot(void) @@ -286,7 +286,9 @@ enum ec_image system_get_image_copy(void) /* --- stubs --- */ void __hw_timer_enable_clock(int n, int enable) -{ /* Done in hardware init */ } +{ /* Done in hardware init */ +} void usleep(unsigned us) -{ /* Used only as a workaround */ } +{ /* Used only as a workaround */ +} |