Message ID | 20230520050854.73160-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 b10csp154311vqo; Fri, 19 May 2023 22:22:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5tvC+IYYiccJLgXGSSBA3orzds/QkTRrJvDD6DPXnI/bqkz4xC4id1L4JQWixd9CJJZzoI X-Received: by 2002:a05:6a21:998f:b0:10a:be5c:6e3d with SMTP id ve15-20020a056a21998f00b0010abe5c6e3dmr855167pzb.13.1684560130341; Fri, 19 May 2023 22:22:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684560130; cv=none; d=google.com; s=arc-20160816; b=IiaDRoC7pVSGnCkUJW/pQWfnQfb3PH88tMmFPNrJ1CRDT0RV5mdHmcEDx4iZqWOK8c EdAU4uJOD719xBED9c5zrE9+GzlqYJQbH5K4xM0ZH0Wi63iuZIEXwF9ASDxi/+vzvCuF lt8aQloMCTKSvoRs2WW/aPojGDqXOxKTkKDaBGb0rIzPt/P563DqnqaSGfCiD7Q9/H3z XykqQ4Do1aqpHFZxk3mLy5ApxuBKRhYdC2+viPZPtUdwaGC3AiC1K54SFHbaJ1tfIu9Z o6AOc2vLzWm23HKua0AqSgh1SS72Wh0myHxSRT352FvacPdmXZtkE9XCu0tGJ6tVQNVk SFbw== 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=ThFXexQPFRCJNnuExBQV6oXvorIqggOn4AoGvAjt/7s=; b=SxcqUVaLUXkq1BPVgGyRuvpKPmMXlfobhwT5XPIrZ7u0LnbKCts4j9cseP+Y4LS/rY xawk0iRE0oMpjba5RIivnu6yyYw7ie1OZlGx28Ezbvl4R4NiMozhCkebu+pbgKsm3jJC 9esVJmNaaXf8NKGzLjfg631PauWT+I0PvJlMyfN0gCsFoFcUZgSzVjClTu5TDN4NIGVv cjfImU6BqikbDtbIRpJucyrFfRvytb414r7R73xwz3zEZzFmU97yPdPVVVUJ4T8VNw/s eMUcZn3WPe9m0tWl9wxcITuvumEO8i//5W35f2Z4kNIwOfPM3bEs0xmxR2AOGL1d69fX 1p4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=duD7MC4Z; 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 f20-20020a63f114000000b00513579041bfsi844622pgi.636.2023.05.19.22.21.55; Fri, 19 May 2023 22:22:10 -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=duD7MC4Z; 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 S230131AbjETFJG (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Sat, 20 May 2023 01:09:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229762AbjETFJE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 20 May 2023 01:09:04 -0400 Received: from out-52.mta0.migadu.com (out-52.mta0.migadu.com [91.218.175.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D1F3E40 for <linux-kernel@vger.kernel.org>; Fri, 19 May 2023 22:09:02 -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=1684559340; 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=ThFXexQPFRCJNnuExBQV6oXvorIqggOn4AoGvAjt/7s=; b=duD7MC4Zg8G1UODvoQmB0BeiAUk3aAyCL/Zcr0g9IklFq0JY2LyL7rVp2tk88HFXA22f2L EGIS25ZanxwiKfWIYVScBIWjEj3aB+up8WupWIExitpPvJul0BveLCI5Etj6nkqClSQAGx lA7lb05aLpDm+wEj5dS/6FSfSPqewv0= From: Cai Huoqing <cai.huoqing@linux.dev> To: vkoul@kernel.org Cc: Cai Huoqing <cai.huoqing@linux.dev>, Serge Semin <fancer.lancer@gmail.com>, Manivannan Sadhasivam <mani@kernel.org>, Gustavo Pimentel <gustavo.pimentel@synopsys.com>, Jingoo Han <jingoohan1@gmail.com>, Lorenzo Pieralisi <lpieralisi@kernel.org>, =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= <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 v11 0/4] dmaengine: dw-edma: Add support for native HDMA Date: Sat, 20 May 2023 13:08:48 +0800 Message-Id: <20230520050854.73160-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, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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?1766388747178002240?= X-GMAIL-MSGID: =?utf-8?q?1766389323349440115?= |
Series |
dmaengine: dw-edma: Add support for native HDMA
|
|
Message
Cai Huoqing
May 20, 2023, 5:08 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 (4):
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 support for native HDMA
dmaengine: dw-edma: Add HDMA DebugFS support
Tested-by: Serge Semin <fancer.lancer@gmail.com>
v10->v11: Using single name in commit log.
v10 link:
https://lore.kernel.org/lkml/20230517030115.21093-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 20-05-23, 13:08, 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. Applied, thanks