Add Intel Arria 10 SoC FPGA driver
v4 cover Add Intel Arria 10 SoC FPGA driver
From: Tien Fong Chee <[email protected]>
This is the 4th version of patchset to adds support for Intel Arria 10 SoC FPGA driver. This version mainly resolved comments from Ley Foon and Dinh in [v3]. This series is working on top of u-boot-socfpga-next branch
http://git.denx.de/?p=u-boot/u-boot-socfpga.git;a=shortlog;h=refs/heads/next.
[v3]: https://www.mail-archive.com/u-boot at lists.denx.de/msg249160.html
v3 -> v4 changes:
-----------------
- Fixed typo on patch 1 and patch 2.
- Created separate patch for enabling FPGA driver build on SPL.
- No change on patch 3.
- Removed some unnecessary wrappers and unused function.
Patchset history
----------------
[v1]: https://www.mail-archive.com/u-boot at lists.denx.de/msg247788.html [v2]: https://www.mail-archive.com/u-boot at lists.denx.de/msg248541.html
Tien Fong Chee (5):
arm: socfpga: Remove unused passing parameter of socfpga_bridges_reset
arm: socfpga: Restructure FPGA driver in the preparation to support
A10.
arm: socfpga: Enable FPGA driver on SPL
arm: socfpga: Move FPGA manager driver to FPGA driver
arm: socfpga: Add FPGA driver support for Arria 10
arch/arm/mach-socfpga/Makefile | 1 -
arch/arm/mach-socfpga/fpga_manager.c | 78 ----
arch/arm/mach-socfpga/include/mach/fpga_manager.h | 70 +--
.../include/mach/fpga_manager_arria10.h | 100 +++++
.../mach/{fpga_manager.h => fpga_manager_gen5.h} | 69 ++-
.../include/mach/reset_manager_arria10.h | 2 +-
arch/arm/mach-socfpga/reset_manager_arria10.c | 4 +-
drivers/Makefile | 1 +
drivers/fpga/Makefile | 2 +
drivers/fpga/socfpga.c | 241 +----------
drivers/fpga/socfpga_arria10.c | 479 +++++++++++++++++++++
drivers/fpga/{socfpga.c => socfpga_gen5.c} | 98 ++---
include/configs/socfpga_common.h | 3 +-
13 files changed, 684 insertions(+), 464 deletions(-)
delete mode 100644 arch/arm/mach-socfpga/fpga_manager.c
create mode 100644 arch/arm/mach-socfpga/include/mach/fpga_manager_arria10.h
copy arch/arm/mach-socfpga/include/mach/{fpga_manager.h => fpga_manager_gen5.h} (57%)
create mode 100644 drivers/fpga/socfpga_arria10.c
copy drivers/fpga/{socfpga.c => socfpga_gen5.c} (85%)Signature · 1 line
1.8.2.3
PATCH v4 1/5 arm: socfpga: Remove unused passing parameter of socfpga_bridges_reset
From: Tien Fong Chee <[email protected]>
Remove parameter from socfpga_bridges_reset(), and keeping this function for single purpose which is just triggering reset on bridges. socfpga_reset_deassert_bridges_handoff() can be called for releasing reset on any bridges based on the bridge setting defined in fdt.
--- arch/arm/mach-socfpga/include/mach/reset_manager_arria10.h | 2 +- arch/arm/mach-socfpga/reset_manager_arria10.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-socfpga/include/mach/reset_manager_arria10.h +1 -1
@@ -17,7 +17,7 @@ int socfpga_reset_deassert_bridges_handoff(void);void socfpga_reset_assert_fpga_connected_peripherals (void );void socfpga_reset_deassert_osc1wd0 (void );void socfpga_reset_uart (int assert); -int socfpga_bridges_reset (int enable); +int socfpga_bridges_reset (void );struct socfpga_reset_manager {u32 stat;
arch/arm/mach-socfpga/reset_manager_arria10.c +2 -2
@@ -318,13 +318,13 @@ void socfpga_per_reset_all(void) }#if defined(CONFIG_SOCFPGA_VIRTUAL_TARGET ) -int socfpga_bridges_reset (int enable) +int socfpga_bridges_reset (void ) {/* For SoCFPGA-VT, this is NOP. */ return 0 ; }#else -int socfpga_bridges_reset (int enable) +int socfpga_bridges_reset (void ) {int ret;
Signature · 1 line
1.8.2.3
PATCH v4 2/5 arm: socfpga: Restructure FPGA driver in the preparation to support A10.
In reply to tien.fong.chee at intel.comFrom: Tien Fong Chee <[email protected]>
Move FPGA driver which is Gen5 specific code into Gen5 driver file and keeping common FPGA driver er intact. All the changes are still keeping in driver/fpga/ and no functional change. Subsequent patch would move FPGA manager driver from arch/arm into driver/fpga/ .
---
arch/arm/mach-socfpga/Makefile | 2 +-
arch/arm/mach-socfpga/include/mach/fpga_manager.h | 68 +-----
.../mach/{fpga_manager.h => fpga_manager_gen5.h} | 69 +++---
drivers/fpga/Makefile | 1 +
drivers/fpga/socfpga.c | 241 +--------------------
drivers/fpga/{socfpga.c => socfpga_gen5.c} | 54 +----
6 files changed, 49 insertions(+), 386 deletions(-)
copy arch/arm/mach-socfpga/include/mach/{fpga_manager.h => fpga_manager_gen5.h} (57%)
copy drivers/fpga/{socfpga.c => socfpga_gen5.c} (83%)arch/arm/mach-socfpga/Makefile +1 -1
@@ -9,7 +9,6 @@ obj-y += board.o obj-y += clock_manager.o -obj-y += fpga_manager.o obj-y += misc.o obj-y += reset_manager.o obj-y += timer.o
@@ -21,6 +20,7 @@ obj-y += reset_manager_gen5.o obj-y += scan_manager.o obj-y += system_manager_gen5.o obj-y += wrap_pll_config.o +obj-y += fpga_manager.o endif ifdef CONFIG_TARGET_SOCFPGA_ARRIA10
arch/arm/mach-socfpga/include/mach/fpga_manager.h +12 -56
84 lines not on this page · raw message
arch/arm/mach-socfpga/include/mach/fpga_manager_gen5.h renamed from arch/arm/mach-socfpga/include/mach/fpga_manager.h +30 -39
83 lines not on this page · raw message
drivers/fpga/Makefile +1 -0
@@ -20,4 +20,5 @@ obj-$(CONFIG_FPGA_CYCLON2) += cyclon2.o obj-$(CONFIG_FPGA_STRATIX_II) += stratixII.o obj-$(CONFIG_FPGA_STRATIX_V) += stratixv.o obj-$(CONFIG_FPGA_SOCFPGA) += socfpga.o +obj-$(CONFIG_TARGET_SOCFPGA_GEN5) += socfpga_gen5.o endif
drivers/fpga/socfpga.c +4 -237
262 lines not on this page · raw message
drivers/fpga/socfpga_gen5.c renamed from drivers/fpga/socfpga.c +1 -53
72 lines not on this page · raw message
Signature · 1 line
1.8.2.3
Dinh Nguyen
maintainerPATCH v4 2/5 arm: socfpga: Restructure FPGA driver in the preparation to support A10.
Quoted 4 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Move FPGA driver which is Gen5 specific code into Gen5 driver file and keeping common FPGA driver er intact. All the changes are still keeping
remove the 'er'.
Also remove the ending '.' at the end of the commit header.
Dinh
Chee
PATCH v4 2/5 arm: socfpga: Restructure FPGA driver in the preparation to support A10.
Quoted 5 lines · Dinh Nguyen
Quoted 3 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Quoted 8 lines
Quoted 3 lines
Move FPGA driver which is Gen5 specific code into Gen5 driver file and keeping common FPGA driver er intact. All the changes are still keeping
remove the 'er'.
Also remove the ending '.' at the end of the commit header.
Dinh
Okay.
PATCH v4 3/5 arm: socfpga: Enable FPGA driver on SPL
In reply to tien.fong.chee at intel.comFrom: Tien Fong Chee <[email protected]>
Enable FPGA driver build for SPL. FPGA driver is needed for SPL to configure and getting DDR up before loading U-boot into DDR and booting from there.
--- drivers/Makefile | 1 + 1 file changed, 1 insertion(+)
drivers/Makefile +1 -0
@@ -47,6 +47,7 @@ obj-$(CONFIG_OMAP_USB_PHY) += usb/phy/ obj-$(CONFIG_SPL_SATA_SUPPORT) += block/ obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += block/ obj-$(CONFIG_SPL_MMC_SUPPORT) += block/ +obj-$(CONFIG_FPGA) += fpga/ endif ifdef CONFIG_TPL_BUILD
Signature · 1 line
1.8.2.3
Dinh Nguyen
maintainerPATCH v4 3/5 arm: socfpga: Enable FPGA driver on SPL
Quoted 16 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Enable FPGA driver build for SPL. FPGA driver is needed for SPL to configure and getting DDR up before loading U-boot into DDR and booting from there.
Signed-off-by Tien Fong Chee <[email protected]>--- drivers/Makefile | 1 + 1 file changed, 1 insertion(+)drivers/Makefile +0
-0
drivers/Makefile obj-$(CONFIG_OMAP_USB_PHY) += usb/phy/ · line 50
Quoted 4 lines
drivers/Makefile +1
-0@@ -47,6 +47,7 @@ obj-$(CONFIG_OMAP_USB_PHY) += usb/phy/ obj-$(CONFIG_SPL_SATA_SUPPORT) += block/ obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += block/ obj-$(CONFIG_SPL_MMC_SUPPORT) += block/ +obj-$(CONFIG_FPGA) += fpga/
There's a SPL_FPGA_SUPPORT already defined. Can you use that?
Dinh
Dinh Nguyen
maintainerPATCH v4 3/5 arm: socfpga: Enable FPGA driver on SPL
Quoted 14 lines · Dinh Nguyen
Quoted 11 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Enable FPGA driver build for SPL. FPGA driver is needed for SPL to configure and getting DDR up before loading U-boot into DDR and booting from there.
Signed-off-by Tien Fong Chee <[email protected]>--- drivers/Makefile | 1 + 1 file changed, 1 insertion(+)
Quoted 12 lines
drivers/Makefile obj-$(CONFIG_OMAP_USB_PHY) += usb/phy/ · line 50
Quoted 9 lines
drivers/Makefile +1
-0@@ -47,6 +47,7 @@ obj-$(CONFIG_OMAP_USB_PHY) += usb/phy/ obj-$(CONFIG_SPL_SATA_SUPPORT) += block/ obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += block/ obj-$(CONFIG_SPL_MMC_SUPPORT) += block/ +obj-$(CONFIG_FPGA) += fpga/There's a
SPL_FPGA_SUPPORTalready defined. Can you use that?
Also with the above change, you're building in the FPGA driver into the SPL for Gen5 devices, you probably didn't want that.
CC spl/drivers/fpga/fpga.o CC spl/drivers/fpga/altera.o CC spl/drivers/fpga/socfpga.o
Dinh
Chee
PATCH v4 3/5 arm: socfpga: Enable FPGA driver on SPL
Quoted 19 lines · Dinh Nguyen
Quoted 17 lines · Dinh Nguyen
Quoted 13 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Enable FPGA driver build for SPL. FPGA driver is needed for SPL to configure and getting DDR up before loading U-boot into DDR and
booting from there.Signed-off-by Tien Fong Chee <[email protected]>---
drivers/Makefile | 1 +1 file changed, 1 insertion(+)
Quoted 11 lines
Quoted 11 lines
Quoted 9 lines
drivers/Makefile +0
-0@@ -47,6 +47,7 @@ obj-$(CONFIG_OMAP_USB_PHY) += usb/phy/obj-$(CONFIG_SPL_SATA_SUPPORT) +=
block/
obj-$(CONFIG_SPL_USB_HOST_SUPPORT) +=block/
obj-$(CONFIG_SPL_MMC_SUPPORT) +=block/
+obj-$(CONFIG_FPGA) += fpga/There's a
SPL_FPGA_SUPPORTalready defined. Can you use that?
Okay, sure.
Quoted 9 lines
Also with the above change, you're building in the FPGA driver into the
SPL for Gen5 devices, you probably didn't want that.CC spl/drivers/fpga/fpga.o
CC spl/drivers/fpga/altera.o
CC spl/drivers/fpga/socfpga.oDinh
PATCH v4 4/5 arm: socfpga: Move FPGA manager driver to FPGA driver
In reply to tien.fong.chee at intel.comFrom: Tien Fong Chee <[email protected]>
Move FPGA manager driver which is Gen5 specific code from arch/arm/ into FPGA driver at driver/fpga/. No functional change.
--- arch/arm/mach-socfpga/Makefile | 1 - arch/arm/mach-socfpga/fpga_manager.c | 78 ------------------------------------ drivers/fpga/socfpga_gen5.c | 54 +++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 79 deletions(-) delete mode 100644 arch/arm/mach-socfpga/fpga_manager.c
arch/arm/mach-socfpga/Makefile +0 -1
@@ -20,7 +20,6 @@ obj-y += reset_manager_gen5.o obj-y += scan_manager.o obj-y += system_manager_gen5.o obj-y += wrap_pll_config.o -obj-y += fpga_manager.o endif ifdef CONFIG_TARGET_SOCFPGA_ARRIA10
arch/arm/mach-socfpga/fpga_manager.c deleted +0 -78
78 lines not on this page · raw message
drivers/fpga/socfpga_gen5.c +54 -0
60 lines not on this page · raw message
Signature · 1 line
1.8.2.3
PATCH v4 5/5 arm: socfpga: Add FPGA driver support for Arria 10
In reply to tien.fong.chee at intel.comFrom: Tien Fong Chee <[email protected]>
Add FPGA driver support for Arria 10.
--- arch/arm/mach-socfpga/include/mach/fpga_manager.h | 2 + .../include/mach/fpga_manager_arria10.h | 100 +++++ drivers/fpga/Makefile | 1 + drivers/fpga/socfpga_arria10.c | 479 +++++++++++++++++++++ include/configs/socfpga_common.h | 3 +- 5 files changed, 583 insertions(+), 2 deletions(-) create mode 100644 arch/arm/mach-socfpga/include/mach/fpga_manager_arria10.h create mode 100644 drivers/fpga/socfpga_arria10.c
arch/arm/mach-socfpga/include/mach/fpga_manager.h +2 -0
@@ -12,6 +12,8 @@#if defined(CONFIG_TARGET_SOCFPGA_GEN5 )#include <asm/arch/fpga_manager_gen5.h> +#elif defined(CONFIG_TARGET_SOCFPGA_ARRIA10 ) +#include <asm/arch/fpga_manager_arria10.h> #endif /* FPGA CD Ratio Value */
arch/arm/mach-socfpga/include/mach/fpga_manager_arria10.h new file +100 -0
100 lines not on this page · raw message
drivers/fpga/Makefile +1 -0
@@ -21,4 +21,5 @@ obj-$(CONFIG_FPGA_STRATIX_II) += stratixII.o obj-$(CONFIG_FPGA_STRATIX_V) += stratixv.o obj-$(CONFIG_FPGA_SOCFPGA) += socfpga.o obj-$(CONFIG_TARGET_SOCFPGA_GEN5) += socfpga_gen5.o +obj-$(CONFIG_TARGET_SOCFPGA_ARRIA10) += socfpga_arria10.o endif
drivers/fpga/socfpga_arria10.c new file +479 -0
479 lines not on this page · raw message
include/configs/socfpga_common.h +1 -2
@@ -105,14 +105,13 @@/* * FPGA Driver */ -#ifdef CONFIG_TARGET_SOCFPGA_GEN5 #ifdef CONFIG_CMD_FPGA #define CONFIG_FPGA #define CONFIG_FPGA_ALTERA #define CONFIG_FPGA_SOCFPGA #define CONFIG_FPGA_COUNT 1#endif -#endif +/* * L4 OSC1 Timer 0 */
Signature · 1 line
1.8.2.3
Chee
v4 cover Add Intel Arria 10 SoC FPGA driver
In reply to tien.fong.chee at intel.comQuoted 10 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
This is the 4th version of patchset to adds support for Intel Arria 10 SoC FPGA
driver. This version mainly resolved comments from Ley Foon and Dinh in [v3].
This series is working on top of u-boot-socfpga-next branch
http://git.denx.de/?p=u-boot/u-boot-socfpga.git;a=shortlog;h=refs/hea
ds/next.
Hi Marek,
How about this series of patches? Good to get accepted?
Thanks.
Quoted 49 lines
[v3]: https://www.mail-archive.com/u-
boot at lists.denx.de/msg249160.htmlv3 -> v4 changes:
-----------------
- Fixed typo on patch 1 and patch 2.
- Created separate patch for enabling FPGA driver build on SPL.
- No change on patch 3.
- Removed some unnecessary wrappers and unused function.Patchset history
----------------
[v1]: https://www.mail-archive.com/u-boot at lists.denx.de/msg247788.htm l
[v2]: https://www.mail-archive.com/u-boot at lists.denx.de/msg248541.htm lTien Fong Chee (5):
arm: socfpga: Remove unused passing parameter ofsocfpga_bridges_reset
arm: socfpga: Restructure FPGA driver in the preparation to support A10.
arm: socfpga: Enable FPGA driver on SPL
arm: socfpga: Move FPGA manager driver to FPGA driver
arm: socfpga: Add FPGA driver support for Arria 10arch/arm/mach-socfpga/Makefile | 1 - arch/arm/mach-socfpga/fpga_manager.c | 78 ---- arch/arm/mach-socfpga/include/mach/fpga_manager.h | 70 +-- .../include/mach/fpga_manager_arria10.h | 100 +++++
.../mach/{fpga_manager.h=> fpga_manager_gen5.h} | 69 ++- .../include/mach/reset_manager_arria10.h | 2 +- arch/arm/mach-socfpga/reset_manager_arria10.c | 4 +- drivers/Makefile | 1 + drivers/fpga/Makefile | 2 + drivers/fpga/socfpga.c | 241 +---------- drivers/fpga/socfpga_arria10.c | 479
+++++++++++++++++++++
drivers/fpga/{socfpga.c => socfpga_gen5.c} | 98 ++--- include/configs/socfpga_common.h | 3 +-13 files changed, 684 insertions(+), 464 deletions(-)delete mode 100644
arch/arm/mach-socfpga/fpga_manager.ccreate mode 100644arch/arm/mach-socfpga/include/mach/fpga_manager_arria10.h
copyarch/arm/mach-socfpga/include/mach/{fpga_manager.h=>fpga_manager_gen5.h} (57%)
create mode 100644drivers/fpga/socfpga_arria10.ccopydrivers/fpga/{socfpga.c=>socfpga_gen5.c} (85%)
v4 cover Add Intel Arria 10 SoC FPGA driver
Quoted 11 lines · Tien Fong
Quoted 10 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
This is the 4th version of patchset to adds support for Intel Arria 10 SoC FPGA
driver. This version mainly resolved comments from Ley Foon and Dinh in [v3].
This series is working on top of u-boot-socfpga-next branch
http://git.denx.de/?p=u-boot/u-boot-socfpga.git;a=shortlog;h=refs/hea
ds/next.
Quoted 3 lines
Hi Marek,
How about this series of patches? Good to get accepted?
How many A-B/R-B tags did it collect thus far ?
Signature · 2 lines
Best regards, Marek Vasut