Skip to contentSkip to conversation

drivers: fpga: Enable SOC64 support, remove Agilex/Stratix10 checks for FPGA bridge

PATCH In review Chen Huei Lok 2 participants 3 messages Feb 5 FPGA manager framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: fpga: Enable SOC64 support, remove Agilex/Stratix10 checks for FPGA bridge

From: drosdi <[email protected]>

Replace the conditional compilation checks for Agilex and Stratix10 with a check for SOC64 in drivers/fpga/altera.c.

---
 drivers/fpga/altera.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/fpga/altera.c +2 -4
index 4a9aa74357e..246df72cb89 100644
@@ -12,8 +12,7 @@
 /*
  *  Altera FPGA support
  */
-#if IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX) || \
-	IS_ENABLED(CONFIG_TARGET_SOCFPGA_STRATIX10)
+#if IS_ENABLED(CONFIG_TARGET_SOCFPGA_SOC64)
 #include <asm/arch/misc.h>
 #endif
 #include <errno.h>
@@ -48,8 +47,7 @@ static const struct altera_fpga {
 #endif
 };
 
-#if IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX) || \
-	IS_ENABLED(CONFIG_TARGET_SOCFPGA_STRATIX10)
+#if IS_ENABLED(CONFIG_TARGET_SOCFPGA_SOC64)
 int fpga_is_partial_data(int devnum, size_t img_len)
 {
 	/*
Signature · 1 line
2.43.7
#1 lore raw
Quoted 4 lines · Chen Huei Lok

From: drosdi <[email protected]>

Replace the conditional compilation checks for Agilex and Stratix10 with a check for SOC64 in drivers/fpga/altera.c.

Add an explaination on why this change.

Regards
Peng

#2 lore raw

Hi Peng,

Quoted 10 lines · Chen Huei Lok
Quoted 4 lines

From: drosdi <[email protected]>

Replace the conditional compilation checks for Agilex and Stratix10 with a check for SOC64 in drivers/fpga/altera.c.

Add an explaination on why this change.

Regards
Peng

Thanks for the comment.

The change replaces the Agilex/Stratix10 checks with a SOC64 check because this code applies not only to Stratix10 and Agilex, but also to Agilex7M and Agilex5, which are SOC64 devices. Consolidating the check simplifies the code and ensures it covers all relevant SOC64 platforms.

I will reword the commit message and reflect it in v2.

Best regards,
Lok