Altera Partial Reconfiguration IP
Subsystems (2)
v2 cover Altera Partial Reconfiguration IP
From: Matthew Gerlach <[email protected]>
This set of patches implements a fpga-mgr driver for the Altera Partial Reconfiguration IP. The driver depends on a patch from Alan Tull that adds a config complete timeout. The driver code itself is divided into core functions and functions to implement a platform driver. It is expected that drivers for other buses like PCIe would also use the core functions.
Alan Tull (1):
fpga: add config complete timeout
Matthew Gerlach (3):
fpga pr ip: Core driver support for Altera Partial Reconfiguration IP. fpga dt: bindings for Altera Partial Reconfiguration IP. fpga pr ip: Platform driver for Altera Partial Reconfiguration IP.
.../devicetree/bindings/fpga/altera-pr-ip.txt | 12 ++ drivers/fpga/Kconfig | 12 ++ drivers/fpga/Makefile | 2 + drivers/fpga/altera-pr-ip-core-plat.c | 65 ++++++ drivers/fpga/altera-pr-ip-core.c | 217 +++++++++++++++++++++ drivers/fpga/altera-pr-ip-core.h | 29 +++ drivers/fpga/fpga-region.c | 3 + include/linux/fpga/fpga-mgr.h | 3 + 8 files changed, 343 insertions(+) create mode 100644 Documentation/devicetree/bindings/fpga/altera-pr-ip.txt create mode 100644 drivers/fpga/altera-pr-ip-core-plat.c create mode 100644 drivers/fpga/altera-pr-ip-core.c create mode 100644 drivers/fpga/altera-pr-ip-core.h
Signature · 1 line
2.7.4
PATCH v2 1/4 fpga: add config complete timeout
From: Alan Tull <[email protected]>
Adding timeout for maximum allowed time for FPGA to go to operating mode after a FPGA region has been programmed.
--- drivers/fpga/fpga-region.c | 3 +++ include/linux/fpga/fpga-mgr.h | 3 +++ 2 files changed, 6 insertions(+)
drivers/fpga/fpga-region.c +3 -0
@@ -381,6 +381,9 @@ static int fpga_region_notify_pre_apply(struct fpga_region *region,of_property_read_u32 (nd->overlay,"region-freeze-timeout-us" , &info->disable_timeout_us); +of_property_read_u32 (nd->overlay,"config-complete-timeout-us" , + &info->config_complete_timeout_us); +/* If FPGA was externally programmed, don't specify firmware */ if ((info->flags &FPGA_MGR_EXTERNAL_CONFIG ) && firmware_name) {pr_err ("error: specified firmware and external-fpga-config" );
include/linux/fpga/fpga-mgr.h +3 -0
@@ -76,11 +76,14 @@ enum fpga_mgr_states {* @flags: boolean flags as defined above * @enable_timeout_us: maximum time to enable traffic through bridge (uSec) * @disable_timeout_us: maximum time to disable traffic through bridge (uSec) +* @config_complete_timeout_us: maximum time for FPGA to switch to operating +* status in the write_complete op. */ struct fpga_image_info {u32 flags;u32 enable_timeout_us;u32 disable_timeout_us; +u32 config_complete_timeout_us; };/**
Signature · 1 line
2.7.4
PATCH v2 2/4 fpga pr ip: Core driver support for Altera Partial Reconfiguration IP.
In reply to [email protected]From: Matthew Gerlach <matthew.gerlach-VuQAYsv1563Yd54FQh9/[email protected]>
Adding the core functions necessary for a fpga-mgr driver for the Altera Partial IP component. It is intended for these functions to be used by the various bus implementations like the platform bus or the PCIe bus.
--- drivers/fpga/Kconfig | 5 + drivers/fpga/Makefile | 1 + drivers/fpga/altera-pr-ip-core.c | 217 +++++++++++++++++++++++++++++++++++++++ drivers/fpga/altera-pr-ip-core.h | 29 ++++++ 4 files changed, 252 insertions(+) create mode 100644 drivers/fpga/altera-pr-ip-core.c create mode 100644 drivers/fpga/altera-pr-ip-core.h
drivers/fpga/Kconfig +5 -0
@@ -63,6 +63,11 @@ config ALTERA_FREEZE_BRIDGE isolate one region of the FPGA from the busses while that region is being reprogrammed. +config ALTERA_PR_IP_CORE + tristate "Altera Partial Reconfiguration IP Core" + help + Core driver support for Altera Partial Reconfiguration IP component + endif # FPGA endmenu
drivers/fpga/Makefile +1 -0
@@ -9,6 +9,7 @@ obj-$(CONFIG_FPGA) += fpga-mgr.o obj-$(CONFIG_FPGA_MGR_SOCFPGA) += socfpga.o obj-$(CONFIG_FPGA_MGR_SOCFPGA_A10) += socfpga-a10.o obj-$(CONFIG_FPGA_MGR_ZYNQ_FPGA) += zynq-fpga.o +obj-$(CONFIG_ALTERA_PR_IP_CORE) += altera-pr-ip-core.o # FPGA Bridge Drivers obj-$(CONFIG_FPGA_BRIDGE) += fpga-bridge.o
drivers/fpga/altera-pr-ip-core.c new file +217 -0
217 lines not on this page · raw message
drivers/fpga/altera-pr-ip-core.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* Driver for Altera Partial Reconfiguration IP Core +* +* Copyright (C) 2016 Intel Corporation +* +* Based on socfpga-a10.c Copyright (C) 2015-2016 Altera Corporation +* by Alan Tull <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms and conditions of the GNU General Public License, +* version 2, as published by the Free Software Foundation. +* +* This program is distributed in the hope it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef _ALT_PR_IP_CORE_H +#define _ALT_PR_IP_CORE_H +#include <linux/io.h> + +int alt_pr_probe (struct device *dev,void __iomem *reg_base); +int alt_pr_remove (struct device *dev); + +#endif /* _ALT_PR_IP_CORE_H */
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 3/4 fpga dt: bindings for Altera Partial Reconfiguration IP.
In reply to [email protected]From: Matthew Gerlach <[email protected]>
Device Tree bindings for Altera Partial Reconfiguration IP.
v2: s/Reconfiguraion/Reconfiguration/
====================
--- Documentation/devicetree/bindings/fpga/altera-pr-ip.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Documentation/devicetree/bindings/fpga/altera-pr-ip.txt
Documentation/devicetree/bindings/fpga/altera-pr-ip.txt new file +12 -0
@@ -0,0 +1,12 @@ +Altera Partial Reconfiguration IP + +Required properties: +- compatible : should contain "altr,pr-ip" +- reg : base address and size for memory mapped io. + +Example: + + fpga_mgr: fpga-mgr@ff20c000 { + compatible = "altr,pr-ip"; + reg = <0xff20c000 0x10>; + };
Signature · 1 line
2.7.4
PATCH v2 4/4 fpga pr ip: Platform driver for Altera Partial Reconfiguration IP.
In reply to [email protected]From: Matthew Gerlach <[email protected]>
This adds a platform bus driver for a fpga-mgr driver that uses the Altera Partial Reconfiguration IP component.
v2: s/altr,pr-ip-core/altr,pr-ip/
====================
--- drivers/fpga/Kconfig | 7 ++++ drivers/fpga/Makefile | 1 + drivers/fpga/altera-pr-ip-core-plat.c | 65 +++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 drivers/fpga/altera-pr-ip-core-plat.c
drivers/fpga/Kconfig +7 -0
@@ -68,6 +68,13 @@ config ALTERA_PR_IP_CORE help Core driver support for Altera Partial Reconfiguration IP component +config ALTERA_PR_IP_CORE_PLAT + tristate "Platform support of Altera Partial Reconfiguration IP Core" + depends on ALTERA_PR_IP_CORE && OF + help + Platform driver support for Altera Partial Reconfiguration IP + component + endif # FPGA endmenu
drivers/fpga/Makefile +1 -0
@@ -10,6 +10,7 @@ obj-$(CONFIG_FPGA_MGR_SOCFPGA) += socfpga.o obj-$(CONFIG_FPGA_MGR_SOCFPGA_A10) += socfpga-a10.o obj-$(CONFIG_FPGA_MGR_ZYNQ_FPGA) += zynq-fpga.o obj-$(CONFIG_ALTERA_PR_IP_CORE) += altera-pr-ip-core.o +obj-$(CONFIG_ALTERA_PR_IP_CORE_PLAT) += altera-pr-ip-core-plat.o # FPGA Bridge Drivers obj-$(CONFIG_FPGA_BRIDGE) += fpga-bridge.o
drivers/fpga/altera-pr-ip-core-plat.c new file +65 -0
65 lines not on this page · raw message
Signature · 1 line
2.7.4