Rename Stratix10 FPGA driver and support Agilex
cover Rename Stratix10 FPGA driver and support Agilex
- Rename Stratix10 FPGA driver to 'Intel FPGA SDM Mailbox'.
- Add watchdog reset when configuring the FPGA.
- Enable 'Intel FPGA SDM Mailbox' for Agilex.
Chee Hong Ang (3):
fpga: altera: Rename Stratix10 FPGA to Intel FPGA SDM Mailbox
fpga: intel_sdm_mb: Add watchdog reset
arm: socfpga: agilex: Enable FPGA Full Reconfiguration support
arch/arm/mach-socfpga/Kconfig | 3 ++-
arch/arm/mach-socfpga/misc_s10.c | 2 +-
drivers/fpga/Kconfig | 14 +++++++-------
drivers/fpga/Makefile | 2 +-
drivers/fpga/altera.c | 7 ++++---
drivers/fpga/{stratix10.c => intel_sdm_mb.c} | 5 ++++-
include/altera.h | 9 +++++----
7 files changed, 24 insertions(+), 18 deletions(-)
rename drivers/fpga/{stratix10.c => intel_sdm_mb.c} (97%)Signature · 1 line
2.13.0
PATCH 1/3 fpga: altera: Rename Stratix10 FPGA to Intel FPGA SDM Mailbox
Rename Stratix10 FPGA driver to Intel FPGA SDM Mailbox driver because it is using generic SDM (Secure Device Manager) Mailbox interface shared by other platform (e.g. Agilex) as well.
---
arch/arm/mach-socfpga/Kconfig | 2 +-
arch/arm/mach-socfpga/misc_s10.c | 2 +-
drivers/fpga/Kconfig | 12 ++++++------
drivers/fpga/Makefile | 2 +-
drivers/fpga/altera.c | 7 ++++---
drivers/fpga/{stratix10.c => intel_sdm_mb.c} | 2 +-
include/altera.h | 9 +++++----
7 files changed, 19 insertions(+), 17 deletions(-)
rename drivers/fpga/{stratix10.c => intel_sdm_mb.c} (98%)arch/arm/mach-socfpga/Kconfig +1 -1
@@ -79,7 +79,7 @@ config TARGET_SOCFPGA_STRATIX10 select ARMV8_MULTIENTRY select ARMV8_SET_SMPEN select ARMV8_SPIN_TABLE - select FPGA_STRATIX10 + select FPGA_INTEL_SDM_MAILBOX choice prompt "Altera SOCFPGA board select"
arch/arm/mach-socfpga/misc_s10.c +1 -1
@@ -31,7 +31,7 @@ DECLARE_GLOBAL_DATA_PTR;static Altera_desc altera_fpga[] = { {/* Family */ - Intel_FPGA_Stratix10, + Intel_FPGA_SDM_Mailbox,/* Interface type */ secure_device_manager_mailbox,/* No limitation as additional data will be ignored */
drivers/fpga/Kconfig +6 -6
@@ -31,16 +31,16 @@ config FPGA_CYCLON2 Enable FPGA driver for loading bitstream in BIT and BIN format on Altera Cyclone II device. -config FPGA_STRATIX10 - bool "Enable Altera FPGA driver for Stratix 10" +config FPGA_INTEL_SDM_MAILBOX + bool "Enable Intel FPGA Full Reconfiguration SDM Mailbox driver" depends on TARGET_SOCFPGA_STRATIX10 select FPGA_ALTERA help - Say Y here to enable the Altera Stratix 10 FPGA specific driver + Say Y here to enable the Intel FPGA Full Reconfig SDM Mailbox driver - This provides common functionality for Altera Stratix 10 devices. - Enable FPGA driver for writing bitstream into Altera Stratix10 - device. + This provides common functionality for Intel FPGA devices. + Enable FPGA driver for writing full bitstream into Intel FPGA + devices through SDM (Secure Device Manager) Mailbox. config FPGA_XILINX bool "Enable Xilinx FPGA drivers"
drivers/fpga/Makefile +1 -1
@@ -16,9 +16,9 @@ ifdef CONFIG_FPGA_ALTERA obj-y += altera.o obj-$(CONFIG_FPGA_ACEX1K) += ACEX1K.o obj-$(CONFIG_FPGA_CYCLON2) += cyclon2.o +obj-$(CONFIG_FPGA_INTEL_SDM_MAILBOX) += intel_sdm_mb.o obj-$(CONFIG_FPGA_STRATIX_II) += stratixII.o obj-$(CONFIG_FPGA_STRATIX_V) += stratixv.o -obj-$(CONFIG_FPGA_STRATIX10) += stratix10.o obj-$(CONFIG_FPGA_SOCFPGA) += socfpga.o obj-$(CONFIG_TARGET_SOCFPGA_GEN5) += socfpga_gen5.o obj-$(CONFIG_TARGET_SOCFPGA_ARRIA10) += socfpga_arria10.o
drivers/fpga/altera.c +4 -3
@@ -40,12 +40,13 @@ static const struct altera_fpga { #if defined(CONFIG_FPGA_STRATIX_V) { Altera_StratixV, "StratixV", stratixv_load, NULL, NULL }, #endif -#if defined(CONFIG_FPGA_STRATIX10) - { Intel_FPGA_Stratix10, "Stratix10", stratix10_load, NULL, NULL }, -#endif #if defined(CONFIG_FPGA_SOCFPGA) { Altera_SoCFPGA, "SoC FPGA", socfpga_load, NULL, NULL }, #endif +#if defined(CONFIG_FPGA_INTEL_SDM_MAILBOX) + { Intel_FPGA_SDM_Mailbox, "Intel SDM Mailbox", intel_sdm_mb_load, NULL, + NULL }, +#endif }; static int altera_validate(Altera_desc *desc, const char *fn)
drivers/fpga/intel_sdm_mb.c renamed from drivers/fpga/stratix10.c +1 -1
@@ -247,7 +247,7 @@ static int send_reconfig_data(const void *rbf_data, size_t rbf_size,* This is the interface used by FPGA driver. * Return 0 for success, non-zero for error. */ -int stratix10_load (Altera_desc *desc,const void *rbf_data,size_t rbf_size) +int intel_sdm_mb_load (Altera_desc *desc,const void *rbf_data,size_t rbf_size) {int ret;u32 resp_len =2 ;
include/altera.h +5 -4
@@ -56,10 +56,10 @@ enum altera_family { Altera_StratixII,/* StratixV Family */ Altera_StratixV, -/* Stratix10 Family */ - Intel_FPGA_Stratix10,/* SoCFPGA Family */ Altera_SoCFPGA, +/* Intel FPGA Family with SDM (Secure Device Manager) Mailbox */ + Intel_FPGA_SDM_Mailbox,/* Add new models here */
@@ -120,8 +120,9 @@ int socfpga_load(Altera_desc *desc, const void *rbf_data, size_t rbf_size);int stratixv_load (Altera_desc *desc,const void *rbf_data,size_t rbf_size);#endif -#ifdef CONFIG_FPGA_STRATIX10 -int stratix10_load (Altera_desc *desc,const void *rbf_data,size_t rbf_size); +#ifdef CONFIG_FPGA_INTEL_SDM_MAILBOX +int intel_sdm_mb_load (Altera_desc *desc,const void *rbf_data, +size_t rbf_size);#endif #endif /* _ALTERA_H_ */
Signature · 1 line
2.13.0
Tan
PATCH 1/3 fpga: altera: Rename Stratix10 FPGA to Intel FPGA SDM Mailbox
Quoted 15 lines
-----Original Message-----
From: Ang, Chee Hong <[email protected]>
Sent: Friday, August 7, 2020 11:50 AM
To: u-boot at lists.denx.de
Cc: Marek Vasut <[email protected]>; Simon Goldschmidt <[email protected]>; Tom Rini <[email protected]>; See, Chin Liang <[email protected]>; Tan, Ley Foon <[email protected]>; Ang, Chee Hong <[email protected]>; Chee, Tien Fong <[email protected]>; Lim, Elly Siew Chin <[email protected]>
Subject: [PATCH v1 1/3] fpga: altera: Rename Stratix10 FPGA to Intel FPGA SDM Mailbox
Quoted 6 lines
Rename Stratix10 FPGA driver to Intel FPGA SDM Mailbox driver because it is using generic SDM (Secure Device Manager) Mailbox interface shared by other platform (e.g. Agilex) as well.
Signed-off-by Chee Hong Ang <[email protected]>---
Regards
Ley Foon
PATCH 2/3 fpga: intel_sdm_mb: Add watchdog reset
In reply to Chee Hong AngEnsure watchdog reset is not triggered if the fpga reconfiguration is taking too long.
--- drivers/fpga/intel_sdm_mb.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/fpga/intel_sdm_mb.c +3 -0
@@ -6,6 +6,7 @@#include <common.h> #include <altera.h> #include <log.h> +#include <watchdog.h> #include <asm/arch/mailbox_s10.h> #include <linux/delay.h>
@@ -113,6 +114,7 @@ static int reconfig_status_polling_resp(void)puts ("." );udelay (RECONFIG_STATUS_INTERVAL_DELAY_US ); +WATCHDOG_RESET (); }return -ETIMEDOUT ;
@@ -238,6 +240,7 @@ static int send_reconfig_data(const void *rbf_data, size_t rbf_size,if (resp_err && !xfer_count)return resp_err; } +WATCHDOG_RESET (); }return 0 ;
Signature · 1 line
2.13.0
Tan
PATCH 2/3 fpga: intel_sdm_mb: Add watchdog reset
Quoted 14 lines
-----Original Message-----
From: Ang, Chee Hong <[email protected]>
Sent: Friday, August 7, 2020 11:50 AM
To: u-boot at lists.denx.de
Cc: Marek Vasut <[email protected]>; Simon Goldschmidt <[email protected]>; Tom Rini <[email protected]>; See, Chin Liang <[email protected]>; Tan, Ley Foon <[email protected]>; Ang, Chee Hong <[email protected]>; Chee, Tien Fong <[email protected]>; Lim, Elly Siew Chin <[email protected]>
Subject: [PATCH v1 2/3] fpga:intel_sdm_mb: Add watchdog reset
Quoted 8 lines
Ensure watchdog reset is not triggered if the fpga reconfiguration is taking too long.
Signed-off-by Chee Hong Ang <[email protected]>--- drivers/fpga/intel_sdm_mb.c | 3 +++ 1 file changed, 3 insertions(+)
Regards
Ley Foon
PATCH 3/3 arm: socfpga: agilex: Enable FPGA Full Reconfiguration support
In reply to Chee Hong AngEnable FPGA full reconfiguration support with Intel FPGA SDM Mailbox driver for Agilex.
--- arch/arm/mach-socfpga/Kconfig | 1 + drivers/fpga/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-socfpga/Kconfig +1 -0
@@ -35,6 +35,7 @@ config TARGET_SOCFPGA_AGILEX select ARMV8_SET_SMPEN select ARMV8_SPIN_TABLE select CLK + select FPGA_INTEL_SDM_MAILBOX select NCORE_CACHE select SPL_CLK if SPL
drivers/fpga/Kconfig +1 -1
@@ -33,7 +33,7 @@ config FPGA_CYCLON2 config FPGA_INTEL_SDM_MAILBOX bool "Enable Intel FPGA Full Reconfiguration SDM Mailbox driver" - depends on TARGET_SOCFPGA_STRATIX10 + depends on TARGET_SOCFPGA_STRATIX10 || TARGET_SOCFPGA_AGILEX select FPGA_ALTERA help Say Y here to enable the Intel FPGA Full Reconfig SDM Mailbox driver
Signature · 1 line
2.13.0
Tan
PATCH 3/3 arm: socfpga: agilex: Enable FPGA Full Reconfiguration support
Quoted 50 lines
-----Original Message-----
From: Ang, Chee Hong <[email protected]>
Sent: Friday, August 7, 2020 11:50 AM
To: u-boot at lists.denx.de
Cc: Marek Vasut <[email protected]>; Simon Goldschmidt <[email protected]>; Tom Rini <[email protected]>; See, Chin Liang <[email protected]>; Tan, Ley Foon <[email protected]>; Ang, Chee Hong <[email protected]>; Chee, Tien Fong <[email protected]>; Lim, Elly Siew Chin <[email protected]>
Subject: [PATCH v1 3/3] arm: socfpga: agilex: Enable FPGA Full Reconfiguration supportEnable FPGA full reconfiguration support with Intel FPGA SDM Mailbox driver for Agilex.
Signed-off-by Chee Hong Ang <[email protected]>--- arch/arm/mach-socfpga/Kconfig | 1 + drivers/fpga/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)arch/arm/mach- renamed from arch/arm/mach-socfpga/Kconfig +0
-0socfpga/Kconfig index
32549913cc..26f2cf8e47100644arch/arm/mach-socfpga/Kconfig +1
-0@@ -35,6 +35,7 @@ config TARGET_SOCFPGA_AGILEX select ARMV8_SET_SMPEN select ARMV8_SPIN_TABLE select CLK + select FPGA_INTEL_SDM_MAILBOX select NCORE_CACHE select SPL_CLK if SPLdrivers/fpga/Kconfig index renamed from drivers/fpga/Kconfig +0
-0
dd0b39a8d1..425b52a926100644drivers/fpga/Kconfig +1
-1@@ -33,7 +33,7 @@ config FPGA_CYCLON2 config FPGA_INTEL_SDM_MAILBOX bool "Enable Intel FPGA Full Reconfiguration SDM Mailbox driver" - depends on TARGET_SOCFPGA_STRATIX10 + depends on TARGET_SOCFPGA_STRATIX10 ||
TARGET_SOCFPGA_AGILEXdrivers/fpga/Kconfig +0
-0select FPGA_ALTERA help Say Y here to enable the Intel FPGA Full Reconfig SDM Mailbox
Quoted 2 lines
driver
--
Regards
Ley Foon