Received: by 2002:ab2:6486:0:b0:1ef:eae8:a797 with SMTP id de6csp289971lqb; Sat, 16 Mar 2024 04:34:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU9eDEs82TxrRtziXmdXfrbUYaa5u3jfrdG8SV6zzaMcX0eCrceXoyHDabwIkSl5i/ZoNlf3katioPFGv2hIHs0BnVt5Zf8znNLjcZQoQ== X-Google-Smtp-Source: AGHT+IGMCF3woWaoxs3WYITpH3b/nocM3aCv5+fiiprjfCnBdDCfY/GVO8NJm6xHBPW5XCWNGS/h X-Received: by 2002:a05:6358:5207:b0:17e:76a1:8b7e with SMTP id b7-20020a056358520700b0017e76a18b7emr6589033rwa.4.1710588874008; Sat, 16 Mar 2024 04:34:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710588873; cv=pass; d=google.com; s=arc-20160816; b=HBgPfE2VQrrBUMj61CEjcAPgv5owJt3JEdckFP4TGF2R1Cb57rVQ3PawC8o1Xd1HCm omnm9KoDR3UqeMngUBLoZcxomzLYUESXNBqI40VJFdIXrYmRw4Bg1X7yl+rt0kmwDWrk Ux2Vr0+WpQBJt5txRP6iItoFGBkTX+AC4lEBaf1Mq0n9KRhzUHvD5GMCg6wCKA8YY8KE RdvRAnqEdDYPkIXB1/boYz3uwicYrASs2Vb5JCXMqdhk8rv6JqrZwp+XqUubTmKW3zF0 NndfNav5nLQWVpWlcETInmA8WrfLDEeYK0WHWrDAtusdz3jey+c1ZLRhyFmzbuLi7Cb2 AG3Q== 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=7Z37Fhnl9elK9XhP5wjE4o3gperl4Pr2AbvomUolrG0=; fh=HswpDLPM/4FtWurS/t4Xcm42jr8GjwccTPnN61sN7fQ=; b=hUnA32J7rW5CB7+AjGvAL5A1wuPSsw9Qy1n6f6fzXsw7ukDYlJA9+D9cL9qr1Z3OJA /fW5/r61T+gNn92RIWLPyVsphUISJ1EaLZxbOhy6cUm84E3dfQLjEivKsJREJ6IPzcSh v1gzTz51gB+w40gm7JzJpFR/f+BTfODSDEUTUZ4tGGNScVD400f+77rB/ISfEEVXuP1F n1jp4sA85jnXkl7gQivSPJ4I34aKKVBCwQqnCVTuu+8uLW2JdTFDiDSo9gFZo2g0981K ZX1mJwoEVaBPZBcLdZwdDii9umWPmBiHQ1ufNRB5ErtVMYFrlSLBkxZb8KACL+oIsOFY KJ/w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IuGhTzzP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-105167-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105167-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 190-20020a6301c7000000b005d6d6f8cbddsi4341641pgb.360.2024.03.16.04.34.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Mar 2024 04:34:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-105167-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IuGhTzzP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-105167-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105167-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 0500BB213C2 for ; Sat, 16 Mar 2024 11:34:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3CDC718AF4; Sat, 16 Mar 2024 11:34:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IuGhTzzP" 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 52FAD14A9D; Sat, 16 Mar 2024 11:34:12 +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=1710588852; cv=none; b=Ez5LttSoS4mJSH7u8Q/D1waLuAWUNwM8y3VSLA4LcSeZprDXiuTXqnGuVhFH2agns8VeGDgSfgfD/bgc8fC856KoiUOrWBjWqBn5VtP/RXVRWZVOBaYKfxNqnJVjZz6FMEv2r2dwbfoodXfQBYavBKch6GLm56R9lFXZphCppWs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710588852; c=relaxed/simple; bh=4L4tGD1DKV+mZjgPQTvkjdRdWNUjXgMgRTBy+sDZ4xg=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=SA5k6jgrME+lEtJiqnOoqPwA4ywTLqKbTOO9FkEDTJl3gaL+p//UW3Q8/RA4fhqPbwteRPdP3iFYUSqE3+YEijt6JDDFIw1BbU8W7nXzPdYz85lQRScPvUB0S4gU83gN61T72mSaBNZ4WG+nX8xnOuLpfVb+bG11p+DGeUvGdHU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IuGhTzzP; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id D2FDEC433C7; Sat, 16 Mar 2024 11:34:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710588851; bh=4L4tGD1DKV+mZjgPQTvkjdRdWNUjXgMgRTBy+sDZ4xg=; h=From:Subject:Date:To:Cc:Reply-To:From; b=IuGhTzzPUp/V7LrkG+np+N2ddC+ZfIanfodbb3o9EqLnyaP1jOVvLDTPtL8/36iRG cM6BW8prCN24tZmY/jEeoBLiB1GUHQB7OapG7emqSsTMk+SDnSWAX33jim3LbqV0Ns OwsQ7u1mL61Dt8ZSKJPB/nDlJm3yok5a+stvVEbn2Qn3BEtLf1SduKSNaL0eH9c9HV hm6SKE6T+YyqbltME8iKFo4z1IeAelAD0hBs8rlA+vdT0rXmo4O3RS3PFCjitAlBgT UPkfZhn1Swx2xBmmfmhnTO3F4Shg1cOB2GszBIynL+dT6TMg5TPDnjGYr7ZNbPQXId c61Ooyy+T+NVw== 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 BE655C54E5D; Sat, 16 Mar 2024 11:34:11 +0000 (UTC) From: Keguang Zhang via B4 Relay Subject: [PATCH v6 0/2] Add support for Loongson1 DMA Date: Sat, 16 Mar 2024 19:33:52 +0800 Message-Id: <20240316-loongson1-dma-v6-0-90de2c3cc928@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=H4sIAKCD9WUC/z2NQQ6CMBAAv0L27JJukQqc/IfxUGFbGmlrWjVGw t+tHjzOYWZWyJwcZxiqFRI/XXYxFFC7CsZZB8vopsIghWyIpMAlxmBzDIST10iq0Ybbg+guPRT nlti41693Ohc2KXq8z4n1vyJ62ZGkvm3qVu6V6JDwyvZRZvX7uzxar91Sj9HDtn0AHlUeF6EAA AA= To: Keguang Zhang , Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-mips@vger.kernel.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1710588849; l=2457; i=keguang.zhang@gmail.com; s=20231129; h=from:subject:message-id; bh=4L4tGD1DKV+mZjgPQTvkjdRdWNUjXgMgRTBy+sDZ4xg=; b=p93Izz5hHhY6H2wDb31zXn4GqlnZAT04fm48vFU46D5x+W2hAJuZ7arhkDP9w1U14HnAr8S+d jxo/7SN/W01D1vWzFQJVw/LAcnoytJr8L3ue7qsMRIWH0kgx1a2WZdx 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: Add the driver and dt-binding document for Loongson1 DMA. Changelog V5 -> 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 V4 -> 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 V3 -> 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. V2 -> V3: Rename ls1x_dma_filter_fn to ls1x_dma_filter. V1 -> 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 DMA dmaengine: Loongson1: Add Loongson1 dmaengine driver .../bindings/dma/loongson,ls1x-dma.yaml | 64 +++ drivers/dma/Kconfig | 9 + drivers/dma/Makefile | 1 + drivers/dma/loongson1-dma.c | 492 ++++++++++++++++++ 4 files changed, 566 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/loongson,ls1x-dma.yaml create mode 100644 drivers/dma/loongson1-dma.c -- 2.39.2 base-commit: 719136e5c24768ebdf80b9daa53facebbdd377c3 --- Keguang Zhang (2): dt-bindings: dma: Add Loongson-1 DMA dmaengine: Loongson1: Add Loongson1 dmaengine driver .../devicetree/bindings/dma/loongson,ls1x-dma.yaml | 66 ++ drivers/dma/Kconfig | 9 + drivers/dma/Makefile | 1 + drivers/dma/loongson1-dma.c | 665 +++++++++++++++++++++ 4 files changed, 741 insertions(+) --- base-commit: a1e7655b77e3391b58ac28256789ea45b1685abb change-id: 20231120-loongson1-dma-163afe5708b9 Best regards, -- Keguang Zhang