summaryrefslogtreecommitdiff
path: root/drivers/ddr/marvell/a38x
diff options
context:
space:
mode:
authorMoti Buskila <motib@marvell.com>2021-02-19 19:11:15 +0300
committerStefan Roese <sr@denx.de>2021-02-26 12:22:29 +0300
commit9c4e06af0bfad86ff66df6fbd6be6c4a75ffd303 (patch)
tree54c8a55a1bb900c5a516392c720a340450927dfb /drivers/ddr/marvell/a38x
parent6373a92d42b165872c43b5b7424a331260cb6212 (diff)
downloadu-boot-9c4e06af0bfad86ff66df6fbd6be6c4a75ffd303.tar.xz
ddr: marvell: a38x: fix memory size calculation using 32bit bus width
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 <motib@marvell.com> Reviewed-by: Stefan Chulski <Stefan.Chulski@cavium.com> Reviewed-by: Alex Leibovich <alexl@marvell.com> Reviewed-by: Kostya Porotchkin <Kostya.Porotchkin@cavium.com> Signed-off-by: Marek BehĂșn <marek.behun@nic.cz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Diffstat (limited to 'drivers/ddr/marvell/a38x')
-rw-r--r--drivers/ddr/marvell/a38x/mv_ddr_spd.c5
-rw-r--r--drivers/ddr/marvell/a38x/mv_ddr_spd.h1
-rw-r--r--drivers/ddr/marvell/a38x/mv_ddr_topology.c4
3 files changed, 0 insertions, 10 deletions
diff --git a/drivers/ddr/marvell/a38x/mv_ddr_spd.c b/drivers/ddr/marvell/a38x/mv_ddr_spd.c
index cb90d30a6a..04dbfe94d6 100644
--- a/drivers/ddr/marvell/a38x/mv_ddr_spd.c
+++ b/drivers/ddr/marvell/a38x/mv_ddr_spd.c
@@ -217,11 +217,6 @@ enum mv_ddr_die_capacity mv_ddr_spd_die_capacity_get(union mv_ddr_spd_data *spd_
return ret_val;
}
-void mv_ddr_spd_die_capacity_user_get(union mv_ddr_spd_data *spd_data, enum mv_ddr_die_capacity capacity)
-{
- spd_data->byte_fields.byte_4.bit_fields.die_capacity = capacity;
-}
-
unsigned char mv_ddr_spd_mem_mirror_get(union mv_ddr_spd_data *spd_data)
{
unsigned char mem_mirror = spd_data->byte_fields.byte_131.bit_fields.rank_1_mapping;
diff --git a/drivers/ddr/marvell/a38x/mv_ddr_spd.h b/drivers/ddr/marvell/a38x/mv_ddr_spd.h
index ee35377af5..b4bfef3103 100644
--- a/drivers/ddr/marvell/a38x/mv_ddr_spd.h
+++ b/drivers/ddr/marvell/a38x/mv_ddr_spd.h
@@ -277,7 +277,6 @@ union mv_ddr_spd_data {
int mv_ddr_spd_timing_calc(union mv_ddr_spd_data *spd_data, unsigned int timing_data[]);
enum mv_ddr_dev_width mv_ddr_spd_dev_width_get(union mv_ddr_spd_data *spd_data);
enum mv_ddr_die_capacity mv_ddr_spd_die_capacity_get(union mv_ddr_spd_data *spd_data);
-void mv_ddr_spd_die_capacity_user_get(union mv_ddr_spd_data *spd_data, enum mv_ddr_die_capacity capacity);
unsigned char mv_ddr_spd_mem_mirror_get(union mv_ddr_spd_data *spd_data);
unsigned char mv_ddr_spd_cs_bit_mask_get(union mv_ddr_spd_data *spd_data);
unsigned char mv_ddr_spd_dev_type_get(union mv_ddr_spd_data *spd_data);
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);