aboutsummaryrefslogtreecommitdiff
path: root/src/soc/marvell/armada38x/spi.c
diff options
context:
space:
mode:
authorRuilin Hao <rlhao@marvell.com>2015-11-10 00:18:59 -0800
committerPatrick Georgi <pgeorgi@google.com>2016-02-04 11:31:45 +0100
commitde4defbaaf76a8bf7a705e3d1b265e1936cd7481 (patch)
tree8b1184e4496851be3a9a98d8a37527be4891bab9 /src/soc/marvell/armada38x/spi.c
parentc1b9e7934c0b100b8ce558669df8b57a03b2271f (diff)
soc/marvell/armada38x: Add i2c driver for armada38x
Port i2c driver from uboot to coreboot BUG=chrome-os-partner:47462 TEST=emerge-cyclone coreboot BRANCH=tot Change-Id: I8ce2a965acaed68ad0f0518648490ec471c6810b Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 4c2e9592662787ebed1d0aa8cafaa00fd12c2e9c Original-Change-Id: If791228edf29405fa4b2f959a21510bd7da9865b Original-Signed-off-by: Ruilin Hao <rlhao@marvell.com> Original-Reviewed-on: https://chromium-review.googlesource.com/313342 Original-Commit-Ready: Kan Yan <kyan@google.com> Original-Tested-by: Kan Yan <kyan@google.com> Original-Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://review.coreboot.org/13113 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/soc/marvell/armada38x/spi.c')
-rw-r--r--src/soc/marvell/armada38x/spi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/soc/marvell/armada38x/spi.c b/src/soc/marvell/armada38x/spi.c
index ed5d519dd0..6a0e062327 100644
--- a/src/soc/marvell/armada38x/spi.c
+++ b/src/soc/marvell/armada38x/spi.c
@@ -21,6 +21,7 @@
#include <assert.h>
#include <console/console.h>
#include <soc/common.h>
+#include <soc/clock.h>
/******************************************************************************
base type define
@@ -352,7 +353,7 @@ int mv_spi_sys_init(unsigned char spi_id,
MV_SPI_HAL_DATA hal_data;
hal_data.ctrl_model = MV_6810_DEV_ID;
- hal_data.tclk = MV_BOARD_TCLK_250MHZ;
+ hal_data.tclk = mv_tclk_get();
return mv_spi_init(spi_id, cs_id, serial_baud_rate, &hal_data);
}