]> git.dujemihanovic.xyz Git - u-boot.git/commit
socfpga: arria10: Allow dcache_enable before relocation
authorPaweł Anikiel <pan@semihalf.com>
Fri, 17 Jun 2022 10:47:26 +0000 (12:47 +0200)
committerTien Fong Chee <tien.fong.chee@intel.com>
Fri, 1 Jul 2022 06:57:15 +0000 (14:57 +0800)
commite26ecebc684bfe74f6c27cca151c3490d1ed5d8f
tree27a3b69531fc9a55d833ff44a42d14b669feda29
parent5c53d9c0d955d046694e550e1c429fa509abb0c8
socfpga: arria10: Allow dcache_enable before relocation

Before relocating to SDRAM, the ECC is initialized by clearing the
whole SDRAM. In order to speed this up, dcache_enable is used (see
sdram_init_ecc_bits).

Since commit 503eea451903 ("arm: cp15: update DACR value to activate
access control"), this no longer works, because running code in OCRAM
with the XN bit set causes a page fault. Override dram_bank_mmu_setup
to disable XN in the OCRAM and setup DRAM dcache before relocation.

Signed-off-by: Paweł Anikiel <pan@semihalf.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/arm/mach-socfpga/misc_arria10.c