From patchwork Wed Jun 9 14:22:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 12310285 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=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham 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 2D2E9C48BCD for ; Wed, 9 Jun 2021 14:22:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 182B3613BF for ; Wed, 9 Jun 2021 14:22:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237645AbhFIOYg (ORCPT ); Wed, 9 Jun 2021 10:24:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:53230 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237951AbhFIOYa (ORCPT ); Wed, 9 Jun 2021 10:24:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623248555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eGpIk5XJnGPfT/pomqiFUwoDpGM7sL2DIzHoor45pdc=; b=F44Hz0wt7Dd/Kz24vz45Aj5Vh37ETfGZcBPQSBYIUArVoNtIFeIJm/05HT9zBgT0qyLC9i UYaU6siwWFraGLdPFA3GfDKz78yMUuaVv9+Fi7hJCKV/MwInlTy0l5nizc9/nIIeEmBjQ8 QG6T83J1dtuhIrxvW9CjATrFRb5jp7c= Received: from mail-oi1-f199.google.com (mail-oi1-f199.google.com [209.85.167.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-401-wkKsuY72PhGIoCt-KXfW7g-1; Wed, 09 Jun 2021 10:22:33 -0400 X-MC-Unique: wkKsuY72PhGIoCt-KXfW7g-1 Received: by mail-oi1-f199.google.com with SMTP id j20-20020aca17140000b02901f3ef48ce7dso4658538oii.12 for ; Wed, 09 Jun 2021 07:22:33 -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=eGpIk5XJnGPfT/pomqiFUwoDpGM7sL2DIzHoor45pdc=; b=EZczgGpzkMmqPkkGJs3kNtzxGsCDThuelTo88mcCn5u6Fua62RYt4urrb9FT/VJhvL 81x6NBUiD/QHlzh6wzKtq0U68nUuhUbGXLFnm2qv86HotiG20PUH94e5MMQntcO8aieP VI1vF01hfj21fkQ9cmYq61uKo31gkIGV8v7W5c8F2wtPEE76vz+xtTehrz0QPzDz/SW2 QMn+O98D2/NHYA3I6dmJzjM5tppjf33pT/NZOGWSSNEeTGDxFnCkNwPYR60jYiBUet4N e1VM5dLcGUpVJrTp45QBl55DhB6ru9iXSP83HA36G1C8aFDKK3DYZhEvOCypo5eB00+E h/Og== X-Gm-Message-State: AOAM533fB5Sv9Q3Uq2MOMsrvu9Mm32WpZr7WOhy5W5qQ4IfD5RwbnIft jPG0JCxbMRaMjIf/80h+19niKkiO3EipknGCrkYTwms0XS+fM8jZ+wnxaTAvD8Eu7MTSZifVk+T llzfw0f7555sA4Y9gZIQqtg== X-Received: by 2002:a4a:a802:: with SMTP id o2mr100848oom.91.1623248552934; Wed, 09 Jun 2021 07:22:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLBQ2BV1jd0XBPam98XtRPk842afdonpKuqwrs/9WQyANyBOayVYGgCsY3isms3bnqddh27Q== X-Received: by 2002:a4a:a802:: with SMTP id o2mr100830oom.91.1623248552708; Wed, 09 Jun 2021 07:22:32 -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 o4sm3414432oon.15.2021.06.09.07.22.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 07:22:32 -0700 (PDT) From: trix@redhat.com To: mdf@kernel.org, hao.wu@intel.com, michal.simek@xilinx.com, gregkh@linuxfoundation.org, nava.manne@xilinx.com, dinguyen@kernel.org, krzysztof.kozlowski@canonical.com, yilun.xu@intel.com, arnd@arndb.de, fpacheco@redhat.com, richard.gong@intel.com, luca@lucaceresoli.net Cc: linux-kernel@vger.kernel.org, linux-fpga@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tom Rix Subject: [PATCH v2 3/4] fpga: altera: reorganize to subdir layout Date: Wed, 9 Jun 2021 07:22:07 -0700 Message-Id: <20210609142208.3085451-5-trix@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210609142208.3085451-1-trix@redhat.com> References: <20210609142208.3085451-1-trix@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-fpga@vger.kernel.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 | 78 +++++++++++++++++++ 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, 92 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..9c913f47109b1 --- /dev/null +++ b/drivers/fpga/altera/Kconfig @@ -0,0 +1,78 @@ +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..9c86057cff110 --- /dev/null +++ b/drivers/fpga/altera/Makefile @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0-only + +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