Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2705203ybk; Tue, 12 May 2020 06:14:31 -0700 (PDT) X-Google-Smtp-Source: APiQypKcovGKZRkVAySI4Ov3B2GXqfrH1VHA2kBIXekeCtjvj2iaACT2vwW2BCsOcobm/9Xlzy8x X-Received: by 2002:a17:906:dc02:: with SMTP id yy2mr17416183ejb.11.1589289271565; Tue, 12 May 2020 06:14:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589289271; cv=none; d=google.com; s=arc-20160816; b=iwgoElpFPeflAC+H1miFJ20vxQzFNd38grZZ5ntgJBSdHjSA/kxm4r4srvb0GLc2G+ 8VNtSFjCMAK4yc3wr+xeuIPZQdPsm1c0vbdvEojNYgZpwfJrZrFOvA52TqSX/8Gdlbhh lR5HdxNbl3JPgHUBFueOMGpiUpETQ5FSdbLyM6EHmypdh3FRMb2/lniltqVpJvus+n27 NQdAZ18ie+omODFKaAWZjyAMkx4CNMcmAZJfYtS1D84s652pSzLkCxo8Cwt2UQdHraRD O+QVyZ/FOZH73MudCeCq7kTNFqwpUvTB5cyqm7vMk8wVJ2ZWgB/QbmU+OSXJpx16IMgw hxBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=C45hd4QaORYs381gz4T2yjccZRVphRRPsOhQHmbLIwE=; b=vbGQSn9T8rdTWI3itbK30Z6yf1Q4lUZJMf+yIwGA+NihLYgVejs7rV1dZMxVrewHVx fSFOi0S2wpcUfWTP96ddGnglkZbcGqCUNt4CdOA6OkEXYQrcxWMcV+mh/dbngzRMiITx xQZ5chsOgf6zQpM0jWAgSZkpNcnH79yeezH6KQYuqVzXBcLlTTcZeJ8kVDsonq8xaGZw J0dE0mRpuS2bAzjNh1xWTOxTL7AjCxT+fymQRv/Qcp1lSqWBx9rRdnfoWr7S0Mms9ZF0 3Ktcjq45pevWCiFiu1aPvh663Fu+A2yyRJt+C447DUzMESCs+BaCmsEBWyBsgM0bPPBv QjQg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h22si5607893ejf.95.2020.05.12.06.14.06; Tue, 12 May 2020 06:14:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729901AbgELNMH (ORCPT + 99 others); Tue, 12 May 2020 09:12:07 -0400 Received: from mga04.intel.com ([192.55.52.120]:31830 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726891AbgELNMH (ORCPT ); Tue, 12 May 2020 09:12:07 -0400 IronPort-SDR: kfwqYFtbR2x7kebXu0H2A/QqkF4qTEXhwQnxeN5tfM2XP4TU9EbqRT078/r7jRlRhtISN8Utrm 3AAiCYu/li3g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2020 06:11:46 -0700 IronPort-SDR: enexzkz5PmtuHs0D0sFloFyx2Mpk3LsCixCKMhaEd4RTIPC42deB01ymKVYVXBAw+/JynL3jrr qYZpuHyxq0xA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,383,1583222400"; d="scan'208";a="286645821" Received: from marshy.an.intel.com ([10.122.105.159]) by fmsmga004.fm.intel.com with ESMTP; 12 May 2020 06:11:46 -0700 From: richard.gong@linux.intel.com To: mdf@kernel.org Cc: linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org, dinguyen@kernel.org, richard.gong@linux.intel.com, Richard Gong Subject: [PATCHv1] fpga: stratix10-soc: remove the pre-set reconfiguration condition Date: Tue, 12 May 2020 08:27:31 -0500 Message-Id: <1589290051-30246-1-git-send-email-richard.gong@linux.intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Richard Gong The reconfiguration mode is pre-set by driver as the full reconfiguration. As a result, user have to change code and recompile the drivers if he or she wants to perform a partial reconfiguration. Removing the pre-set reconfiguration condition so that user can select full or partial reconfiguration via overlay device tree without recompiling the drivers. Also add an error message if the configuration request is failure. Signed-off-by: Richard Gong --- drivers/fpga/stratix10-soc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/fpga/stratix10-soc.c b/drivers/fpga/stratix10-soc.c index 44b7c56..2da8a40 100644 --- a/drivers/fpga/stratix10-soc.c +++ b/drivers/fpga/stratix10-soc.c @@ -182,12 +182,12 @@ static int s10_ops_write_init(struct fpga_manager *mgr, uint i; int ret; - ctype.flags = 0; if (info->flags & FPGA_MGR_PARTIAL_RECONFIG) { dev_dbg(dev, "Requesting partial reconfiguration.\n"); - ctype.flags |= BIT(COMMAND_RECONFIG_FLAG_PARTIAL); + ctype.flags = 1; } else { dev_dbg(dev, "Requesting full reconfiguration.\n"); + ctype.flags = 0; } reinit_completion(&priv->status_return_completion); @@ -210,6 +210,7 @@ static int s10_ops_write_init(struct fpga_manager *mgr, ret = 0; if (!test_and_clear_bit(SVC_STATUS_OK, &priv->status)) { + dev_err(dev, "RECONFIG_REQUEST failed\n"); ret = -ETIMEDOUT; goto init_done; } -- 2.7.4