From: Sonal Santan <sonal.santan@xxxxxxxxxx> Update fpga Kconfig/Makefile and add Kconfig/Makefile for new drivers. Signed-off-by: Sonal Santan <sonal.santan@xxxxxxxxxx> --- drivers/fpga/Kconfig | 2 ++ drivers/fpga/Makefile | 4 ++++ drivers/fpga/xrt/Kconfig | 7 +++++++ drivers/fpga/xrt/Makefile | 21 +++++++++++++++++++++ drivers/fpga/xrt/lib/Kconfig | 11 +++++++++++ drivers/fpga/xrt/lib/Makefile | 30 ++++++++++++++++++++++++++++++ drivers/fpga/xrt/mgmt/Kconfig | 11 +++++++++++ drivers/fpga/xrt/mgmt/Makefile | 27 +++++++++++++++++++++++++++ 8 files changed, 113 insertions(+) create mode 100644 drivers/fpga/xrt/Kconfig create mode 100644 drivers/fpga/xrt/Makefile create mode 100644 drivers/fpga/xrt/lib/Kconfig create mode 100644 drivers/fpga/xrt/lib/Makefile create mode 100644 drivers/fpga/xrt/mgmt/Kconfig create mode 100644 drivers/fpga/xrt/mgmt/Makefile diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig index 7cd5a29fc437..73e4deb20986 100644 --- a/drivers/fpga/Kconfig +++ b/drivers/fpga/Kconfig @@ -215,4 +215,6 @@ config FPGA_MGR_ZYNQMP_FPGA to configure the programmable logic(PL) through PS on ZynqMP SoC. +source "drivers/fpga/xrt/Kconfig" + endif # FPGA diff --git a/drivers/fpga/Makefile b/drivers/fpga/Makefile index d8e21dfc6778..2b4453ff7c52 100644 --- a/drivers/fpga/Makefile +++ b/drivers/fpga/Makefile @@ -46,3 +46,7 @@ dfl-afu-objs += dfl-afu-error.o # Drivers for FPGAs which implement DFL obj-$(CONFIG_FPGA_DFL_PCI) += dfl-pci.o + +# XRT drivers for Alveo +obj-$(CONFIG_FPGA_XRT_LIB) += xrt/lib/ +obj-$(CONFIG_FPGA_XRT_XMGMT) += xrt/mgmt/ diff --git a/drivers/fpga/xrt/Kconfig b/drivers/fpga/xrt/Kconfig new file mode 100644 index 000000000000..50422f77c6df --- /dev/null +++ b/drivers/fpga/xrt/Kconfig @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Xilinx Alveo FPGA device configuration +# + +source "drivers/fpga/xrt/lib/Kconfig" +source "drivers/fpga/xrt/mgmt/Kconfig" diff --git a/drivers/fpga/xrt/Makefile b/drivers/fpga/xrt/Makefile new file mode 100644 index 000000000000..19e828cc7af9 --- /dev/null +++ b/drivers/fpga/xrt/Makefile @@ -0,0 +1,21 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Copyright (C) 2020 Xilinx, Inc. All rights reserved. +# +# Authors: Sonal.Santan@xxxxxxxxxx +# + +all: + $(MAKE) -C lib all + $(MAKE) -C mgmt all + $(MAKE) lint + +tags: + ../../../../scripts/tags.sh + +clean: + $(MAKE) -C lib clean + $(MAKE) -C mgmt clean + +lint: + ../../../../scripts/lint.sh diff --git a/drivers/fpga/xrt/lib/Kconfig b/drivers/fpga/xrt/lib/Kconfig new file mode 100644 index 000000000000..541af91008ee --- /dev/null +++ b/drivers/fpga/xrt/lib/Kconfig @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# XRT Alveo FPGA device configuration +# + +config FPGA_XRT_LIB + tristate "XRT Alveo Driver Library" + depends on HWMON && PCI + select LIBFDT + help + XRT Alveo FPGA PCIe device driver common library. diff --git a/drivers/fpga/xrt/lib/Makefile b/drivers/fpga/xrt/lib/Makefile new file mode 100644 index 000000000000..176e2134171c --- /dev/null +++ b/drivers/fpga/xrt/lib/Makefile @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Copyright (C) 2020 Xilinx, Inc. All rights reserved. +# +# Authors: Sonal.Santan@xxxxxxxxxx +# + +FULL_XRT_PATH=$(srctree)/$(src)/.. +FULL_DTC_PATH=$(srctree)/scripts/dtc/libfdt + +obj-$(CONFIG_FPGA_XRT_LIB) := xrt-lib.o + +xrt-lib-objs := \ + xrt-main.o \ + xrt-subdev.o \ + xrt-cdev.o \ + ../common/xrt-metadata.o \ + subdevs/xrt-partition.o \ + subdevs/xrt-vsec.o \ + subdevs/xrt-axigate.o \ + subdevs/xrt-gpio.o \ + subdevs/xrt-icap.o \ + subdevs/xrt-clock.o \ + subdevs/xrt-clkfreq.o \ + subdevs/xrt-ucs.o \ + subdevs/xrt-calib.o + +ccflags-y := -I$(FULL_XRT_PATH)/include \ + -I$(FULL_XRT_PATH)/common \ + -I$(FULL_DTC_PATH) diff --git a/drivers/fpga/xrt/mgmt/Kconfig b/drivers/fpga/xrt/mgmt/Kconfig new file mode 100644 index 000000000000..a2fe7ab21941 --- /dev/null +++ b/drivers/fpga/xrt/mgmt/Kconfig @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Xilinx XRT FPGA device configuration +# + +config FPGA_XRT_XMGMT + tristate "Xilinx Alveo Management Driver" + depends on HWMON && PCI && FPGA_XRT_LIB + select LIBFDT + help + XRT Alveo FPGA PCIe device driver for Management Physical Function. diff --git a/drivers/fpga/xrt/mgmt/Makefile b/drivers/fpga/xrt/mgmt/Makefile new file mode 100644 index 000000000000..d32698b8bf58 --- /dev/null +++ b/drivers/fpga/xrt/mgmt/Makefile @@ -0,0 +1,27 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Copyright (C) 2019-2020 Xilinx, Inc. All rights reserved. +# +# Authors: Sonal.Santan@xxxxxxxxxx +# + +FULL_XRT_PATH=$(srctree)/$(src)/.. +FULL_DTC_PATH=$(srctree)/scripts/dtc/libfdt + +obj-$(CONFIG_FPGA_XRT_XMGMT) += xmgmt.o + +commondir := ../common + +xmgmt-objs := xmgmt-root.o \ + xmgmt-main.o \ + xmgmt-fmgr-drv.o \ + xmgmt-main-region.o \ + $(commondir)/xrt-root.o \ + $(commondir)/xrt-metadata.o \ + $(commondir)/xrt-xclbin.o + + + +ccflags-y := -I$(FULL_XRT_PATH)/include \ + -I$(FULL_XRT_PATH)/common \ + -I$(FULL_DTC_PATH) -- 2.17.1