Message ID | 20230323034944.78357-1-cai.huoqing@linux.dev |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2704602wrt; Wed, 22 Mar 2023 20:51:33 -0700 (PDT) X-Google-Smtp-Source: AK7set88MBVQj5cMk3/JFtDyUMtsVPy+7LpG1TXcshKlroKh9LhulivyFCM+TfFJTY2r5e3N50gD X-Received: by 2002:a17:906:a047:b0:92f:a6d3:b941 with SMTP id bg7-20020a170906a04700b0092fa6d3b941mr11117040ejb.30.1679543493476; Wed, 22 Mar 2023 20:51:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679543493; cv=none; d=google.com; s=arc-20160816; b=Qg7tPBFwrFZpxIy3/0TP5+nke1tp0AyuKX8zDUHL56zMGXGHQ9oUGPS7gdFSTG8rB/ oJ1l+DW/FnsdXnr/9DJ0LaVF/Ke3spw0WBS6mUC4cJ1SQsyFoc9CvYI76p2NsMWP9F2R kX4MyPLHxdqJNuL+8JrmI97lluvBH44q3NmGS9QtKEWTs58NvFVNaGCBciZcu7FaDyYU lNx57n7bFTQYi9uFk+CyLxqeZ4K0oRbL0mLWElx4vx+evIqpwLFCB1VasFHyGNpg8BTr 9oNGqKQZMOtVl+w8pZSSjjpeCg63+T57nJzkHKFDxR6UXnYcuL1num0Osue1+wM9UmDb sfuw== 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=7dsvccvkRHrBjwsXoKqpaTIV3NUG6wQWgO51YCAk8w0=; b=Gy4DMWtlOoqQbrPWWcDX3g5Kvr84XKaB4Qda6IyW+lmotmpl9ELhrFhbEcp/t9uVu7 GIFbqs2eqpOWxeunOwz2pirUHoaiSj6akc/7hvZy2Tc9LobQJIfF/Zs9uUeIjOTzBnha 1muo5XlMbRK4fpE5HzOI+dl8F3pMeBtZQ/MHxrRD6rpvhFyxdIos/xFWiSlh0shnYygc MI8wsNzSnVEZAnS3w9BkaaDYVuP9Ofxms/1CUOiL/hy0OUZewfylNJ/02OvNeTDIZfjj BCo1/KPxO5Zu6fwGQchbuXWqh1mGYXUknXJBdaNf8jNc0OEhm7p9bAee84SaxT5MxU+n cHaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=tNYtdks0; 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 sc16-20020a1709078a1000b009333e2401d0si17367949ejc.48.2023.03.22.20.51.10; Wed, 22 Mar 2023 20:51:33 -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=tNYtdks0; 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 S229903AbjCWDt5 (ORCPT <rfc822;ezelljr.billy@gmail.com> + 99 others); Wed, 22 Mar 2023 23:49:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230141AbjCWDty (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 22 Mar 2023 23:49:54 -0400 Received: from out-26.mta1.migadu.com (out-26.mta1.migadu.com [95.215.58.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86D7276B2 for <linux-kernel@vger.kernel.org>; Wed, 22 Mar 2023 20:49:52 -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=1679543390; 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=7dsvccvkRHrBjwsXoKqpaTIV3NUG6wQWgO51YCAk8w0=; b=tNYtdks0+Ea1rAa1e9C2nj6lJNjdGxxnYV3PHpDQK4pnGSHrFH0EFrhL76RFm3+kyhauVu XgXgvEf6bGR1jhVs1mtPlxqQ2cW7w8YVw36PEbIhlBMS9xrdv5dnatohiCeoC2Q13GkeZD uVfr+mAt0chwSWsaY0q9PvMCyH9W7tI= 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 v8 0/4] dmaengine: dw-edma: Add support for native HDMA Date: Thu, 23 Mar 2023 11:49:37 +0800 Message-Id: <20230323034944.78357-1-cai.huoqing@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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?1761128997968533076?= X-GMAIL-MSGID: =?utf-8?q?1761128997968533076?= |
Series |
dmaengine: dw-edma: Add support for native HDMA
|
|
Message
Cai Huoqing
March 23, 2023, 3:49 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 v7->v8: 1.Remove the [5/5] patch in v7. [3/4] 2.Get back the static methods: dw_hdma_v0_core_clear_done_int(), dw_hdma_v0_core_clear_abort_int() and dw_hdma_v0_core_status_int(). [4/4] 3.Drop some unused field in dw_hdma_debugfs_entry. v7 link: https://lore.kernel.org/lkml/20230315012840.6986-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 | 173 +++++++++++ drivers/dma/dw-edma/dw-hdma-v0-debugfs.h | 22 ++ drivers/dma/dw-edma/dw-hdma-v0-regs.h | 130 ++++++++ drivers/pci/controller/dwc/pcie-designware.c | 2 +- include/linux/dma/edma.h | 7 +- 13 files changed, 811 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 Thu, Mar 23, 2023 at 11:49:37AM +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 > > v7->v8: > 1.Remove the [5/5] patch in v7. > [3/4] > 2.Get back the static methods: dw_hdma_v0_core_clear_done_int(), > dw_hdma_v0_core_clear_abort_int() and dw_hdma_v0_core_status_int(). > [4/4] > 3.Drop some unused field in dw_hdma_debugfs_entry. The whole series looking good now except a few nitpicks which can be fixed should v9 is required (see patches #3 and #4). I've got the patchset tested on DW PCIe Root Port v4.60a with eDMA engine embedded. A dummy read/write DMA-streams from/to a remote PCIe VGA adapter memory was performed as expected. So feel free to add to the entire series: Tested-by: Serge Semin <fancer.lancer@gmail.com> -Serge(y) > > v7 link: > https://lore.kernel.org/lkml/20230315012840.6986-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 | 173 +++++++++++ > drivers/dma/dw-edma/dw-hdma-v0-debugfs.h | 22 ++ > drivers/dma/dw-edma/dw-hdma-v0-regs.h | 130 ++++++++ > drivers/pci/controller/dwc/pcie-designware.c | 2 +- > include/linux/dma/edma.h | 7 +- > 13 files changed, 811 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 >