From mboxrd@z Thu Jan 1 00:00:00 1970 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=-15.3 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,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 B56F3C433DB for ; Thu, 4 Mar 2021 13:55:18 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 27A8764E5F for ; Thu, 4 Mar 2021 13:55:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 27A8764E5F 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DGilpfaVNrzxq1GNr70jsYwNCPFjlkRNNPYn/lHy6gk=; b=jaAsvrOHB1w5yEaAwuMjiNLUq 9PJiNCno2KIpJ/Lc0sgUgLoJLrPW2CxTLDs2pUmmixmqYlAOS2xiMarj0IigtIxvk0exMc3+Mhhzs uEyappBuDcWIyn8D0vKp5SPab/ugxBtS67QCtXmzs0I5X088OteJvFycd5JoS8UotZMK1pjZVXs6U UI1ZINMrZn2sQWTATTmAzxxh9Gy5y/zNeUZya34F3ThgLSnwZAFMQaGOy+52tEloU2JknB+fHsDbB MBJY95mIPL0xSDjATsS+/YfFyFkC1fgXYcxJM5t7s0HxxxSEl7Cw9S3xBDKMCUHhcMlKJxRwh0ePN 4jDk/AmpQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lHoPl-008oFS-29; Thu, 04 Mar 2021 13:53:17 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHoPZ-008oDX-Uw for linux-arm-kernel@lists.infradead.org; Thu, 04 Mar 2021 13:53:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614865981; 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=lXMZR9NYDhRem8zZDsBYRp3qs3UWS1OqKUVN3Wolnks=; b=HQsnM/1uze6zqUWfTvYomR1KGuhrDcnWg7RaN0BQYCpQfH512KmTP6TAnu42NMwn5WVEyJ +GUku8pXrvLEM5NosmONtmtKyL2WlaXYf+2J13llRCqgjzMl2uMqgxOs5H3mJzoRJU7v/2 y4QK/bwIncvcRERO1EaJT700Js1xJ7I= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-499-ExVgsnp6Nn6raQ1_GiQ1Dw-1; Thu, 04 Mar 2021 08:51:27 -0500 X-MC-Unique: ExVgsnp6Nn6raQ1_GiQ1Dw-1 Received: by mail-qt1-f198.google.com with SMTP id x5so18925086qti.23 for ; Thu, 04 Mar 2021 05:51:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=lXMZR9NYDhRem8zZDsBYRp3qs3UWS1OqKUVN3Wolnks=; b=kto6F4FpDfT8jmi6yw52/lsVsX6kCaBp3/QnjVLie8UyYf/BY3es8iHBkL0GEoNtju phAQ9VrjjPmpN339rcb+30qYIVxexzHfILY86N4Wr4SHFKn10vJVOkHpOmXhNQOt61Vx hvVFB46iCqzIxOVq46csotoGNe0eoyqv3qP2suhaNY+dvbM5lp/BuudRLqS7F3mWIT9q tfBTD68fmh1+caqofO42jkn9NQGG9iPH/cqO9rkTEiBqrzUy1qUyQx9oYkHmTblU7Vdd DFW+dy9JnLjhqtFFEBmfLGjsm2kCWBXeeoUDp2bGiYNpY4q1xFQ9R89V23wQ8JNI9UUu oq4Q== X-Gm-Message-State: AOAM533ZWESdxJ6EVCzp0CmdWBXcoVdUo3FYdb5c/WNVrg22lXmWj8g6 vorCuA39CzoECMoCBYyybbE4N+QQ7J9oySYn+3P7CyJFxjNgoJP1HJkx+ANVkY1NO4nE7lZXlk8 5saLcYZ/A48PWEnev8EGGbu6nO7xYlShrjkE= X-Received: by 2002:a0c:c488:: with SMTP id u8mr4207330qvi.9.1614865887157; Thu, 04 Mar 2021 05:51:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJydKS0YxaVm2uUcf5l7dt7ZzBbAEphGXDYwwuYbgKa51KOqdSpIeFGKh+wa05uWEvmNF6ixrA== X-Received: by 2002:a0c:c488:: with SMTP id u8mr4207320qvi.9.1614865886891; Thu, 04 Mar 2021 05:51:26 -0800 (PST) Received: from trix.remote.csb (075-142-250-213.res.spectrum.com. [75.142.250.213]) by smtp.gmail.com with ESMTPSA id z5sm3703621qtc.42.2021.03.04.05.51.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Mar 2021 05:51:26 -0800 (PST) Subject: Re: [PATCH v2 2/2] fpga: Add support for Xilinx DFX AXI Shutdown manager To: Nava kishore Manne , mdf@kernel.org, robh+dt@kernel.org, michal.simek@xilinx.com, linux-fpga@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, chinnikishore369@gmail.com Cc: git@xilinx.com References: <20210211051148.16722-1-nava.manne@xilinx.com> <20210211051148.16722-3-nava.manne@xilinx.com> From: Tom Rix Message-ID: <156f2240-2360-b47a-26af-cfd4eb88ddf5@redhat.com> Date: Thu, 4 Mar 2021 05:51:24 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210211051148.16722-3-nava.manne@xilinx.com> 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 Content-Language: en-US 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2/10/21 9:11 PM, Nava kishore Manne wrote: > This patch adds support for Xilinx Dynamic Function eXchange(DFX) AXI > shutdown manager IP. It can be used to safely handling the AXI traffic > on a Reconfigurable Partition when it is undergoing dynamic reconfiguration > and there by preventing system deadlock that may occur if AXI transactions > are interrupted during reconfiguration. > > PR-Decoupler and AXI shutdown manager are completely different IPs. > But both the IP registers are compatible and also both belong to the > same sub-system (fpga-bridge).So using same driver for both IP's. > > Signed-off-by: Nava kishore Manne > --- > Changes for v2: > -Fixed some minor coding issues as suggested by > Tom Rix. > > drivers/fpga/Kconfig | 9 +++++++- > drivers/fpga/xilinx-pr-decoupler.c | 37 ++++++++++++++++++++++++++---- > 2 files changed, 40 insertions(+), 6 deletions(-) > > diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig > index 5645226ca3ce..bf85b9a65ec2 100644 > --- a/drivers/fpga/Kconfig > +++ b/drivers/fpga/Kconfig > @@ -118,10 +118,17 @@ config XILINX_PR_DECOUPLER > depends on FPGA_BRIDGE > depends on HAS_IOMEM > help > - Say Y to enable drivers for Xilinx LogiCORE PR Decoupler. > + Say Y to enable drivers for Xilinx LogiCORE PR Decoupler > + or Xilinx Dynamic Function eXchnage AIX Shutdown Manager. > The PR Decoupler exists in the FPGA fabric to isolate one > region of the FPGA from the busses while that region is > being reprogrammed during partial reconfig. > + The Dynamic Function eXchange AXI shutdown manager prevents > + AXI traffic from passing through the bridge. The controller > + safely handles AXI4MM and AXI4-Lite interfaces on a > + Reconfigurable Partition when it is undergoing dynamic > + reconfiguration, preventing the system deadlock that can > + occur if AXI transactions are interrupted by DFX. > > config FPGA_REGION > tristate "FPGA Region" > diff --git a/drivers/fpga/xilinx-pr-decoupler.c b/drivers/fpga/xilinx-pr-decoupler.c > index 7d69af230567..78a6f5324193 100644 > --- a/drivers/fpga/xilinx-pr-decoupler.c > +++ b/drivers/fpga/xilinx-pr-decoupler.c > @@ -1,7 +1,7 @@ > // SPDX-License-Identifier: GPL-2.0-only > /* > * Copyright (c) 2017, National Instruments Corp. > - * Copyright (c) 2017, Xilix Inc > + * Copyright (c) 2017, Xilinx Inc > * > * FPGA Bridge Driver for the Xilinx LogiCORE Partial Reconfiguration > * Decoupler IP Core. > @@ -18,7 +18,12 @@ > #define CTRL_CMD_COUPLE 0 > #define CTRL_OFFSET 0 > > +struct xlnx_config_data { > + const char *name; > +}; > + > struct xlnx_pr_decoupler_data { > + const struct xlnx_config_data *ipconfig; > void __iomem *io_base; > struct clk *clk; > }; > @@ -76,15 +81,28 @@ static const struct fpga_bridge_ops xlnx_pr_decoupler_br_ops = { > .enable_show = xlnx_pr_decoupler_enable_show, > }; > > +static const struct xlnx_config_data decoupler_config = { > + .name = "Xilinx PR Decoupler", > +}; > + > +static const struct xlnx_config_data shutdown_config = { > + .name = "Xilinx DFX AXI Shutdown Manager", > +}; > + > static const struct of_device_id xlnx_pr_decoupler_of_match[] = { > - { .compatible = "xlnx,pr-decoupler-1.00", }, > - { .compatible = "xlnx,pr-decoupler", }, > + { .compatible = "xlnx,pr-decoupler-1.00", .data = &decoupler_config }, > + { .compatible = "xlnx,pr-decoupler", .data = &decoupler_config }, > + { .compatible = "xlnx,dfx-axi-shutdown-manager-1.00", > + .data = &shutdown_config }, > + { .compatible = "xlnx,dfx-axi-shutdown-manager", > + .data = &shutdown_config }, > {}, > }; > MODULE_DEVICE_TABLE(of, xlnx_pr_decoupler_of_match); > > static int xlnx_pr_decoupler_probe(struct platform_device *pdev) > { > + struct device_node *np = pdev->dev.of_node; > struct xlnx_pr_decoupler_data *priv; > struct fpga_bridge *br; > int err; > @@ -94,6 +112,14 @@ static int xlnx_pr_decoupler_probe(struct platform_device *pdev) > if (!priv) > return -ENOMEM; > > + if (np) { > + const struct of_device_id *match; > + > + match = of_match_node(xlnx_pr_decoupler_of_match, np); > + if (match && match->data) > + priv->ipconfig = match->data; > + } > + > res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > priv->io_base = devm_ioremap_resource(&pdev->dev, res); > if (IS_ERR(priv->io_base)) > @@ -114,7 +140,7 @@ static int xlnx_pr_decoupler_probe(struct platform_device *pdev) > > clk_disable(priv->clk); > > - br = devm_fpga_bridge_create(&pdev->dev, "Xilinx PR Decoupler", > + br = devm_fpga_bridge_create(&pdev->dev, priv->ipconfig->name, > &xlnx_pr_decoupler_br_ops, priv); > if (!br) { > err = -ENOMEM; > @@ -125,7 +151,8 @@ static int xlnx_pr_decoupler_probe(struct platform_device *pdev) > > err = fpga_bridge_register(br); > if (err) { > - dev_err(&pdev->dev, "unable to register Xilinx PR Decoupler"); > + dev_err(&pdev->dev, "unable to register %s", > + priv->ipconfig->name); > goto err_clk; > } > The changes I asked for were made. Reviewed-by: Tom Rix _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel