summaryrefslogtreecommitdiff
path: root/chip/stm32/system.c
diff options
context:
space:
mode:
authorDavid Hendricks <dhendrix@chromium.org>2013-02-15 11:43:07 -0800
committerChromeBot <chrome-bot@google.com>2013-03-08 12:01:46 -0800
commitea000b0fc00c5e998dc11a455e98626389303984 (patch)
tree0a4a56427403d8f23128f5bbc13cc7ed18b0bd16 /chip/stm32/system.c
parenta44e0d91c8cf30c56d06ed8378b5f49760876d4a (diff)
downloadchrome-ec-ea000b0fc00c5e998dc11a455e98626389303984.tar.gz
stm32f10x: Initial import
This adds initial support for the other chips in the stm32f10x series: stm32f101, stm32f102x, stm32f103x, stm32f105x, stm32f107x. The main difference is in the register definitions. Clock, flash, GPIO, and JTAG modules are similar enough that for now we can symlink the existing source for stm32f100. BRANCH=none BUG=none TEST=Tested on McCroskey (follow-up CL) Signed-off-by: David Hendricks <dhendrix@chromium.org> Change-Id: I67363d02578e21be51d842b6bd8b5e4848720993 Reviewed-on: https://gerrit.chromium.org/gerrit/43412 Reviewed-by: David Hendricks <dhendrix@chromium.org> Tested-by: David Hendricks <dhendrix@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: David Hendricks <dhendrix@chromium.org>
Diffstat (limited to 'chip/stm32/system.c')
-rw-r--r--chip/stm32/system.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/chip/stm32/system.c b/chip/stm32/system.c
index a985966875..56028ee923 100644
--- a/chip/stm32/system.c
+++ b/chip/stm32/system.c
@@ -130,7 +130,7 @@ void system_pre_init(void)
/* Enable RTC and use LSI as clock source */
STM32_RCC_CSR = (STM32_RCC_CSR & ~0x00C30000) | 0x00420000;
}
-#elif defined(CHIP_VARIANT_stm32f100)
+#elif defined(CHIP_VARIANT_stm32f100) || defined(CHIP_VARIANT_stm32f10x)
if ((STM32_RCC_BDCR & 0x00018300) != 0x00008200) {
/* the RTC settings are bad, we need to reset it */
STM32_RCC_BDCR |= 0x00010000;