From patchwork Wed Jun 9 13:21:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 12310183 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=-17.0 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,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 86874C48BCF for ; Wed, 9 Jun 2021 14:00:32 +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 4AA9C61364 for ; Wed, 9 Jun 2021 14:00:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4AA9C61364 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=HEdT0l/zJW0PoX GpRM4PRaICoGAWXxaLpcGksFO8XOTKahqysCkdH8VVOs1DhvPsvH3YqertZMdF7R4Du1B5JBygdLd 2fKBcTisNC/YkuU0VE9K9bUT9Qn1Ufr9MBo1d0DuuA3k2/5lHhO3WBFbqpn7AdSCeN8WbYVBsDHSH LKkUqY3EgufaImabZphdolzPVOyacSeR9leda41cuKGPlXDCJqttAQ4xHGVAO/4dcI16q4xx4pl5W trueNNjYBmDUSSuqx09QDGkBtP8oDoqrYtGmax87jQ6qYfWn/hwAR7GOpRb3KnEjRjkfSL8XUjiON fovezGI4n5RmnDlwoEgg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqyiO-00E9h8-GG; Wed, 09 Jun 2021 13:57:53 +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 1lqyAw-00Dypu-Kf for linux-arm-kernel@lists.infradead.org; Wed, 09 Jun 2021 13:23:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623244997; 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=fcCh7P/6WuZ9xlPQ621TPDTVtTqiRB/8MkEa/yc8kBsP4OQGEwnQ0er58mgJmBGrLpUbnm PexfBEL9josHbaN4GqSlfbgt/nxQRp9LfmkkBRXczIsffRtpsdaquDFxN0TVZS1/VgFvSP A+T4qRTm6pZEt5PbCSe8ZSjPydNKZN8= Received: from mail-oi1-f198.google.com (mail-oi1-f198.google.com [209.85.167.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-333-XPzRCnT-MKGk-OgNLmnmOg-1; Wed, 09 Jun 2021 09:23:16 -0400 X-MC-Unique: XPzRCnT-MKGk-OgNLmnmOg-1 Received: by mail-oi1-f198.google.com with SMTP id a24-20020a0568080998b02901ee3e06e6a6so9539271oic.6 for ; Wed, 09 Jun 2021 06:23:16 -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=jBJGonlG4DVbqToRuqlQmYq66rXl/BGikmUHqLpMUWpml2OEoI0svVDhg7IUM9Xkx9 cSl66mwRS0oYwcCjUHXa9ZelwzB5fBkKMYePhtcSMygnhNXbF0tdPyO39jMpgiAdy8C7 XVJT+ve7Bot5en1dDQz3jo5BJ0GCgmX6Vj4AugI0Gk2gDaDf4Fw0QZlGHT523otihk/c RAPOwOmKD6CrO/NnQqjah7fnjEMU6YjjhTghAPWmhTQBPPexcFm4An67Oprk0IL4NjgH nPJDHe+ieoAUSbkGrpx8m4wUIghPLFM/p0VsOytC/LutPfjLUmYdrJYAccoewdPc7CTY 930Q== X-Gm-Message-State: AOAM532QU+Ij3cDuTDr993nVeUmVHYqDNtQo9FGY4+7yaITYUbzELYHj 5eiqPGC19V0Zk5BAZidUgOdsC2PG4HlXfYcGZpH/fXeIXZF2Z+DdFCujaZdHP1N6Xw/XUB0MA5z 7fFkm6YwMFlXE8ENZ9X8sfpEpZtO+LEAHvnQ= X-Received: by 2002:a9d:1b8:: with SMTP id e53mr21498145ote.252.1623244995630; Wed, 09 Jun 2021 06:23:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwr4NEx7Yve3wjhF1gwVJrTOehYjV/0qEGs38SXoho/7pOmP0syhetqKATX2jZzPm+B7Rcomg== X-Received: by 2002:a9d:1b8:: with SMTP id e53mr21498134ote.252.1623244995464; Wed, 09 Jun 2021 06:23:15 -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 21sm3165654otd.21.2021.06.09.06.23.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 06:23:15 -0700 (PDT) From: trix@redhat.com To: hao.wu@intel.com, mdf@kernel.org, corbet@lwn.net, michal.simek@xilinx.com 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: Wed, 9 Jun 2021 06:21:48 -0700 Message-Id: <20210609132151.3081379-6-trix@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210609132151.3081379-1-trix@redhat.com> References: <20210609132151.3081379-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-20210609_062318_806210_A4B7978B X-CRM114-Status: GOOD ( 14.64 ) 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