aboutsummaryrefslogtreecommitdiff
path: root/src/soc/rockchip/rk3399/romstage.c
diff options
context:
space:
mode:
authorLin Huang <hl@rock-chips.com>2016-03-17 15:28:33 +0800
committerPatrick Georgi <pgeorgi@google.com>2016-05-09 08:45:13 +0200
commitc4cbf482f796b12f240bb88340a61ecac12ee090 (patch)
tree7796d0ccf31ab7d45742343a10e78c4cd0984f59 /src/soc/rockchip/rk3399/romstage.c
parent5dae9306d9fcfe660b0379f3b99976f8d5828b61 (diff)
rockchip: rk3399: add sdram driver
Add the sdram driver for rk3399. With this patch we can boot into depthcharge. This patch also include a config file for lpddr3-hynix-4GB that generated bases on its datasheet. Please refer to TRM V0.3 Part1 Chapter 9 for DMC. BRANCH=none BUG=chrome-os-partner:51537 TEST=boot to depthcharge on kevin Change-Id: I2afcaa3b68dbad77a5fe677b835289b675ed2bef Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 5d777e29942057fb7237eefa34051d1f54b19405 Original-Change-Id: Ifa1fe98a7058869518757d50678a64620610d91d Original-Signed-off-by: Lin Huang <hl@rock-chips.com> Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/332562 Reviewed-on: https://review.coreboot.org/14716 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/soc/rockchip/rk3399/romstage.c')
-rw-r--r--src/soc/rockchip/rk3399/romstage.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/soc/rockchip/rk3399/romstage.c b/src/soc/rockchip/rk3399/romstage.c
index 93eb41a168..c7183b671e 100644
--- a/src/soc/rockchip/rk3399/romstage.c
+++ b/src/soc/rockchip/rk3399/romstage.c
@@ -26,6 +26,7 @@
#include <romstage_handoff.h>
#include <symbols.h>
#include <soc/mmu_operations.h>
+#include <soc/sdram.h>
static const uint64_t dram_size = (uint64_t)CONFIG_DRAM_SIZE_MB * MiB;
@@ -34,7 +35,7 @@ void main(void)
console_init();
exception_init();
- /*TODO: need implement sdram init */
+ sdram_init(get_sdram_config());
mmu_config_range((void *)0, (uintptr_t)dram_size, CACHED_MEM);
mmu_config_range(_dma_coherent, _dma_coherent_size, UNCACHED_MEM);