mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-22 09:58:52 +09:00
![]() The usage of socfpga_sdram_apply_static_cfg() seems rather dubious and is confirmed to lead to a rare system hang when enabling bridges. This patch removes the socfpga_sdram_apply_static_cfg() altogether, because it's use seems unjustified and problematic. The socfpga_sdram_apply_static_cfg() triggers write to SDRAM staticcfg register to set the applycfg bit, which according to old vendor U-Boot sources can only be written when there is no traffic between the SDRAM controller and the rest of the system. Empirical measurements confirm this, setting the applycfg bit when there is traffic between the SDRAM controller and CPU leads to the SDRAM controller accesses being blocked shortly after. Altera originally solved this by moving the entire code which sets the staticcfg register to OCRAM [1]. The commit message claims that the applycfg bit needs to be set after write to fpgaportrst register. This is however inverted by Altera shortly after in [2], where the order becomes the exact opposite of what commit message [1] claims to be the required order. The explanation points to a possible problem in AMP use-case, where the FPGA might be sending transactions through the F2S bridge. However, the AMP is only the tip of the iceberg here. Any of the other L2, L3 or L4 masters can trigger transactions to the SDRAM. It becomes rather non-trivial to guarantee there are no transactions to the SDRAM controller. The SoCFPGA SDRAM driver always writes the applycfg bit in SPL. Thus, writing the applycfg again in bridge enable code seems redundant and can presumably be dropped. [1] |
||
---|---|---|
.. | ||
include/mach | ||
board.c | ||
clock_manager_arria10.c | ||
clock_manager_gen5.c | ||
clock_manager_s10.c | ||
clock_manager.c | ||
fpga_manager.c | ||
freeze_controller.c | ||
Kconfig | ||
mailbox_s10.c | ||
Makefile | ||
misc_arria10.c | ||
misc_gen5.c | ||
misc_s10.c | ||
misc.c | ||
mmu-arm64_s10.c | ||
pinmux_arria10.c | ||
qts-filter.sh | ||
reset_manager_arria10.c | ||
reset_manager_gen5.c | ||
reset_manager_s10.c | ||
reset_manager.c | ||
scan_manager.c | ||
spl_a10.c | ||
spl_gen5.c | ||
spl_s10.c | ||
system_manager_gen5.c | ||
system_manager_s10.c | ||
timer_s10.c | ||
timer.c | ||
wrap_iocsr_config.c | ||
wrap_pinmux_config_s10.c | ||
wrap_pinmux_config.c | ||
wrap_pll_config_s10.c | ||
wrap_pll_config.c | ||
wrap_sdram_config.c |