From patchwork Tue Jun 8 16:23:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 12307507 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E0BAC4743D for ; Tue, 8 Jun 2021 16:26:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2FF1F61249 for ; Tue, 8 Jun 2021 16:26:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FF1F61249 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qYQw75ph/x4z/p6VUZSLmnDbgHCgEbn/6yu9+cTfK9k=; b=3bmT9OPAmUH3Gc nPegcZeVwBx1IQeRMFqScwKoG3F5/b9eZ49fi66+La7ZGwbrsNb0W3XAawWfqj/kIDQ3VeZyWgjYD bP6YpBswh7jndN1fLEiMXzNIUIV0X9GBW7GUIz7P3WDEsp42j0wuFdPgXneWdxqC6/qHgor3t27ZX US7DjXYnah8j0nihaXO7bXV7MCmfbJd49O2/7PKmEABpt+/+aFLHkgFNFLnyDDLX6xsgPjKljIAe/ ZfGHcqHvMRgSHItD7XCU1T0fKFN5oHorLRJ8K4DY/NtSiTehbwQa+VPxhsxGIOAIAfvZaGEpcmJeI 0NgyOyzyRCZYrkoip5cA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqeWl-009U85-9O; Tue, 08 Jun 2021 16:24:31 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqeWI-009TyC-G5 for linux-arm-kernel@lists.infradead.org; Tue, 08 Jun 2021 16:24:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623169441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=92YiPexxYpFlIHYIfUzcajyREjX7dCB4H6SLkcvlG4w=; b=GfU97fD5CLyyzGT//nNJh1mKcDcsIU3ZHqv0bwclM4m1JtS+DK4QtwIHXVF004Fms/rpaZ qZyAbtOMUa1gMhkPQdp4yI6IEnahmHqQS4OB4OllHbh1RgObWln9f331QlN8tJatkQYsD/ ZjLERMktwyEDd81lx+bJrEkZitbIvto= Received: from mail-oo1-f70.google.com (mail-oo1-f70.google.com [209.85.161.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-506-f7mO2Yg0O6OPSXm0_Ay1lQ-1; Tue, 08 Jun 2021 12:24:00 -0400 X-MC-Unique: f7mO2Yg0O6OPSXm0_Ay1lQ-1 Received: by mail-oo1-f70.google.com with SMTP id f8-20020a4ab6480000b029023de979bd74so13619530ooo.7 for ; Tue, 08 Jun 2021 09:24:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=92YiPexxYpFlIHYIfUzcajyREjX7dCB4H6SLkcvlG4w=; b=JGvTt7P+PaHFysJY2U8M848HtxG09pyvmpu7cC2DrHzzPZqXitoq9ISZ6SY0x9nzCC VpPUBbfUG/uuNUzvnamyGdRyiTnA1qCkcUhMzOBY0OIUmEY+BP9MY/EFT7wsBv2cYE64 Vyu/SuTYTeK7e2I4h0es3m3cwFVzlti7iR6pczHqNbtgp2DZARF3slWh9LyxJBY4rgij PnogA9AZqn4WMbj+TMpzVkbS0WlypGfz4X6rapR9pi3GPuj4Pdn1NA/KjSm5a5UxdmYu wvpDvwrLdt56k0VitN1pQaSsJzAFQyTskMv1pr+ml+aifgTy8Wg8/YOv/2CHit8EBxVJ 6Siw== X-Gm-Message-State: AOAM531wLEOo7ZR9TLl6G//k0Y4b6mL4xckcSV1ul5TehQAL+1O6qaHG 3v5gPGOveYGYlje0zG1GOsH3YCAmJMwqWXdAj/+g6bmxf08YO30V3XY+LAF0sqQeQHcAP/h0eaS uNNIjCohRrtozAkT8nm6kK5Y1t+iLY9L3UMY= X-Received: by 2002:a05:6830:1089:: with SMTP id y9mr4372932oto.372.1623169439497; Tue, 08 Jun 2021 09:23:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+zhcHpGZNXOCJECV0D4K2Tn7MTHmVEPkEHnbcjgNLKB+Ils5kcjdRoG7MXU69h/dGP6xVkA== X-Received: by 2002:a05:6830:1089:: with SMTP id y9mr4372908oto.372.1623169439222; Tue, 08 Jun 2021 09:23:59 -0700 (PDT) Received: from localhost.localdomain.com (075-142-250-213.res.spectrum.com. [75.142.250.213]) by smtp.gmail.com with ESMTPSA id s4sm3225773otr.80.2021.06.08.09.23.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 09:23:58 -0700 (PDT) From: trix@redhat.com To: hao.wu@intel.com, mdf@kernel.org, corbet@lwn.net, michal.simek@xilinx.com, gregkh@linuxfoundation.org, dinguyen@kernel.org, krzysztof.kozlowski@canonical.com, nava.manne@xilinx.com, yilun.xu@intel.com, davidgow@google.com, fpacheco@redhat.com, richard.gong@intel.com, luca@lucaceresoli.net Cc: linux-fpga@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tom Rix Subject: [PATCH 1/7] fpga: dfl: reorganize to subdir layout Date: Tue, 8 Jun 2021 09:23:34 -0700 Message-Id: <20210608162340.3010204-3-trix@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210608162340.3010204-1-trix@redhat.com> References: <20210608162340.3010204-1-trix@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=trix@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210608_092402_734293_C7E7C1F4 X-CRM114-Status: GOOD ( 24.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Tom Rix Create a dfl/ subdir Move dfl-* files to it. Add a Kconfig and Makefile Because FPGA_DFL is now used in dfl/Kconfig in a if/endif block, all the other configs in dfl/Kconfig implicitly depend on FPGA_DFL. So the explict dependence can be removed. Also since FPGA_DFL depends on HAS_IOMEM, it can be removed from the other configs. Signed-off-by: Tom Rix --- MAINTAINERS | 2 +- drivers/fpga/Kconfig | 80 +------------------- drivers/fpga/Makefile | 18 +---- drivers/fpga/dfl/Kconfig | 81 +++++++++++++++++++++ drivers/fpga/dfl/Makefile | 19 +++++ drivers/fpga/{ => dfl}/dfl-afu-dma-region.c | 0 drivers/fpga/{ => dfl}/dfl-afu-error.c | 0 drivers/fpga/{ => dfl}/dfl-afu-main.c | 0 drivers/fpga/{ => dfl}/dfl-afu-region.c | 0 drivers/fpga/{ => dfl}/dfl-afu.h | 0 drivers/fpga/{ => dfl}/dfl-fme-br.c | 0 drivers/fpga/{ => dfl}/dfl-fme-error.c | 0 drivers/fpga/{ => dfl}/dfl-fme-main.c | 0 drivers/fpga/{ => dfl}/dfl-fme-mgr.c | 0 drivers/fpga/{ => dfl}/dfl-fme-perf.c | 0 drivers/fpga/{ => dfl}/dfl-fme-pr.c | 0 drivers/fpga/{ => dfl}/dfl-fme-pr.h | 0 drivers/fpga/{ => dfl}/dfl-fme-region.c | 0 drivers/fpga/{ => dfl}/dfl-fme.h | 0 drivers/fpga/{ => dfl}/dfl-n3000-nios.c | 0 drivers/fpga/{ => dfl}/dfl-pci.c | 0 drivers/fpga/{ => dfl}/dfl.c | 0 drivers/fpga/{ => dfl}/dfl.h | 0 23 files changed, 103 insertions(+), 97 deletions(-) create mode 100644 drivers/fpga/dfl/Kconfig create mode 100644 drivers/fpga/dfl/Makefile rename drivers/fpga/{ => dfl}/dfl-afu-dma-region.c (100%) rename drivers/fpga/{ => dfl}/dfl-afu-error.c (100%) rename drivers/fpga/{ => dfl}/dfl-afu-main.c (100%) rename drivers/fpga/{ => dfl}/dfl-afu-region.c (100%) rename drivers/fpga/{ => dfl}/dfl-afu.h (100%) rename drivers/fpga/{ => dfl}/dfl-fme-br.c (100%) rename drivers/fpga/{ => dfl}/dfl-fme-error.c (100%) rename drivers/fpga/{ => dfl}/dfl-fme-main.c (100%) rename drivers/fpga/{ => dfl}/dfl-fme-mgr.c (100%) rename drivers/fpga/{ => dfl}/dfl-fme-perf.c (100%) rename drivers/fpga/{ => dfl}/dfl-fme-pr.c (100%) rename drivers/fpga/{ => dfl}/dfl-fme-pr.h (100%) rename drivers/fpga/{ => dfl}/dfl-fme-region.c (100%) rename drivers/fpga/{ => dfl}/dfl-fme.h (100%) rename drivers/fpga/{ => dfl}/dfl-n3000-nios.c (100%) rename drivers/fpga/{ => dfl}/dfl-pci.c (100%) rename drivers/fpga/{ => dfl}/dfl.c (100%) rename drivers/fpga/{ => dfl}/dfl.h (100%) diff --git a/MAINTAINERS b/MAINTAINERS index 1be6895a143d2..46ef3af06ba53 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7201,7 +7201,7 @@ L: linux-fpga@vger.kernel.org S: Maintained F: Documentation/ABI/testing/sysfs-bus-dfl* F: Documentation/fpga/dfl.rst -F: drivers/fpga/dfl* +F: drivers/fpga/dfl/ F: drivers/uio/uio_dfl.c F: include/linux/dfl.h F: include/uapi/linux/fpga-dfl.h diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig index 33e15058d0dc7..c427b25cc6f7e 100644 --- a/drivers/fpga/Kconfig +++ b/drivers/fpga/Kconfig @@ -145,85 +145,7 @@ config OF_FPGA_REGION Support for loading FPGA images by applying a Device Tree overlay. -config FPGA_DFL - tristate "FPGA Device Feature List (DFL) support" - select FPGA_BRIDGE - select FPGA_REGION - depends on HAS_IOMEM - help - Device Feature List (DFL) defines a feature list structure that - creates a linked list of feature headers within the MMIO space - to provide an extensible way of adding features for FPGA. - Driver can walk through the feature headers to enumerate feature - devices (e.g. FPGA Management Engine, Port and Accelerator - Function Unit) and their private features for target FPGA devices. - - Select this option to enable common support for Field-Programmable - Gate Array (FPGA) solutions which implement Device Feature List. - It provides enumeration APIs and feature device infrastructure. - -config FPGA_DFL_FME - tristate "FPGA DFL FME Driver" - depends on FPGA_DFL && HWMON && PERF_EVENTS - help - The FPGA Management Engine (FME) is a feature device implemented - under Device Feature List (DFL) framework. Select this option to - enable the platform device driver for FME which implements all - FPGA platform level management features. There shall be one FME - per DFL based FPGA device. - -config FPGA_DFL_FME_MGR - tristate "FPGA DFL FME Manager Driver" - depends on FPGA_DFL_FME && HAS_IOMEM - help - Say Y to enable FPGA Manager driver for FPGA Management Engine. - -config FPGA_DFL_FME_BRIDGE - tristate "FPGA DFL FME Bridge Driver" - depends on FPGA_DFL_FME && HAS_IOMEM - help - Say Y to enable FPGA Bridge driver for FPGA Management Engine. - -config FPGA_DFL_FME_REGION - tristate "FPGA DFL FME Region Driver" - depends on FPGA_DFL_FME && HAS_IOMEM - help - Say Y to enable FPGA Region driver for FPGA Management Engine. - -config FPGA_DFL_AFU - tristate "FPGA DFL AFU Driver" - depends on FPGA_DFL - help - This is the driver for FPGA Accelerated Function Unit (AFU) which - implements AFU and Port management features. A User AFU connects - to the FPGA infrastructure via a Port. There may be more than one - Port/AFU per DFL based FPGA device. - -config FPGA_DFL_NIOS_INTEL_PAC_N3000 - tristate "FPGA DFL NIOS Driver for Intel PAC N3000" - depends on FPGA_DFL - select REGMAP - help - This is the driver for the N3000 Nios private feature on Intel - PAC (Programmable Acceleration Card) N3000. It communicates - with the embedded Nios processor to configure the retimers on - the card. It also instantiates the SPI master (spi-altera) for - the card's BMC (Board Management Controller). - -config FPGA_DFL_PCI - tristate "FPGA DFL PCIe Device Driver" - depends on PCI && FPGA_DFL - help - Select this option to enable PCIe driver for PCIe-based - Field-Programmable Gate Array (FPGA) solutions which implement - the Device Feature List (DFL). This driver provides interfaces - for userspace applications to configure, enumerate, open and access - FPGA accelerators on the FPGA DFL devices, enables system level - management functions such as FPGA partial reconfiguration, power - management and virtualization with DFL framework and DFL feature - device drivers. - - To compile this as a module, choose M here. +source "drivers/fpga/dfl/Kconfig" config FPGA_MGR_ZYNQMP_FPGA tristate "Xilinx ZynqMP FPGA" diff --git a/drivers/fpga/Makefile b/drivers/fpga/Makefile index 18dc9885883a2..bda74e54ce390 100644 --- a/drivers/fpga/Makefile +++ b/drivers/fpga/Makefile @@ -31,20 +31,4 @@ obj-$(CONFIG_XILINX_PR_DECOUPLER) += xilinx-pr-decoupler.o obj-$(CONFIG_FPGA_REGION) += fpga-region.o obj-$(CONFIG_OF_FPGA_REGION) += of-fpga-region.o -# FPGA Device Feature List Support -obj-$(CONFIG_FPGA_DFL) += dfl.o -obj-$(CONFIG_FPGA_DFL_FME) += dfl-fme.o -obj-$(CONFIG_FPGA_DFL_FME_MGR) += dfl-fme-mgr.o -obj-$(CONFIG_FPGA_DFL_FME_BRIDGE) += dfl-fme-br.o -obj-$(CONFIG_FPGA_DFL_FME_REGION) += dfl-fme-region.o -obj-$(CONFIG_FPGA_DFL_AFU) += dfl-afu.o - -dfl-fme-objs := dfl-fme-main.o dfl-fme-pr.o dfl-fme-error.o -dfl-fme-objs += dfl-fme-perf.o -dfl-afu-objs := dfl-afu-main.o dfl-afu-region.o dfl-afu-dma-region.o -dfl-afu-objs += dfl-afu-error.o - -obj-$(CONFIG_FPGA_DFL_NIOS_INTEL_PAC_N3000) += dfl-n3000-nios.o - -# Drivers for FPGAs which implement DFL -obj-$(CONFIG_FPGA_DFL_PCI) += dfl-pci.o +obj-$(CONFIG_FPGA_DFL) += dfl/ diff --git a/drivers/fpga/dfl/Kconfig b/drivers/fpga/dfl/Kconfig new file mode 100644 index 0000000000000..1f5ce42f63e44 --- /dev/null +++ b/drivers/fpga/dfl/Kconfig @@ -0,0 +1,81 @@ +config FPGA_DFL + tristate "FPGA Device Feature List (DFL) support" + select FPGA_BRIDGE + select FPGA_REGION + depends on HAS_IOMEM + help + Device Feature List (DFL) defines a feature list structure that + creates a linked list of feature headers within the MMIO space + to provide an extensible way of adding features for FPGA. + Driver can walk through the feature headers to enumerate feature + devices (e.g. FPGA Management Engine, Port and Accelerator + Function Unit) and their private features for target FPGA devices. + + Select this option to enable common support for Field-Programmable + Gate Array (FPGA) solutions which implement Device Feature List. + It provides enumeration APIs and feature device infrastructure. + +if FPGA_DFL + +config FPGA_DFL_FME + tristate "FPGA DFL FME Driver" + depends on HWMON && PERF_EVENTS + help + The FPGA Management Engine (FME) is a feature device implemented + under Device Feature List (DFL) framework. Select this option to + enable the platform device driver for FME which implements all + FPGA platform level management features. There shall be one FME + per DFL based FPGA device. + +config FPGA_DFL_FME_MGR + tristate "FPGA DFL FME Manager Driver" + depends on FPGA_DFL_FME + help + Say Y to enable FPGA Manager driver for FPGA Management Engine. + +config FPGA_DFL_FME_BRIDGE + tristate "FPGA DFL FME Bridge Driver" + depends on FPGA_DFL_FME + help + Say Y to enable FPGA Bridge driver for FPGA Management Engine. + +config FPGA_DFL_FME_REGION + tristate "FPGA DFL FME Region Driver" + depends on FPGA_DFL_FME + help + Say Y to enable FPGA Region driver for FPGA Management Engine. + +config FPGA_DFL_AFU + tristate "FPGA DFL AFU Driver" + help + This is the driver for FPGA Accelerated Function Unit (AFU) which + implements AFU and Port management features. A User AFU connects + to the FPGA infrastructure via a Port. There may be more than one + Port/AFU per DFL based FPGA device. + +config FPGA_DFL_NIOS_INTEL_PAC_N3000 + tristate "FPGA DFL NIOS Driver for Intel PAC N3000" + select REGMAP + help + This is the driver for the N3000 Nios private feature on Intel + PAC (Programmable Acceleration Card) N3000. It communicates + with the embedded Nios processor to configure the retimers on + the card. It also instantiates the SPI master (spi-altera) for + the card's BMC (Board Management Controller). + +config FPGA_DFL_PCI + tristate "FPGA DFL PCIe Device Driver" + depends on PCI + help + Select this option to enable PCIe driver for PCIe-based + Field-Programmable Gate Array (FPGA) solutions which implement + the Device Feature List (DFL). This driver provides interfaces + for userspace applications to configure, enumerate, open and access + FPGA accelerators on the FPGA DFL devices, enables system level + management functions such as FPGA partial reconfiguration, power + management and virtualization with DFL framework and DFL feature + device drivers. + + To compile this as a module, choose M here. + +endif #FPGA_DFL diff --git a/drivers/fpga/dfl/Makefile b/drivers/fpga/dfl/Makefile new file mode 100644 index 0000000000000..724792039026f --- /dev/null +++ b/drivers/fpga/dfl/Makefile @@ -0,0 +1,19 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# FPGA Device Feature List (DFL) Support +obj-$(CONFIG_FPGA_DFL) += dfl.o +obj-$(CONFIG_FPGA_DFL_AFU) += dfl-afu.o +obj-$(CONFIG_FPGA_DFL_FME) += dfl-fme.o +obj-$(CONFIG_FPGA_DFL_FME_BRIDGE) += dfl-fme-br.o +obj-$(CONFIG_FPGA_DFL_FME_MGR) += dfl-fme-mgr.o +obj-$(CONFIG_FPGA_DFL_FME_REGION) += dfl-fme-region.o +obj-$(CONFIG_FPGA_DFL_NIOS_INTEL_PAC_N3000) += dfl-n3000-nios.o +obj-$(CONFIG_FPGA_DFL_PCI) += dfl-pci.o + +dfl-fme-objs := dfl-fme-main.o dfl-fme-pr.o dfl-fme-error.o \ + dfl-fme-perf.o +dfl-afu-objs := dfl-afu-main.o dfl-afu-region.o dfl-afu-dma-region.o \ + dfl-afu-error.o + + + diff --git a/drivers/fpga/dfl-afu-dma-region.c b/drivers/fpga/dfl/dfl-afu-dma-region.c similarity index 100% rename from drivers/fpga/dfl-afu-dma-region.c rename to drivers/fpga/dfl/dfl-afu-dma-region.c diff --git a/drivers/fpga/dfl-afu-error.c b/drivers/fpga/dfl/dfl-afu-error.c similarity index 100% rename from drivers/fpga/dfl-afu-error.c rename to drivers/fpga/dfl/dfl-afu-error.c diff --git a/drivers/fpga/dfl-afu-main.c b/drivers/fpga/dfl/dfl-afu-main.c similarity index 100% rename from drivers/fpga/dfl-afu-main.c rename to drivers/fpga/dfl/dfl-afu-main.c diff --git a/drivers/fpga/dfl-afu-region.c b/drivers/fpga/dfl/dfl-afu-region.c similarity index 100% rename from drivers/fpga/dfl-afu-region.c rename to drivers/fpga/dfl/dfl-afu-region.c diff --git a/drivers/fpga/dfl-afu.h b/drivers/fpga/dfl/dfl-afu.h similarity index 100% rename from drivers/fpga/dfl-afu.h rename to drivers/fpga/dfl/dfl-afu.h diff --git a/drivers/fpga/dfl-fme-br.c b/drivers/fpga/dfl/dfl-fme-br.c similarity index 100% rename from drivers/fpga/dfl-fme-br.c rename to drivers/fpga/dfl/dfl-fme-br.c diff --git a/drivers/fpga/dfl-fme-error.c b/drivers/fpga/dfl/dfl-fme-error.c similarity index 100% rename from drivers/fpga/dfl-fme-error.c rename to drivers/fpga/dfl/dfl-fme-error.c diff --git a/drivers/fpga/dfl-fme-main.c b/drivers/fpga/dfl/dfl-fme-main.c similarity index 100% rename from drivers/fpga/dfl-fme-main.c rename to drivers/fpga/dfl/dfl-fme-main.c diff --git a/drivers/fpga/dfl-fme-mgr.c b/drivers/fpga/dfl/dfl-fme-mgr.c similarity index 100% rename from drivers/fpga/dfl-fme-mgr.c rename to drivers/fpga/dfl/dfl-fme-mgr.c diff --git a/drivers/fpga/dfl-fme-perf.c b/drivers/fpga/dfl/dfl-fme-perf.c similarity index 100% rename from drivers/fpga/dfl-fme-perf.c rename to drivers/fpga/dfl/dfl-fme-perf.c diff --git a/drivers/fpga/dfl-fme-pr.c b/drivers/fpga/dfl/dfl-fme-pr.c similarity index 100% rename from drivers/fpga/dfl-fme-pr.c rename to drivers/fpga/dfl/dfl-fme-pr.c diff --git a/drivers/fpga/dfl-fme-pr.h b/drivers/fpga/dfl/dfl-fme-pr.h similarity index 100% rename from drivers/fpga/dfl-fme-pr.h rename to drivers/fpga/dfl/dfl-fme-pr.h diff --git a/drivers/fpga/dfl-fme-region.c b/drivers/fpga/dfl/dfl-fme-region.c similarity index 100% rename from drivers/fpga/dfl-fme-region.c rename to drivers/fpga/dfl/dfl-fme-region.c diff --git a/drivers/fpga/dfl-fme.h b/drivers/fpga/dfl/dfl-fme.h similarity index 100% rename from drivers/fpga/dfl-fme.h rename to drivers/fpga/dfl/dfl-fme.h diff --git a/drivers/fpga/dfl-n3000-nios.c b/drivers/fpga/dfl/dfl-n3000-nios.c similarity index 100% rename from drivers/fpga/dfl-n3000-nios.c rename to drivers/fpga/dfl/dfl-n3000-nios.c diff --git a/drivers/fpga/dfl-pci.c b/drivers/fpga/dfl/dfl-pci.c similarity index 100% rename from drivers/fpga/dfl-pci.c rename to drivers/fpga/dfl/dfl-pci.c diff --git a/drivers/fpga/dfl.c b/drivers/fpga/dfl/dfl.c similarity index 100% rename from drivers/fpga/dfl.c rename to drivers/fpga/dfl/dfl.c diff --git a/drivers/fpga/dfl.h b/drivers/fpga/dfl/dfl.h similarity index 100% rename from drivers/fpga/dfl.h rename to drivers/fpga/dfl/dfl.h From patchwork Tue Jun 8 16:23:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 12307509 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43BE5C47082 for ; Tue, 8 Jun 2021 16:26:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1467061249 for ; Tue, 8 Jun 2021 16:26:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1467061249 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wfa4yJFAS1/vAMP6w69AKwNwQfmHCjz87P8AxT87Fhw=; b=Ku7iPhqMuszDtX HDYDP1+X8Y3XFQAmC7CWzB7xWcXH7soN1oIKeN11gujgoz45br3pwy070ZIUJu7Vv4nNe0FWoN9zO EgWCodHhVEXAjhivb8EBlsLEF/3OXLh2Gay/qif8+dSb9uqTCw+jPdd+qGLO3Vys6asJU1TtNeYDE J4MK7gCdsv/6fkKW4PlkbXuWV9Meh5se4ibb6+Mc8wU8OT4dam50TmZr/8urHNai3dF5PT8htHj3X BEPAaS2RHUJhGqISJz0HideqDZfZ/GwZzcGsdNsUjrIYigdpLAczKDgD6uahjPoQO5rRdztpp8LlQ Cooo7+P1zZnK49BteJaQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqeX0-009UD2-27; Tue, 08 Jun 2021 16:24:46 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqeWO-009TzL-Mc for linux-arm-kernel@lists.infradead.org; Tue, 08 Jun 2021 16:24:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623169445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XvFqgoXbMqYdld4DmESpGVSZB3RoZyxfbp1QAtbqos0=; b=UD3KzaeRDnZgwO4pjI7ste+OVc21ZXCMqnv0GFCzeZVW3WHvvxKh9NUwQxTOqLLMoxhyzA pDDymOiXgSAH2f8SzDNbjKowks+vA9fvUSDefP1wRq64CzX8uubo2nm9N5tvLqoxmqnhS/ xVVjTUNGfoRbFHprecXBBbmFlAq4GNA= Received: from mail-oo1-f71.google.com (mail-oo1-f71.google.com [209.85.161.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-271-Q0hiiQdAPyGGvJtwpx-Tig-1; Tue, 08 Jun 2021 12:24:03 -0400 X-MC-Unique: Q0hiiQdAPyGGvJtwpx-Tig-1 Received: by mail-oo1-f71.google.com with SMTP id r130-20020a4a37880000b029024987ad471cso6457941oor.17 for ; Tue, 08 Jun 2021 09:24:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XvFqgoXbMqYdld4DmESpGVSZB3RoZyxfbp1QAtbqos0=; b=nWhL2ta8QVlArXyR8L0AYoDIrmsaConDpf+nvOta5+qvVRVCgEoDejj9DgxJ+NCl/Y iWz6/vFBgMokaceX6LREzV3p3hGck12z69c4P6CII1VLrKX2ukmxtih5n119P72zxbc0 iqOsogtBbbMFj1Gey+zC5uzkM6sZm01qMWM3eqiwJyZK1HloMKGasHMrT9thup97u7Hh Hx9uhLovM7cTOVQn/pPnUSx219xXdXxfY1eS6N+U7HzlyF9tgS9AALyfjmLbX1a0vgHo LwdZ03a3JZ1XYISMjwvvqOSwhNM+5LRUxQfSpVJEvFi26ff5c4hZzhA+fMKwy47ZqbZN /9sQ== X-Gm-Message-State: AOAM532uS2aKLixg31LF0bS1Cg1bFJcGtqRHGvzE9g4FhHKTeBzn7GJc R8nONOox4igaGmz2Z6Qj6p7t0/p36dSaMiqlnRRcA0lKCTIVNKjcMD1JB9vZay2Kv8z6ScVmfQL Jz62JO7tXrP3X+tSo6hFcRLC67bQ7fcEMfBY= X-Received: by 2002:a05:6830:1f05:: with SMTP id u5mr6319901otg.322.1623169441601; Tue, 08 Jun 2021 09:24:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7E1xIoOHythPGryMK8OW5qp/eRfmgkPOl+Bw4viux2xt0BER4TIXDPNTI/HIFSkb+7TvFmw== X-Received: by 2002:a05:6830:1f05:: with SMTP id u5mr6319887otg.322.1623169441389; Tue, 08 Jun 2021 09:24:01 -0700 (PDT) Received: from localhost.localdomain.com (075-142-250-213.res.spectrum.com. [75.142.250.213]) by smtp.gmail.com with ESMTPSA id s4sm3225773otr.80.2021.06.08.09.23.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 09:24:01 -0700 (PDT) From: trix@redhat.com To: hao.wu@intel.com, mdf@kernel.org, corbet@lwn.net, michal.simek@xilinx.com, gregkh@linuxfoundation.org, dinguyen@kernel.org, krzysztof.kozlowski@canonical.com, nava.manne@xilinx.com, yilun.xu@intel.com, davidgow@google.com, fpacheco@redhat.com, richard.gong@intel.com, luca@lucaceresoli.net Cc: linux-fpga@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tom Rix Subject: [PATCH 2/7] fpga: xilinx: reorganize to subdir layout Date: Tue, 8 Jun 2021 09:23:35 -0700 Message-Id: <20210608162340.3010204-4-trix@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210608162340.3010204-1-trix@redhat.com> References: <20210608162340.3010204-1-trix@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=trix@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210608_092408_862797_4A11007B X-CRM114-Status: GOOD ( 19.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Tom Rix Create a xilinx/ subdir Move xilinx-* and zynq* files to it. Add a Kconfig and Makefile Signed-off-by: Tom Rix --- drivers/fpga/Kconfig | 40 +--------------- drivers/fpga/Makefile | 5 +- drivers/fpga/xilinx/Kconfig | 48 +++++++++++++++++++ drivers/fpga/xilinx/Makefile | 8 ++++ .../fpga/{ => xilinx}/xilinx-pr-decoupler.c | 0 drivers/fpga/{ => xilinx}/xilinx-spi.c | 0 drivers/fpga/{ => xilinx}/zynq-fpga.c | 0 drivers/fpga/{ => xilinx}/zynqmp-fpga.c | 0 8 files changed, 58 insertions(+), 43 deletions(-) create mode 100644 drivers/fpga/xilinx/Kconfig create mode 100644 drivers/fpga/xilinx/Makefile rename drivers/fpga/{ => xilinx}/xilinx-pr-decoupler.c (100%) rename drivers/fpga/{ => xilinx}/xilinx-spi.c (100%) rename drivers/fpga/{ => xilinx}/zynq-fpga.c (100%) rename drivers/fpga/{ => xilinx}/zynqmp-fpga.c (100%) diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig index c427b25cc6f7e..657703b41b06e 100644 --- a/drivers/fpga/Kconfig +++ b/drivers/fpga/Kconfig @@ -52,25 +52,12 @@ config FPGA_MGR_ALTERA_CVP FPGA manager driver support for Arria-V, Cyclone-V, Stratix-V, Arria 10 and Stratix10 Altera FPGAs using the CvP interface over PCIe. -config FPGA_MGR_ZYNQ_FPGA - tristate "Xilinx Zynq FPGA" - depends on ARCH_ZYNQ || COMPILE_TEST - help - FPGA manager driver support for Xilinx Zynq FPGAs. - config FPGA_MGR_STRATIX10_SOC tristate "Intel Stratix10 SoC FPGA Manager" depends on (ARCH_INTEL_SOCFPGA && INTEL_STRATIX10_SERVICE) help FPGA manager driver support for the Intel Stratix10 SoC. -config FPGA_MGR_XILINX_SPI - tristate "Xilinx Configuration over Slave Serial (SPI)" - depends on SPI - help - FPGA manager driver support for Xilinx FPGA configuration - over slave serial interface. - config FPGA_MGR_ICE40_SPI tristate "Lattice iCE40 SPI" depends on OF && SPI @@ -113,23 +100,6 @@ config ALTERA_FREEZE_BRIDGE isolate one region of the FPGA from the busses while that region is being reprogrammed. -config XILINX_PR_DECOUPLER - tristate "Xilinx LogiCORE PR Decoupler" - depends on FPGA_BRIDGE - depends on HAS_IOMEM - help - Say Y to enable drivers for Xilinx LogiCORE PR Decoupler - or Xilinx Dynamic Function eXchnage AIX Shutdown Manager. - The PR Decoupler exists in the FPGA fabric to isolate one - region of the FPGA from the busses while that region is - being reprogrammed during partial reconfig. - The Dynamic Function eXchange AXI shutdown manager prevents - AXI traffic from passing through the bridge. The controller - safely handles AXI4MM and AXI4-Lite interfaces on a - Reconfigurable Partition when it is undergoing dynamic - reconfiguration, preventing the system deadlock that can - occur if AXI transactions are interrupted by DFX. - config FPGA_REGION tristate "FPGA Region" depends on FPGA_BRIDGE @@ -146,14 +116,6 @@ config OF_FPGA_REGION overlay. source "drivers/fpga/dfl/Kconfig" - -config FPGA_MGR_ZYNQMP_FPGA - tristate "Xilinx ZynqMP FPGA" - depends on ZYNQMP_FIRMWARE || (!ZYNQMP_FIRMWARE && COMPILE_TEST) - help - FPGA manager driver support for Xilinx ZynqMP FPGAs. - This driver uses the processor configuration port(PCAP) - to configure the programmable logic(PL) through PS - on ZynqMP SoC. +source "drivers/fpga/xilinx/Kconfig" endif # FPGA diff --git a/drivers/fpga/Makefile b/drivers/fpga/Makefile index bda74e54ce390..0868c7c4264d8 100644 --- a/drivers/fpga/Makefile +++ b/drivers/fpga/Makefile @@ -15,9 +15,6 @@ obj-$(CONFIG_FPGA_MGR_SOCFPGA) += socfpga.o obj-$(CONFIG_FPGA_MGR_SOCFPGA_A10) += socfpga-a10.o obj-$(CONFIG_FPGA_MGR_STRATIX10_SOC) += stratix10-soc.o obj-$(CONFIG_FPGA_MGR_TS73XX) += ts73xx-fpga.o -obj-$(CONFIG_FPGA_MGR_XILINX_SPI) += xilinx-spi.o -obj-$(CONFIG_FPGA_MGR_ZYNQ_FPGA) += zynq-fpga.o -obj-$(CONFIG_FPGA_MGR_ZYNQMP_FPGA) += zynqmp-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 @@ -25,10 +22,10 @@ obj-$(CONFIG_ALTERA_PR_IP_CORE_PLAT) += altera-pr-ip-core-plat.o obj-$(CONFIG_FPGA_BRIDGE) += fpga-bridge.o obj-$(CONFIG_SOCFPGA_FPGA_BRIDGE) += altera-hps2fpga.o altera-fpga2sdram.o obj-$(CONFIG_ALTERA_FREEZE_BRIDGE) += altera-freeze-bridge.o -obj-$(CONFIG_XILINX_PR_DECOUPLER) += xilinx-pr-decoupler.o # High Level Interfaces obj-$(CONFIG_FPGA_REGION) += fpga-region.o obj-$(CONFIG_OF_FPGA_REGION) += of-fpga-region.o obj-$(CONFIG_FPGA_DFL) += dfl/ +obj-$(CONFIG_FPGA_XILINX) += xilinx/ diff --git a/drivers/fpga/xilinx/Kconfig b/drivers/fpga/xilinx/Kconfig new file mode 100644 index 0000000000000..1ef0b6a34ae0c --- /dev/null +++ b/drivers/fpga/xilinx/Kconfig @@ -0,0 +1,48 @@ +config FPGA_XILINX + bool "Xilinx Devices" + default y + help + If you have a xilinx fpga, say Y. + +if FPGA_XILINX + +config FPGA_MGR_ZYNQ_FPGA + tristate "Xilinx Zynq FPGA" + depends on ARCH_ZYNQ || COMPILE_TEST + help + FPGA manager driver support for Xilinx Zynq FPGAs. + +config FPGA_MGR_ZYNQMP_FPGA + tristate "Xilinx ZynqMP FPGA" + depends on ZYNQMP_FIRMWARE || (!ZYNQMP_FIRMWARE && COMPILE_TEST) + help + FPGA manager driver support for Xilinx ZynqMP FPGAs. + This driver uses the processor configuration port(PCAP) + to configure the programmable logic(PL) through PS + on ZynqMP SoC. + +config XILINX_PR_DECOUPLER + tristate "Xilinx LogiCORE PR Decoupler" + depends on FPGA_BRIDGE + depends on HAS_IOMEM + help + Say Y to enable drivers for Xilinx LogiCORE PR Decoupler + or Xilinx Dynamic Function eXchnage AIX Shutdown Manager. + The PR Decoupler exists in the FPGA fabric to isolate one + region of the FPGA from the busses while that region is + being reprogrammed during partial reconfig. + The Dynamic Function eXchange AXI shutdown manager prevents + AXI traffic from passing through the bridge. The controller + safely handles AXI4MM and AXI4-Lite interfaces on a + Reconfigurable Partition when it is undergoing dynamic + reconfiguration, preventing the system deadlock that can + occur if AXI transactions are interrupted by DFX. + +config FPGA_MGR_XILINX_SPI + tristate "Xilinx Configuration over Slave Serial (SPI)" + depends on SPI + help + FPGA manager driver support for Xilinx FPGA configuration + over slave serial interface. + +endif #FPGA_XILINX diff --git a/drivers/fpga/xilinx/Makefile b/drivers/fpga/xilinx/Makefile new file mode 100644 index 0000000000000..7bb7543412790 --- /dev/null +++ b/drivers/fpga/xilinx/Makefile @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0 + +obj-$(CONFIG_XILINX_PR_DECOUPLER) += xilinx-pr-decoupler.o +obj-$(CONFIG_FPGA_MGR_XILINX_SPI) += xilinx-spi.o +obj-$(CONFIG_FPGA_MGR_ZYNQ_FPGA) += zynq-fpga.o +obj-$(CONFIG_FPGA_MGR_ZYNQMP_FPGA) += zynqmp-fpga.o + + diff --git a/drivers/fpga/xilinx-pr-decoupler.c b/drivers/fpga/xilinx/xilinx-pr-decoupler.c similarity index 100% rename from drivers/fpga/xilinx-pr-decoupler.c rename to drivers/fpga/xilinx/xilinx-pr-decoupler.c diff --git a/drivers/fpga/xilinx-spi.c b/drivers/fpga/xilinx/xilinx-spi.c similarity index 100% rename from drivers/fpga/xilinx-spi.c rename to drivers/fpga/xilinx/xilinx-spi.c diff --git a/drivers/fpga/zynq-fpga.c b/drivers/fpga/xilinx/zynq-fpga.c similarity index 100% rename from drivers/fpga/zynq-fpga.c rename to drivers/fpga/xilinx/zynq-fpga.c diff --git a/drivers/fpga/zynqmp-fpga.c b/drivers/fpga/xilinx/zynqmp-fpga.c similarity index 100% rename from drivers/fpga/zynqmp-fpga.c rename to drivers/fpga/xilinx/zynqmp-fpga.c From patchwork Tue Jun 8 16:23:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 12307511 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC188C47082 for ; Tue, 8 Jun 2021 16:26:41 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 88F2661184 for ; Tue, 8 Jun 2021 16:26:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 88F2661184 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MSSJbmLUPwDYIA8mQNz+iUOC5qf7fwbVNi+xGW4ih7U=; b=mxvVnTyUVv6LgL DODKVIEMqiOj65jGeSuVoTbXOKPN62DlMiXhhpC8XN2acthRrO2B9LffQWtvP5/LqAjBxORNab33g kafoiCn50lt344+s7zlKUSRzbfFHsibUDkTKDRtVD7NnhPRf/npaAvsmqm2epPbdecYHLrC4EdVLi 7jP+T6n5kDJJcbZnkybYNp3WpmVcumCOJYP82fKIMkG/r+L3GU/WAKHY8jXQ8YUfyQaxr6JOAOAGT 0vIo93KFUtbbCSSJgKMA1m8FFKv4mCFzCsTvyHlEbX2/tpb7ChnyC+OLPgzdFKD9X4Y8pVYimtmtA FX32nzag+rZo/U3+NpYw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqeXH-009ULN-LO; Tue, 08 Jun 2021 16:25:03 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqeWO-009Tzp-Mj for linux-arm-kernel@lists.infradead.org; Tue, 08 Jun 2021 16:24:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623169447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=toAw5Xqv8MQJGP4owqqo3qaenoRchLuqhCbpOlut5Y4=; b=RjnJCyTLNPzGqU13enFOCwQzYV4P7CcX7ckPkPzX9S8vV4xsWny09OYlgTWpodIQfke6xO 4NVS4Rv5oBkE8yLLLTQsrLAqBmNnNnBpipimr86d44LD/WIMkU4vePYmYvCisiDPnCKe6f A9FKlYfTA4kFSgdMh1i3ZDZ0sOVcI0o= Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-291-IuKqBSRYOFuLPW_8rbyVyA-1; Tue, 08 Jun 2021 12:24:06 -0400 X-MC-Unique: IuKqBSRYOFuLPW_8rbyVyA-1 Received: by mail-oi1-f200.google.com with SMTP id w12-20020aca490c0000b02901f1fdc1435aso5952504oia.14 for ; Tue, 08 Jun 2021 09:24:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=toAw5Xqv8MQJGP4owqqo3qaenoRchLuqhCbpOlut5Y4=; b=IYIucAuek1bGhCNCxJVZ4SMyGAKnkxU2s7ie/ABFucNMoNIrfN/KDH2OjlnhuMvIwi dsZlRN9XjONbQzQHZthelaVCt3V7QepVQ0KHaifDithAm6xzW7o0+mJUAB9VzH8QdngX q0AxFcyvksTouobz4eaejst1Q+/0b0pZxuhp6+8LxYlFzSwBCXiv6TjzkTovUj2UFWON YhvwpTvLQBG10uRiqpeuPeYtlJq4ePmfRaT6Z0CNGAgztSYXVPn1UY0oz56/NkbObf1p Mq3z5eemwRm1xDRmR2fiDFigkOYMIFFWb34A49fKTj12MCIF/ZsvusuHjnPYDfkx/cQW iFhA== X-Gm-Message-State: AOAM5329EDn1bI1csl/DG8jWn9uybw9jyVxuXImgHLI9JZ1Cty9wKJ1N VNYcqngTG+7/6EUPkz7oae+Ri3t0v0wWWelBnX8PPAzMZn5UUQswfyrZI7JpysnWVVCEUSEy8Cf 85Twes2sddSGib9/Qj4ZG3jMJaODFFXzTwtA= X-Received: by 2002:aca:618a:: with SMTP id v132mr3346230oib.144.1623169444269; Tue, 08 Jun 2021 09:24:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyW04vVXKt7PDcW9Ic3eTm6zC3e16yh85s5lg5uQQH1Z8uTlf+DTutR5jX5qQ/mLTrdeTk5Ug== X-Received: by 2002:aca:618a:: with SMTP id v132mr3346217oib.144.1623169444067; Tue, 08 Jun 2021 09:24:04 -0700 (PDT) Received: from localhost.localdomain.com (075-142-250-213.res.spectrum.com. [75.142.250.213]) by smtp.gmail.com with ESMTPSA id s4sm3225773otr.80.2021.06.08.09.24.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 09:24:03 -0700 (PDT) From: trix@redhat.com To: hao.wu@intel.com, mdf@kernel.org, corbet@lwn.net, michal.simek@xilinx.com, gregkh@linuxfoundation.org, dinguyen@kernel.org, krzysztof.kozlowski@canonical.com, nava.manne@xilinx.com, yilun.xu@intel.com, davidgow@google.com, fpacheco@redhat.com, richard.gong@intel.com, luca@lucaceresoli.net Cc: linux-fpga@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tom Rix Subject: [PATCH 3/7] fpga: altera: reorganize to subdir layout Date: Tue, 8 Jun 2021 09:23:36 -0700 Message-Id: <20210608162340.3010204-5-trix@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210608162340.3010204-1-trix@redhat.com> References: <20210608162340.3010204-1-trix@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=trix@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210608_092408_958806_4B0D150D X-CRM114-Status: GOOD ( 17.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Tom Rix Create a altera/ subdir Move altera-* and soc* ts73xx* files to it. Add a Kconfig and Makefile Signed-off-by: Tom Rix --- drivers/fpga/Kconfig | 70 +--------------- drivers/fpga/Makefile | 11 +-- drivers/fpga/altera/Kconfig | 79 +++++++++++++++++++ drivers/fpga/altera/Makefile | 12 +++ drivers/fpga/{ => altera}/altera-cvp.c | 0 drivers/fpga/{ => altera}/altera-fpga2sdram.c | 0 .../fpga/{ => altera}/altera-freeze-bridge.c | 0 drivers/fpga/{ => altera}/altera-hps2fpga.c | 0 .../{ => altera}/altera-pr-ip-core-plat.c | 0 drivers/fpga/{ => altera}/altera-pr-ip-core.c | 0 drivers/fpga/{ => altera}/altera-ps-spi.c | 0 drivers/fpga/{ => altera}/socfpga-a10.c | 0 drivers/fpga/{ => altera}/socfpga.c | 0 drivers/fpga/{ => altera}/stratix10-soc.c | 0 drivers/fpga/{ => altera}/ts73xx-fpga.c | 0 15 files changed, 93 insertions(+), 79 deletions(-) create mode 100644 drivers/fpga/altera/Kconfig create mode 100644 drivers/fpga/altera/Makefile rename drivers/fpga/{ => altera}/altera-cvp.c (100%) rename drivers/fpga/{ => altera}/altera-fpga2sdram.c (100%) rename drivers/fpga/{ => altera}/altera-freeze-bridge.c (100%) rename drivers/fpga/{ => altera}/altera-hps2fpga.c (100%) rename drivers/fpga/{ => altera}/altera-pr-ip-core-plat.c (100%) rename drivers/fpga/{ => altera}/altera-pr-ip-core.c (100%) rename drivers/fpga/{ => altera}/altera-ps-spi.c (100%) rename drivers/fpga/{ => altera}/socfpga-a10.c (100%) rename drivers/fpga/{ => altera}/socfpga.c (100%) rename drivers/fpga/{ => altera}/stratix10-soc.c (100%) rename drivers/fpga/{ => altera}/ts73xx-fpga.c (100%) diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig index 657703b41b06e..885701b1356ad 100644 --- a/drivers/fpga/Kconfig +++ b/drivers/fpga/Kconfig @@ -12,52 +12,6 @@ menuconfig FPGA if FPGA -config FPGA_MGR_SOCFPGA - tristate "Altera SOCFPGA FPGA Manager" - depends on ARCH_INTEL_SOCFPGA || COMPILE_TEST - help - FPGA manager driver support for Altera SOCFPGA. - -config FPGA_MGR_SOCFPGA_A10 - tristate "Altera SoCFPGA Arria10" - depends on ARCH_INTEL_SOCFPGA || COMPILE_TEST - select REGMAP_MMIO - help - FPGA manager driver support for Altera Arria10 SoCFPGA. - -config ALTERA_PR_IP_CORE - tristate "Altera Partial Reconfiguration 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 && HAS_IOMEM - help - Platform driver support for Altera Partial Reconfiguration IP - component - -config FPGA_MGR_ALTERA_PS_SPI - tristate "Altera FPGA Passive Serial over SPI" - depends on SPI - select BITREVERSE - help - FPGA manager driver support for Altera Arria/Cyclone/Stratix - using the passive serial interface over SPI. - -config FPGA_MGR_ALTERA_CVP - tristate "Altera CvP FPGA Manager" - depends on PCI - help - FPGA manager driver support for Arria-V, Cyclone-V, Stratix-V, - Arria 10 and Stratix10 Altera FPGAs using the CvP interface over PCIe. - -config FPGA_MGR_STRATIX10_SOC - tristate "Intel Stratix10 SoC FPGA Manager" - depends on (ARCH_INTEL_SOCFPGA && INTEL_STRATIX10_SERVICE) - help - FPGA manager driver support for the Intel Stratix10 SoC. - config FPGA_MGR_ICE40_SPI tristate "Lattice iCE40 SPI" depends on OF && SPI @@ -71,35 +25,12 @@ config FPGA_MGR_MACHXO2_SPI FPGA manager driver support for Lattice MachXO2 configuration over slave SPI interface. -config FPGA_MGR_TS73XX - tristate "Technologic Systems TS-73xx SBC FPGA Manager" - depends on ARCH_EP93XX && MACH_TS72XX - help - FPGA manager driver support for the Altera Cyclone II FPGA - present on the TS-73xx SBC boards. - config FPGA_BRIDGE tristate "FPGA Bridge Framework" help Say Y here if you want to support bridges connected between host processors and FPGAs or between FPGAs. -config SOCFPGA_FPGA_BRIDGE - tristate "Altera SoCFPGA FPGA Bridges" - depends on ARCH_INTEL_SOCFPGA && FPGA_BRIDGE - help - Say Y to enable drivers for FPGA bridges for Altera SOCFPGA - devices. - -config ALTERA_FREEZE_BRIDGE - tristate "Altera FPGA Freeze Bridge" - depends on FPGA_BRIDGE && HAS_IOMEM - help - Say Y to enable drivers for Altera FPGA Freeze bridges. A - freeze bridge is a bridge that exists in the FPGA fabric to - isolate one region of the FPGA from the busses while that - region is being reprogrammed. - config FPGA_REGION tristate "FPGA Region" depends on FPGA_BRIDGE @@ -115,6 +46,7 @@ config OF_FPGA_REGION Support for loading FPGA images by applying a Device Tree overlay. +source "drivers/fpga/altera/Kconfig" source "drivers/fpga/dfl/Kconfig" source "drivers/fpga/xilinx/Kconfig" diff --git a/drivers/fpga/Makefile b/drivers/fpga/Makefile index 0868c7c4264d8..db83aeb997f24 100644 --- a/drivers/fpga/Makefile +++ b/drivers/fpga/Makefile @@ -7,25 +7,16 @@ obj-$(CONFIG_FPGA) += fpga-mgr.o # FPGA Manager Drivers -obj-$(CONFIG_FPGA_MGR_ALTERA_CVP) += altera-cvp.o -obj-$(CONFIG_FPGA_MGR_ALTERA_PS_SPI) += altera-ps-spi.o obj-$(CONFIG_FPGA_MGR_ICE40_SPI) += ice40-spi.o obj-$(CONFIG_FPGA_MGR_MACHXO2_SPI) += machxo2-spi.o -obj-$(CONFIG_FPGA_MGR_SOCFPGA) += socfpga.o -obj-$(CONFIG_FPGA_MGR_SOCFPGA_A10) += socfpga-a10.o -obj-$(CONFIG_FPGA_MGR_STRATIX10_SOC) += stratix10-soc.o -obj-$(CONFIG_FPGA_MGR_TS73XX) += ts73xx-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 -obj-$(CONFIG_SOCFPGA_FPGA_BRIDGE) += altera-hps2fpga.o altera-fpga2sdram.o -obj-$(CONFIG_ALTERA_FREEZE_BRIDGE) += altera-freeze-bridge.o # High Level Interfaces obj-$(CONFIG_FPGA_REGION) += fpga-region.o obj-$(CONFIG_OF_FPGA_REGION) += of-fpga-region.o +obj-$(CONFIG_FPGA_ALTERA) += altera/ obj-$(CONFIG_FPGA_DFL) += dfl/ obj-$(CONFIG_FPGA_XILINX) += xilinx/ diff --git a/drivers/fpga/altera/Kconfig b/drivers/fpga/altera/Kconfig new file mode 100644 index 0000000000000..87480445664f4 --- /dev/null +++ b/drivers/fpga/altera/Kconfig @@ -0,0 +1,79 @@ +config FPGA_ALTERA + bool "Altera Devices" + default y + help + If you have an altera fpga, say Y. + +if FPGA_ALTERA + +config FPGA_MGR_SOCFPGA + tristate "Altera SOCFPGA FPGA Manager" + depends on ARCH_INTEL_SOCFPGA || COMPILE_TEST + help + FPGA manager driver support for Altera SOCFPGA. + +config FPGA_MGR_SOCFPGA_A10 + tristate "Altera SoCFPGA Arria10" + depends on ARCH_INTEL_SOCFPGA || COMPILE_TEST + select REGMAP_MMIO + help + FPGA manager driver support for Altera Arria10 SoCFPGA. + +config ALTERA_PR_IP_CORE + tristate "Altera Partial Reconfiguration 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 && HAS_IOMEM + help + Platform driver support for Altera Partial Reconfiguration IP + component + +config FPGA_MGR_ALTERA_PS_SPI + tristate "Altera FPGA Passive Serial over SPI" + depends on SPI + select BITREVERSE + help + FPGA manager driver support for Altera Arria/Cyclone/Stratix + using the passive serial interface over SPI. + +config FPGA_MGR_ALTERA_CVP + tristate "Altera CvP FPGA Manager" + depends on PCI + help + FPGA manager driver support for Arria-V, Cyclone-V, Stratix-V, + Arria 10 and Stratix10 Altera FPGAs using the CvP interface over PCIe. + +config FPGA_MGR_STRATIX10_SOC + tristate "Intel Stratix10 SoC FPGA Manager" + depends on (ARCH_INTEL_SOCFPGA && INTEL_STRATIX10_SERVICE) + help + FPGA manager driver support for the Intel Stratix10 SoC. + +config FPGA_MGR_TS73XX + tristate "Technologic Systems TS-73xx SBC FPGA Manager" + depends on ARCH_EP93XX && MACH_TS72XX + help + FPGA manager driver support for the Altera Cyclone II FPGA + present on the TS-73xx SBC boards. + +config ALTERA_FREEZE_BRIDGE + tristate "Altera FPGA Freeze Bridge" + depends on FPGA_BRIDGE && HAS_IOMEM + help + Say Y to enable drivers for Altera FPGA Freeze bridges. A + freeze bridge is a bridge that exists in the FPGA fabric to + isolate one region of the FPGA from the busses while that + region is being reprogrammed. + +config SOCFPGA_FPGA_BRIDGE + tristate "Altera SoCFPGA FPGA Bridges" + depends on ARCH_INTEL_SOCFPGA && FPGA_BRIDGE + help + Say Y to enable drivers for FPGA bridges for Altera SOCFPGA + devices. + +endif #FPGA_ALTERA + diff --git a/drivers/fpga/altera/Makefile b/drivers/fpga/altera/Makefile new file mode 100644 index 0000000000000..4d725c72fcbef --- /dev/null +++ b/drivers/fpga/altera/Makefile @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0 + +obj-$(CONFIG_ALTERA_FREEZE_BRIDGE) += altera-freeze-bridge.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 +obj-$(CONFIG_FPGA_MGR_ALTERA_CVP) += altera-cvp.o +obj-$(CONFIG_FPGA_MGR_ALTERA_PS_SPI) += altera-ps-spi.o +obj-$(CONFIG_FPGA_MGR_SOCFPGA) += socfpga.o +obj-$(CONFIG_FPGA_MGR_SOCFPGA_A10) += socfpga-a10.o +obj-$(CONFIG_FPGA_MGR_STRATIX10_SOC) += stratix10-soc.o +obj-$(CONFIG_FPGA_MGR_TS73XX) += ts73xx-fpga.o +obj-$(CONFIG_SOCFPGA_FPGA_BRIDGE) += altera-hps2fpga.o altera-fpga2sdram.o diff --git a/drivers/fpga/altera-cvp.c b/drivers/fpga/altera/altera-cvp.c similarity index 100% rename from drivers/fpga/altera-cvp.c rename to drivers/fpga/altera/altera-cvp.c diff --git a/drivers/fpga/altera-fpga2sdram.c b/drivers/fpga/altera/altera-fpga2sdram.c similarity index 100% rename from drivers/fpga/altera-fpga2sdram.c rename to drivers/fpga/altera/altera-fpga2sdram.c diff --git a/drivers/fpga/altera-freeze-bridge.c b/drivers/fpga/altera/altera-freeze-bridge.c similarity index 100% rename from drivers/fpga/altera-freeze-bridge.c rename to drivers/fpga/altera/altera-freeze-bridge.c diff --git a/drivers/fpga/altera-hps2fpga.c b/drivers/fpga/altera/altera-hps2fpga.c similarity index 100% rename from drivers/fpga/altera-hps2fpga.c rename to drivers/fpga/altera/altera-hps2fpga.c diff --git a/drivers/fpga/altera-pr-ip-core-plat.c b/drivers/fpga/altera/altera-pr-ip-core-plat.c similarity index 100% rename from drivers/fpga/altera-pr-ip-core-plat.c rename to drivers/fpga/altera/altera-pr-ip-core-plat.c diff --git a/drivers/fpga/altera-pr-ip-core.c b/drivers/fpga/altera/altera-pr-ip-core.c similarity index 100% rename from drivers/fpga/altera-pr-ip-core.c rename to drivers/fpga/altera/altera-pr-ip-core.c diff --git a/drivers/fpga/altera-ps-spi.c b/drivers/fpga/altera/altera-ps-spi.c similarity index 100% rename from drivers/fpga/altera-ps-spi.c rename to drivers/fpga/altera/altera-ps-spi.c diff --git a/drivers/fpga/socfpga-a10.c b/drivers/fpga/altera/socfpga-a10.c similarity index 100% rename from drivers/fpga/socfpga-a10.c rename to drivers/fpga/altera/socfpga-a10.c diff --git a/drivers/fpga/socfpga.c b/drivers/fpga/altera/socfpga.c similarity index 100% rename from drivers/fpga/socfpga.c rename to drivers/fpga/altera/socfpga.c diff --git a/drivers/fpga/stratix10-soc.c b/drivers/fpga/altera/stratix10-soc.c similarity index 100% rename from drivers/fpga/stratix10-soc.c rename to drivers/fpga/altera/stratix10-soc.c diff --git a/drivers/fpga/ts73xx-fpga.c b/drivers/fpga/altera/ts73xx-fpga.c similarity index 100% rename from drivers/fpga/ts73xx-fpga.c rename to drivers/fpga/altera/ts73xx-fpga.c From patchwork Tue Jun 8 16:23:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 12307529 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CA9AC47082 for ; Tue, 8 Jun 2021 16:27:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0104C6128A for ; Tue, 8 Jun 2021 16:27:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0104C6128A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8vOi5hROoAIZcy62Bbt/fyJ8T/95xfoNc30Mm1luigw=; b=LfhcfKtI55D6Op kIhTeTINOi4x+/rVcfW5IX4HZpNymtQiZPJT+7nkxVYpX0ulGlpWUSRqBTYXlHZaAipXVMXxlPawI k+qjaE29IyZZ6dB23CkOpYHVtFbnfJu7DtcVmk5U3DRWf7UcgP0BQ2+vnmOyhepZfgldsWPjK1eOL tmRASmkAjLMRqlJsf9SubOmIDIsc+JvMzNsdm+FO+IjuCZ5iBM7TcA4QNSP/Ihtr17/B96mci/GSL He0/UpRRmxEsjtTzGKdSk1/d1JrHW0gYofbXoaZssPpFmFtvxbQu1fphNiji0ztJkSipSqwsDB2Te vyAJ2OMw3yj3AAgrlrgA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqeXi-009UXE-KC; Tue, 08 Jun 2021 16:25:31 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqeWQ-009U0V-7P for linux-arm-kernel@lists.infradead.org; Tue, 08 Jun 2021 16:24:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623169449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hE6HSHMIRX+gAlRokY5aHJhvIk3ZJblkRJXqZXARHDc=; b=dE7snJEyh6cQyeqFqChnZpscoVtUmnK/hq1o5AyDvurrOnMniv9GYfAowtsmEG7ZpmSNk6 mEOJgNBpfRDtgnweGdJnqdgEOiRzsmy6igqgisfA6A+2P6/OgAhfzcEF/dgInw56SqiOfu gNS4NB+JiPRgMdxxRYok019SGqBcVbw= Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-479-Zt8hGMlMNvyji3x0WClTPQ-1; Tue, 08 Jun 2021 12:24:08 -0400 X-MC-Unique: Zt8hGMlMNvyji3x0WClTPQ-1 Received: by mail-ot1-f69.google.com with SMTP id 88-20020a9d06e10000b029030513a66c79so14315344otx.0 for ; Tue, 08 Jun 2021 09:24:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hE6HSHMIRX+gAlRokY5aHJhvIk3ZJblkRJXqZXARHDc=; b=NWOiZqmDrv8FQNL8QO19SjRjFDSBAQB2rrmWiTbDD+nOtQ5KLvMkJf7lr73nbjhAmw +dUDhLfsw1xMLtuSP2C5Xk4Y0Fy5qPg7MGwJfEvaM6Hc/tuXeh5apiXIup8OrEJ1I1nC Bqc8OBh3IIghFwddw5hu6isATfq+U2HU7m8gy44pO4CmVYRN+Fn85ULBe+Zmfhnw/RjZ I2xtk5KPwrD84tFW6oz5/Oh4L6+NFDJvxXtYPTzF2H58UxUJ585VRXuBX8VAwZtQpUIZ 6onNIFJQ5uZeER3aZAYlar2zsU78TWFTGzvnz7yIEcMbE7DrCQYdOJ3QPXcvEOYLqCco 6vZQ== X-Gm-Message-State: AOAM530gsPUbNPkHyI6tuxuFPOaGHpDCpmAB9P0wQXvN826veRdcpQO4 ZORefIMaemDoAPnemQupjiDGjgFUTlmeL0K2XghY6Ods5Zjr1HdGfCUkJGh797ijTHVQzXMf1AO 8yHo83TrkLZbrGvSAQLhlelBT373a0vs50cw= X-Received: by 2002:a05:6808:55c:: with SMTP id i28mr3440175oig.66.1623169446382; Tue, 08 Jun 2021 09:24:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz871oBeLPJEBJQHL79uFGPE47JE/Fxob6zrZrwY6gtaALlSf91P0rx0V53f1omTZuqN8Zfig== X-Received: by 2002:a05:6808:55c:: with SMTP id i28mr3440166oig.66.1623169446230; Tue, 08 Jun 2021 09:24:06 -0700 (PDT) Received: from localhost.localdomain.com (075-142-250-213.res.spectrum.com. [75.142.250.213]) by smtp.gmail.com with ESMTPSA id s4sm3225773otr.80.2021.06.08.09.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 09:24:05 -0700 (PDT) From: trix@redhat.com To: hao.wu@intel.com, mdf@kernel.org, corbet@lwn.net, michal.simek@xilinx.com, gregkh@linuxfoundation.org, dinguyen@kernel.org, krzysztof.kozlowski@canonical.com, nava.manne@xilinx.com, yilun.xu@intel.com, davidgow@google.com, fpacheco@redhat.com, richard.gong@intel.com, luca@lucaceresoli.net Cc: linux-fpga@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tom Rix Subject: [PATCH 4/7] fpga: lattice: reorganize to subdir layout Date: Tue, 8 Jun 2021 09:23:37 -0700 Message-Id: <20210608162340.3010204-6-trix@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210608162340.3010204-1-trix@redhat.com> References: <20210608162340.3010204-1-trix@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=trix@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210608_092410_376522_ECD6EB91 X-CRM114-Status: GOOD ( 14.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Tom Rix Create a lattice/ subdir Move ice40* and machxo2* files to it. Add a Kconfig and Makefile Signed-off-by: Tom Rix --- drivers/fpga/Kconfig | 14 +------------- drivers/fpga/Makefile | 13 +++++-------- drivers/fpga/lattice/Kconfig | 22 ++++++++++++++++++++++ drivers/fpga/lattice/Makefile | 4 ++++ drivers/fpga/{ => lattice}/ice40-spi.c | 0 drivers/fpga/{ => lattice}/machxo2-spi.c | 0 6 files changed, 32 insertions(+), 21 deletions(-) create mode 100644 drivers/fpga/lattice/Kconfig create mode 100644 drivers/fpga/lattice/Makefile rename drivers/fpga/{ => lattice}/ice40-spi.c (100%) rename drivers/fpga/{ => lattice}/machxo2-spi.c (100%) diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig index 885701b1356ad..0cce719d6af84 100644 --- a/drivers/fpga/Kconfig +++ b/drivers/fpga/Kconfig @@ -12,19 +12,6 @@ menuconfig FPGA if FPGA -config FPGA_MGR_ICE40_SPI - tristate "Lattice iCE40 SPI" - depends on OF && SPI - help - FPGA manager driver support for Lattice iCE40 FPGAs over SPI. - -config FPGA_MGR_MACHXO2_SPI - tristate "Lattice MachXO2 SPI" - depends on SPI - help - FPGA manager driver support for Lattice MachXO2 configuration - over slave SPI interface. - config FPGA_BRIDGE tristate "FPGA Bridge Framework" help @@ -47,6 +34,7 @@ config OF_FPGA_REGION overlay. source "drivers/fpga/altera/Kconfig" +source "drivers/fpga/lattice/Kconfig" source "drivers/fpga/dfl/Kconfig" source "drivers/fpga/xilinx/Kconfig" diff --git a/drivers/fpga/Makefile b/drivers/fpga/Makefile index db83aeb997f24..9197698201e3a 100644 --- a/drivers/fpga/Makefile +++ b/drivers/fpga/Makefile @@ -4,19 +4,16 @@ # # Core FPGA Manager Framework -obj-$(CONFIG_FPGA) += fpga-mgr.o - -# FPGA Manager Drivers -obj-$(CONFIG_FPGA_MGR_ICE40_SPI) += ice40-spi.o -obj-$(CONFIG_FPGA_MGR_MACHXO2_SPI) += machxo2-spi.o +obj-$(CONFIG_FPGA) += fpga-mgr.o # FPGA Bridge Drivers -obj-$(CONFIG_FPGA_BRIDGE) += fpga-bridge.o +obj-$(CONFIG_FPGA_BRIDGE) += fpga-bridge.o # High Level Interfaces -obj-$(CONFIG_FPGA_REGION) += fpga-region.o -obj-$(CONFIG_OF_FPGA_REGION) += of-fpga-region.o +obj-$(CONFIG_FPGA_REGION) += fpga-region.o +obj-$(CONFIG_OF_FPGA_REGION) += of-fpga-region.o obj-$(CONFIG_FPGA_ALTERA) += altera/ obj-$(CONFIG_FPGA_DFL) += dfl/ +obj-$(CONFIG_FPGA_LATTICE) += lattice/ obj-$(CONFIG_FPGA_XILINX) += xilinx/ diff --git a/drivers/fpga/lattice/Kconfig b/drivers/fpga/lattice/Kconfig new file mode 100644 index 0000000000000..4619aac49ef57 --- /dev/null +++ b/drivers/fpga/lattice/Kconfig @@ -0,0 +1,22 @@ +config FPGA_LATTICE + bool "Lattice Devices" + default y + help + If you have a lattic fpga, say Y. + +if FPGA_LATTICE + +config FPGA_MGR_ICE40_SPI + tristate "Lattice iCE40 SPI" + depends on OF && SPI + help + FPGA manager driver support for Lattice iCE40 FPGAs over SPI. + +config FPGA_MGR_MACHXO2_SPI + tristate "Lattice MachXO2 SPI" + depends on SPI + help + FPGA manager driver support for Lattice MachXO2 configuration + over slave SPI interface. + +endif #FPGA_LATTICE diff --git a/drivers/fpga/lattice/Makefile b/drivers/fpga/lattice/Makefile new file mode 100644 index 0000000000000..42d01c1b61704 --- /dev/null +++ b/drivers/fpga/lattice/Makefile @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 + +obj-$(CONFIG_FPGA_MGR_ICE40_SPI) += ice40-spi.o +obj-$(CONFIG_FPGA_MGR_MACHXO2_SPI) += machxo2-spi.o diff --git a/drivers/fpga/ice40-spi.c b/drivers/fpga/lattice/ice40-spi.c similarity index 100% rename from drivers/fpga/ice40-spi.c rename to drivers/fpga/lattice/ice40-spi.c diff --git a/drivers/fpga/machxo2-spi.c b/drivers/fpga/lattice/machxo2-spi.c similarity index 100% rename from drivers/fpga/machxo2-spi.c rename to drivers/fpga/lattice/machxo2-spi.c From patchwork Tue Jun 8 16:23:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 12307531 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAC61C47082 for ; Tue, 8 Jun 2021 16:28:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9DAF061184 for ; Tue, 8 Jun 2021 16:28:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DAF061184 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lKwZK84M6dFyx5SizFkUaW6cBX8QJllC73gUGDDmJvg=; b=c4h9kFmeyi2+pg s7ZkudydNB5DPjpxXH8TwMZi4YmEyRJ2EidX4wZzQEh3AEMVotBeH0obEOEOEqi8oUWv5tFqrby/a Kr/46jHBsBZq7SA6mlFETwwx6WOe6GVvr+A/uYdJ3IO3yWm3Dtpo8Ex+zI2Dz4jicrDBjaEPsMQYL 7q0slZTux3rc1PzFPzgBfyIbjKNckhSbaKc/2mhS/ugFq4RIj2wCiZJoVEs/Dv8g2cY2T9Ae4sGPB XAXwaR9ewMdDAFS6gxtPJPRMe3rpI4dHUfGD08YgNMO+RRyIf4rm7DF8tr6Eq5cD/cWE07/sxoFOo XvlEzS2C61DT5MjkxUZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqeYP-009UsB-6v; Tue, 08 Jun 2021 16:26:14 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqeWT-009U1c-I0 for linux-arm-kernel@lists.infradead.org; Tue, 08 Jun 2021 16:24:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623169452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=z30Ub+z2OjWJtR5c/iXeFpG9nHCwEt3UgVQc8aykjUY=; b=OEIBs1DpxsDgAbU7gFr7QJxOlk1knvDWRCn46TtxUW3JvDuqGZsSGJR5ipku1lZ7PKWXOA jop0GRrg+nsw0NLbLtEKu1IPBzPlmtoOkAeqAVU8nYsN1efo2awNeLXGhBC5pbzgQWGZLY nikQnX3fRQ48OrTO7XBKhahM7sKqVV0= Received: from mail-ot1-f71.google.com (mail-ot1-f71.google.com [209.85.210.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-249-GWyiMUqSMR6E4t7ig_Xmig-1; Tue, 08 Jun 2021 12:24:11 -0400 X-MC-Unique: GWyiMUqSMR6E4t7ig_Xmig-1 Received: by mail-ot1-f71.google.com with SMTP id q20-20020a9d7c940000b02903f5a4101f8eso1463009otn.17 for ; Tue, 08 Jun 2021 09:24:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z30Ub+z2OjWJtR5c/iXeFpG9nHCwEt3UgVQc8aykjUY=; b=Q29NmRBiWulr1eB/6oRNSqKEC515/5UvO04mW9ufrjiua7ZEa+GHTHu7IVJ3QCrNcw EgDF041mG8MUGx7zsrZOhrPaMGlTF5FhhNHkVQSdpmHkNzf2cec2H4ClmZKqJ09Y8jyJ y9PZzYWKNkIbSwJiuIoebMOd0NOj+h0cn2KCLcsj3pt+0wIVDSiuUDG6ZAvoCV6NXv3o bKJVedR5aY3ZAbA7WzQJ7fDnrr4lV6D7OpxgDVQevHv8vvoH/hfEIWRL4jsy35LlL7Ed UmFTnul0smBi1xViYgg1QHNQCd9MqFu3WEsEfahPSKsOm/eovYpXxUf0sC6smdwwr119 Y6fQ== X-Gm-Message-State: AOAM532c5b3V3l3k4bC6YUPkY5qL6ptKG3BpMXdWN7add6y9B7JuAKp8 r2cJjn7ClfQLqQ3gvcopiimHU+NmRQzoktuSIqHLcUX0ny/LILBqyw5/bmkifEuWcOV9qaUnHvR 51rrKir4AUkgOkk0BSSbeNo9b1khAcqbe3sk= X-Received: by 2002:aca:ed0f:: with SMTP id l15mr3327138oih.136.1623169448965; Tue, 08 Jun 2021 09:24:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/wf90qvmJyOhl8IF/LUAuCtSuS57EK6CzmLJqOBLpGIE7vechP80vuJAMtMPctg+4J7fPcg== X-Received: by 2002:aca:ed0f:: with SMTP id l15mr3327130oih.136.1623169448735; Tue, 08 Jun 2021 09:24:08 -0700 (PDT) Received: from localhost.localdomain.com (075-142-250-213.res.spectrum.com. [75.142.250.213]) by smtp.gmail.com with ESMTPSA id s4sm3225773otr.80.2021.06.08.09.24.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 09:24:08 -0700 (PDT) From: trix@redhat.com To: hao.wu@intel.com, mdf@kernel.org, corbet@lwn.net, michal.simek@xilinx.com, gregkh@linuxfoundation.org, dinguyen@kernel.org, krzysztof.kozlowski@canonical.com, nava.manne@xilinx.com, yilun.xu@intel.com, davidgow@google.com, fpacheco@redhat.com, richard.gong@intel.com, luca@lucaceresoli.net Cc: linux-fpga@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tom Rix Subject: [PATCH 5/7] fpga: dfl: remove dfl- prefix on files Date: Tue, 8 Jun 2021 09:23:38 -0700 Message-Id: <20210608162340.3010204-7-trix@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210608162340.3010204-1-trix@redhat.com> References: <20210608162340.3010204-1-trix@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=trix@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210608_092413_801281_C02502F9 X-CRM114-Status: GOOD ( 18.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Tom Rix It is not necessary to have a dfl- prefix on a file when the file is in a dfl/ subdir. Signed-off-by: Tom Rix --- Documentation/fpga/dfl.rst | 4 ++-- drivers/fpga/dfl/Makefile | 21 +++++++------------ ...{dfl-afu-dma-region.c => afu-dma-region.c} | 2 +- .../fpga/dfl/{dfl-afu-error.c => afu-error.c} | 2 +- .../fpga/dfl/{dfl-afu-main.c => afu-main.c} | 2 +- .../dfl/{dfl-afu-region.c => afu-region.c} | 2 +- drivers/fpga/dfl/{dfl-afu.h => afu.h} | 6 +++--- drivers/fpga/dfl/{dfl-fme-br.c => fme-br.c} | 2 +- .../fpga/dfl/{dfl-fme-error.c => fme-error.c} | 2 +- .../fpga/dfl/{dfl-fme-main.c => fme-main.c} | 2 +- drivers/fpga/dfl/{dfl-fme-mgr.c => fme-mgr.c} | 2 +- .../fpga/dfl/{dfl-fme-perf.c => fme-perf.c} | 2 +- drivers/fpga/dfl/{dfl-fme-pr.c => fme-pr.c} | 4 ++-- drivers/fpga/dfl/{dfl-fme-pr.h => fme-pr.h} | 6 +++--- .../dfl/{dfl-fme-region.c => fme-region.c} | 2 +- drivers/fpga/dfl/{dfl-fme.h => fme.h} | 6 +++--- .../dfl/{dfl-n3000-nios.c => n3000-nios.c} | 0 drivers/fpga/dfl/{dfl-pci.c => pci.c} | 0 18 files changed, 31 insertions(+), 36 deletions(-) rename drivers/fpga/dfl/{dfl-afu-dma-region.c => afu-dma-region.c} (99%) rename drivers/fpga/dfl/{dfl-afu-error.c => afu-error.c} (99%) rename drivers/fpga/dfl/{dfl-afu-main.c => afu-main.c} (99%) rename drivers/fpga/dfl/{dfl-afu-region.c => afu-region.c} (99%) rename drivers/fpga/dfl/{dfl-afu.h => afu.h} (98%) rename drivers/fpga/dfl/{dfl-fme-br.c => fme-br.c} (99%) rename drivers/fpga/dfl/{dfl-fme-error.c => fme-error.c} (99%) rename drivers/fpga/dfl/{dfl-fme-main.c => fme-main.c} (99%) rename drivers/fpga/dfl/{dfl-fme-mgr.c => fme-mgr.c} (99%) rename drivers/fpga/dfl/{dfl-fme-perf.c => fme-perf.c} (99%) rename drivers/fpga/dfl/{dfl-fme-pr.c => fme-pr.c} (99%) rename drivers/fpga/dfl/{dfl-fme-pr.h => fme-pr.h} (96%) rename drivers/fpga/dfl/{dfl-fme-region.c => fme-region.c} (98%) rename drivers/fpga/dfl/{dfl-fme.h => fme.h} (95%) rename drivers/fpga/dfl/{dfl-n3000-nios.c => n3000-nios.c} (100%) rename drivers/fpga/dfl/{dfl-pci.c => pci.c} (100%) diff --git a/Documentation/fpga/dfl.rst b/Documentation/fpga/dfl.rst index ccc33f199df2a..696ab63d9e6bf 100644 --- a/Documentation/fpga/dfl.rst +++ b/Documentation/fpga/dfl.rst @@ -210,7 +210,7 @@ device and etc. Its driver module is always loaded first once the device is created by the system. This driver plays an infrastructural role in the driver architecture. It locates the DFLs in the device memory, handles them and related resources to common interfaces from DFL framework for enumeration. -(Please refer to drivers/fpga/dfl.c for detailed enumeration APIs). +(Please refer to drivers/fpga/dfl/dfl.c for detailed enumeration APIs). The FPGA Management Engine (FME) driver is a platform driver which is loaded automatically after FME platform device creation from the DFL device module. It @@ -499,7 +499,7 @@ In some cases, we may need to add some new private features to existing FIUs framework, as each private feature will be parsed automatically and related mmio resources can be found under FIU platform device created by DFL framework. Developer only needs to provide a sub feature driver with matched feature id. -FME Partial Reconfiguration Sub Feature driver (see drivers/fpga/dfl-fme-pr.c) +FME Partial Reconfiguration Sub Feature driver (see drivers/fpga/dfl/fme-pr.c) could be a reference. Location of DFLs on a PCI Device diff --git a/drivers/fpga/dfl/Makefile b/drivers/fpga/dfl/Makefile index 724792039026f..29c9dbabd9f77 100644 --- a/drivers/fpga/dfl/Makefile +++ b/drivers/fpga/dfl/Makefile @@ -4,16 +4,11 @@ obj-$(CONFIG_FPGA_DFL) += dfl.o obj-$(CONFIG_FPGA_DFL_AFU) += dfl-afu.o obj-$(CONFIG_FPGA_DFL_FME) += dfl-fme.o -obj-$(CONFIG_FPGA_DFL_FME_BRIDGE) += dfl-fme-br.o -obj-$(CONFIG_FPGA_DFL_FME_MGR) += dfl-fme-mgr.o -obj-$(CONFIG_FPGA_DFL_FME_REGION) += dfl-fme-region.o -obj-$(CONFIG_FPGA_DFL_NIOS_INTEL_PAC_N3000) += dfl-n3000-nios.o -obj-$(CONFIG_FPGA_DFL_PCI) += dfl-pci.o - -dfl-fme-objs := dfl-fme-main.o dfl-fme-pr.o dfl-fme-error.o \ - dfl-fme-perf.o -dfl-afu-objs := dfl-afu-main.o dfl-afu-region.o dfl-afu-dma-region.o \ - dfl-afu-error.o - - - +obj-$(CONFIG_FPGA_DFL_FME_BRIDGE) += fme-br.o +obj-$(CONFIG_FPGA_DFL_FME_MGR) += fme-mgr.o +obj-$(CONFIG_FPGA_DFL_FME_REGION) += fme-region.o +obj-$(CONFIG_FPGA_DFL_NIOS_INTEL_PAC_N3000) += n3000-nios.o +obj-$(CONFIG_FPGA_DFL_PCI) += pci.o + +dfl-fme-objs := fme-main.o fme-pr.o fme-error.o fme-perf.o +dfl-afu-objs := afu-main.o afu-region.o afu-dma-region.o afu-error.o diff --git a/drivers/fpga/dfl/dfl-afu-dma-region.c b/drivers/fpga/dfl/afu-dma-region.c similarity index 99% rename from drivers/fpga/dfl/dfl-afu-dma-region.c rename to drivers/fpga/dfl/afu-dma-region.c index 02b60fde04305..1cf3acbdb0918 100644 --- a/drivers/fpga/dfl/dfl-afu-dma-region.c +++ b/drivers/fpga/dfl/afu-dma-region.c @@ -14,7 +14,7 @@ #include #include -#include "dfl-afu.h" +#include "afu.h" void afu_dma_region_init(struct dfl_feature_platform_data *pdata) { diff --git a/drivers/fpga/dfl/dfl-afu-error.c b/drivers/fpga/dfl/afu-error.c similarity index 99% rename from drivers/fpga/dfl/dfl-afu-error.c rename to drivers/fpga/dfl/afu-error.c index ab7be62173681..4e04a9de314d5 100644 --- a/drivers/fpga/dfl/dfl-afu-error.c +++ b/drivers/fpga/dfl/afu-error.c @@ -17,7 +17,7 @@ #include #include -#include "dfl-afu.h" +#include "afu.h" #define PORT_ERROR_MASK 0x8 #define PORT_ERROR 0x10 diff --git a/drivers/fpga/dfl/dfl-afu-main.c b/drivers/fpga/dfl/afu-main.c similarity index 99% rename from drivers/fpga/dfl/dfl-afu-main.c rename to drivers/fpga/dfl/afu-main.c index 7f621e96d3b8d..9681ab83c02ee 100644 --- a/drivers/fpga/dfl/dfl-afu-main.c +++ b/drivers/fpga/dfl/afu-main.c @@ -19,7 +19,7 @@ #include #include -#include "dfl-afu.h" +#include "afu.h" #define RST_POLL_INVL 10 /* us */ #define RST_POLL_TIMEOUT 1000 /* us */ diff --git a/drivers/fpga/dfl/dfl-afu-region.c b/drivers/fpga/dfl/afu-region.c similarity index 99% rename from drivers/fpga/dfl/dfl-afu-region.c rename to drivers/fpga/dfl/afu-region.c index 0804b7a0c2986..0efcdb2a388e3 100644 --- a/drivers/fpga/dfl/dfl-afu-region.c +++ b/drivers/fpga/dfl/afu-region.c @@ -8,7 +8,7 @@ * Wu Hao * Xiao Guangrong */ -#include "dfl-afu.h" +#include "afu.h" /** * afu_mmio_region_init - init function for afu mmio region support diff --git a/drivers/fpga/dfl/dfl-afu.h b/drivers/fpga/dfl/afu.h similarity index 98% rename from drivers/fpga/dfl/dfl-afu.h rename to drivers/fpga/dfl/afu.h index e5020e2b1f3df..1ea7945218d57 100644 --- a/drivers/fpga/dfl/dfl-afu.h +++ b/drivers/fpga/dfl/afu.h @@ -14,8 +14,8 @@ * Henry Mitchel */ -#ifndef __DFL_AFU_H -#define __DFL_AFU_H +#ifndef __AFU_H +#define __AFU_H #include @@ -106,4 +106,4 @@ extern const struct dfl_feature_ops port_err_ops; extern const struct dfl_feature_id port_err_id_table[]; extern const struct attribute_group port_err_group; -#endif /* __DFL_AFU_H */ +#endif /* __AFU_H */ diff --git a/drivers/fpga/dfl/dfl-fme-br.c b/drivers/fpga/dfl/fme-br.c similarity index 99% rename from drivers/fpga/dfl/dfl-fme-br.c rename to drivers/fpga/dfl/fme-br.c index 3ff9f3a687ce5..ee321903b2885 100644 --- a/drivers/fpga/dfl/dfl-fme-br.c +++ b/drivers/fpga/dfl/fme-br.c @@ -17,7 +17,7 @@ #include #include "dfl.h" -#include "dfl-fme-pr.h" +#include "fme-pr.h" struct fme_br_priv { struct dfl_fme_br_pdata *pdata; diff --git a/drivers/fpga/dfl/dfl-fme-error.c b/drivers/fpga/dfl/fme-error.c similarity index 99% rename from drivers/fpga/dfl/dfl-fme-error.c rename to drivers/fpga/dfl/fme-error.c index 51c2892ec06d5..97c94a87d053b 100644 --- a/drivers/fpga/dfl/dfl-fme-error.c +++ b/drivers/fpga/dfl/fme-error.c @@ -19,7 +19,7 @@ #include #include "dfl.h" -#include "dfl-fme.h" +#include "fme.h" #define FME_ERROR_MASK 0x8 #define FME_ERROR 0x10 diff --git a/drivers/fpga/dfl/dfl-fme-main.c b/drivers/fpga/dfl/fme-main.c similarity index 99% rename from drivers/fpga/dfl/dfl-fme-main.c rename to drivers/fpga/dfl/fme-main.c index 77ea04d4edbef..05676c5a623b1 100644 --- a/drivers/fpga/dfl/dfl-fme-main.c +++ b/drivers/fpga/dfl/fme-main.c @@ -22,7 +22,7 @@ #include #include "dfl.h" -#include "dfl-fme.h" +#include "fme.h" static ssize_t ports_num_show(struct device *dev, struct device_attribute *attr, char *buf) diff --git a/drivers/fpga/dfl/dfl-fme-mgr.c b/drivers/fpga/dfl/fme-mgr.c similarity index 99% rename from drivers/fpga/dfl/dfl-fme-mgr.c rename to drivers/fpga/dfl/fme-mgr.c index d5861d13b3069..ae2b45abbe3aa 100644 --- a/drivers/fpga/dfl/dfl-fme-mgr.c +++ b/drivers/fpga/dfl/fme-mgr.c @@ -22,7 +22,7 @@ #include #include -#include "dfl-fme-pr.h" +#include "fme-pr.h" /* FME Partial Reconfiguration Sub Feature Register Set */ #define FME_PR_DFH 0x0 diff --git a/drivers/fpga/dfl/dfl-fme-perf.c b/drivers/fpga/dfl/fme-perf.c similarity index 99% rename from drivers/fpga/dfl/dfl-fme-perf.c rename to drivers/fpga/dfl/fme-perf.c index 4299145ef347e..451d7b6e0ac1f 100644 --- a/drivers/fpga/dfl/dfl-fme-perf.c +++ b/drivers/fpga/dfl/fme-perf.c @@ -18,7 +18,7 @@ #include #include "dfl.h" -#include "dfl-fme.h" +#include "fme.h" /* * Performance Counter Registers for Cache. diff --git a/drivers/fpga/dfl/dfl-fme-pr.c b/drivers/fpga/dfl/fme-pr.c similarity index 99% rename from drivers/fpga/dfl/dfl-fme-pr.c rename to drivers/fpga/dfl/fme-pr.c index d61ce9a188792..aed4f061c0bf2 100644 --- a/drivers/fpga/dfl/dfl-fme-pr.c +++ b/drivers/fpga/dfl/fme-pr.c @@ -26,8 +26,8 @@ #include #include "dfl.h" -#include "dfl-fme.h" -#include "dfl-fme-pr.h" +#include "fme.h" +#include "fme-pr.h" static struct dfl_fme_region * dfl_fme_region_find_by_port_id(struct dfl_fme *fme, int port_id) diff --git a/drivers/fpga/dfl/dfl-fme-pr.h b/drivers/fpga/dfl/fme-pr.h similarity index 96% rename from drivers/fpga/dfl/dfl-fme-pr.h rename to drivers/fpga/dfl/fme-pr.h index 096a699089d30..65b33cdeaf80d 100644 --- a/drivers/fpga/dfl/dfl-fme-pr.h +++ b/drivers/fpga/dfl/fme-pr.h @@ -15,8 +15,8 @@ * Henry Mitchel */ -#ifndef __DFL_FME_PR_H -#define __DFL_FME_PR_H +#ifndef __FME_PR_H +#define __FME_PR_H #include @@ -81,4 +81,4 @@ struct dfl_fme_mgr_pdata { #define DFL_FPGA_FME_BRIDGE "dfl-fme-bridge" #define DFL_FPGA_FME_REGION "dfl-fme-region" -#endif /* __DFL_FME_PR_H */ +#endif /* __FME_PR_H */ diff --git a/drivers/fpga/dfl/dfl-fme-region.c b/drivers/fpga/dfl/fme-region.c similarity index 98% rename from drivers/fpga/dfl/dfl-fme-region.c rename to drivers/fpga/dfl/fme-region.c index 1eeb42af10122..412609ebad148 100644 --- a/drivers/fpga/dfl/dfl-fme-region.c +++ b/drivers/fpga/dfl/fme-region.c @@ -17,7 +17,7 @@ #include #include -#include "dfl-fme-pr.h" +#include "fme-pr.h" static int fme_region_get_bridges(struct fpga_region *region) { diff --git a/drivers/fpga/dfl/dfl-fme.h b/drivers/fpga/dfl/fme.h similarity index 95% rename from drivers/fpga/dfl/dfl-fme.h rename to drivers/fpga/dfl/fme.h index 4195dd68193e7..300b6cc5cb63f 100644 --- a/drivers/fpga/dfl/dfl-fme.h +++ b/drivers/fpga/dfl/fme.h @@ -15,8 +15,8 @@ * Henry Mitchel */ -#ifndef __DFL_FME_H -#define __DFL_FME_H +#ifndef __FME_H +#define __FME_H /** * struct dfl_fme - dfl fme private data @@ -41,4 +41,4 @@ extern const struct attribute_group fme_global_err_group; extern const struct dfl_feature_ops fme_perf_ops; extern const struct dfl_feature_id fme_perf_id_table[]; -#endif /* __DFL_FME_H */ +#endif /* __FME_H */ diff --git a/drivers/fpga/dfl/dfl-n3000-nios.c b/drivers/fpga/dfl/n3000-nios.c similarity index 100% rename from drivers/fpga/dfl/dfl-n3000-nios.c rename to drivers/fpga/dfl/n3000-nios.c diff --git a/drivers/fpga/dfl/dfl-pci.c b/drivers/fpga/dfl/pci.c similarity index 100% rename from drivers/fpga/dfl/dfl-pci.c rename to drivers/fpga/dfl/pci.c