Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp555996rdb; Thu, 30 Nov 2023 11:39:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IGacqps+VOVgomwRJBjXRR0A5PR2jTY9PNq1pkax+uMjVaC9+Pqt7MyBnehqyMCG+fV9+Gc X-Received: by 2002:a05:6a00:1c85:b0:6cd:ed99:550b with SMTP id y5-20020a056a001c8500b006cded99550bmr2412552pfw.4.1701373149431; Thu, 30 Nov 2023 11:39:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701373149; cv=pass; d=google.com; s=arc-20160816; b=gVmuMSJk907qw+epNIpRyjtsHhqOdNEvGV5VmqAxoY9sw6ubD60wzvtsNSMOqAwID/ LcYRkj50aeQPMY6HpgVlLC60btCHLVdgeG+Eyoq4cZk8ZdKug4xk7bs97kKYijHeA5c9 sycsaL/EUuD9bC3MJkGcYqAfdIASjCl1iXA5WN+iBOp+qiacP5o1EUCMxxw9jQVgLKla 8Cz1B1GFq3Uw32WkJGGhIDJnJEvmlzMi2I1wK7sV1UENPn2qbbWgHnBrED7aLY0+L2TC pxALaxge8/ZDKGqzMjGopQoW2Umf5xIt6JI2Y5hnqXpxDUk+x2onbXlcDwGgd9HEZw59 b9ZA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=xDRZaMc9z3c/fNsnadu7iC1WOhR0GdmLUbCcdr5PmII=; fh=o92DHWzxf08ZDySemit1G8KY3BFL3+N5bgtlFUw4yTA=; b=RXCb2ejP3RljY8h7VEroAVkOK+YuSyfl4hV9qqNCpsIPjEhNpFqV83U9Rl1oKxFERo IqSi+hO4ejBmpIGP+NQR081QimYuERLVgpEjbnnG0oU9sV9N6jKI570bABeZuC6ur+je CpyOgiNbVAcnHPI+ZbbSkr3/5MBAoqNBdSp50gR7fay2UMTA32csGW8uOzwwn0BvSNVd bv9zJ0V2ocduuG1SVFRiNXrkKxjxYZ7vIMpf6TX5oT6FUC5q1JvnJyErkwh4eFJu3nSf u143t+9XXdgsSeFKPAmcQJAzmVArcpblXTqx0jq4C5QR28uPzmFyk56LGN8mYAsGBYiu pWwQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=T65RmwOH; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id fj17-20020a056a003a1100b006c0febe4496si1830963pfb.205.2023.11.30.11.39.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 11:39:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=T65RmwOH; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id E6995827D0D7; Thu, 30 Nov 2023 11:39:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376477AbjK3Tir (ORCPT + 99 others); Thu, 30 Nov 2023 14:38:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376441AbjK3Tiq (ORCPT ); Thu, 30 Nov 2023 14:38:46 -0500 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2084.outbound.protection.outlook.com [40.107.244.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02896D7F; Thu, 30 Nov 2023 11:38:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nbB2o9spCbjo97WfNJE0ypkRCl+X5B66/jK4JaIxoK612dcvAwtNqDtDohHvS6mAD3dE/a7UO6Eb2iDMJ/gePz8lRohxSti+A5cMk1Zy8LG5OQwlUnP1GId7ahSTTCq+vGro29GE7YlQbQjg2YhZxos9eVjsin25osac6xXIFqcbM7ihfSiUT0td45WLSq+NM82FVwymoZAWZq7j98p2/xF5BUj//i9i5dUeE+bOdfKpooXX3R50Od/9YBXFSgEHrnxYisx4hwdWKB0ds8cJ3/Hnk0sPVMU4jjKY8hiOENBfrwX7fb5X/4yoI0mvriACKOkwkofwfdxNPJFiLESxcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xDRZaMc9z3c/fNsnadu7iC1WOhR0GdmLUbCcdr5PmII=; b=KjYow+94tGrpDmoXkLRZMwH5v39oGWAtWG7mgN7GMwcb9YHrle+831dY7KeCXH8qj6tr2OKbzohNo02F/8Prod/sIZ5nPeCQD2iYMiLGLOsjl5T07IitivMOFFcwB8ipcg4viDNdiRZxMuPY4fF0rfiMeyxaemBYyMKvMIZK7s+mrm+CMnbAZsCnWaV6pdabbphTxtJ0PJhOaW0FvilvE3PealyNZ13eygzcI6pF2JCqL6pjeXV7sikKPkHz5ydPs/ucICdVby2d1ZfOjVTwlNpOO0g7/bUvUJryfaeDoa7UvXwidxyyc4KnpEbRAgHj1jf4I2C2CZYeCdcz3RR13Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xDRZaMc9z3c/fNsnadu7iC1WOhR0GdmLUbCcdr5PmII=; b=T65RmwOHGhzhH875XrpkxmnGM15G5Nj0qDqo2fvYLq850ktWxYWwZKwEG2M9p5wXrHhQIrt33u4NkCQ8e8dqPjSKMpG8dA3NaaWSGV+c67NKHHyddU7OL4HfGrqx+KApmlZShwghApnI4O6yIRsWMLd+c/0p1x6rcksv8m2nQ9M= Received: from CY5PR15CA0001.namprd15.prod.outlook.com (2603:10b6:930:14::8) by MN2PR12MB4271.namprd12.prod.outlook.com (2603:10b6:208:1d7::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.24; Thu, 30 Nov 2023 19:38:48 +0000 Received: from CY4PEPF0000FCC5.namprd03.prod.outlook.com (2603:10b6:930:14:cafe::4e) by CY5PR15CA0001.outlook.office365.com (2603:10b6:930:14::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.26 via Frontend Transport; Thu, 30 Nov 2023 19:38:47 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000FCC5.mail.protection.outlook.com (10.167.242.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7046.17 via Frontend Transport; Thu, 30 Nov 2023 19:38:47 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Thu, 30 Nov 2023 13:38:47 -0600 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Thu, 30 Nov 2023 13:38:46 -0600 Received: from xsjlizhih40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.34 via Frontend Transport; Thu, 30 Nov 2023 13:38:46 -0600 From: Lizhi Hou To: , , CC: Lizhi Hou , , , Subject: [PATCH V8 0/2] AMD QDMA driver Date: Thu, 30 Nov 2023 11:38:21 -0800 Message-ID: <1701373103-67868-1-git-send-email-lizhi.hou@amd.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000FCC5:EE_|MN2PR12MB4271:EE_ X-MS-Office365-Filtering-Correlation-Id: 99054f0e-66d1-4829-48c6-08dbf1dbf8cb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cZEcjF6h3247pVVJuOb2GCx/TPBp5GEe10Vzp5zbKx8pyJMYXQCKtOv22KA30qhEuujDoqRQFrLaO8FeO5PtZtn8sNE0GuwbbazDbAzbKW51Y6+6zRiKUniG2vbWAXmYnVZ/5pejQg4OwVtcxH0+qGYWBxl0BBjt92cFCQEVyLdMRx7GLe0HrIfh7pacW1kzIhIWs6uG7CY/NV0bQREqAMm6O1JldexJIejXzQKillDs98CsIRDzsyGALMNXDhWY8NOl3vYHNi0TegpV3OVTontwCnlWLm20aJgEz3kcS7GHXfF4RuvA/CuHTReIw3VEfdYjYUg52jkhtmtaybADDweCy4PaJKnjaFhWGlk41R0hEqhwHadMUW89SSMLbDs5Eo+Q5JGdzzkvj2MeoYHgsL8IHMabq9UGGaPpHF50V6A++zQDBASgat2S2gkGUyPth42WeFB4L8bx69R1YzKwl5iNKoeGOXYatpGSBMSWR8pcC0t77BP2mAAe9D1Cg+Lxm6P7lbfroAj8Npy1MPNFGuFbRdhJcSOcEC6U19gc6+j3CGZgi9YMX5FowwB+hiBCS+H+cwoCWT1lWLEuKxVWWTRsk2WbRMcd2XSo4eo+nUfWfoA5cCpGUgAHHSC+3+91b3bPxo9iTAwR/FP0MoDeWqGIhm75DGhN51UvGbpwNxrlp1gyPHhm5PLRnFvtGid5PrFwd5X4z5iHSi2PLWlv+E3V/n4CvoEoR5hAwVx2TNS6/51uzt0As2R8y3V2GptoVG/RVAEnNxoDxrIpCtttHRyPyRpTkFHEn/IWqLy5+PFlMNbU21s7vtLGY4ZinZIexufCaIYutca1FGy/kgR9Vw== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(39860400002)(346002)(136003)(376002)(396003)(230273577357003)(230922051799003)(230173577357003)(64100799003)(82310400011)(451199024)(1800799012)(186009)(46966006)(36840700001)(40470700004)(81166007)(47076005)(40480700001)(356005)(82740400003)(83380400001)(26005)(41300700001)(36756003)(336012)(36860700001)(426003)(2616005)(6666004)(40460700003)(966005)(5660300002)(2906002)(54906003)(44832011)(316002)(70586007)(110136005)(70206006)(478600001)(8676002)(86362001)(8936002)(4326008)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2023 19:38:47.6167 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 99054f0e-66d1-4829-48c6-08dbf1dbf8cb X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000FCC5.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4271 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 30 Nov 2023 11:39:02 -0800 (PST) Hello, The QDMA subsystem is used in conjunction with the PCI Express IP block to provide high performance data transfer between host memory and the card's DMA subsystem. +-------+ +-------+ +-----------+ PCIe | | | | | | Tx/Rx | | | | AXI | | <=======> | PCIE | <===> | QDMA | <====>| User Logic| | | | | | | +-------+ +-------+ +-----------+ Comparing to AMD/Xilinx XDMA subsystem, https://lore.kernel.org/lkml/Y+XeKt5yPr1nGGaq@matsya/ the QDMA subsystem is a queue based, configurable scatter-gather DMA implementation which provides thousands of queues, support for multiple physical/virtual functions with single-root I/O virtualization (SR-IOV), and advanced interrupt support. In this mode the IP provides AXI4-MM and AXI4-Stream user interfaces which may be configured on a per-queue basis. The QDMA has been used for Xilinx Alveo PCIe devices. https://www.xilinx.com/applications/data-center/v70.html This patch series is to provide the platform driver for AMD QDMA subsystem to support AXI4-MM DMA transfers. More functions, such as AXI4-Stream and SR-IOV, will be supported by future patches. The device driver for any FPGA based PCIe device which leverages QDMA can call the standard dmaengine APIs to discover and use the QDMA subsystem without duplicating the QDMA driver code in its own driver. Changes since v7: - Fixed smatch warnings Changes since v6: - Added a patch to create amd/ and empty Kconfig/Makefile for AMD drivers - Moved source code under amd/qdma/ - Minor changes for code review comments Changes since v5: - Add more in patch description. Changes since v4: - Convert to use platform driver callback .remove_new() Changes since v3: - Minor changes in Kconfig description. Changes since v2: - A minor change from code review comments. Changes since v1: - Minor changes from code review comments. - Fixed kernel robot warning. Lizhi Hou (1): dmaengine: amd: Add empty Kconfig and Makefile for AMD drivers Nishad Saraf (1): dmaengine: amd: qdma: Add AMD QDMA driver MAINTAINERS | 8 + drivers/dma/Kconfig | 2 + drivers/dma/Makefile | 1 + drivers/dma/amd/Kconfig | 14 + drivers/dma/amd/Makefile | 6 + drivers/dma/amd/qdma/Makefile | 8 + drivers/dma/amd/qdma/qdma-comm-regs.c | 64 ++ drivers/dma/amd/qdma/qdma.c | 1185 ++++++++++++++++++++++++ drivers/dma/amd/qdma/qdma.h | 265 ++++++ include/linux/platform_data/amd_qdma.h | 36 + 10 files changed, 1589 insertions(+) create mode 100644 drivers/dma/amd/Kconfig create mode 100644 drivers/dma/amd/Makefile create mode 100644 drivers/dma/amd/qdma/Makefile create mode 100644 drivers/dma/amd/qdma/qdma-comm-regs.c create mode 100644 drivers/dma/amd/qdma/qdma.c create mode 100644 drivers/dma/amd/qdma/qdma.h create mode 100644 include/linux/platform_data/amd_qdma.h -- 2.34.1