Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp482718ybz; Fri, 17 Apr 2020 04:54:15 -0700 (PDT) X-Google-Smtp-Source: APiQypJPciJbHJ+t/cbSZ+L0TR/uqTVVl0WHFThd3So1HrEveuEvguidLB/0+jJaZeP4FWfwfL14 X-Received: by 2002:a17:906:5003:: with SMTP id s3mr2538334ejj.266.1587124455774; Fri, 17 Apr 2020 04:54:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587124455; cv=none; d=google.com; s=arc-20160816; b=lqkP0tmW4eyRwWqUdpNCxz5XhB6b1whN9EavTci/7p8lDa3t1+e1DhCPqWvVqW7q6Y OzhHDqtXqaeFdU4uZm/9lLL1zIFgDEhGEiq4kmbyKv6fM3cy6zT7fiNvET5A9/G88W2O WuyTUzIbudWBpie75ZJIWWRLSuJDzWG+8JwqsGTRkTfj7w1sNfS7lCfwFfrk1yhlWC/x xj6Lgz4z3UpBm/7KyNMGsxhkriz9p+r/DnyOyO0UqBtBO4S4o1agL6UkNBWja+5aj0z0 LCc6wT4KftmiLuZCaSnh8QBKevSiu/QpzGdMRdJany8t8scbbXXWnErdGXdek8pd05ZO Nh/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=TciF6bGCTR+lIsOpRs838Tndwc1Q1PUz1uznKF9LOzQ=; b=kTEBsqHKmFC1GfekOkppUtCUk0Nb7+THYgwweVLXx2aoFJHwaYi9JFU/o1jFC+aVg2 Q3GRvrp+AQEw8Ij3ciaeURZhiC0p4oMk762cZhDS+8LtEJ1RpayBuxCwjoBiiksR1WSI OY0M4jpJ3vMXgafpiGo3rJa7qXGBamBypxGrod3hvigWPRQkmMHj4qdbo5mSuMg2GpCH o8taKRnnu75zu+FfpQ89w+3GHxGgM9Jqm8/h9HJB6wU97C3WP6SKtVVMqTLZX25GWqo9 uFysWkpyxUWY9GXZf17L/dGjLLk4l70bZMO7+dbX4w0jubUrXkmakZjk9nBvTz5YkHa6 HvOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IrvhpsIh; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s13si12428011eja.102.2020.04.17.04.53.52; Fri, 17 Apr 2020 04:54:15 -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; dkim=pass header.i=@kernel.org header.s=default header.b=IrvhpsIh; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730484AbgDQLuh (ORCPT + 99 others); Fri, 17 Apr 2020 07:50:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:51838 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730440AbgDQLuh (ORCPT ); Fri, 17 Apr 2020 07:50:37 -0400 Received: from localhost (unknown [223.235.195.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2A8DD20780; Fri, 17 Apr 2020 11:50:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587124237; bh=5UjYdrgjeQ5u3UswjbSXqSXZJqYPM0oJyCxvVK55xTM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IrvhpsIh0160xPKGxTyu0dbOsDSt22PdPYnjbMVfrDP50BskHk4nULTsmMBXVXuIS CwBG76Bh6NpKaoMlzzM2y7uk+J4ZQryUGRg2t/ydNomFiUiyEBkyrST89YmSV6Qw+q QsJdmFunpU5WJInoNEANvFVJe96UbiTz2nMS6sBs= Date: Fri, 17 Apr 2020 17:20:30 +0530 From: Vinod Koul To: Alan Mikhak Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, gustavo.pimentel@synopsys.com, dan.j.williams@intel.com, kishon@ti.com, paul.walmsley@sifive.com Subject: Re: [PATCH v2] dmaengine: dw-edma: Decouple dw-edma-core.c from struct pci_dev Message-ID: <20200417115030.GM72691@vkoul-mobl> References: <1586971629-30196-1-git-send-email-alan.mikhak@sifive.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1586971629-30196-1-git-send-email-alan.mikhak@sifive.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15-04-20, 10:27, Alan Mikhak wrote: > From: Alan Mikhak > > Decouple dw-edma-core.c from struct pci_dev as a step toward integration > of dw-edma with pci-epf-test so the latter can initiate dma operations > locally from the endpoint side. A barrier to such integration is the > dependency of dw_edma_probe() and other functions in dw-edma-core.c on > struct pci_dev. > > The Synopsys DesignWare dw-edma driver was designed to run on host side > of PCIe link to initiate DMA operations remotely using eDMA channels of > PCIe controller on the endpoint side. This can be inferred from seeing > that dw-edma uses struct pci_dev and accesses hardware registers of dma > channels across the bus using BAR0 and BAR2. > > The ops field of struct dw_edma in dw-edma-core.h is currenty undefined: > > const struct dw_edma_core_ops *ops; > > However, the kernel builds without failure even when dw-edma driver is > enabled. Instead of removing the currently undefined and usued ops field, > define struct dw_edma_core_ops and use the ops field to decouple > dw-edma-core.c from struct pci_dev. Applied, thanks -- ~Vinod