From patchwork Fri Jun 25 19:58:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 12345861 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.1 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=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 0B388C2B9F4 for ; Fri, 25 Jun 2021 20:01:44 +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 CD17361960 for ; Fri, 25 Jun 2021 20:01:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD17361960 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=iQIsmL2MK/XIQxvjZ76gh3vNpaqeE4F1qGDm6lnmuSo=; b=Zpavgs+RYWtI0h HiEKNXfqLoUk+0bQPM3ZJf7qq8xfJNa4yuWO3cZmrI1gN3vnd+ij0I7QNVil0eRsbvz/6HO8ppPOK GkP7gvsokUYYzO4xPK17AmIUkkWblt2MjAD2zCtFY28zKtHSyqNkBe5cOuE+0E809c2dTW67yr7ol Axe0RfBSIWg6c+Y2VGhVxT6D2x43Q5v3MTbjbX8PdaFhjPNkzDT7P0wfa9wstEkHe5zTyU5ZL4m8V ONlzgbbT3RZI52FOOQPEeE0vWA6objAoguopeLyjTyF/i3XZM/I9FqP2QNRRuFZj/xK5gxOJqjDDS D3oFzjLz9/P0tnHsTU3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwrza-002lKw-2F; Fri, 25 Jun 2021 19:59:58 +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 1lwryk-002l59-T1 for linux-arm-kernel@lists.infradead.org; Fri, 25 Jun 2021 19:59:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624651145; 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=06yao2CDsis15QoJOXCwwfY4/53M6JaTIu7lUfBh14M=; b=HDxJx86/S0zgVCNozNCUVfslWF+lgi9uaAXa1Jn2a33z81+p74Aq8kaDwPffkq86ZTN4RC BhUw8HdsvAPlZ7YozzCJ4rpLll6vGzJRbp9PzeThz7Z8qtqgf3Ded5E3LC71Rs44s9FHld txKntgZdw8Oj78YhfMIH//faX7Xp1QU= 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-174-b3mNV-WmNPSGMP5Xl2D7mQ-1; Fri, 25 Jun 2021 15:59:05 -0400 X-MC-Unique: b3mNV-WmNPSGMP5Xl2D7mQ-1 Received: by mail-oi1-f199.google.com with SMTP id j20-20020aca17140000b02901f3ef48ce7dso6515337oii.12 for ; Fri, 25 Jun 2021 12:59:04 -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=06yao2CDsis15QoJOXCwwfY4/53M6JaTIu7lUfBh14M=; b=ahrNr8aYjbJatKfGasLk/mKsQTVZ1qTUFmFOQv/sFc+76Eag/Ao9aA8SLwCviZOprb E7VZzqRi8kat+UJUq9lFp85QaTfnowdOO3JM+X72QCg9KrHc0W2UlCfjcclawxS/iwqA kKlDNjh77jngxNmej4kmugcPBIfLKDXsHShvI//yfAxldI0GgyHHdWfd1VCepdGbY2TH TXVz41PWMEbor4KUkOFnv1MPrX8qIUeSRhPwAZqrXwtJGh1S7EJ458oBOlNu1ubcDJc7 WtzD4VcZiaekn+5h4IAJ1zgovfdSCWRMgpPZpjaEZRjpeeUysAyhqlpTZ8VfC4m/Ih6g m6xA== X-Gm-Message-State: AOAM531OrMxGZ9Z99oKGBElz5SDg0iLEvwoeHRDvs7wl8jeTRiaFrgLy zrgzH12dc2V9vLFutRnPPm5SfLf0GOQsWU7Tian7d2pzzwcDOr1aPv//QxTdUwHGs+Mk2Cpt/Uw GOtFm4pssfx+3HApmStAZgkvi45NNQEe08qA= X-Received: by 2002:a9d:1444:: with SMTP id h62mr11278368oth.166.1624651144410; Fri, 25 Jun 2021 12:59:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeem8EOmmmn5y8CPZeFaRc3c9s14pMP/nstObriZEyihVaSXAzzok2ediru14hgoYsiKudHA== X-Received: by 2002:a9d:1444:: with SMTP id h62mr11278356oth.166.1624651144276; Fri, 25 Jun 2021 12:59: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 r204sm1467374oih.11.2021.06.25.12.59.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Jun 2021 12:59:03 -0700 (PDT) From: trix@redhat.com To: mdf@kernel.org, hao.wu@intel.com, michal.simek@xilinx.com Cc: linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tom Rix Subject: [PATCH v5 2/4] fpga: add FPGA_MGR_REIMAGE flag Date: Fri, 25 Jun 2021 12:58:47 -0700 Message-Id: <20210625195849.837976-4-trix@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210625195849.837976-1-trix@redhat.com> References: <20210625195849.837976-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-20210625_125907_133532_48A54650 X-CRM114-Status: GOOD ( 10.99 ) 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 If this flag is set the reimage ops will be used otherwise the reconfig ops will be used to write the image Signed-off-by: Tom Rix --- include/linux/fpga/fpga-mgr.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h index 53f9402d6aa17..0791e22b07f88 100644 --- a/include/linux/fpga/fpga-mgr.h +++ b/include/linux/fpga/fpga-mgr.h @@ -67,12 +67,15 @@ enum fpga_mgr_states { * %FPGA_MGR_BITSTREAM_LSB_FIRST: SPI bitstream bit order is LSB first * * %FPGA_MGR_COMPRESSED_BITSTREAM: FPGA bitstream is compressed + * + * %FPGA_MGR_REIMAGE: Reimage the whole card, fpga bs and other device fw */ #define FPGA_MGR_PARTIAL_RECONFIG BIT(0) #define FPGA_MGR_EXTERNAL_CONFIG BIT(1) #define FPGA_MGR_ENCRYPTED_BITSTREAM BIT(2) #define FPGA_MGR_BITSTREAM_LSB_FIRST BIT(3) #define FPGA_MGR_COMPRESSED_BITSTREAM BIT(4) +#define FPGA_MGR_REIMAGE BIT(5) /** * struct fpga_image_info - information specific to an FPGA image