From patchwork Wed Jun 9 14:22:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 12310283 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 A8652C48BE6 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 8B290613B1 for ; Wed, 9 Jun 2021 14:22:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237738AbhFIOYh (ORCPT ); Wed, 9 Jun 2021 10:24:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:44685 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235109AbhFIOYg (ORCPT ); Wed, 9 Jun 2021 10:24:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623248561; 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=iPI2ugPfAhDK/AdGt/cvoUhfwXVHdmzksRXG9FzYxNc=; b=dteq6uVAofeiC6Yns9/7LuYYhf0rkl4VuL3lAL71QSkiEBqm/HaJar9XqTZqbi4RMwzXZV cb7JP8dKXouWc06cRSeuD+2BFFE7CZLf3sKutm4eM7v9BLhT923pssWfu3fo0P9fsfVz/K YfzSCPz/Ncjh8/5Hj7LcGXhno4yltsM= Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-582-kTa11FbfNTuptdVs43jZFw-1; Wed, 09 Jun 2021 10:22:40 -0400 X-MC-Unique: kTa11FbfNTuptdVs43jZFw-1 Received: by mail-ot1-f72.google.com with SMTP id 59-20020a9d0dc10000b02902a57e382ca1so16418556ots.7 for ; Wed, 09 Jun 2021 07:22:40 -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=iPI2ugPfAhDK/AdGt/cvoUhfwXVHdmzksRXG9FzYxNc=; b=ZJugzOpiN1/4th/dt2cbUvYTBI4RpxXvrrrYXaiAovRgJnXYfbHRtathNFZFBiH2da s+s1pIghYFfa1s9yifd2zu8gAWiXFT0OcftOAswDb2gt4GZ/qoK7fZLEqdAnyKDDS5QJ eGRAItKeFxiKzn2yrPx9Kc7Bq+qaVD++8Ecv6eDLz37FjcRDy5jCVy7OnLs3xNSKVGot zdFxY1uyYhM5vksyZRHB41pRYAU+gDYGYDXALHOEOX91tUQ+tR/XVpofabarY1gvz1WZ 8S/KXmmXEJNYNOMFdok4pW0wosFGSsUiYjsdYj6OuerVfR2qq4ATP5ng+th2w7gyor1p HEbA== X-Gm-Message-State: AOAM531zcnDHN9LcwLX1VfviKanAynCrk2qoN+gL1zrjt2oInBwKdOQ/ /uUnbrxRshmIhrOBEkN8ru4IafHt++VEObl1s/owbkmz9tDt7eU8/82K/CJ1LHEuwwYpjfLSyNx ahY5pFjAU7Ml09E/07/zS+Q== X-Received: by 2002:aca:308c:: with SMTP id w134mr6577725oiw.71.1623248558991; Wed, 09 Jun 2021 07:22:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNC4zfEVt8T2BTXXGLvcH9GVgnJwrZ0mapPVE/yDgsUbx8qTwDgphBHd56iAsA2+7dx2ZY/Q== X-Received: by 2002:aca:308c:: with SMTP id w134mr6577712oiw.71.1623248558824; Wed, 09 Jun 2021 07:22:38 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 07:22:38 -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 4/4] fpga: lattice: reorganize to subdir layout Date: Wed, 9 Jun 2021 07:22:08 -0700 Message-Id: <20210609142208.3085451-6-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 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..477c888d2994e --- /dev/null +++ b/drivers/fpga/lattice/Kconfig @@ -0,0 +1,22 @@ +config FPGA_LATTICE + bool "Lattice Devices" + default y + help + If you have a lattice 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..f542c96a73d40 --- /dev/null +++ b/drivers/fpga/lattice/Makefile @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-only + +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