Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2350793imj; Mon, 18 Feb 2019 04:36:35 -0800 (PST) X-Google-Smtp-Source: AHgI3IbGmQTkvCRnUyx7BDfEE0zooTfBfZuiWnVyN1Od39U8kjIu2UVyTv+3qNYdXpZZJM3HNdye X-Received: by 2002:a62:d281:: with SMTP id c123mr19682512pfg.210.1550493395844; Mon, 18 Feb 2019 04:36:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550493395; cv=none; d=google.com; s=arc-20160816; b=hEbNgdB8nLTn9zHhsBCKXEBU9KicKyIXeRDp9a/135CBAFWmgNmd8pfSJfviXihPlM AV20gPbTcLhxR8/68sj3nS+ybBTQumHIIuhWo5jbGyQ+mIU+CMqJW2q9pxDtofKqkGx7 sRTDc9JPL+8Y/pzlQfRVr592OUBI2sNkkO6030/UDQWejP8s6vpOUf9AEYhZXzmpeBSI WQMmU898jBggtrc2ERR16lhZ/yDvP7hgg95Hc5R+XinPKxN18FRMvrKY8hU0Qovy8fuI ZLOQwZCCU4TaNIJt8BWolzlJpm1u4NTi6P36kUyyJ40mRx4lbHhxi1UNzCOmhqqD3HQK xEMA== 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 :in-reply-to:references:mime-version; bh=TkxiOdlFMG2Oo/NhiwiO2IEP5PcwzbiZ5G0/wUbTDYU=; b=c/UH9EgVuU8/xdjAIZVOFO5lf4YQJhGOEBtnDu9eqybj72wpUJm7J84yUJSM/d1Y7X gJTrXqNaRjGHvtBKtRDj4SdaJ2iHXhzuJHPqYgFuGZ7iMUAgsRH7ok2DKc2Z/SYpurdY ylp0fsGqSVAMk/XlN2vdzx6e/kDOIhhPCfjxj738gHmLH35XJtehx+vruliVzl4LkrQK W7wFd3NBKxtgk/Tp0cY1B1wLogXEJ64RfSs2JETrnu7Balu9uNHMGuveoqi9DYrWeePv 6R4DA2jQ+jOBoRdRpGEDw8t+QT6OpqWEOXf8VgHX3w72bB2RZMh3Pu0QXA5V8lbb66IN JAHA== 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 z9si13418921pgf.54.2019.02.18.04.36.20; Mon, 18 Feb 2019 04:36:35 -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 S1730824AbfBRMXS (ORCPT + 99 others); Mon, 18 Feb 2019 07:23:18 -0500 Received: from mail-qk1-f196.google.com ([209.85.222.196]:36816 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728898AbfBRMXR (ORCPT ); Mon, 18 Feb 2019 07:23:17 -0500 Received: by mail-qk1-f196.google.com with SMTP id o125so9831334qkf.3; Mon, 18 Feb 2019 04:23:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TkxiOdlFMG2Oo/NhiwiO2IEP5PcwzbiZ5G0/wUbTDYU=; b=bbMzP7+6INf7UYwnMKyxu1bCECU5d59iQDYaT7pUr66Z4jO4jMNrtkfkpTTzqFzqqN vXodNkpkJOlSn06wMisD4gC5CDWAtFvD6lxvxn8DYX7efGCeQl7qdR73Ds/Ibche4OEy 3NZ01HX4panBOsn5LoCya1c7iuCk7gH4I8h+Z7KXmUnxTA41RdB6fHW1F4AfOOOCT+v2 PB9fiFSyTG9vq5q4WQLRk/hHNoVK8RDMsckc54XQitGbPkqeXazES+6PGdC+xjkWV30G kjxhniUC4QnB1jwogzCUSM2SXHiC/bUOeT0+JgxRmfsGy7jpD9ispuHSs3CzUsPT79wL 4M0A== X-Gm-Message-State: AHQUAuagGGt6XkOoeMyM5fSgel0VWF+JwpyVzPfcEx5PMSd4g1r8iqDN SRLRGt58mNURzpiJ9w0kvVGx/Cmaq/8R3U24/+EvXA== X-Received: by 2002:a37:d492:: with SMTP id s18mr15615469qks.343.1550492596472; Mon, 18 Feb 2019 04:23:16 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Arnd Bergmann Date: Mon, 18 Feb 2019 13:23:00 +0100 Message-ID: Subject: Re: [PATCH 1/3] dt-bindings: dmaengine: Add one new cell to present hardware slave id To: Baolin Wang Cc: Vinod Koul , Rob Herring , Mark Rutland , Olof Johansson , Orson Zhai , Lyra Zhang , Dan Williams , DTML , arm-soc , Linux ARM , Linux Kernel Mailing List , dmaengine@vger.kernel.org, eric.long@unisoc.com, Mark Brown 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 Mon, Feb 18, 2019 at 11:52 AM Baolin Wang wrote: > On Mon, 18 Feb 2019 at 18:31, Arnd Bergmann wrote: > > > > On Tue, Feb 12, 2019 at 9:25 AM Baolin Wang wrote: > > > On Fri, 1 Feb 2019 at 19:53, Baolin Wang wrote: > > > > On Thu, 31 Jan 2019 at 00:52, Arnd Bergmann wrote: > > > > > On Tue, Jan 22, 2019 at 2:21 PM Baolin Wang wrote: > > > > > > > > > > > > Client: > > > > > > DMA clients connected to the Spreadtrum DMA controller must use the format > > > > > > -described in the dma.txt file, using a two-cell specifier for each channel. > > > > > > -The two cells in order are: > > > > > > +described in the dma.txt file, using a three-cell specifier for each channel. > > > > > > +The three cells in order are: > > > > > > 1. A phandle pointing to the DMA controller. > > > > > > 2. The channel id. > > > > > > +3. The hardware slave id which is used for clients to trigger DMA engine > > > > > > +automatically. > > > > > > > > > > I notice that this is an incompatible binding change. Is that necessary? > > > > > If the current code works, I'd suggest allowing both #dma-cells=<2> > > > > > and <3>, and then implementing both in the driver. > > > > > > > > Yes, this is necessary. > > > > > > > > Yes, current code can work, but the problem is that the DMA clients > > > > must add one property (something like "sprd,slave-id") to specify the > > > > slave id. So considering this, we want to change the dma-cells to 2, > > > > including dma channel and dma slave id, which can avoid introducing > > > > some similar properties for DMA clients. > > > > > > > > Now there are no DMA clients in mainline for Spreadtrum platform, and > > > > we want to upstream our first DMA clients: SPI controller. So no other > > > > drivers need to change when we changing dma cells. Thanks. > > > > > > Do you have any other concerns about this patch set? If not, I think > > > Vinod can apply this patch set. Thanks. > > > > Sorry for the late reply. Yes, this makes sense since there are no > > existing users then. For the DT changes going through the dmaengine > > tree > > > > Acked-by: Arnd Bergmann > > Thanks for your reviewing. > > > > > One more question, to make sure we don't need to edit it again: > > Why do you need both a 'channel id' and a 'slave id' here? Is this > > a strict hardware requirement for your DMA engine? In many > > other designs, only a DMA request line number needs to > > be described, and I think this would correspond to what you > > call the 'hardware slave id' in your documentation. > > I try to explain why we need the slave id. > > For our DMA engine driver, we have software request mode and hardware > request mode. For software request mode, the DMA engine driver need > trigger DMA to start transfer manually. But for hardware request mode, > we just set one unique slave id corresponding to the slave hardware to > the DMA engine, then the slave hardware can trigger DMA automatically. > And the slave id is not always same with the channel id according to > the SoC design, so we add one cell to specify the slave id. I did understand the need for a slave-id, I was instead wondering about the channel-id number. On many SoCs, all channels are equal, and you just have to pick one of those with the right capabilities for a particular slave. Arnd