[PATCH v1] arm: socfpga: soc64: separate reset manager into common and platform-family parts
Chee, Tien Fong
tien.fong.chee at altera.com
Mon Apr 13 10:33:53 CEST 2026
Hi Chen Huei,
> From: Lok, Chen Huei <chen.huei.lok at altera.com>
> Sent: Tuesday, February 10, 2026 1:23 PM
> To: u-boot at lists.denx.de <u-boot at lists.denx.de>
> Cc: Marek Vasut <marex at denx.de>; Simon Goldschmidt
> <simon.k.r.goldschmidt at gmail.com>; Chee, Tien Fong
> <tien.fong.chee at altera.com>; Tom Rini <trini at konsulko.com>; Rosdi, Danish
> Ahmad <danish.ahmad.rosdi at altera.com>; Yuslaimi, Alif Zakuan
> <alif.zakuan.yuslaimi at altera.com>; Maniyam, Dinesh
> <dinesh.maniyam at altera.com>; Ng, Boon Khai <boon.khai.ng at altera.com>; Hea, Kok
> Kiang <kok.kiang.hea at altera.com>; Lok, Chen Huei <chen.huei.lok at altera.com>
> 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
> 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 <chen.huei.lok at altera.com>
> ---
> 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%)
> diff --git a/arch/arm/mach-socfpga/Makefile b/arch/arm/mach-socfpga/Makefile
> index 4e85bfb00d4..71587fd3caa 100644
> --- a/arch/arm/mach-socfpga/Makefile
> +++ b/arch/arm/mach-socfpga/Makefile
> @@ -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
> diff --git a/arch/arm/mach-socfpga/reset_manager_soc64.c
> b/arch/arm/mach-socfpga/reset_manager_soc64.c
> new file mode 100644
> index 00000000000..71e9512af49
> --- /dev/null
> +++ b/arch/arm/mach-socfpga/reset_manager_soc64.c
> @@ -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>
> + *
> + */
> +
> +#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
> +#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
More information about the U-Boot
mailing list