armv7/pit: Setup EC on SPI2.

The Embedded Controller (EC) for Pit is connected via SPI2, and needs to be
configured before we can talk to it.

BUG=chrome-os-partner:20441
TEST=emerge-peach_pit chromeos-coreboot-peach_pit; boot successfully.
BRANCH=none

Change-Id: Ic260d89a4aad0633868800af9c331ce8cf7a518f
Reviewed-on: https://gerrit.chromium.org/gerrit/59751
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
This commit is contained in:
Hung-Te Lin 2013-06-24 20:02:01 +08:00 committed by ChromeBot
commit 973beef0cf

View file

@ -122,6 +122,14 @@ static void setup_storage(void)
exynos_pinmux_sdmmc2();
}
static void setup_ec(void)
{
/* SPI2 (EC) is slower and needs to work in half-duplex mode with
* single byte bus width. */
clock_set_rate(PERIPH_ID_SPI2, 500000);
exynos_pinmux_spi2();
}
static void setup_graphics(void)
{
exynos_pinmux_dphpd();
@ -271,6 +279,7 @@ void main(void)
setup_storage();
setup_gpio();
setup_graphics();
setup_ec();
simple_spi_test();
/* Set SPI (primary CBFS media) clock to 50MHz. */