ddr: marvell: a38x: fix memory cs size function
authorMoti Buskila <motib@marvell.com>
Fri, 19 Feb 2021 16:11:22 +0000 (17:11 +0100)
committerStefan Roese <sr@denx.de>
Fri, 26 Feb 2021 09:22:29 +0000 (10:22 +0100)
commit2ab7bbf71ef63ffb621312730232d6d1b9b9f92f
treef7495914897288ea92e5777b21d1b4246eb03979
parentb85c6fb065f2eea0d08402bda9394c4b3db6f753
ddr: marvell: a38x: fix memory cs size function

commit c8b301463d508c807a33f7b7eaea98bbda4aa35e upstream.

The funtion returnd cs size in byte instead of MB, that cause
calculation error since the caller was expected to get u32 and when he
got above 4G it refers it as 0.
The fix was to get the cs memory size from function as in MB and then
multiply it by 1MB.

Signed-off-by: Moti Buskila <motib@marvell.com>
Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
Signed-off-by: Marek BehĂșn <marek.behun@nic.cz>
Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
drivers/ddr/marvell/a38x/mv_ddr_plat.c
drivers/ddr/marvell/a38x/xor.c