Subsequent boots can skip the dram configuration, it will already
be in a usable state.
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
try_flash = true;
}
printf("\n");
- if (ftr & SYS_REG_INFO_HAS_DRAM) {
+ if (ftr & SYS_REG_INFO_HAS_DRAM && !ddrctrl_init_done_read()) {
printf("LiteDRAM built from LiteX %s\n", LITEX_GIT_SHA1);
sdram_init();
}
+
+ val = readq(SYSCON_BASE + SYS_REG_CTRL);
+ writeq(val & ~SYS_REG_CTRL_ALT_RESET, SYSCON_BASE + SYS_REG_CTRL);
+
if (ftr & SYS_REG_INFO_HAS_BRAM) {
printf("Booting from BRAM...\n");
return 0;