Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp36416pxb; Wed, 30 Mar 2022 22:15:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhWf9A9W4zVOgFv9SGFC2QLnGnsWHq5ihnJu6z9tlRcUdXG+uTECf28Lg7F2/50jO6+08n X-Received: by 2002:a62:1d09:0:b0:4fd:8b00:d28 with SMTP id d9-20020a621d09000000b004fd8b000d28mr3518875pfd.81.1648703705972; Wed, 30 Mar 2022 22:15:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648703705; cv=none; d=google.com; s=arc-20160816; b=RDZ80cG9cYHhsJuaH6aCmtnVRMKVoEELJ0VJdEZOfA2JWvDC9udHH4Ho0TCOqu7ECH Wgv1YJsG3YpmuFVkazv2SgOm2nQd71ngAb6bFop8BmVV6iLIoY2n+xG2Mno9c+L3ubEO yCAi4nIZNgOfU9P/blOZ8l3SNWUCdPnasQoqSiIclBLbi/wNLs5AfdKc+iQISJHt9PrX QZyqJipIAcwRBRs6lkycTuX1ukHdeYSGrXXz7f/4xSSnvFHtpdLURwDL9n5o16jWzOVD N1VQ0rtwaDE3U5+LGBFP7y71zaIeaLzX1G7bzJpA2zxX0qhoZFoN3wcAOyQXCq+YVhZR 0NpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=su81uPGLPlEfo3kKBvUrtbr7Q1bO5QHvXSGg8dkL+fQ=; b=NHZES6u27BVMp1QMH+3Zvje5fZwqBLSDx0ZEjlQ0A01wOZxTkrpcCB29kgq14/oZqL sCnMjGpeorcMtQ4FpZMwruDLPA975Y1ZSSQQXN/EtAGe7AC4flfoqwE1oOyxKn/HZ5no qYL64rFuZR0npDhU03bIFR71Bs9R4/o8C+4DNAG0vb8uN1fj6P7auF3bPgtolditL9LR tqIQy9tK8uO8tf1AnGhFY8Z4J+ufB0bilfDCb3Mav+IXHNtMBwf+0JhuBNs9wxF8/UJU MGbhe47pMm7CwvV9bMDWG36WMQnnzreq5uwzapOf5lrn5V3OwzO6exYB2UKzLI8eanOM oU9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20210112.gappssmtp.com header.s=20210112 header.b=GYdBweRk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id cb13-20020a056a00430d00b004fae00be7c5si21667294pfb.40.2022.03.30.22.15.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 22:15:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@dabbelt-com.20210112.gappssmtp.com header.s=20210112 header.b=GYdBweRk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A13B4166E0D; Wed, 30 Mar 2022 21:19:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229687AbiCaEPs (ORCPT + 99 others); Thu, 31 Mar 2022 00:15:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229737AbiCaENs (ORCPT ); Thu, 31 Mar 2022 00:13:48 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 556362BC4 for ; Wed, 30 Mar 2022 20:51:31 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id h19so19769503pfv.1 for ; Wed, 30 Mar 2022 20:51:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20210112.gappssmtp.com; s=20210112; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=su81uPGLPlEfo3kKBvUrtbr7Q1bO5QHvXSGg8dkL+fQ=; b=GYdBweRk6GWXxrgZswn1g1wP5TqlOb2xYijX08he5T593LHNvihsBdxclepFnR7wPA EFDojWqpJICiiOKuQB//cisuhUNkO2u5FfDMfQ7xraDnZxIEaXhE6D+qkAGFe35j0/rl RO1qQO2LmKibxy7DGGirkpOSCxRw8dZ1qqwkj5cP30AjJuMIpCmQTXt3dxGQDeMiEtGh d5Q45bU3pivpOU71UsQ4SeFHJOX5d+mhVbGaKTWoO3ihezhVAZ1Mq0dvBZ4CY44+2+zJ Rnop+XYoeO70UTzueOxVxj/wtrVhWM9hBdPQqsaCO5lfOkdCgm02VVu0RnVDsDwNYnXW NNcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=su81uPGLPlEfo3kKBvUrtbr7Q1bO5QHvXSGg8dkL+fQ=; b=K4q3urMARJXHZnT9UW4hsXeY4UbNAbdw009UDd+71z6FHufYJptSl1AJAmo3V6BNRI Q0Y75822jNBPNmhvkixstihly4zwn7R7jfKh1X2yRBbMEvA/z09XyvsHuPfKt3c+nAPR nlBQSx3FofTkPL8EDlUpT9jUTY1c44jOVg2l9p7qUxTbUMdMuq5d+gboA8KZOO90Jc+J Gvr18ilhGXxiEkPk/TcuyqKgv7Ne2SQpAoDv1TvzmBfN7TBrElCqZe32MsZHsrV0ZdOG k7o7W4F1VM7ZIecGA5G49cTqoYdRycq+o9UJCvvPpvTcMH3ttX5cfeC2V9sgt0Fd5nti 8p9A== X-Gm-Message-State: AOAM53218vwZBuP4evAOPIHxVaXLoXR9GyVB+vkLma3XGksBFwDDuMAf ycYJrNfHU0L9dZIYS/Z0qafDrjsIfowBzQ== X-Received: by 2002:a65:6d87:0:b0:374:2525:dcb0 with SMTP id bc7-20020a656d87000000b003742525dcb0mr8997668pgb.248.1648696554441; Wed, 30 Mar 2022 20:15:54 -0700 (PDT) Received: from localhost ([12.3.194.138]) by smtp.gmail.com with ESMTPSA id w9-20020a056a0014c900b004fb2ca5f6d7sm17801820pfu.136.2022.03.30.20.15.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 20:15:53 -0700 (PDT) Date: Wed, 30 Mar 2022 20:15:53 -0700 (PDT) X-Google-Original-Date: Wed, 30 Mar 2022 20:15:50 PDT (-0700) Subject: Re: [PATCH v8 0/4] Determine the number of DMA channels by 'dma-channels' property In-Reply-To: CC: robh+dt@kernel.org, Paul Walmsley , aou@eecs.berkeley.edu, krzysztof.kozlowski@canonical.com, conor.dooley@microchip.com, geert@linux-m68k.org, bin.meng@windriver.com, green.wan@sifive.com, vkoul@kernel.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, zong.li@sifive.com From: Palmer Dabbelt To: zong.li@sifive.com Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 28 Mar 2022 02:52:21 PDT (-0700), zong.li@sifive.com wrote: > The PDMA driver currently assumes there are four channels by default, it > might cause the error if there is actually less than four channels. > Change that by getting number of channel dynamically from device tree. > For backwards-compatible, it uses the default value (i.e. 4) when there > is no 'dma-channels' information in dts. > > This patch set contains the dts and dt-bindings change. > > Changed in v8: > - Rebase on master > - Remove modification of microchip-mpfs.dtsi > - Rename DMA node name of fu540-c000.dtsi > > Changed in v7: > - Rebase on tag v5.17-rc7 > - Modify the subject of patch > > Changed in v6: > - Rebase on tag v5.17-rc6 > - Change sf_pdma.chans[] to a flexible array member. > > Changed in v5: > - Rebase on tag v5.17-rc3 > - Fix typo in dt-bindings and commit message > - Add PDMA versioning scheme for compatible > > Changed in v4: > - Remove cflags of debug use reported-by: kernel test robot > > Changed in v3: > - Fix allocating wrong size > - Return error if 'dma-channels' is larger than maximum > > Changed in v2: > - Rebase on tag v5.16 > - Use 4 as default value of dma-channels > > Zong Li (4): > dt-bindings: dma-engine: sifive,fu540: Add dma-channels property and > modify compatible > riscv: dts: Add dma-channels property and modify compatible > riscv: dts: rename the node name of dma > dmaengine: sf-pdma: Get number of channel by device tree > > .../bindings/dma/sifive,fu540-c000-pdma.yaml | 19 +++++++++++++-- > arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 5 ++-- > drivers/dma/sf-pdma/sf-pdma.c | 24 ++++++++++++------- > drivers/dma/sf-pdma/sf-pdma.h | 8 ++----- > 4 files changed, 38 insertions(+), 18 deletions(-) Thanks, these are on for-next.