Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp361515rwd; Fri, 19 May 2023 22:19:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4TP6F4lm4dsBhQnCnrHT5rzczxVA2JbFvmYs2IEELnZrVJpg2mupBWHQyqebjcKsL26Y8i X-Received: by 2002:a05:6a00:1681:b0:64d:2365:fbab with SMTP id k1-20020a056a00168100b0064d2365fbabmr7968636pfc.4.1684559991078; Fri, 19 May 2023 22:19:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684559991; cv=none; d=google.com; s=arc-20160816; b=ZyVS59nDfrBFxRFFO43ahchrP+C3M3HD3CtsYvvUi+WbTEuYf/kwYPIcSJUpQgiDcB yAl0WImS4FY1NoGHiG9QDtYA36YYw+G2Vp8iuy2qivk8hw1OebQ9kETz+qkfU1dPnvG8 Uy4wJFR5toVSwON6xd4cxzLsW7bkPIEO1W/ao0m32MnhI3U3JWClDU2kRK4nhUkElOWb 5JHmubyylpE4N/ON9EMNK/e33YguZpuhB0rmuZx18DPm3UqARtfV5vn0tYdc0k3dwjPK Va/O1xTnJmab/uRG5FolIcz8Fj30j02Bv2v+w2iIjV2ADjJHihN68cFe6W62b236b6n5 VKbQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a9-20020aa79709000000b0064d2d8d7c33si894300pfg.45.2023.05.19.22.19.37; Fri, 19 May 2023 22:19:51 -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 S229627AbjETFJG (ORCPT + 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 ); 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 ; 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 To: vkoul@kernel.org Cc: Cai Huoqing , Serge Semin , Manivannan Sadhasivam , Gustavo Pimentel , Jingoo Han , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 -- 2.34.1