From patchwork Fri Jun 25 19:58:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 12345875 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 F1A0CC2B9F4 for ; Fri, 25 Jun 2021 20:02:52 +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 B1F416195D for ; Fri, 25 Jun 2021 20:02:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B1F416195D 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=7cOVrsIt1Fx81VGTgZdP7HC9HNo2/IpYAAltJOiaIXc=; b=eBQ5ASNW6jrNP7 IYY1f67s7PeMm5FagAPEV56/4bOiKs+n2cof0Qf/KlMMI/A0BcA0L+g/jZ+xhqI5GBhPSfNfK3/Ui WhMANoIsCFLF4KG72ycyxvamvldXRhCQZFsCws18Sa27J5ya/6dfkJrElojdyjY7Sk1u2NkLzMyeT yNuiKzLLKnocmEl+qS8KkmYVKDbDM6K/F+cc/TiSmZ5v3x7QAwFwxpRFlC2RS5hFuPSuO+tRCIP3K GbWi3T3Vo66EwTVnPRlkshUSb3tuveDZq7rnKoAuKgMscPWoIzNV03v6dKDMuvhCf4qC4PFfHbpwC bK+nDpnB8udkoFkeG6EQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lws0t-002lq4-B8; Fri, 25 Jun 2021 20:01:20 +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 1lwryq-002l7n-P8 for linux-arm-kernel@lists.infradead.org; Fri, 25 Jun 2021 19:59:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624651151; 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=TgS1W0YkxnAj8zzimJEJj0dUofXVg1iWDV0xL3ii1c4=; b=ORqX38cAz+4mi7TJMzHFij8dGeHNtvbIM51v8RC1zTrhENk+MwFTzusUQ2SDy+5WFWtorA 9O6lQDSltmq758wMREhNhLczUlqM7uQBIV1wXyelnUNGjPeul/RWWZ8wjaD1MY5PKVJxMS GFMIGyikmf8n8iv984O/dDx2sFHCpL8= Received: from mail-oi1-f197.google.com (mail-oi1-f197.google.com [209.85.167.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-290-06IJJK5pMK2PG-plyWenSg-1; Fri, 25 Jun 2021 15:59:10 -0400 X-MC-Unique: 06IJJK5pMK2PG-plyWenSg-1 Received: by mail-oi1-f197.google.com with SMTP id q31-20020a056808201fb02902242061b668so6535558oiw.8 for ; Fri, 25 Jun 2021 12:59: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=TgS1W0YkxnAj8zzimJEJj0dUofXVg1iWDV0xL3ii1c4=; b=RTXs8w4OgQsGOFRRrm7flIdZ5MuT+BRKRFDQOOUYo3K1fk+Gafpf9dfbTf0Ui1IAw0 ShVOhQlZvFcKO80T6Q9Qhb5ZAI1djm6XtY/NtUogVteJI9EsrsuTMikzQ3cOl7DY3TaI X1M95/Y+TKh7xRTO4rwtTyejLsfOWz4kwUejtZ/QGvjxQgOeSQi/C2ElGohqPyPwdxk+ pcHSPrmzo/FJ3Iind5CtgHojIzbXwlFE/wRCpZLE15VJcCDWY1M+kjsJF0UqbW5cM+67 W8F4/iLXYjJI6AbADcToqIDCEwgi1Nf8j5lZez2kTSCSXb8rAjepBiZ0H8hg/pdJIsUp HAkw== X-Gm-Message-State: AOAM533EvEZDpHcFSuI1ec8pz0iKczlYcQ5/rrcWMBH98hw5gyFnHSG1 NPkB/rAhc1c2jq7aforjfN4Bu/4U62Aqa6PJOK/Fb86nFo2Pp2K934uaRE9pikNwF++9+CSHfYM PgNRYUbvWn7px7fyjkMnE/awIxCOmaCFI1FY= X-Received: by 2002:a05:6830:1e55:: with SMTP id e21mr8941889otj.29.1624651149615; Fri, 25 Jun 2021 12:59:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxK16sNuDxGos3d6wDWJs1xw8YcqRzRff8x/NSugHYZvhWkQA++qMFqI3SoPwY6dhVGg3zmTg== X-Received: by 2002:a05:6830:1e55:: with SMTP id e21mr8941875otj.29.1624651149422; Fri, 25 Jun 2021 12:59:09 -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.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Jun 2021 12:59:09 -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 4/4] fpga: use reimage ops in fpga_mgr_load() Date: Fri, 25 Jun 2021 12:58:49 -0700 Message-Id: <20210625195849.837976-6-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_125912_992962_0276259E X-CRM114-Status: GOOD ( 10.62 ) 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 the fpga_image_info flags FPGA_MGR_REIMAGE bit is set swap out the reconfig ops for the reimage ops and do the load. Signed-off-by: Tom Rix --- drivers/fpga/fpga-mgr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c index c8a6bfa037933..5e53a0508087a 100644 --- a/drivers/fpga/fpga-mgr.c +++ b/drivers/fpga/fpga-mgr.c @@ -419,6 +419,9 @@ int fpga_mgr_load(struct fpga_manager *mgr, struct fpga_image_info *info) { const struct fpga_manager_update_ops *uops = &mgr->mops->reconfig; + if (info->flags & FPGA_MGR_REIMAGE) + uops = &mgr->mops->reimage; + if (info->sgt) return fpga_mgr_buf_load_sg(mgr, info, info->sgt, uops); if (info->buf && info->count)