Received: by 10.223.185.116 with SMTP id b49csp6006301wrg; Wed, 7 Mar 2018 23:42:21 -0800 (PST) X-Google-Smtp-Source: AG47ELsfGtpoE3gcq+aRxiMdi/NSnhzE/JWi6UVmh0st48ENp50Sz0XOOOMHI7N83TCveKPZ1YkG X-Received: by 2002:a17:902:d81:: with SMTP id 1-v6mr23585344plv.324.1520494941756; Wed, 07 Mar 2018 23:42:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520494941; cv=none; d=google.com; s=arc-20160816; b=G8n6PpQYIFDwOGOR+cRnH9x39i88+RgzWcYYCBkiwr1wrZL8YE+WhHWUchFIRwtEP5 cNVHM3H/YKhs+r2sxihuG3gPdtDZMjRriX/81Bw7BCv7ffN61e7BYHP25/xJ64h/vD1I lWsd9LA/4QAN/qB27qVtNZdiPaXkdqYOpIpF1xmd3mwzMVotF10QPzF4kQhV8o/zEuxM 8l5AV5qHsVpJwBeFd/WxT0q5slOwwY4+FSdDiOge433YLJzDff7PIe9QhDxgMTzT2b1c 2NFfYATv26PGWanebc4H3Us6sBmxlbpsq7Zm3bminiZvIO84gqysQvEmRQ7PdlTC83xq 1nVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=jy+etPI/Jvo0mRrkQatW4H3CeY0/7MnDDyigwYukgRE=; b=xz+AwS8Skm7WhHtWtOtUofVLu872ieYUEzpt/R3G5gEDXQKLm92tc9Xg+NsOYhIpYd rvjY/zuezP0Md5Jp6Hbl0I1II/l8xbWQnTDC8/HAjQzSY8rPwFJ4Q49YxaF7QJFGjpko 66xrXmQGfXm25jMDwU62EhRO5GSt2lnDaedPvuet+hHFg6SWTO92tJvYofqVlyXlLsZV tIPkktu9HBnfuloUQ/EpXUYCRcC/Mmtd2CIcrnND51Gyvp7Amnwipxlv6Hs0xKUK7P4d OuKodegv9BbLg/gxn+5pe7MOHMC7RCVFLzTcCA7yuMFTxXAPEphtzWx2c6y4YhkGKoQ3 c5Iw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t71si12625283pgc.793.2018.03.07.23.42.06; Wed, 07 Mar 2018 23:42:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934890AbeCHHlS (ORCPT + 99 others); Thu, 8 Mar 2018 02:41:18 -0500 Received: from verein.lst.de ([213.95.11.211]:33788 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751696AbeCHHlQ (ORCPT ); Thu, 8 Mar 2018 02:41:16 -0500 Received: by newverein.lst.de (Postfix, from userid 2407) id 2BA307F12C; Thu, 8 Mar 2018 08:41:15 +0100 (CET) Date: Thu, 8 Mar 2018 08:41:15 +0100 From: Christoph Hellwig To: Nipun Gupta Cc: Robin Murphy , Christoph Hellwig , "will.deacon@arm.com" , "mark.rutland@arm.com" , "catalin.marinas@arm.com" , "iommu@lists.linux-foundation.org" , "robh+dt@kernel.org" , "m.szyprowski@samsung.com" , "gregkh@linuxfoundation.org" , "joro@8bytes.org" , Leo Li , "shawnguo@kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linuxppc-dev@lists.ozlabs.org" , Bharat Bhushan , "stuyoder@gmail.com" , Laurentiu Tudor Subject: Re: [PATCH 5/6] dma-mapping: support fsl-mc bus Message-ID: <20180308074115.GB15748@lst.de> References: <1520260166-29387-1-git-send-email-nipun.gupta@nxp.com> <1520260166-29387-6-git-send-email-nipun.gupta@nxp.com> <20180305150814.GA15918@lst.de> <7b4f9972-6aaa-fc9d-3854-d48b19a8051c@arm.com> <20180305183938.GB20086@lst.de> <1729ae21-d08c-b413-51a3-f22c394b388d@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 06, 2018 at 04:41:56AM +0000, Nipun Gupta wrote: > Sorry for asking a trivial question - looking into dma_configure() I see that > PCI is used in the start and the end of the API. > In the end part pci_put_host_bridge_device() is called. > So are two bus callbacks something like 'dma_config_start' & 'dma_config_end' > will be required where the former one will return "dma_dev"? I'd just use dma_configure as the callback. Currently the of_dma_configure and acpi_dma_configure are only used for PCI anyway, as no one else sets a non-NULL dma dev. For fsl-mc I suspect only of_dma_configure is relevanet, so just call that directly. If at some point we get enough busses with either OF or ACPI we could create a helper called from ->dma_configure for that.