Message ID | 20230413033156.93751-1-cai.huoqing@linux.dev |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp762550vqo; Wed, 12 Apr 2023 20:45:12 -0700 (PDT) X-Google-Smtp-Source: AKy350ZAULDUvy3rHlRV5kcDyKr+FEblk5gU6PfqwB209uvC0Ui0uqTqim5zQaqwvjSxA5bDGIwP X-Received: by 2002:a17:906:4409:b0:94e:3d6f:9c0f with SMTP id x9-20020a170906440900b0094e3d6f9c0fmr1232925ejo.55.1681357512494; Wed, 12 Apr 2023 20:45:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681357512; cv=none; d=google.com; s=arc-20160816; b=nHfsRIK8ICQmIhcz6NeLXNP9Gj4Lr4cvw91K/TWqJSUlZv0VdR53fA+7iVJ8nVbJVH AQ5qW2JPSbzX3raGPOMmZ7uVK3C79RMYobei14KI4b3cKVSzUesYOYQjjKDMTSFiU+Kz Y6srZaJMDGR/Uo2/NLW9ugr3clNLIMCIiW0R8Dgyhyb+sLk0to28vbBhrNKtrTOfbPQe /pVphQFgIdiO0uIust9dyaQVrxvqrGeEDDDnrH9tU+JU0aULgbzXIaEigdRlt6D4w6Gm Lpfmh3/HOK+BOvXXeC+fKCG1NOIh+GNm1Dpfwf+a/fVRnoskr8a0t57xNP2+WF+ZAcK3 DXvg== 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:date:subject:cc:to:from:dkim-signature; bh=cnkaeNTG6HWrKe4B22XDrTgrH+xGhdfzP0gfBo97fsM=; b=DwPsiKYWqVplxwUG50llO56elIOi5SfZxL/FuuHh13d9+DOYQQzuIwpPZvfQyXvzU/ H2QCsJfkEyEI6AKTjs4k30fVT46LFrhM9VE/ai358t33mPHw4cQZdREf7rGuuKrQxgHt Y4QcsmhkPdA0JAraGhpxW4OgTnT9ZRmNxlNlvTWV3QKCJyZrXdzr869Fci4xjbTECsNG 6ZvJc73VuWRNQm2507jMCEo+dgxRarHDmGdCSOxiUouGjspEC3ZadamVxmB2PK9COE0J 043MMicrZfzlUIs4wgV0Wv6abnto28sVTRDRGYNJglzt8/6f3yaEnFef51URuZRvfGq6 p47Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Z3E3dz0o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wj5-20020a170907050500b00932f1744dcfsi766848ejb.54.2023.04.12.20.44.48; Wed, 12 Apr 2023 20:45:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Z3E3dz0o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229526AbjDMDcI (ORCPT <rfc822;peter110.wang@gmail.com> + 99 others); Wed, 12 Apr 2023 23:32:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229482AbjDMDcF (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 12 Apr 2023 23:32:05 -0400 Received: from out-60.mta0.migadu.com (out-60.mta0.migadu.com [IPv6:2001:41d0:1004:224b::3c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FF83139 for <linux-kernel@vger.kernel.org>; Wed, 12 Apr 2023 20:32:04 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1681356722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=cnkaeNTG6HWrKe4B22XDrTgrH+xGhdfzP0gfBo97fsM=; b=Z3E3dz0owl0nN4rKG9KRQNrCXjK0rI45FCqCz6vaohluJ2uBwZVzc9uTGHywZ3bVY4SS15 QBPgXOKqJLCnG0hUElSiYrUfoZGcZGtYRYNnnlzkNrbjtcUdUZDcU/mCvkFHXc3FT12pGs Y7uCtYqVlalKah2mzi2zvxhOUeQq5uQ= From: Cai Huoqing <cai.huoqing@linux.dev> To: fancer.lancer@gmail.com Cc: Cai Huoqing <cai.huoqing@linux.dev>, Gustavo Pimentel <gustavo.pimentel@synopsys.com>, Vinod Koul <vkoul@kernel.org>, Jingoo Han <jingoohan1@gmail.com>, Lorenzo Pieralisi <lpieralisi@kernel.org>, =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= <kw@linux.com>, Rob Herring <robh@kernel.org>, Bjorn Helgaas <bhelgaas@google.com>, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH RESEND v9 0/4] dmaengine: dw-edma: Add support for native HDMA Date: Thu, 13 Apr 2023 11:31:51 +0800 Message-Id: <20230413033156.93751-1-cai.huoqing@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763031134961042980?= X-GMAIL-MSGID: =?utf-8?q?1763031134961042980?= |
Series |
dmaengine: dw-edma: Add support for native HDMA
|
|
Message
Cai Huoqing
April 13, 2023, 3:31 a.m. UTC
Add support for HDMA NATIVE, as long the IP design has set
the compatible register map parameter-HDMA_NATIVE,
which allows compatibility for native HDMA register configuration.
The HDMA Hyper-DMA IP is an enhancement of the eDMA embedded-DMA IP.
And the native HDMA registers are different from eDMA,
so this patch add support for HDMA NATIVE mode.
HDMA write and read channels operate independently to maximize
the performance of the HDMA read and write data transfer over
the link When you configure the HDMA with multiple read channels,
then it uses a round robin (RR) arbitration scheme to select
the next read channel to be serviced.The same applies when
youhave multiple write channels.
The native HDMA driver also supports a maximum of 16 independent
channels (8 write + 8 read), which can run simultaneously.
Both SAR (Source Address Register) and DAR (Destination Address Register)
are aligned to byte.
Cai Huoqing (1):
dmaengine: dw-edma: Add support for native HDMA
Cai huoqing (3):
dmaengine: dw-edma: Rename dw_edma_core_ops structure to
dw_edma_plat_ops
dmaengine: dw-edma: Create a new dw_edma_core_ops structure to
abstract controller operation
dmaengine: dw-edma: Add HDMA DebugFS support
Tested-by: Serge Semin <fancer.lancer@gmail.com>
v8->v9:
[3/4]
1.Drop an empty line.
[4/4]
2.Update commit log.
3.Remove unused macro
v8 link:
https://lore.kernel.org/lkml/20230323034944.78357-1-cai.huoqing@linux.dev/
drivers/dma/dw-edma/Makefile | 8 +-
drivers/dma/dw-edma/dw-edma-core.c | 86 ++----
drivers/dma/dw-edma/dw-edma-core.h | 58 ++++
drivers/dma/dw-edma/dw-edma-pcie.c | 4 +-
drivers/dma/dw-edma/dw-edma-v0-core.c | 85 +++++-
drivers/dma/dw-edma/dw-edma-v0-core.h | 14 +-
drivers/dma/dw-edma/dw-hdma-v0-core.c | 296 +++++++++++++++++++
drivers/dma/dw-edma/dw-hdma-v0-core.h | 17 ++
drivers/dma/dw-edma/dw-hdma-v0-debugfs.c | 170 +++++++++++
drivers/dma/dw-edma/dw-hdma-v0-debugfs.h | 22 ++
drivers/dma/dw-edma/dw-hdma-v0-regs.h | 129 ++++++++
drivers/pci/controller/dwc/pcie-designware.c | 2 +-
include/linux/dma/edma.h | 7 +-
13 files changed, 807 insertions(+), 91 deletions(-)
create mode 100644 drivers/dma/dw-edma/dw-hdma-v0-core.c
create mode 100644 drivers/dma/dw-edma/dw-hdma-v0-core.h
create mode 100644 drivers/dma/dw-edma/dw-hdma-v0-debugfs.c
create mode 100644 drivers/dma/dw-edma/dw-hdma-v0-debugfs.h
create mode 100644 drivers/dma/dw-edma/dw-hdma-v0-regs.h
Comments
On 13 4月 23 11:31:51, Cai Huoqing wrote: > Add support for HDMA NATIVE, as long the IP design has set > the compatible register map parameter-HDMA_NATIVE, > which allows compatibility for native HDMA register configuration. > > The HDMA Hyper-DMA IP is an enhancement of the eDMA embedded-DMA IP. > And the native HDMA registers are different from eDMA, > so this patch add support for HDMA NATIVE mode. > > HDMA write and read channels operate independently to maximize > the performance of the HDMA read and write data transfer over > the link When you configure the HDMA with multiple read channels, > then it uses a round robin (RR) arbitration scheme to select > the next read channel to be serviced.The same applies when > youhave multiple write channels. > > The native HDMA driver also supports a maximum of 16 independent > channels (8 write + 8 read), which can run simultaneously. > Both SAR (Source Address Register) and DAR (Destination Address Register) > are aligned to byte. Hi Vinod, thanks for your reply, these resend patchs base on dmaengine-next. please try it. Thanks, Cai- > > Cai Huoqing (1): > dmaengine: dw-edma: Add support for native HDMA > > Cai huoqing (3): > dmaengine: dw-edma: Rename dw_edma_core_ops structure to > dw_edma_plat_ops > dmaengine: dw-edma: Create a new dw_edma_core_ops structure to > abstract controller operation > dmaengine: dw-edma: Add HDMA DebugFS support > > Tested-by: Serge Semin <fancer.lancer@gmail.com> > > v8->v9: > [3/4] > 1.Drop an empty line. > [4/4] > 2.Update commit log. > 3.Remove unused macro > > v8 link: > https://lore.kernel.org/lkml/20230323034944.78357-1-cai.huoqing@linux.dev/ > > drivers/dma/dw-edma/Makefile | 8 +- > drivers/dma/dw-edma/dw-edma-core.c | 86 ++---- > drivers/dma/dw-edma/dw-edma-core.h | 58 ++++ > drivers/dma/dw-edma/dw-edma-pcie.c | 4 +- > drivers/dma/dw-edma/dw-edma-v0-core.c | 85 +++++- > drivers/dma/dw-edma/dw-edma-v0-core.h | 14 +- > drivers/dma/dw-edma/dw-hdma-v0-core.c | 296 +++++++++++++++++++ > drivers/dma/dw-edma/dw-hdma-v0-core.h | 17 ++ > drivers/dma/dw-edma/dw-hdma-v0-debugfs.c | 170 +++++++++++ > drivers/dma/dw-edma/dw-hdma-v0-debugfs.h | 22 ++ > drivers/dma/dw-edma/dw-hdma-v0-regs.h | 129 ++++++++ > drivers/pci/controller/dwc/pcie-designware.c | 2 +- > include/linux/dma/edma.h | 7 +- > 13 files changed, 807 insertions(+), 91 deletions(-) > create mode 100644 drivers/dma/dw-edma/dw-hdma-v0-core.c > create mode 100644 drivers/dma/dw-edma/dw-hdma-v0-core.h > create mode 100644 drivers/dma/dw-edma/dw-hdma-v0-debugfs.c > create mode 100644 drivers/dma/dw-edma/dw-hdma-v0-debugfs.h > create mode 100644 drivers/dma/dw-edma/dw-hdma-v0-regs.h > > -- > 2.34.1 >
On Thu, Apr 13, 2023 at 11:31:51AM +0800, Cai Huoqing wrote: > Add support for HDMA NATIVE, as long the IP design has set > the compatible register map parameter-HDMA_NATIVE, > which allows compatibility for native HDMA register configuration. > > The HDMA Hyper-DMA IP is an enhancement of the eDMA embedded-DMA IP. > And the native HDMA registers are different from eDMA, > so this patch add support for HDMA NATIVE mode. > > HDMA write and read channels operate independently to maximize > the performance of the HDMA read and write data transfer over > the link When you configure the HDMA with multiple read channels, > then it uses a round robin (RR) arbitration scheme to select > the next read channel to be serviced.The same applies when > youhave multiple write channels. > > The native HDMA driver also supports a maximum of 16 independent > channels (8 write + 8 read), which can run simultaneously. > Both SAR (Source Address Register) and DAR (Destination Address Register) > are aligned to byte. > > Cai Huoqing (1): > dmaengine: dw-edma: Add support for native HDMA > > Cai huoqing (3): > dmaengine: dw-edma: Rename dw_edma_core_ops structure to > dw_edma_plat_ops > dmaengine: dw-edma: Create a new dw_edma_core_ops structure to > abstract controller operation > dmaengine: dw-edma: Add HDMA DebugFS support > > Tested-by: Serge Semin <fancer.lancer@gmail.com> Two small notes in the regard of the resubmitted series: 1. On resubmission it would be nice to move the Tested-by tag to all the patches of the series. Currently neither b4 tool nor patchwork see it which may cause the tag missing should @Vinod apply the patch by using these utilities and if he didn't notice it in the cover-letter. 2. Each resubmission even with no functional change implies patchset version advance. So this patchset was supposed to be v10 with the changelog describing that it was rebased onto the latest dmaengine-next branch state. Just to make sure that my tag won't be missing should this series be applied: Tested-by: Serge Semin <fancer.lancer@gmail.com> -Serge(y) > > v8->v9: > [3/4] > 1.Drop an empty line. > [4/4] > 2.Update commit log. > 3.Remove unused macro > > v8 link: > https://lore.kernel.org/lkml/20230323034944.78357-1-cai.huoqing@linux.dev/ > > drivers/dma/dw-edma/Makefile | 8 +- > drivers/dma/dw-edma/dw-edma-core.c | 86 ++---- > drivers/dma/dw-edma/dw-edma-core.h | 58 ++++ > drivers/dma/dw-edma/dw-edma-pcie.c | 4 +- > drivers/dma/dw-edma/dw-edma-v0-core.c | 85 +++++- > drivers/dma/dw-edma/dw-edma-v0-core.h | 14 +- > drivers/dma/dw-edma/dw-hdma-v0-core.c | 296 +++++++++++++++++++ > drivers/dma/dw-edma/dw-hdma-v0-core.h | 17 ++ > drivers/dma/dw-edma/dw-hdma-v0-debugfs.c | 170 +++++++++++ > drivers/dma/dw-edma/dw-hdma-v0-debugfs.h | 22 ++ > drivers/dma/dw-edma/dw-hdma-v0-regs.h | 129 ++++++++ > drivers/pci/controller/dwc/pcie-designware.c | 2 +- > include/linux/dma/edma.h | 7 +- > 13 files changed, 807 insertions(+), 91 deletions(-) > create mode 100644 drivers/dma/dw-edma/dw-hdma-v0-core.c > create mode 100644 drivers/dma/dw-edma/dw-hdma-v0-core.h > create mode 100644 drivers/dma/dw-edma/dw-hdma-v0-debugfs.c > create mode 100644 drivers/dma/dw-edma/dw-hdma-v0-debugfs.h > create mode 100644 drivers/dma/dw-edma/dw-hdma-v0-regs.h > > -- > 2.34.1 >
On 13 4月 23 11:31:51, Cai Huoqing wrote: > Add support for HDMA NATIVE, as long the IP design has set > the compatible register map parameter-HDMA_NATIVE, > which allows compatibility for native HDMA register configuration. > > The HDMA Hyper-DMA IP is an enhancement of the eDMA embedded-DMA IP. > And the native HDMA registers are different from eDMA, > so this patch add support for HDMA NATIVE mode. > > HDMA write and read channels operate independently to maximize > the performance of the HDMA read and write data transfer over > the link When you configure the HDMA with multiple read channels, > then it uses a round robin (RR) arbitration scheme to select > the next read channel to be serviced.The same applies when > youhave multiple write channels. > > The native HDMA driver also supports a maximum of 16 independent > channels (8 write + 8 read), which can run simultaneously. > Both SAR (Source Address Register) and DAR (Destination Address Register) > are aligned to byte. > > Cai Huoqing (1): > dmaengine: dw-edma: Add support for native HDMA > > Cai huoqing (3): > dmaengine: dw-edma: Rename dw_edma_core_ops structure to > dw_edma_plat_ops > dmaengine: dw-edma: Create a new dw_edma_core_ops structure to > abstract controller operation > dmaengine: dw-edma: Add HDMA DebugFS support > > Tested-by: Serge Semin <fancer.lancer@gmail.com> Hi Vinod Just ping this patch. I have rebased this patch series, pls try it. Thanks, -Cai > > v8->v9: > [3/4] > 1.Drop an empty line. > [4/4] > 2.Update commit log. > 3.Remove unused macro > > v8 link: > https://lore.kernel.org/lkml/20230323034944.78357-1-cai.huoqing@linux.dev/ > > drivers/dma/dw-edma/Makefile | 8 +- > drivers/dma/dw-edma/dw-edma-core.c | 86 ++---- > drivers/dma/dw-edma/dw-edma-core.h | 58 ++++ > drivers/dma/dw-edma/dw-edma-pcie.c | 4 +- > drivers/dma/dw-edma/dw-edma-v0-core.c | 85 +++++- > drivers/dma/dw-edma/dw-edma-v0-core.h | 14 +- > drivers/dma/dw-edma/dw-hdma-v0-core.c | 296 +++++++++++++++++++ > drivers/dma/dw-edma/dw-hdma-v0-core.h | 17 ++ > drivers/dma/dw-edma/dw-hdma-v0-debugfs.c | 170 +++++++++++ > drivers/dma/dw-edma/dw-hdma-v0-debugfs.h | 22 ++ > drivers/dma/dw-edma/dw-hdma-v0-regs.h | 129 ++++++++ > drivers/pci/controller/dwc/pcie-designware.c | 2 +- > include/linux/dma/edma.h | 7 +- > 13 files changed, 807 insertions(+), 91 deletions(-) > create mode 100644 drivers/dma/dw-edma/dw-hdma-v0-core.c > create mode 100644 drivers/dma/dw-edma/dw-hdma-v0-core.h > create mode 100644 drivers/dma/dw-edma/dw-hdma-v0-debugfs.c > create mode 100644 drivers/dma/dw-edma/dw-hdma-v0-debugfs.h > create mode 100644 drivers/dma/dw-edma/dw-hdma-v0-regs.h > > -- > 2.34.1 >