Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp271325pxj; Wed, 16 Jun 2021 01:52:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOPRA1yQQ/Wrf5cAJEtZfYP/XFN4dO10FOQKYL4r/uEZe3fp7+0trlbKQgo/OBvmxjzRRf X-Received: by 2002:a17:906:acd:: with SMTP id z13mr4238702ejf.437.1623833564856; Wed, 16 Jun 2021 01:52:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623833564; cv=none; d=google.com; s=arc-20160816; b=HAPPTJFhCMmc2zT17bl7yf0QhLxmU3ttWg/hQS8IAtBnW6GJdLbGUf9xdHvHxDcSla cKht2FEdJmfhXU6Nbgs85VP5QkybbJsdXdXjx8Kq+2Wsv5rw24eU/OcHe/yyPrRYwf8P Q2y5BQ0nFMuR3Y09oZ2GG07H0G5g4IWw5RwhdLNFqx+al7oxwj2gZk/2dV//2RVVAsIV CXPsFhsTnaiiebFY+D0l1Ukce4Jj1tp4HJ9T1nLlNJ2KU8aVRj1OCX0CxfeT5EBFDMSK 4TwgL/CWHtpNS9RMzMypOYKZM0UMSNoy0mmkPj0wrpDURWlAMrvOuQS6w1j9PZOsXhgD s8nQ== 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=YepXkOe+nc5TzE4L+Qo8gsGzXGr0lNq6TON4xHnejzk=; b=fxRO2vtrkLt3B3UKyxPu6MxDAynm4kdhC02FHp0ABr3Mks2dSOkp6koYSBUaE/Evab O5nNbE7ffAKy5WSwsMAh98qwxPfW3Js4u03PpCOBbYFCsi0YGL6r+qZfnk0eAKC0S7uJ 5lTPuLxNfv6o4uMB2RxNSKK8znXsZCR6iwmyHR0aJfg/95KWSrG/6vc4tRML7N60l6L4 MGVHOhGr8icz1xWmRpL2ug27SrewAisvWVEn4jDm5oYHNj+0T2UjaRh42EJYF8oMhvQN ZCuW40EgHOTgBMZPh+4e/CSxNeUdQIKNrkACfGATDvYnI3f41GKP5+ZiHEkGfhjxn22D bU6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o5D1UmSs; 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 g11si1470893edw.414.2021.06.16.01.52.22; Wed, 16 Jun 2021 01:52:44 -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=k20201202 header.b=o5D1UmSs; 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 S232087AbhFPIwz (ORCPT + 99 others); Wed, 16 Jun 2021 04:52:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:44154 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231318AbhFPIwz (ORCPT ); Wed, 16 Jun 2021 04:52:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 90DE86115B; Wed, 16 Jun 2021 08:50:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623833449; bh=0RiZqdL/N3p9wsukY1cKqE3It2WhUjFIue2G+sKSwRs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=o5D1UmSsCdG/nTX7zN1ZUAxjBIyR9Pug2ZB9dETlxGKdoU2Z87qMz18bljY/QR0FC kk7+pbZby6Clz/OSqx/Yl4EdKRcX7WnneW0pSgcCYK7A7NSDpFPOtY0IckVfFlrKLQ wqsd+YD0lg7u1WiCCb59eBau9fEzxPURFODhVymLMFTJnYEeHqcBS82IcC4Ruunr9R nJcp0nNynW98it74rzdjKnAxmZqn8Hc3cPkBBCq8RvdRPC6tBRRy5IkN7cDAhNJcA0 x+4N6zN7rnRr/CVG2+7eQZStuZV8befS2yEg3meSa8PLY/1SAal2i/C58Dd7a0CPVZ brZY5465JG81A== Date: Wed, 16 Jun 2021 14:20:45 +0530 From: Vinod Koul To: Mark Brown Cc: Bjorn Andersson , Wolfram Sang , linux-arm-msm@vger.kernel.org, Andy Gross , Matthias Kaehlcke , Douglas Anderson , Sumit Semwal , Amit Pundir , linux-spi@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/7] spi: spi-geni-qcom: Add support for GPI dma Message-ID: References: <20210111151651.1616813-1-vkoul@kernel.org> <20210111151651.1616813-5-vkoul@kernel.org> <20210111163504.GD4728@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210111163504.GD4728@sirena.org.uk> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mark, On 11-01-21, 16:35, Mark Brown wrote: > On Mon, Jan 11, 2021 at 08:46:48PM +0530, Vinod Koul wrote: > > > +static int get_xfer_mode(struct spi_master *spi) > > +{ > > + struct spi_geni_master *mas = spi_master_get_devdata(spi); > > + struct geni_se *se = &mas->se; > > + int mode = GENI_SE_FIFO; > > Why not use the core DMA mapping support? Sorry I seemed to have missed replying to this one. Looking at the code, that is ideal case. Only issue I can see is that core DMA mapping device being used is incorrect. The core would use ctlr->dev.parent which is the spi0 device here. But in this case, that wont work. We have a parent qup device which is the parent for both spi and dma device and needs to be used for dma-mapping! If we allow drivers to set dma mapping device and use that, then I can reuse the core. Let me know if that is agreeable to you and I can hack this up. Maybe add a new member in spi_controller which is filled by drivers in can_dma() callback? Thanks -- ~Vinod