From 9c4e06af0bfad86ff66df6fbd6be6c4a75ffd303 Mon Sep 17 00:00:00 2001 From: Moti Buskila Date: Fri, 19 Feb 2021 17:11:15 +0100 Subject: ddr: marvell: a38x: fix memory size calculation using 32bit bus width MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit ab9240402a70cc02496683971779e75eff410ab4 upstream. - function mv_ddr_spd_die_capacity_user_get() has a bug, since it insert a user memory enum to it, instead of SPD memory enum (which are different) - fix: remove mv_ddr_spd_die_capacity_user_get() function. - memory size with 64 and 32 bit already calculated correctly at mv_ddr_mem_sz_per_cs_get() function Signed-off-by: Moti Buskila Reviewed-by: Stefan Chulski Reviewed-by: Alex Leibovich Reviewed-by: Kostya Porotchkin Signed-off-by: Marek BehĂșn Tested-by: Chris Packham --- drivers/ddr/marvell/a38x/mv_ddr_topology.c | 4 ---- 1 file changed, 4 deletions(-) (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 3feb65ea46..31711fdd49 100644 --- a/drivers/ddr/marvell/a38x/mv_ddr_topology.c +++ b/drivers/ddr/marvell/a38x/mv_ddr_topology.c @@ -74,10 +74,6 @@ int mv_ddr_topology_map_update(void) /* update device width in topology map */ iface_params->bus_width = mv_ddr_spd_dev_width_get(&tm->spd_data); - /* overwrite SPD configuration, with what the user set */ - if (tm->bus_act_mask == MV_DDR_32BIT_ECC_PUP8_BUS_MASK) - mv_ddr_spd_die_capacity_user_get(&tm->spd_data, tm->interface_params[0].memory_size); - /* update die capacity in topology map */ iface_params->memory_size = mv_ddr_spd_die_capacity_get(&tm->spd_data); -- cgit v1.2.3