zynqmp: spl: support DRAM ECC initialization
authorJorge Ramirez-Ortiz <jorge@foundries.io>
Sun, 13 Jun 2021 18:55:53 +0000 (20:55 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 23 Jun 2021 07:48:35 +0000 (09:48 +0200)
commit01c7714a7bc615d054e2cd8ecb077415dbcf0a51
tree16769bfc067791e9382bcfd8870d5248d0a3f658
parentca8bb0ccb752e38c49fc37e83af4857b04487ebb
zynqmp: spl: support DRAM ECC initialization

Use the ZDMA channel 0 to initialize the DRAM banks. This avoid
spurious ECC errors that can occur when accessing unitialized memory.

The feature is enabled by setting the option
CONFIG_SPL_ZYNQMP_DRAM_ECC_INIT and providing the following data:

 SPL_ZYNQMP_DRAM_BANK1_BASE: start of memory to initialize
 SPL_ZYNQMP_DRAM_BANK1_LEN : len of memory to initialize (hex)
 SPL_ZYNQMP_DRAM_BANK2_BASE: start of memory to initialize
 SPL_ZYNQMP_DRAM_BANK2_LEN : len of memory to initialize (hex)

Setting SPL_ZYNQMP_DRAM_BANK_LEN to 0 takes no action.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/arm/mach-zynqmp/Kconfig
arch/arm/mach-zynqmp/Makefile
arch/arm/mach-zynqmp/ecc_spl_init.c [new file with mode: 0644]
arch/arm/mach-zynqmp/include/mach/ecc_spl_init.h [new file with mode: 0644]
arch/arm/mach-zynqmp/include/mach/hardware.h
arch/arm/mach-zynqmp/spl.c