From 236609d93c76b9e108d765cd7cf0632063ea8273 Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Thu, 30 Jan 2020 12:50:44 +1300 Subject: ddr: marvell: a38x: Allow boards to specify CK_DELAY parameter For some layouts it is necessary to adjust the CK_DELAY parameter to successfully complete DDR training. Add the ability to specify the CK_DELAY in the mv_ddr_topology_map. Signed-off-by: Chris Packham --- drivers/ddr/marvell/a38x/mv_ddr_topology.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/ddr/marvell/a38x/mv_ddr_topology.c') diff --git a/drivers/ddr/marvell/a38x/mv_ddr_topology.c b/drivers/ddr/marvell/a38x/mv_ddr_topology.c index ef3b658a78..09840b1e70 100644 --- a/drivers/ddr/marvell/a38x/mv_ddr_topology.c +++ b/drivers/ddr/marvell/a38x/mv_ddr_topology.c @@ -229,6 +229,16 @@ int mv_ddr_is_ecc_ena(void) return 0; } +int mv_ddr_ck_delay_get(void) +{ + struct mv_ddr_topology_map *tm = mv_ddr_topology_map_get(); + + if (tm->ck_delay) + return tm->ck_delay; + + return -1; +} + /* translate topology map definition to real memory size in bits */ static unsigned int mem_size[] = { ADDR_SIZE_512MB, -- cgit v1.2.3