Skip to content
Commit 9e4abc0d authored by Thor Thayer's avatar Thor Thayer Committed by Meng Li
Browse files

HSD #1707131464: EDAC/altera: Add S10 SDRAM ECC check for legacy U-Boot

commit  4ecc1c7f58b0cdc5e1da8485be9b46a39e618cf6 from
https://github.com/altera-opensource/linux-socfpga.git

A bug in U-Boot causes a crash during SDRAM boot if ECC is
not enabled in the bitstream but is enabled in the Linux
config.[1]

Memory mapped read of the ECC Enabled bit was only enabled
if U-Boot determined ECC was enabled in the bitstream.

The Linux driver checks the ECC enable bit using a memory map
read. In the ECC disabled bitstream case, U-Boot didn't
enable ECC register memory map reads and since they are not
allowed this results in a crash.

This patch always reads the ECC Enable register through an
SMC call which is always allowed and will work with legacy
and current U-Boot.

[1] https://lkml.org/lkml/2019/11/29/366



Fixes: Commit 08f08bfb ("EDAC, altera: Merge Stratix10 into the Arria10 SDRAM probe routine")

Signed-off-by: default avatarThor Thayer <thor.thayer@linux.intel.com>
Signed-off-by: default avatarMeng Li <Meng.Li@windriver.com>
parent b3719a1e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment