[PATCH v1 6/8] arm: socfpga: n5x: Switch firewall setup to device model

Chen Huei Lok chen.huei.lok at altera.com
Wed Mar 18 04:16:35 CET 2026


Move the system manager and L3 interconnect firewall configuration
from a dedicated `firewall_setup()` function to using the device model
(`uclass_get_device_by_name`). This removes the hardcoded firewall
setup in SPL and relies on the device model, making the code more
maintainable and aligned with upstream practices.

Also, remove `CONFIG_SPL_DRIVERS_MISC_SUPPORT` from the defconfig,
as it's no longer required.

Signed-off-by: Tien Fong Chee <tien.fong.chee at altera.com>
Signed-off-by: Chen Huei Lok <chen.huei.lok at altera.com>
---
 arch/arm/mach-socfpga/spl_n5x.c | 12 +++++++++++-
 configs/socfpga_n5x_defconfig   |  1 -
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-socfpga/spl_n5x.c b/arch/arm/mach-socfpga/spl_n5x.c
index 81283ef7162..97b3f8f1830 100644
--- a/arch/arm/mach-socfpga/spl_n5x.c
+++ b/arch/arm/mach-socfpga/spl_n5x.c
@@ -72,7 +72,17 @@ void board_init_f(ulong dummy)
 	print_reset_info();
 	cm_print_clock_quick_summary();

-	firewall_setup();
+	ret = uclass_get_device_by_name(UCLASS_NOP, "socfpga-system-mgr-firewall", &dev);
+	if (ret) {
+		printf("System manager firewall configuration failed: %d\n", ret);
+		hang();
+	}
+
+	ret = uclass_get_device_by_name(UCLASS_NOP, "socfpga-l3interconnect-firewall", &dev);
+	if (ret) {
+		printf("L3 interconnect firewall configuration failed: %d\n", ret);
+		hang();
+	}

 	ret = uclass_get_device(UCLASS_CACHE, 0, &dev);
 	if (ret) {
diff --git a/configs/socfpga_n5x_defconfig b/configs/socfpga_n5x_defconfig
index fc74e2f65b7..6e55987d310 100644
--- a/configs/socfpga_n5x_defconfig
+++ b/configs/socfpga_n5x_defconfig
@@ -94,7 +94,6 @@ CONFIG_PANIC_HANG=y
 CONFIG_SPL_CRC32=y
 CONFIG_SHA512_ALGO=y
 CONFIG_SHA384=y
-CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_FS_LOADER=y
 CONFIG_SPL_ENV_SUPPORT=y
 # CONFIG_TOOLS_MKEFICAPSULE is not set
--
2.19.0



More information about the U-Boot mailing list