summaryrefslogtreecommitdiff
path: root/chip/stm32/system.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-12-06 15:17:33 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-12-16 20:28:32 +0000
commit05bd0cdec7a3132fda3127c3c9daeed0ebae0dae (patch)
tree37720df1bbd03c8590a33212dfd147eab7b5430e /chip/stm32/system.c
parent33ea7aa4739390c2cce578ac8310f0d7b5b3679c (diff)
downloadchrome-ec-05bd0cdec7a3132fda3127c3c9daeed0ebae0dae.tar.gz
Rename mixed-case config constants
This renames constants used in compiler conditionals to uppercase. BOARD_foo CHIP_foo CHIP_FAMILY_foo CHIP_VARIANT_foo CORE_foo Mixed-case constants are still defined by the makefile, but are now no longer used. I will make one more pass in a week or so to catch any that are part of someone else's CL, since otherwise this change might silently merge correctly but result in incorrect compilation. Then I will remove defining the mixed-case constants. BUG=chromium:322144 BRANCH=none TEST=Build all boards. Also, "git grep 'BOARD_[a-z]'" should return no results (similarly for CHIP, CORE, etc.) Change-Id: I6418412e9f7ec604a35c2d426d12475dd83e7076 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/179206 Reviewed-by: Vic Yang <victoryang@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'chip/stm32/system.c')
-rw-r--r--chip/stm32/system.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/chip/stm32/system.c b/chip/stm32/system.c
index 41d47218fa..2cd4063709 100644
--- a/chip/stm32/system.c
+++ b/chip/stm32/system.c
@@ -151,14 +151,14 @@ void system_pre_init(void)
while (!(STM32_RCC_CSR & (1 << 1)))
;
/* re-configure RTC if needed */
-#ifdef CHIP_FAMILY_stm32l
+#ifdef CHIP_FAMILY_STM32L
if ((STM32_RCC_CSR & 0x00C30000) != 0x00420000) {
/* the RTC settings are bad, we need to reset it */
STM32_RCC_CSR |= 0x00800000;
/* Enable RTC and use LSI as clock source */
STM32_RCC_CSR = (STM32_RCC_CSR & ~0x00C30000) | 0x00420000;
}
-#elif defined(CHIP_FAMILY_stm32f)
+#elif defined(CHIP_FAMILY_STM32F)
if ((STM32_RCC_BDCR & 0x00018300) != 0x00008200) {
/* the RTC settings are bad, we need to reset it */
STM32_RCC_BDCR |= 0x00010000;
@@ -197,7 +197,7 @@ void system_reset(int flags)
if (flags & SYSTEM_RESET_HARD) {
-#ifdef CHIP_FAMILY_stm32l
+#ifdef CHIP_FAMILY_STM32L
/*
* Ask the flash module to reboot, so that we reload the
* option bytes.