summaryrefslogtreecommitdiff
path: root/chip/stm32/spi.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-04-05 13:15:14 -0700
committerChromeBot <chrome-bot@google.com>2013-04-08 10:31:43 -0700
commit6878c3da716350e5a2b20d84bc588188d6f9cca8 (patch)
treed75a4628727f1b8896c86bdf3681c7cc85341f3b /chip/stm32/spi.c
parentfcb1e1c8197949ab5d0ada5f103fa1af268aefbe (diff)
downloadchrome-ec-6878c3da716350e5a2b20d84bc588188d6f9cca8.tar.gz
Clean up daisy GPIO and SPI init
Much of the board init duplicated stuff already done in gpio init, so remove it. Powering the SPI module should be done in spi.c, not board.c. BUG=chrome-os-partner:18343 BRANCH=none TEST=build all platforms; boot EC on daisy Change-Id: I9a99eeeb971ebbf7de5b9c0548153684fbb7fff6 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/47469 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'chip/stm32/spi.c')
-rw-r--r--chip/stm32/spi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/chip/stm32/spi.c b/chip/stm32/spi.c
index ec8e078c73..bf57b0b361 100644
--- a/chip/stm32/spi.c
+++ b/chip/stm32/spi.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+ * Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
@@ -326,6 +326,9 @@ static int spi_init(void)
{
struct spi_ctlr *spi;
+ /* Enable clocks to SPI module */
+ STM32_RCC_APB2ENR |= 1 << 12;
+
/**
* SPI1
* PA7: SPI1_MOSI