Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp86503lqs; Thu, 13 Jun 2024 04:52:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXIzFiEt3BGKeBx3gxJpSkyhItiOgUwLaIWzNGspJEoeEBSzR1jXDsZQEpdabttrZuTReoP1T0NZuFy4S01VGS4VpGUGTyA/5clD2U5Pw== X-Google-Smtp-Source: AGHT+IH+QG/Ev5XaK6NHLYRwOILcZ5X+I1otw9sMFAqhx966xKLV87BRM65hAS7wsqH7cNiUtTqN X-Received: by 2002:a0d:e006:0:b0:627:d23a:4505 with SMTP id 00721157ae682-62fb85747b3mr45588497b3.3.1718279574563; Thu, 13 Jun 2024 04:52:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718279574; cv=pass; d=google.com; s=arc-20160816; b=pb7fywV9ifaO+av+uZ3Nky2k5FXZRsyRGX83w5n9gCOE7+x+0qRH0Rn5ribkGNN5x0 SadQ+bLE0+n7j1B/yY3yR0z1dhPaNvMuKGMwwyCOn/Ut8S9KwE5kguJQSoqJasgJVLth 6DsjZhy/aLJSDZjvRSFCSa4E6oeX5sFeFJRzZL0kR8oQ8ZPkoqrNZWF9d4ZpjXzoVSKp CrqazTB9pVBXUrLu9RZEDwMOPWFrmn6VJMbZ7r4zEGqsNC06dZo2CcwKjIBe9fPpkkhy wzYdwQrS6wMRTeGqapEd/dTfcj7swaK6lysu6O7KksKonk2kQCZjSQKDSZMB1lH8fYP+ 8RTg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:from:dkim-signature; bh=Vx3kklQQQuBNPUhgd8T+wMLRCUsg9cv3TmECM6Q4JZk=; fh=r9Pi6HnEMrrOrHsn65IS40Tek8zXX1/8e8+8WBoc9oM=; b=eWUU45pZmDpHuZBf6HiymjA9+AiocZNijsMbMnNxDT1Lyx3jOkudkTwgnv9NCVQ0un dNEGUJslcZb6ZQUm4Xgq82yQzv1zdHD6POzhqcMbb58LncArnGFKCsR+j6CxJBWQSvlP Z0PLyuzMdar+q9k+9HjgaMi/77q4FJU/XMUcW6hTqO0ZVlN0K2S/CBgtBXBuTFWjfpGd pOGgl9zjIKKqepwDxpbV7/Gz+vvNRrN/Gk381lzunL9Uf+OUUrWLSSNqcZuA4KD4Dw5t +jFGYtjt3ai235t+OHhKflC63piy5DK5/LI9YlHq7/KqeBGU0ywn4245BZCygWty3F19 VOiQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lGpdVmCY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213129-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213129-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6b2a5b5ab5dsi3613956d6.440.2024.06.13.04.52.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 04:52:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213129-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lGpdVmCY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213129-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213129-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3AFE31C21B8C for ; Thu, 13 Jun 2024 11:52:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 948BA146A92; Thu, 13 Jun 2024 11:50:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lGpdVmCY" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9038D146019; Thu, 13 Jun 2024 11:50:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718279402; cv=none; b=MAc1zyYd+eMDgn+Twq1qtMsa+km+Kvi4KQu02PEMs9c9AU2AAGwwZ4iFAl/k3MzhOQc6fsZOakpAx/QYr1VFEK1bZa2+hus6OKe6HnVEzfKwqu6SywbHPvF9GnyicmmMeZVQeLUbMaYtt4SLRm5R93r2akRAxQfhgmd47W7VNsM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718279402; c=relaxed/simple; bh=HwivC1YSyiPpQ5PwufJY8pxz6NX1ZCCTtPty8vus00c=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=hIcqwDYWiybZOnovlp22H3WvimLLnWEnTESvfVmdSmUecepqLUUyMEQbE2RYDN8cQspTyPXDWsL7GcQRBh2HcsbTPmBm20gqZAUAfb4KCsoIP3leqq8yT0+4/LJi6bqbmOP8IWxzqCeTW5X/SuCrt6UdY3ufa1PYPibO8H3+JSc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lGpdVmCY; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 1D109C32786; Thu, 13 Jun 2024 11:50:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718279402; bh=HwivC1YSyiPpQ5PwufJY8pxz6NX1ZCCTtPty8vus00c=; h=From:Subject:Date:To:Cc:Reply-To:From; b=lGpdVmCYExX99Xc46Lj/TebVuYnjjvN6k+MkH16R9gJhbuHFvdG3DcCYFwnqtaP+5 uDa3xnEDHcb++oY7i1MhpY4J+Vwg4M45uy8ugUdQwWQU6ECJCj/5AG1hRH5PDqgKdA +Hb1jSEO++5PjvuFQKZtxN0kTijWWqiiQjRc/JLNUws63Cxt21dTq4HK3n0MFMEYPd yPSlhnu/rbingchOBGgiiOIxPm7bngCzC3QlywAWP6nw0V9ReN7dI2qX5c/d6hN8yG lNL0FcU7+K0xXgrL9juykFLJlQ++6/iC9mBmxvct8nauLhY8MavOrL49Gk5HMboD3g A/IyiYdr7yUUQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05653C27C4F; Thu, 13 Jun 2024 11:50:02 +0000 (UTC) From: Keguang Zhang via B4 Relay Subject: [PATCH v9 0/2] Add support for Loongson1 APB DMA Date: Thu, 13 Jun 2024 19:48:06 +0800 Message-Id: <20240613-loongson1-dma-v9-0-6181f2c7dece@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAHbcamYC/12Oy07DMBBFf6XyGkfjcf1ixX8gFm48SSyaGNklA qr8O3YXEGV5F+fcc2eFcqTCnk93lmmNJaalDvd0Yv3kl5F4DHUzBJRCIPBrSstY0iJ4mD0XWvq BlAF7cawyH5mG+PXwvb7VPeQ089uUyf9ZwKEVKJySncKzBssFf6fxs551P+3yZZx9vHZ9mptxi uWW8vcjcNXN2yxnkEIfWlbNgTsIhL3s+/qyE7WW1exodEfaVFqacFG2NgVSR9r+0xrMkbaVHpx zGFAZVLCnt237BX4MalxoAQAA To: Keguang Zhang , Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Krzysztof Kozlowski Cc: linux-mips@vger.kernel.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Conor Dooley , Jiaxun Yang X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1718279399; l=2719; i=keguang.zhang@gmail.com; s=20231129; h=from:subject:message-id; bh=HwivC1YSyiPpQ5PwufJY8pxz6NX1ZCCTtPty8vus00c=; b=d0BjInj6FisyYPLtdiANsNixRagpX8lGqMJQCHH+96dGLwb3mFSSR7vPIKXovo7K6hRhP1y8c kaSOXPA+GndDe9P/kUlhGU7G0QUx/YG0D7DiHhLFp9xNvZme6mGSMYr X-Developer-Key: i=keguang.zhang@gmail.com; a=ed25519; pk=FMKGj/JgKll/MgClpNZ3frIIogsh5e5r8CeW2mr+WLs= X-Endpoint-Received: by B4 Relay for keguang.zhang@gmail.com/20231129 with auth_id=102 X-Original-From: Keguang Zhang Reply-To: keguang.zhang@gmail.com Add the driver and dt-binding document for Loongson1 APB DMA. --- Changes in v9: - Fix all the errors and warnings when building with W=1 and C=1 - Link to v8: https://lore.kernel.org/r/20240607-loongson1-dma-v8-0-f9992d257250@gmail.com Changes in v8: - Change 'interrupts' property to an items list - Link to v7: https://lore.kernel.org/r/20240329-loongson1-dma-v7-0-37db58608de5@gmail.com Changes in v7: - Change the comptible to 'loongson,ls1*-apbdma' (suggested by Huacai Chen) - Update the title and description part accordingly - Rename the file to loongson,ls1b-apbdma.yaml - Add a compatible string for LS1A - Delete minItems of 'interrupts' - Change patterns of 'interrupt-names' to const - Rename the file to loongson1-apb-dma.c to keep the consistency - Update Kconfig and Makefile accordingly - Link to v6: https://lore.kernel.org/r/20240316-loongson1-dma-v6-0-90de2c3cc928@gmail.com Changes in v6: - Change the compatible to the fallback - Implement .device_prep_dma_cyclic for Loongson1 sound driver, - as well as .device_pause and .device_resume. - Set the limitation LS1X_DMA_MAX_DESC and put all descriptors - into one page to save memory - Move dma_pool_zalloc() into ls1x_dma_alloc_desc() - Drop dma_slave_config structure - Use .remove_new instead of .remove - Use KBUILD_MODNAME for the driver name - Improve the debug information - Some minor fixes Changes in v5: - Add the dt-binding document - Add DT support - Use DT information instead of platform data - Use chan_id of struct dma_chan instead of own id - Use of_dma_xlate_by_chan_id() instead of ls1x_dma_filter() - Update the author information to my official name Changes in v4: - Use dma_slave_map to find the proper channel. - Explicitly call devm_request_irq() and tasklet_kill(). - Fix namespace issue. - Some minor fixes and cleanups. Changes in v3: - Rename ls1x_dma_filter_fn to ls1x_dma_filter. Changes in v2: - Change the config from 'DMA_LOONGSON1' to 'LOONGSON1_DMA', - and rearrange it in alphabetical order in Kconfig and Makefile. - Fix comment style. --- Keguang Zhang (2): dt-bindings: dma: Add Loongson-1 APB DMA dmaengine: Loongson1: Add Loongson-1 APB DMA driver .../bindings/dma/loongson,ls1b-apbdma.yaml | 67 +++ drivers/dma/Kconfig | 9 + drivers/dma/Makefile | 1 + drivers/dma/loongson1-apb-dma.c | 665 +++++++++++++++++++++ 4 files changed, 742 insertions(+) --- base-commit: d35b2284e966c0bef3e2182a5c5ea02177dd32e4 change-id: 20231120-loongson1-dma-163afe5708b9 Best regards, -- Keguang Zhang