Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2801358imm; Mon, 16 Jul 2018 14:35:09 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcR1I4iYOw6a9qrLEZ8tk+MX4q3AlqAQvs7m1JcK565ab2MBDCs7y5jrOqFyjp8TOlcP6D6 X-Received: by 2002:a17:902:2702:: with SMTP id c2-v6mr17926338plb.297.1531776909248; Mon, 16 Jul 2018 14:35:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531776909; cv=none; d=google.com; s=arc-20160816; b=oaAwr30cVxx4xe6C5YIZ0rInu4u0i5ou+4KAEc6puHNwdADyYlhRYayDkS53ZDUucL OrrJk8m9LRmYQoWyU9Z0JIpC/4Zg9VJ2tHblDl2zTSN2X0naNcL5PQrexqbh8cOzXm3t O/eMSsMsF9DhJVOXxiLKeMIq/+Y8d2EHXiGO7ApGm9km3k9QLXenlrQ7Shicdl7RBUUl a/Mp+AEdor/FxvT752DFld/JxqLFFY5WzuyPZa+hJqxiV5spfr3MB0Edvi5yqyB7JGoE Wg74fqYmbgr8T/kw04NrQjaYmuao8wQFkZ5UTF3E8rXeNx9rz8+RLLCUB8Xr74REBz/S Iuog== 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=tLMg6k/mwE9JutdGNUoTrKQN9z8d0yYh3gZ+rnkmhq0=; b=Np5znfKq3POjpn/31eOQ9jKhOpzUrIm0KbaYEg5QhJs8YwH7ibClLLp/8XpAMVzdIC J79JFYysnYtcbiCLPdR8Vgh53AdiEcJTuWoWpk075JpsmdSwunM5LV9BJZVX5LjG77sA huUzySj7SsxpTRQ+QprgQzT/4xJH56DqScN9o1rKfrIUwWUfgP+BRH0VO6tSOPpHm9Dx bp85bZVPd9879HH5RPINH8PTc/YSkUutZ0qL+MFhbFiP661zNuRLISeZ6UW6w5sd15/g bA30IGLUnY5+/54qcQppRsMMialDjk53Reqv6vXHGEv99LwnEqoAKXESHJJzZFQcVkH5 6Uag== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i130-v6si30626169pgd.691.2018.07.16.14.34.52; Mon, 16 Jul 2018 14:35:09 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730093AbeGPWC7 (ORCPT + 99 others); Mon, 16 Jul 2018 18:02:59 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:42639 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728290AbeGPWC7 (ORCPT ); Mon, 16 Jul 2018 18:02:59 -0400 Received: by mail-oi0-f68.google.com with SMTP id n84-v6so77623380oib.9; Mon, 16 Jul 2018 14:33:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=tLMg6k/mwE9JutdGNUoTrKQN9z8d0yYh3gZ+rnkmhq0=; b=T3ncPO3VlQcW44tR8hx0fXZfH5sGnTarpKf2D4m3IiG7Cb9TaoGIMGPklcW73w29Rr h9f9ZLyjtGDJol/y8a9hap+G38yDV0FrMIrzikL6JBxsyTKoKy4fHGj//Uz4wQOMO65+ ecVl1L2TiQR9Oa6TzVDbX0yLi48dd6Op278NPe/xkG5eTcxSe3FNsEw+meIzDpCGRYHB 2DOGr7gjKV8UYbrXbZv3nvaKU6Q2MG5cKLA424TW7Wte2UWyEFxmrN7NORqGPBklT4ph 94WucPLggTtXUf6uhe7w6E+fWM7YcIEoJIBf67AcH/n7yjLxWHyTDnZg2gVIC44wbGZT SV1Q== X-Gm-Message-State: AOUpUlFd/K7j9SKCXgTecV2DGkVANPjif6j1bvDNffxP7uiWL/RE1pmR spZJ/2fWOJaQBTZHw/v3eA== X-Received: by 2002:aca:4914:: with SMTP id w20-v6mr1055172oia.5.1531776822226; Mon, 16 Jul 2018 14:33:42 -0700 (PDT) Received: from localhost (24-223-123-72.static.usa-companies.net. [24.223.123.72]) by smtp.gmail.com with ESMTPSA id e2-v6sm12307986oiy.50.2018.07.16.14.33.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Jul 2018 14:33:41 -0700 (PDT) Date: Mon, 16 Jul 2018 15:33:39 -0600 From: Rob Herring To: Vinod Cc: Paul Cercueil , Mark Rutland , Ralf Baechle , Paul Burton , James Hogan , Zubair Lutfullah Kakakhel , Mathieu Malaterre , Daniel Silsby , dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org Subject: Re: [PATCH 05/14] dmaengine: dma-jz4780: Add support for the JZ4740 SoC Message-ID: <20180716213339.GA19161@rob-hp-laptop> References: <20180703123214.23090-1-paul@crapouillou.net> <20180703123214.23090-6-paul@crapouillou.net> <20180709171226.GK22377@vkoul-mobl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180709171226.GK22377@vkoul-mobl> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 09, 2018 at 10:42:26PM +0530, Vinod wrote: > On 03-07-18, 14:32, Paul Cercueil wrote: > > > enum jz_version { > > + ID_JZ4740, > > ID_JZ4770, > > ID_JZ4780, > > }; > > @@ -247,6 +248,7 @@ static void jz4780_dma_desc_free(struct virt_dma_desc *vdesc) > > } > > > > static const unsigned int jz4780_dma_ord_max[] = { > > + [ID_JZ4740] = 5, > > [ID_JZ4770] = 6, > > [ID_JZ4780] = 7, > > }; > > @@ -801,11 +803,13 @@ static struct dma_chan *jz4780_of_dma_xlate(struct of_phandle_args *dma_spec, > > } > > > > static const unsigned int jz4780_dma_nb_channels[] = { > > + [ID_JZ4740] = 6, > > [ID_JZ4770] = 6, > > [ID_JZ4780] = 32, > > }; > > I feel these should be done away with if we describe hardware in DT The compatible property can imply things like this. But how this is structured is a bit strange. Normally you have a per compatible struct with these as elements and the compatible matching selects the struct. > > > > > static const struct of_device_id jz4780_dma_dt_match[] = { > > + { .compatible = "ingenic,jz4740-dma", .data = (void *)ID_JZ4740 }, > > adding .compatible should be the only thing required, if at all for this > addition :) > > -- > ~Vinod