[PATCH v1 02/20] arm: socfpga: Add support for agilex5 clock manager
tien.fong.chee at intel.com
tien.fong.chee at intel.com
Fri Sep 20 09:02:24 CEST 2024
From: Tien Fong Chee <tien.fong.chee at intel.com>
Adding mechanism to retrieve base address for Agilex5 Clock Mananger.
Signed-off-by: Tien Fong Chee <tien.fong.chee at intel.com>
---
arch/arm/mach-socfpga/misc.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c
index 495ba2a0d41..6cf2ee60038 100644
--- a/arch/arm/mach-socfpga/misc.c
+++ b/arch/arm/mach-socfpga/misc.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0+
/*
- * Copyright (C) 2012-2017 Altera Corporation <www.altera.com>
+ * Copyright (C) 2012-2024 Altera Corporation <www.altera.com>
*/
#include <config.h>
@@ -252,15 +252,19 @@ void socfpga_get_managers_addr(void)
if (ret)
hang();
-#ifdef CONFIG_TARGET_SOCFPGA_AGILEX
- ret = socfpga_get_base_addr("intel,agilex-clkmgr",
- &socfpga_clkmgr_base);
-#elif IS_ENABLED(CONFIG_TARGET_SOCFPGA_N5X)
- ret = socfpga_get_base_addr("intel,n5x-clkmgr",
- &socfpga_clkmgr_base);
-#else
- ret = socfpga_get_base_addr("altr,clk-mgr", &socfpga_clkmgr_base);
-#endif
+ if (IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX))
+ ret = socfpga_get_base_addr("intel,agilex-clkmgr",
+ &socfpga_clkmgr_base);
+ else 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_AGILEX5))
+ ret = socfpga_get_base_addr("intel,agilex5-clkmgr",
+ &socfpga_clkmgr_base);
+ else
+ ret = socfpga_get_base_addr("altr,clk-mgr",
+ &socfpga_clkmgr_base);
+
if (ret)
hang();
}
--
2.25.1
More information about the U-Boot
mailing list