Skip to contentSkip to conversation

Altera SoCFpga Boot Stall Fix

PATCH In review Brian Sune 2 participants 2 messages Nov 14, 2025 – Nov 25, 2025

Subsystems (3)
lore
Share & tools
lore

Brian Sune

author
#0 lore raw

PATCH v5 1/1 Altera SoCFpga Boot Stall Fix

Since U-Boot 2025.07 pure SD Card
boot no longer works. Now Altera released 2025.07 shows the different on the u-boot files. After testing, the major root case is get_managers_addr. And this patch fix the SD boot stall via pulling from offical.

---
 arch/arm/mach-socfpga/misc.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
arch/arm/mach-socfpga/misc.c +11 -2
index 76747c2196a..07694107c8a 100644
@@ -222,7 +222,7 @@ static int do_bridge(struct cmd_tbl *cmdtp, int flag, int argc,
 }
 
 U_BOOT_CMD(bridge, 3, 1, do_bridge,
-	   "SoCFPGA HPS FPGA bridge control",
+	   "GEN5 SoCFPGA HPS FPGA bridge control",
 	   "enable [mask] - Enable HPS-to-FPGA (Bit 0), LWHPS-to-FPGA (Bit 1), FPGA-to-HPS (Bit 2) bridges\n"
 	   "bridge disable [mask] - Disable HPS-to-FPGA (Bit 0), LWHPS-to-FPGA (Bit 1), FPGA-to-HPS (Bit 2) bridges\n"
 	   ""
@@ -261,7 +261,16 @@ void socfpga_get_managers_addr(void)
 	if (ret)
 		hang();
 
-	else if (IS_ENABLED(CONFIG_TARGET_SOCFPGA_N5X))
+	if (!IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX) &&
+	    !IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX7M) &&
+	    !IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX5)) {
+		ret = socfpga_get_base_addr("altr,sys-mgr",
+					    &socfpga_sysmgr_base);
+		if (ret)
+			hang();
+	}
+
+	if (IS_ENABLED(CONFIG_TARGET_SOCFPGA_N5X))
 		ret = socfpga_get_base_addr("intel,n5x-clkmgr",
 					    &socfpga_clkmgr_base);
 	else if (!IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX) &&
Signature · 1 line
2.34.1
Reviewed-by Tien Fong Chee on v5 1/1
#1 lore raw
Quoted 46 lines · Brian Sune

[CAUTION: This email is from outside your organization. Unless you trust the sender, do not click on links or open attachments as it may be a fraudulent email attempting to steal your information and/or compromise your computer.]

Since U-Boot 2025.07 pure SD Card
boot no longer works. Now Altera released 2025.07 shows the different on the u-boot files. After testing, the major root case is get_managers_addr. And this patch fix the SD boot stall via pulling from offical.

---
  arch/arm/mach-socfpga/misc.c | 13 +++++++++++--
  1 file changed, 11 insertions(+), 2 deletions(-)
arch/arm/mach-socfpga/misc.c +11 -3
index 76747c2196a..07694107c8a 100644
@@ -222,7 +222,7 @@ static int do_bridge(struct cmd_tbl *cmdtp, int flag, int argc,
  }
 
  U_BOOT_CMD(bridge, 3, 1, do_bridge,
-          "SoCFPGA HPS FPGA bridge control",
+          "GEN5 SoCFPGA HPS FPGA bridge control",
            "enable [mask] - Enable HPS-to-FPGA (Bit 0), LWHPS-to-FPGA (Bit 1), FPGA-to-HPS (Bit 2) bridges\n"
            "bridge disable [mask] - Disable HPS-to-FPGA (Bit 0), LWHPS-to-FPGA (Bit 1), FPGA-to-HPS (Bit 2) bridges\n"
            ""
@@ -261,7 +261,16 @@ void socfpga_get_managers_addr(void)
         if (ret)
                 hang();
 
-       else if (IS_ENABLED(CONFIG_TARGET_SOCFPGA_N5X))
+       if (!IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX) &&
+           !IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX7M) &&
+           !IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX5)) {
+               ret = socfpga_get_base_addr("altr,sys-mgr",
+                                           &socfpga_sysmgr_base);
+               if (ret)
+                       hang();
+       }
+
+       if (IS_ENABLED(CONFIG_TARGET_SOCFPGA_N5X))
                 ret = socfpga_get_base_addr("intel,n5x-clkmgr",
                                             &socfpga_clkmgr_base);
         else if (!IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX) &&
--
Quoted 1 line

2.34.1

Best regards,
Tien Fong

Quoted 1 line