Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp225578pxu; Wed, 7 Oct 2020 01:08:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxG7jUOR4pMAvkUlbDl7hCOO2tpJ4+GMiZHnbdhM6h/J/hf8ToJoAI6s7Eab6OCYbWjXA7 X-Received: by 2002:a17:906:494:: with SMTP id f20mr2076903eja.285.1602058082018; Wed, 07 Oct 2020 01:08:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602058082; cv=none; d=google.com; s=arc-20160816; b=Lh086+q7sdWCiq0HNhym4C2MjeL8XQotUdwqdhNlqPnN/d87N64WQEGMgSUPbCFIZB rq8Jdcna6QWpFJr3hXNUwg1s8+L5qltkYTMpXvUbegMnMTsO02aj7lyeGVPXcxAVCjmc hbV90fLQj6eLja8UaTWQexSRiLxGP/R0zkhLFabrM0OlyZGa51OAan1gngIeaNYnEe3e evcltTqOw9Bp4Hg4DSl+Jsk8ExoRBqt2ZVmmoLaSpDO4E2SXp9I19/b4HhwvKMxx3lNp uRkJh+d/RXg0d8znNCmq0fFLUPr+o7jBnbkoRQMyE7cm2SoBm3oNh3C1m90rswjCdjM+ WCzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fCDIt/W2fHIJt6YOUgIvjadQKEsVJfq9UIdFQCYZ4iE=; b=q3o7AiDYPMbUEq+IHWbk4oj5+WWLifVMDCJsBQ+CyTOSZf1ybNXmyPBoUqH4UrriWB h3i0/Cbc/9TQGQh1xfy6GJ8eYL5hGCezZLkJXnEvO66ZBqt9StY4+XbhDCs2gYZOIU4u IPScnzg7FADDA7s0Gfbo8m85VZBbJo/CMYwnoa5n9yVBTxIy4U2MOe0yv9gOt+q19x04 gY2CMWn7oTwUANEsq1dckwxvhoMgAptTpmM7sv5eX5GkWYsMVqbeE2VciE7zJ1i+lJd9 3xY6kSTtkBuc5Vp6qssuC6V9kdXymXrK2/LhWc9RSRtbFAeilKf79cRTX6j+WaUjSP7I ilEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jH04N95L; 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 w22si905239edx.548.2020.10.07.01.07.39; Wed, 07 Oct 2020 01:08:02 -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=jH04N95L; 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 S1726754AbgJGGxL (ORCPT + 99 others); Wed, 7 Oct 2020 02:53:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:52092 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725970AbgJGGxK (ORCPT ); Wed, 7 Oct 2020 02:53:10 -0400 Received: from localhost (unknown [122.171.222.162]) (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 C1E2E20797; Wed, 7 Oct 2020 06:53:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602053589; bh=WnCyc7OlZxbrj4ooSfvmm2cyBE+u5+4ecYnYdEioJ5Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jH04N95LiL9SC7lL5ocCE3Bv68tKklB00kTumCRPl6x4PHGbNv+acOvCODjj8bdq8 Oimv2htRf8ZyrnCaad5EdTMVAQpy8YfbiUc5R/4IkVsfYJZr1PbktQUVy+W3Rf7GG7 y5LMeKN+Ymqnz90N7EjPMJh++fkupnSRc5WvJ4a4= Date: Wed, 7 Oct 2020 12:23:05 +0530 From: Vinod Koul To: Peter Ujfalusi Cc: nm@ti.com, ssantosh@kernel.org, robh+dt@kernel.org, vigneshr@ti.com, dan.j.williams@intel.com, t-kristo@ti.com, lokeshvutla@ti.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org Subject: Re: [PATCH 07/18] dmaengine: ti: k3-udma-glue: Add function to get device pointer for DMA API Message-ID: <20201007065305.GS2968@vkoul-mobl> References: <20200930091412.8020-1-peter.ujfalusi@ti.com> <20200930091412.8020-8-peter.ujfalusi@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200930091412.8020-8-peter.ujfalusi@ti.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30-09-20, 12:14, Peter Ujfalusi wrote: > Glue layer users should use the device of the DMA for DMA mapping and > allocations as it is the DMA which accesses to descriptors and buffers, > not the clients > > Signed-off-by: Peter Ujfalusi > --- > drivers/dma/ti/k3-udma-glue.c | 14 ++++++++++++++ > drivers/dma/ti/k3-udma-private.c | 6 ++++++ > drivers/dma/ti/k3-udma.h | 1 + > include/linux/dma/k3-udma-glue.h | 4 ++++ > 4 files changed, 25 insertions(+) > > diff --git a/drivers/dma/ti/k3-udma-glue.c b/drivers/dma/ti/k3-udma-glue.c > index a367584f0d7b..a53bc4707ae8 100644 > --- a/drivers/dma/ti/k3-udma-glue.c > +++ b/drivers/dma/ti/k3-udma-glue.c > @@ -487,6 +487,13 @@ int k3_udma_glue_tx_get_irq(struct k3_udma_glue_tx_channel *tx_chn) > } > EXPORT_SYMBOL_GPL(k3_udma_glue_tx_get_irq); > > +struct device * > + k3_udma_glue_tx_get_dma_device(struct k3_udma_glue_tx_channel *tx_chn) How about.. struct device * k3_udma_glue_tx_get_dma_device(struct k3_udma_glue_tx_channel *tx_chn) > +{ > + return xudma_get_device(tx_chn->common.udmax); > +} > +EXPORT_SYMBOL_GPL(k3_udma_glue_tx_get_dma_device); Hmm why would you need to export this device.. Can you please outline all the devices involved here... why not use dmaI_dev->dev or chan->dev? -- ~Vinod