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.

Change-Id: I1f8e921b4616f15951f3e5fae1ecbf116de4ba90
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Signed-off-by: Gabe Black <gabeblack@chromium.org>
Reviewed-on: http://review.coreboot.org/3707
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Hung-Te Lin 2013-06-24 20:02:01 +08:00 committed by Stefan Reinauer
parent e42030d236
commit c357aed3d7

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. */