From patchwork Tue Jul 14 17:41:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11662131 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2730613B4 for ; Tue, 14 Jul 2020 09:29:34 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F41032075F for ; Tue, 14 Jul 2020 09:29:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JMpOfvQl"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="I3QhAvRt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F41032075F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=o03Of/dZ0Btc/At+MMIsqKhaVZwA1gYy0DH3c8Tn7uA=; b=JMpOfvQlPxYDThCvtNy+BizU3a 8nyji8fCA30Y4gk3sKHJevGg5JbyH14WdpozMZz5r5dm0l/1xQsb22FwbEZxgTKMs/rvLdOyUPYSG W0kT35ogTwh/uS4wvYNvxDW0k9zOWut2d454CZ/UzxyQySigYxVPRVgtYoszXUfJ59S9Bldx5ue1p lLcAogtiAskKXopB8c3rbWWcnt6/nnCTRSgkQm59BMXIe06WPGEeNX6sYiR1VzlxKXBEBvrCfoN37 LAal1PsvbvRf2Am/0JAOsr+ssMBAA7cUzNwMHNUpxH0vJyaaCwl4dqQ0gCXamqXCvuFYi7L6kHcxP mnBNy6jQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvHDj-0000Dw-ON; Tue, 14 Jul 2020 09:27:27 +0000 Received: from mail-eopbgr50052.outbound.protection.outlook.com ([40.107.5.52] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvHDc-0000BF-Lz for linux-arm-kernel@lists.infradead.org; Tue, 14 Jul 2020 09:27:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T/Itw9lwDsPzMhfaHKlYPpw9L2zIam5NTKnMlB/sv6hXaS1zKvHqXKK/egHD3Z/dkFSI+wcropflay2WmRGOu9DMPEj9c50glufhs78Va6U7+RlurZ0z/C05KEnVEHuzlXCJx2pw1KnpWlvuVYMlQxlkBXY+zSsMcYSsm4DLBF4uP0G8UotQao8g8QVxYrf0qD8n1VLo+zkv/CgKQGnc6ulYB2MjMoEdbbBR8aeLqoUhM2vuEQFTLrwgLP/XIVutEQCKZmLJ0XfyjdCNzZc7eujMl+AJOwjAV59q+sQ+K48MGeSabDG81u5hEb16BpLkRb2YPn5mdGVCPa0w0QpJPQ== 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-SenderADCheck; bh=Pr8z1PgtHqsrP94smhtYxGqq7vebsC3+BUQnQAmy0A4=; b=fM1ALwZ1fF0hqrTuDtbFZBvWqWGwZwIqw7Rs4ccPlV8Nch1mmDfi3hhDiUNPDoVGetc80nBowlRCSkXEZ76z/2JR8lGgLt6W1IO69mMdmqEo/HxSUKX199//L/fIYQzcwvvcLepGUpTXnRKIYnPi/WuSLHN7EDb+Gs2weIHykqovzQnNuy7iDOvL4LIVrnmgwp4pfnNJCm4yQ7lTglwCpM8VkBTO+wnsIYEkTnMymcAdYh2bDW/s6ZylHegYB4dj1vZ6bMQUYyRw7O4eXWCU0WBVX3pICx2Fn/0JsBPKcGcO7jNECbFiuid4nhNb8+zC89FpIbOLD5xMnW6lFuATGA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Pr8z1PgtHqsrP94smhtYxGqq7vebsC3+BUQnQAmy0A4=; b=I3QhAvRt0eQxpdQKWyr37YlWuxI2WBvjJ5av2jrLkJuqQMGc39S2k3+8vXgTmHu3qxxd8p7P5cuXmKLyqnkJtoa/KvHq0aVsSbNobBIPQAWc1kbSl6zGd75MQyqunh9OSGi/4OqfNel4txeCo0HZ0SJQIGeJD/Thq5LuZG4HTbQ= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) by VI1PR04MB6270.eurprd04.prod.outlook.com (2603:10a6:803:fb::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21; Tue, 14 Jul 2020 09:27:16 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::5cc4:23a5:ca17:da7d]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::5cc4:23a5:ca17:da7d%6]) with mapi id 15.20.3174.025; Tue, 14 Jul 2020 09:27:16 +0000 From: Robin Gong To: vkoul@kernel.org, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, dan.j.williams@intel.com, angelo@sysam.it Subject: [PATCH v2 0/9] add fsl-edma3 support Date: Wed, 15 Jul 2020 01:41:39 +0800 Message-Id: <1594748508-22179-1-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 X-ClientProxiedBy: SG2PR01CA0092.apcprd01.prod.exchangelabs.com (2603:1096:3:15::18) To VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.67) by SG2PR01CA0092.apcprd01.prod.exchangelabs.com (2603:1096:3:15::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3195.17 via Frontend Transport; Tue, 14 Jul 2020 09:27:12 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 71e9b69b-04fa-4621-d6a1-08d827d81921 X-MS-TrafficTypeDiagnostic: VI1PR04MB6270: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qB4kIznkL1P5aEe7wVgtMJVNHhchDsmRMCEnhh692q+e58+rV29Aj8np333h/j1o5QTajylfooDwhqxJBPditkNM26LlmaPmrohbFh3IV4SNr4OEJtUfF3KS5DG/ZRZ8EnqRobDJ5Y1XpKMitNDRpDMEGmhp4FAgRUTdhk2K6MS4uY9l5ZCa5LXnZ5DjwPFQ6Rd730eW4ue2fZmYKmJYc06FwXYeUaaPBqYHPUnfM5SzmuWGn5LUJxE/8yfXevw2J9xwQto3SUZ4r/MDakAnURkxtpKexQlBzWRvTG5t7ZFFuWsR4JgL4fx1aGgvi+ufXmiZulI1xYXACLaG8WkR/g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6638.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(366004)(396003)(136003)(346002)(376002)(66946007)(6486002)(6512007)(66476007)(66556008)(8936002)(4326008)(86362001)(2906002)(6506007)(83380400001)(478600001)(36756003)(16526019)(956004)(2616005)(186003)(6666004)(26005)(5660300002)(8676002)(52116002)(7416002)(316002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: W6s+wRPOVRCSjDKWylN/KBnB/mIfOkYxf1xpRFsvQ6aIO0+NOkcJJS1/kDsXhU5MRl0YVIYTHjznZAeI3Lm0H7T9sQP4sCNBazsgc/Z9nODpvA10WJEL+x2gebMpi91Itov4WOZIXHgKDg9HcgKFsGJihGBlQ+ri3CM8lVFXjp5o3dq6MgQ/tExdGwl2yiIDezl8Uz4SO2Ajw/hYyNaBFOmybRZO3zYbiJz56iKUIZNTGjsO6aCtTJ+3oEPaSKwcTZj2S7IH/lMfMQwv8m16WzmtAmcqEP4VkRynZNMWYGYde0CiXNgqW/m2zdslzTg9cHAMk+E0MPn8HDz8ZMLLuvu2ATMHdwQkFeBbyYOBui7A0dn6seDPGouQiWLMDdV2Cd9Y9cHZ4WFDou3BPZeEfWAIycMoQg901Qx6ReuMxS0sL+P/85dn/EMuwNtsxwMIWo1wOZj3Cmy7VBDcDhCgNCF+MlVoR5UjdPNPvX3LrVs= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 71e9b69b-04fa-4621-d6a1-08d827d81921 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6638.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2020 09:27:16.3560 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dqzUEa4JNvHJ1sdQo2fayO7oUEcZNf8ztqG1HUrvTPevZt6a/MafKCqSxcucfbDRf2SWNgZ4EAXP8f6VCvQGIw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6270 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200714_052720_916510_D874C781 X-CRM114-Status: GOOD ( 12.22 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.5.52 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.5.52 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 DATE_IN_FUTURE_06_12 Date: is 6 to 12 hours after Received: date -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patchset enable fsl-edma3 which is used on i.mx8qxp/i.mx8qm. There are big changes on fsl-edma so that add indepent fsl-edma3 here: 1. split memory address for per channel, while all channels share the same memory address and the same control registers CR/INT..etc. 2. all TCD registers of channels are continuous on legacy edma but split on edma3. 3. per interrupt per channel on edma3. 4. totally different register layer and add some register such as SBR 5. power domain support, per domain per channel. The first 4 patches are used for preparing no any function changes involed. v2: 1. fix yaml binding doc build warning. Robin Gong (9): dmaengine: fsl-edma: move edma_request functions into drvdata dmaengine: fsl-edma-common: add condition check for fsl_edma_chan_mux dmaengine: fsl-edma-common: add fsl_chan into fsl_edma_fill_tcd dmaengine: fsl-edma-common: export fsl_edma_set_tcd_regs dmaengine: fsl-edma3: add fsl-edma3 driver dt-bindings: dma: add fsl-edma3 yaml firmware: imx: scu-pd: correct dma resource arm64: dts: imx8qxp: add edma2 arm64: defconfig: add CONFIG_FSL_EDMA3 .../devicetree/bindings/dma/nxp,fsl-edma3.yaml | 134 ++++++ arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 38 ++ arch/arm64/configs/defconfig | 1 + drivers/dma/Kconfig | 12 + drivers/dma/Makefile | 1 + drivers/dma/fsl-edma-common.c | 151 +++++-- drivers/dma/fsl-edma-common.h | 30 ++ drivers/dma/fsl-edma.c | 10 +- drivers/dma/fsl-edma3.c | 493 +++++++++++++++++++++ drivers/dma/mcf-edma.c | 2 + drivers/firmware/imx/scu-pd.c | 7 +- 11 files changed, 849 insertions(+), 30 deletions(-) create mode 100644 Documentation/devicetree/bindings/dma/nxp,fsl-edma3.yaml create mode 100644 drivers/dma/fsl-edma3.c