arm: socfpga: soc64: separate reset manager into common and platform-family parts
Subsystems (3)
PATCH 1/1 arm: socfpga: soc64: separate reset manager into common and platform-family parts
The SoCFPGA SoC64 reset manager code is currently built as reset_manager_s10.o even though it is shared across multiple SoC64 families.
Split the implementation into:
- reset_manager_soc64.o for common SoC64 logic
- reset_manager_soc64_platform_families.o for platform-family-specific code
This improves code organization and prepares the reset manager for additional SoC64 platform families. No functional change intended.
---
arch/arm/mach-socfpga/Makefile | 15 ++-
arch/arm/mach-socfpga/reset_manager_soc64.c | 94 +++++++++++++++++++
...> reset_manager_soc64_platform_families.c} | 75 +--------------
3 files changed, 106 insertions(+), 78 deletions(-)
create mode 100644 arch/arm/mach-socfpga/reset_manager_soc64.c
rename arch/arm/mach-socfpga/{reset_manager_s10.c => reset_manager_soc64_platform_families.c} (78%)arch/arm/mach-socfpga/Makefile +10 -5
@@ -34,7 +34,8 @@ obj-y += lowlevel_init_soc64.o obj-y += mailbox_s10.o obj-y += misc_soc64.o obj-y += mmu-arm64_s10.o -obj-y += reset_manager_s10.o +obj-y += reset_manager_soc64.o +obj-y += reset_manager_soc64_platform_families.o obj-y += system_manager_soc64.o obj-y += timer_s10.o obj-y += wrap_handoff_soc64.o
@@ -47,7 +48,8 @@ obj-y += lowlevel_init_soc64.o obj-y += mailbox_s10.o obj-y += misc_soc64.o obj-y += mmu-arm64_s10.o -obj-y += reset_manager_s10.o +obj-y += reset_manager_soc64.o +obj-y += reset_manager_soc64_platform_families.o obj-$(CONFIG_SOCFPGA_SECURE_VAB_AUTH) += secure_vab.o obj-y += system_manager_soc64.o obj-y += timer_s10.o
@@ -62,7 +64,8 @@ obj-y += clock_manager_agilex5.o obj-y += mailbox_s10.o obj-y += misc_soc64.o obj-y += mmu-arm64_s10.o -obj-y += reset_manager_s10.o +obj-y += reset_manager_soc64.o +obj-y += reset_manager_soc64_platform_families.o obj-y += wrap_handoff_soc64.o obj-y += wrap_pll_config_soc64.o obj-y += altera-sysmgr.o
@@ -79,7 +82,8 @@ obj-y += lowlevel_init_soc64.o obj-y += mailbox_s10.o obj-y += misc_soc64.o obj-y += mmu-arm64_s10.o -obj-y += reset_manager_s10.o +obj-y += reset_manager_soc64.o +obj-y += reset_manager_soc64_platform_families.o obj-$(CONFIG_SOCFPGA_SECURE_VAB_AUTH) += secure_vab.o obj-y += system_manager_soc64.o obj-y += timer_s10.o
@@ -95,7 +99,8 @@ obj-y += lowlevel_init_soc64.o obj-y += mailbox_s10.o obj-y += misc_soc64.o obj-y += mmu-arm64_s10.o -obj-y += reset_manager_s10.o +obj-y += reset_manager_soc64.o +obj-y += reset_manager_soc64_platform_families.o obj-$(CONFIG_SOCFPGA_SECURE_VAB_AUTH) += secure_vab.o obj-y += system_manager_soc64.o obj-y += timer_s10.o
arch/arm/mach-socfpga/reset_manager_soc64.c new file +94 -0
94 lines not on this page · raw message
arch/arm/mach-socfpga/reset_manager_soc64_platform_families.c renamed from arch/arm/mach-socfpga/reset_manager_s10.c +2 -73
101 lines not on this page · raw message
Signature · 1 line
2.43.7
Hi Chen Huei,
Quoted 10 lines
From: Lok, Chen Huei <[email protected]>
Sent: Tuesday, February 10, 2026 1:23 PM
To: [email protected] <[email protected]>
Cc: Marek Vasut <[email protected]>; Simon Goldschmidt <[email protected]>; Chee, Tien Fong <[email protected]>; Tom Rini <[email protected]>; Rosdi, Danish Ahmad <[email protected]>; Yuslaimi, Alif Zakuan <[email protected]>; Maniyam, Dinesh <[email protected]>; Ng, Boon Khai <[email protected]>; Hea, Kok Kiang <[email protected]>; Lok, Chen Huei <[email protected]>
Quoted 8 lines
Subject: [PATCH v1] arm: socfpga: soc64: separate reset manager into common and platform-family parts
The SoCFPGA SoC64 reset manager code is currently built as reset_manager_s10.o even though it is shared across multiple SoC64 families.
Split the implementation into:
- reset_manager_soc64.o for common SoC64 logic
- reset_manager_soc64_platform_families.o for platform-family-specific
Consider a shorter/more conventional name than reset_manager_soc64_platform_families.c e.g. reset_manager_soc64_families.c
Quoted 78 lines
code
This improves code organization and prepares the reset manager for additional SoC64 platform families. No functional change intended.Signed-off-by Chen Huei Lok <[email protected]>---
arch/arm/mach-socfpga/Makefile | 15 ++- arch/arm/mach-socfpga/reset_manager_soc64.c | 94 +++++++++++++++++++ ...>reset_manager_soc64_platform_families.c} | 75 +--------------3 files changed, 106 insertions(+), 78 deletions(-)create mode 100644
arch/arm/mach-socfpga/reset_manager_soc64.crenamearch/arm/mach-socfpga/{reset_manager_s10.c=>reset_manager_soc64_platform_families.c} (78%)arch/arm/mach-socfpga/Makefile +0
-0@@ -34,7 +34,8 @@ obj-y += lowlevel_init_soc64.oobj-y += mailbox_s10.o
obj-y += misc_soc64.o
obj-y += mmu-arm64_s10.oarch/arm/mach-socfpga/Makefile +2
-1-obj-y += reset_manager_s10.o +obj-y += reset_manager_soc64.o +obj-y += reset_manager_soc64_platform_families.oobj-y += system_manager_soc64.o
obj-y += timer_s10.o
obj-y += wrap_handoff_soc64.oarch/arm/mach-socfpga/Makefile +0
-0@@ -47,7 +48,8 @@ obj-y += lowlevel_init_soc64.oobj-y += mailbox_s10.o
obj-y += misc_soc64.o
obj-y += mmu-arm64_s10.oarch/arm/mach-socfpga/Makefile +2
-1-obj-y += reset_manager_s10.o +obj-y += reset_manager_soc64.o +obj-y += reset_manager_soc64_platform_families.oobj-$(CONFIG_SOCFPGA_SECURE_VAB_AUTH) += secure_vab.o obj-y += system_manager_soc64.o
obj-y += timer_s10.oarch/arm/mach-socfpga/Makefile +0
-0@@ -62,7 +64,8 @@ obj-y += clock_manager_agilex5.oobj-y += mailbox_s10.o
obj-y += misc_soc64.o
obj-y += mmu-arm64_s10.oarch/arm/mach-socfpga/Makefile +2
-1-obj-y += reset_manager_s10.o +obj-y += reset_manager_soc64.o +obj-y += reset_manager_soc64_platform_families.oobj-y += wrap_handoff_soc64.o
obj-y += wrap_pll_config_soc64.o
obj-y += altera-sysmgr.oarch/arm/mach-socfpga/Makefile +0
-0@@ -79,7 +82,8 @@ obj-y += lowlevel_init_soc64.oobj-y += mailbox_s10.o
obj-y += misc_soc64.o
obj-y += mmu-arm64_s10.oarch/arm/mach-socfpga/Makefile +2
-1-obj-y += reset_manager_s10.o +obj-y += reset_manager_soc64.o +obj-y += reset_manager_soc64_platform_families.oobj-$(CONFIG_SOCFPGA_SECURE_VAB_AUTH) += secure_vab.o obj-y += system_manager_soc64.o
obj-y += timer_s10.oarch/arm/mach-socfpga/Makefile +0
-0@@ -95,7 +99,8 @@ obj-y += lowlevel_init_soc64.oobj-y += mailbox_s10.o
obj-y += misc_soc64.o
obj-y += mmu-arm64_s10.oarch/arm/mach-socfpga/Makefile +2
-1-obj-y += reset_manager_s10.o +obj-y += reset_manager_soc64.o +obj-y += reset_manager_soc64_platform_families.oobj-$(CONFIG_SOCFPGA_SECURE_VAB_AUTH) += secure_vab.o obj-y += system_manager_soc64.o
obj-y += timer_s10.oarch/arm/mach-socfpga/reset_manager_soc64.c new file +5
-0@@ -0,0 +1,94 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (C) 2016-2018 Intel Corporation <www.intel.com> +* Copyright (C) 2025 Altera Corporation <www.altera.com> +*
arch/arm/mach-socfpga/reset_manager_soc64.c line 15
Quoted 10 lines
arch/arm/mach-socfpga/reset_manager_soc64.c new file +10
-0+*/ + +#include <errno.h> +#include <exports.h> +#include <hang.h> +#include <asm/global_data.h> +#include <asm/io.h> +#include <asm/secure.h> +#include <asm/arch/reset_manager.h> +#include <asm/arch/smc_api.h>
Includes SMC + secure headers, but the functions shown don’t use them. Prefer minimal includes. This improves compile times and reduces coupling
arch/arm/mach-socfpga/reset_manager_soc64.c line 24
Quoted 9 lines
arch/arm/mach-socfpga/reset_manager_soc64.c new file +9
-0+#include <asm/arch/system_manager.h> +#include <asm/arch/timer.h> +#include <dt-bindings/reset/altr,rst-mgr-s10.h> +#include <linux/iopoll.h> +#include <linux/intel-smc.h> +#include <wait_bit.h> + +DECLARE_GLOBAL_DATA_PTR ; +
[...]
Best regards,
Tien Fong
Hi Tien Fong,
Thanks for the review.
I agree with both points and will fold them into v2:
Quoted 8 lines
Quoted 6 lines
The SoCFPGA SoC64 reset manager code is currently built as reset_manager_s10.o even though it is shared across multiple SoC64 families.
Split the implementation into:
- reset_manager_soc64.o for common SoC64 logic
- reset_manager_soc64_platform_families.o for platform-family-specificConsider a shorter/more conventional name than
reset_manager_soc64_platform_families.ce.g.reset_manager_soc64_families.c
Rename reset_manager_soc64_platform_families.c to reset_manager_soc64_families.c (and update the Makefile accordingly).
Quoted 10 lines
arch/arm/mach-socfpga/reset_manager_soc64.c line 15
Quoted 8 lines
arch/arm/mach-socfpga/reset_manager_soc64.c new file +8
-0+#include <errno.h> +#include <exports.h> +#include <hang.h> +#include <asm/global_data.h> +#include <asm/io.h> +#include <asm/secure.h> +#include <asm/arch/reset_manager.h> +#include <asm/arch/smc_api.h> Includes SMC + secure headers, but the functions shown don’t use them. Prefer minimal includes. This improves compile times and reduces coupling
Trim reset_manager_soc64.c & reset_manager_soc64_families.c to only the includes that are actually used.
Best regards,
Lok