Received: by 10.192.165.156 with SMTP id m28csp296954imm; Sun, 15 Apr 2018 23:33:50 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/xEdR0nwbW609OB51GT0IE1Voo9VW9sjVuDe0NK+8Ayo+y5QKldtATIMkqNZx4U+cvoINe X-Received: by 10.98.198.7 with SMTP id m7mr20630649pfg.66.1523860430267; Sun, 15 Apr 2018 23:33:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523860430; cv=none; d=google.com; s=arc-20160816; b=bj7XEiBBnWkjViPISsMeF+6fgx7+1kHt3Vaq+gWP1yiEyqVJ6I2A5T8NB+mU03kkWQ Alpg4NSYj37C4pPMFTIzECBR+AN6ySTN6weu7QFFsKG/tZsgmm0cf4ej5L3ycPC15A/Q HpcYjVeXhrj9edztEJpcFJ99aUTSgCKKO1w3cAr3eO4EhJ5tcFArisr+n7RCCRPA2vp3 +OY2XiR+1uyjH4dbXSer/z2Yuei2dSsQM4Ympq7uD5D5Qy6KTy8mEDJNcutiiOfoo2ZE CNb9arQm3i8J/GpAN2wWxrNx7th7b2UACJBijWNf2w9VxIZxKkcmjSaDdyVVdJYODGmX GlIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=2hGO+TuV/x1AoT/QEERQ3SJPaVcN7gwvQ93tE8cRIWc=; b=R8KhstO2uQhwAXr93QgaBZeSsvrn7t3ohFaRKL+hJN/OjobwUsBDL5IjbExa4xu63W SulQDyCiOtm46L8Xzf/v9p64eOhLhtbNHd9ZcGQslt1OeMMt+CcjttHS6PhI2iO7kFKn wQIA1MXAC4O4EhiaMx9qmlyMIMQdMl4aOD918ZnWMLKLqxB/UwgegffYLWk5KRIP6HhU 6xU5kEpqunpYMKiZ2EMDFnpE5XripBaxVlCt/xKPw0pivw8cHyzgktbWSWVhlSGGbOeC pJd6F3T4KNW49lUYSI5Jq+Kj90InY081W4GYzi5Js3zBcZNOAADFmzfgG0PaERM0wFUV ToUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=koAZrqLX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z9si5633156pgs.308.2018.04.15.23.33.36; Sun, 15 Apr 2018 23:33:50 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=koAZrqLX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751886AbeDPGcI (ORCPT + 99 others); Mon, 16 Apr 2018 02:32:08 -0400 Received: from mail-ot0-f194.google.com ([74.125.82.194]:42657 "EHLO mail-ot0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750707AbeDPGcG (ORCPT ); Mon, 16 Apr 2018 02:32:06 -0400 Received: by mail-ot0-f194.google.com with SMTP id h55-v6so16157020ote.9 for ; Sun, 15 Apr 2018 23:32:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=2hGO+TuV/x1AoT/QEERQ3SJPaVcN7gwvQ93tE8cRIWc=; b=koAZrqLXBZJoq/k/WiXUoQBY72zWer0KHR4D1w34jgZeZCklIGHFx2lm8RmYUZxSD1 eLJlSbJo3eY2lfN6DUwAaS0FsYUpOOlygDP64JXZu6aTN+J5wQPs7bDtSFddrmViZqkW HDMAXwocyPcAr4c7MyJR7i6ycZd5MT0FoXkZs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=2hGO+TuV/x1AoT/QEERQ3SJPaVcN7gwvQ93tE8cRIWc=; b=Ygyjf03pfb5F3YOIfFannozCxeet9lLJYJdphjdryO2UPGebovJa8+yvKFNdJTV43s pB9IP6zrk+398jISDE9e5U6u4rzVwFb1aSiVGm5qKeRQbfkJuGT4k7r1fhsCGrxnrMnD LbafjpZRoF3i+80lcXtN1f+M6HUnpdWdos8bDCSdiJTBkSXjSYGGd+44Y5S2UXXcbvuX Tz6pqFbQqhsCL57SbY6ZB9902KMu0wsYKakvRr1zyX2AxlWVlN1LYGitJyywDDN6vVO9 lXkgbEnXx9C1QBzLysxn0+Tc/HWai2EE4dFEIRFlMC0BDKIfVInCxUpwiuHHn1rabwwQ LZUw== X-Gm-Message-State: ALQs6tACzsW07vgRhehfhn6D/y/MLnM9AcrRQHlAqV9C4dPYsMf9NYVp kF0Vfsi2mwKARIOtqm0VRxo01iQhunBwAehqWIdm+g== X-Received: by 2002:a9d:2d42:: with SMTP id v60-v6mr9172392ota.177.1523860326305; Sun, 15 Apr 2018 23:32:06 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:7081:0:0:0:0:0 with HTTP; Sun, 15 Apr 2018 23:32:05 -0700 (PDT) In-Reply-To: <20180416035831.GO6014@localhost> References: <0c2b76aba6a49e583f920ae582d6815fa9cc4361.1523346135.git.baolin.wang@linaro.org> <20180411093634.GC6014@localhost> <20180412093735.GF6014@localhost> <20180413034332.GI6014@localhost> <20180413063641.GL6014@localhost> <20180416035831.GO6014@localhost> From: Baolin Wang Date: Mon, 16 Apr 2018 14:32:05 +0800 Message-ID: Subject: Re: [PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration To: Vinod Koul Cc: Dan Williams , Eric Long , Mark Brown , dmaengine@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16 April 2018 at 11:58, Vinod Koul wrote: > On Fri, Apr 13, 2018 at 02:41:48PM +0800, Baolin Wang wrote: >> On 13 April 2018 at 14:36, Vinod Koul wrote: >> > On Fri, Apr 13, 2018 at 02:17:34PM +0800, Baolin Wang wrote: >> > >> >> > Agreed, users only care about grabbing a channel, setting a descriptor and >> >> > submitting that. >> >> > >> >> > I think you need to go back and think about this a bit, please do go thru >> >> > dmaengine documentation and see other driver examples. >> >> > >> >> > We don't typically expose these to users, they give us a transfer and we set >> >> > that up in hardware for efficient. Its DMA so people expect us to use fastest >> >> > mechanism available. >> >> >> >> But there are some configuration are really special for Spreadtrum >> >> DMA, and must need user to specify how to configure, especially some >> >> scenarios of audio. So I wander if we can add one pointer for >> >> 'dma_slave_config' to expand some special DMA configuration >> >> requirements, like: >> >> >> >> struct dma_slave_config { >> >> ...... >> >> unsigned int slave_id; >> >> void *platform_data; >> >> }; >> >> >> >> So if some DMA has some special configuration (such as Spreadtrum >> >> DMA), they can user this platform_data pointer. Like xilinx DMA, they >> >> also have some special configuration. >> > >> > Well we all think our HW is special and needs some additional stuff, most of >> > the cases turns out not to be the case. >> > >> > Can you explain how audio in this case additional configuration... >> >> Beside the general configuration, our audio driver will configure the >> fragment length, block length, maybe transaction length, and they must >> specify the request type and interrupt type, these are what we want to >> export for users. > > As I said before, you need to derive fragment, block or transaction from I am sorry I did not make things clear here. What I mean is not only link list mode(prep_cyclic), but also other modes (prep_slave, prep_interleaved ...), users still need to configure the fragment length, block length or transaction length according to their requirements. > given prep_cyclic values. Interrupt type needs to be derived with the flags > passed. Please do see how other drivers make use of it. Fine. We configure the Interrupt type through the flags passed. -- Baolin.wang Best Regards