ARM: mvebu: handle unused DRAM banks with ECC enabled
authorChris Packham <judge.packham@gmail.com>
Fri, 22 Sep 2017 16:50:31 +0000 (04:50 +1200)
committerStefan Roese <sr@denx.de>
Tue, 26 Sep 2017 04:52:57 +0000 (06:52 +0200)
commitc3ab2744447db80de3c0a18422256a7b638253b3
tree1d7bb978c2a310d6b6b26fc07758b601ef74583a
parent0a91e1cce4497a50af00dc134af6bc19ec87fe34
ARM: mvebu: handle unused DRAM banks with ECC enabled

dram_ecc_scrubbing() had code to skip unused DRAM banks but it would not
work because mvebu_sdram_bs() returns 0 and the code was subtracting 1
before checking the size. Remove the -1 from the bank size and the +1
from the total which will skip unused banks and still calculate the
correct size. Put the -1 where it is needed for scrubbing via the xor
engine.

Reported-by: Joshua Scott <joshua.scott@alliedtelesis.co.nz>
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
arch/arm/mach-mvebu/dram.c