From patchwork Wed Apr 28 23:49:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Dautricourt X-Patchwork-Id: 12230247 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA4ACC433B4 for ; Wed, 28 Apr 2021 23:49:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9458661006 for ; Wed, 28 Apr 2021 23:49:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230075AbhD1Xun (ORCPT ); Wed, 28 Apr 2021 19:50:43 -0400 Received: from mail-eopbgr90058.outbound.protection.outlook.com ([40.107.9.58]:36512 "EHLO FRA01-MR2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229479AbhD1Xun (ORCPT ); Wed, 28 Apr 2021 19:50:43 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BpilTOQQowdIpE6EUhgo2tGPTGrzZ9LL/WfLIZGWP1remLzV7oBSyJPD3p9r4GGhMG1bwUV8li/0avZS3apaMbA7FWBpbMqA666UvHPA1ewBGAUvgD9J/CMWVvld8ef/wOQdfx8xCoCCRSDLqTcKmhSWNqaBMN9kq0EC1a3SUUS3MBN2mDybPLMjr4tCoMCLCUyeDNgv9ZEwUyQ6d+FkQF1mMnQK+9llMrjTnZLAW9J8xEPoBsU9Qtp9AdrrA4qDviXEv05H0wmbVVvbKkldv+2TCypPK69pSd0UBBLD7bnJk8zsAoqGu8ZUMQToYk60dpEtASJ6JJ5vo97vnsDcvg== 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=AZnklvnwpaI3nFp2krmCnLkKM71g7yBIbRETWJT929g=; b=f+1PJrWljsgDMZfv/UOriIA5+Vsi5JA/t+Mic2fl+Iw4fHcWOpXKAu9gyJ85wbK+0iPTWpjy4pG0Q9+DeD9wf5k8viQ/QyQkSFwFZGQ8ls6h3vXiZxCiPwIP4IJCBeyxyzIqXzgz15hOWRSP2fD09mmX5LvhBW/2MDFLEoueh7OfXgGWL+O/91dNWz8NZvgPsSSVazNyh9CwPtw7sFwQNIh7Utzf0yYwioQ6upgdiV0t9bGaGhNyaNMN6Pw9axtnleweiEY8QbeQmXxqIRloFZuv4khNcdS0gL4wCpYQwBhE9nGCTYOpS3oqejJ4DDBivVd2TF/11m9p9K1VBbuVrA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=orolia.com; dmarc=pass action=none header.from=orolia.com; dkim=pass header.d=orolia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orolia.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AZnklvnwpaI3nFp2krmCnLkKM71g7yBIbRETWJT929g=; b=cGkInqTsyJ0ZJGYdKvRaqn/P1DNwDMzIs2mOzUAqn2hgwGMz5ge3hyy9Gc/72T/GIK5qH0gEwCXOE/7ef/NrWLPd9KhiduSuiyPb/RLHxyMVRpZ9fuu/IIuf7Ui30GffFoo/J/JwqbtFvMzzEjy6CXw+o1sod9s8NEiyLyi0sGE= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=orolia.com; Received: from PR1PR06MB4746.eurprd06.prod.outlook.com (2603:10a6:102:11::28) by PR1PR06MB6073.eurprd06.prod.outlook.com (2603:10a6:102:2::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.25; Wed, 28 Apr 2021 23:49:54 +0000 Received: from PR1PR06MB4746.eurprd06.prod.outlook.com ([fe80::246f:58b2:79d6:6aba]) by PR1PR06MB4746.eurprd06.prod.outlook.com ([fe80::246f:58b2:79d6:6aba%5]) with mapi id 15.20.4065.027; Wed, 28 Apr 2021 23:49:54 +0000 Date: Thu, 29 Apr 2021 01:49:39 +0200 From: Olivier Dautricourt To: Rob Herring , Vinod Koul , Stefan Roese Cc: Olivier Dautricourt , dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] dt-bindings: dma: add schema for altr,msgdma Message-ID: Content-Disposition: inline X-Originating-IP: [2a01:e34:ec42:fd70:167:681b:bc47:e8b1] X-ClientProxiedBy: PR0P264CA0095.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:18::35) To PR1PR06MB4746.eurprd06.prod.outlook.com (2603:10a6:102:11::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from orolia.com (2a01:e34:ec42:fd70:167:681b:bc47:e8b1) by PR0P264CA0095.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:18::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.27 via Frontend Transport; Wed, 28 Apr 2021 23:49:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 669170b9-bba0-42a4-ff01-08d90aa05219 X-MS-TrafficTypeDiagnostic: PR1PR06MB6073: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5PdIMh4AZ8y1jMC7heHnq5ELlLnwVrHaNwhGB/9Oa1BzKEwfFga/Hs1X0G75L81lnEGO47MFQz8BkijLqFWNx8vuEjXXUg6rFSwMzLk+nz7qvAdOQv9eRZk/tzf0ukassIW1ocyGgkQffOPc0vmp48hPmyl7bROil5h+ItJc4CMTQyzl0Keej+rwLvRZvol2R8GhVlmI0iHwdZpPotO3O3zKALOgVSjtAOOxMw9ktoefJKCOLNRRLYKahbmh5xPVtgXwTlNPJkZx8ZFS1adKatZ22tspptiMFMjz20EjqDHUNQ13OXmy1yLgEw+O8OSbFNagsRgCxbOYPaIaHPQIlR1jhnHjuX6bK5h8YDvJkuMAw94ZInL3XWnVah9J5CEdpv7Jnvg30HuhWoj0n6MnhPCY3niSTT1jNYS4triisAT0M20aj6bcNOwHCnIhcRuPI+Pe9XPqKQIhjLVT1s2wU0qiBVVpYCvsJ7gTdPJIhkdLFPJABRgx2xo2tivFTodCXppbHnwZHhejm+NoGCJe7NDTi1tkbcpYj9Q8/cRsU2GF2XL0d+dzdjqIHsoeUD5bq7AkUDx+Ii9xITTooosgsN9W9guB4XfUF4EAmsSAezX8nAU6MzVZj3F37CUnTkkDCK6W2vSBSL15GREeaR38WdOdYCCI03f5MZN30SA4fvW3VfHkntZHJJ5jscWs/bDc X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PR1PR06MB4746.eurprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(346002)(136003)(396003)(39830400003)(376002)(55016002)(8936002)(2616005)(2906002)(83380400001)(66946007)(110136005)(8886007)(5660300002)(478600001)(966005)(36756003)(8676002)(6666004)(16526019)(186003)(316002)(38100700002)(44832011)(86362001)(66476007)(66556008)(4326008)(7696005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?gN7GB5Q/wUSaN3xSPOScwUrAp8P63P?= =?utf-8?q?762KmJeGdk0K5yzDxAeTT7et60YpAxo7RHmG/0aveQDFRXADgT3kUd/xRVg8AiXUw?= =?utf-8?q?L67Q021tHvCVkje3vew7QW+wyTqWptCM5heDbjJVMHrvUG2+k4Z16h5G7+PbP3sdP?= =?utf-8?q?xsyTIcnZiEceK38Co+LSAloLcnxRT8JmGvY8IfAZqhmy8Y74RrvpZeshvXHMY/Gf1?= =?utf-8?q?JE3QdTWflhQPkKvyqr9u2rdNV1WoUtT24EXRattAKk6mH//2VHM++oQ0Z5L5p7IG7?= =?utf-8?q?mBTQRrEPEBlfqn6FVV+bNHAIIXVGQ6FRykKZfbE9FKGUFUoufVEjPKuZM4d05DABI?= =?utf-8?q?Dx7jIRhdoBOWX1yjHpZa/J5zh3Zd1NHtcIzL4wCUFccywl2fOWNiYHcdw5FYrTUZa?= =?utf-8?q?Pq644q+IhurAlAmybgR2ZwWnKNgQvoZ/DIJ6mY5T29aNcW8XY/R7VKuFH26AlU1vD?= =?utf-8?q?hKphdJX0jGFD7yJh4tzkPyHAToh7GuTHa//dSG7HYu8eZ9I9Z4eYeaAG7zNBzybDg?= =?utf-8?q?brmV+XqezXA2+mzYywo91MUcVD7dJbPnut/nanl3MFR+HTRVKQ+0IlfmZst8S0Ooi?= =?utf-8?q?rfb1jjvfA4O6cMkZZtZocHDMqxuZkYgMgYJD4+kRj4CJ0Gl7m65Y4Qm8B0nSqEFX6?= =?utf-8?q?D2qYUENIWkPmOel310j17yX7TxAMMYpPDdgI0noiySm9tKMHU4+fKaAhyvOJzZ9Sc?= =?utf-8?q?Fu1JlHyusBnPyul0w8ShslHX8fx6WilHfCI1FZPK75DrC66Bkaa2rr+46bGLp1qDL?= =?utf-8?q?bwE90ICOUWvZdwBgxMwc8o6O8etHB9lByvxYKhkKA9OJXlfKGn5qkaeLhbIfv1y6f?= =?utf-8?q?z+acTD++VNIUAcR9aY2MguoRYj7Zo/Vu+nwtEbHr0k69wZKVcRtQU/aPdjL4jVfn2?= =?utf-8?q?LzjtlmHAjY1rmzEtv1cCgWrRMlvflUdufSfc6INv67XST9mrdYF/3fexrinTiQu63?= =?utf-8?q?JTH/vV86le7qMlzoR9rh0xXbBf2rMxlNXAVorhFHNvsgaLA1as6jwAjgJPMnjmlqT?= =?utf-8?q?KDWoxiJ5FI37t2DQMLPKLxoGJxfI4RaV/Q4AKDudF9qdwx+eEoRsE+ybBxSl4woHZ?= =?utf-8?q?QLIA2y1xZicNJvsq04AutWxTvU4OY/I5o019IaPfBsJaVzgxylHyBwdDXzmeJKXAz?= =?utf-8?q?Uy27IXfMKg5PrDO/wj/DjlGJHeV2ouCdm7YRCmsionRH6r8SEIA8iVhVTHqQa0wlO?= =?utf-8?q?rF4Sy4XfCUbZXcbLPktq3axm+j7M26Mc2IoMH62E97d4MwyK0k4VOYky0BYU4+ICj?= =?utf-8?q?cPsQr4QxKc+OuLfDGEmOdok08e2YO30gqGPBl16AeaAKOixUrYVf042DzJ1C5tODs?= =?utf-8?q?UNGXsHJluGDME?= X-OriginatorOrg: orolia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 669170b9-bba0-42a4-ff01-08d90aa05219 X-MS-Exchange-CrossTenant-AuthSource: PR1PR06MB4746.eurprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2021 23:49:53.9865 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a263030c-9c1b-421f-9471-1dec0b29c664 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fuGqfo8NYNuqJvptld5v7Req86Psooo0yJQjjsG0m85kMxZd4r2wuaq0Arp92Fj5APOqVj4p5+cocJloj95d1vrlGfyP+9xtJTM0HXYpm/0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR1PR06MB6073 Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org - add schema for Altera mSGDMA bindings in devicetree. - add myself as 'Odd fixes' maintainer for this driver Signed-off-by: Olivier Dautricourt --- Notes: Change in v2: - fix reg size in dt example - fix dt_binding check warning - add list in MAINTAINERS entry .../devicetree/bindings/dma/altr,msgdma.yaml | 62 +++++++++++++++++++ MAINTAINERS | 7 +++ 2 files changed, 69 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/altr,msgdma.yaml -- 2.31.0.rc2 diff --git a/Documentation/devicetree/bindings/dma/altr,msgdma.yaml b/Documentation/devicetree/bindings/dma/altr,msgdma.yaml new file mode 100644 index 000000000000..295e46c84bf9 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/altr,msgdma.yaml @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/altr,msgdma.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Altera mSGDMA IP core + +maintainers: + - Olivier Dautricourt + +description: | + Altera / Intel modular Scatter-Gather Direct Memory Access (mSGDMA) + intellectual property (IP) + +allOf: + - $ref: "dma-controller.yaml#" + +properties: + compatible: + const: altr,msgdma + + reg: + description: + csr, desc, resp resgisters + maxItems: 3 + minItems: 3 + + reg-names: + items: + - const: csr + - const: desc + - const: resp + + interrupts: + maxItems: 1 + + "#dma-cells": + description: | + The dma controller discards the argument but one must be specified + to keep compatibility with dma-controller schema. + const: 1 + +required: + - compatible + - reg + - reg-names + - interrupts + +unevaluatedProperties: false + +examples: + - | + #include + + msgdma_controller: dma-controller@ff200b00 { + compatible = "altr,msgdma"; + reg = <0xff200b00 0x100>, <0xff200c00 0x100>, <0xff200d00 0x100>; + reg-names = "csr", "desc", "resp"; + interrupts = <0 67 IRQ_TYPE_LEVEL_HIGH>; + #dma-cells = <1>; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 8f4a072f47ae..464af1b210b2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -782,6 +782,13 @@ M: Ley Foon Tan S: Maintained F: drivers/mailbox/mailbox-altera.c +ALTERA MSGDMA IP CORE DRIVER +M: Olivier Dautricourt +L: dmaengine@vger.kernel.org +S: Odd Fixes +F: Documentation/devicetree/bindings/dma/altr,msgdma.yaml +F: drivers/dma/altera-msgdma.c + ALTERA PIO DRIVER M: Joyce Ooi L: linux-gpio@vger.kernel.org From patchwork Wed Apr 28 23:50:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Dautricourt X-Patchwork-Id: 12230249 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17AB5C433B4 for ; Wed, 28 Apr 2021 23:51:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E554461006 for ; Wed, 28 Apr 2021 23:51:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230131AbhD1Xvw (ORCPT ); Wed, 28 Apr 2021 19:51:52 -0400 Received: from mail-eopbgr90053.outbound.protection.outlook.com ([40.107.9.53]:1894 "EHLO FRA01-MR2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229794AbhD1Xvv (ORCPT ); Wed, 28 Apr 2021 19:51:51 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WXegaM5pOCGJFnedhWUmrnmALvifx1XiYBDsjTN7T1qQvL3H8YNG06QC9oYHpcosH0FdNyvS6UUHqb759Yp2ZdSuGNU51PAfeMbISS9+mtupWxpx7UfJ5fjfI2IopeclSmVGXzjlkTMkeChr10yyo03q3nIfe0PFgl71+c0oD4GH3fnOt3YkN/b0/zxsraObxgX+n7ZFdQx6h6I5pTCASLkfR4zWv///bfyogFfnBj5KusFzynVjAmFSTzYprxNxLbWnoF7S3b++dj+HVBaVhpoxfUxDrdW45uVwVj3qfMIeNyPNPRxdQKE0BzPUvtig28IpL0OJ6drjO2mQIS0B/Q== 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=R0IX8xIzgAMlnkMvOHmgOQkBdPq0S/Mu39eg6JopCII=; b=CZROxxtY76+dwMGGrUi86P0zx+TPN5P1bUMeg8e0a74AmUUsdzWKPV1uEIRTYjF+nfHXCySCLVFemoLJIlPk9tdfaeiV1lrlPypIw13IpcIO675hQWvOvFQj3HsQ2lwiQMn2kDHKtwH5WO8H64T0nCyoBcvas6AXapN3OQBtQO1KuZarTLxMveM2kpw1ZE76IpdGmeBGb4RUDgdLc7S8RVdTlV7nZhg00Jrung2YuFg4osAPdlpQHgLqWGksTKzhPrGq/MS+onnK2Npogju0TgNVUS97/U2PSRoffnHi4NIyqX6tqxEWSHjcXPvo0S7ZBwowyqBpzT4kp325uflCcA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=orolia.com; dmarc=pass action=none header.from=orolia.com; dkim=pass header.d=orolia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orolia.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=R0IX8xIzgAMlnkMvOHmgOQkBdPq0S/Mu39eg6JopCII=; b=PnVoUh2512APHCNKYGlo/2w1HaWPQ+VmznIMK5cYUBVryRfrQwbq0BsVYpgxN4mnwSxBqVQn7YCNGZUKdmCIhyHIORCGao/V8n7X1RYafIb7148auYslxlvtrrjm/g+abDK/CtRgOqc3UcErBvUGL9nCzXxIxiHsupiG+yMxqBA= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=orolia.com; Received: from PR1PR06MB4746.eurprd06.prod.outlook.com (2603:10a6:102:11::28) by PR1PR06MB6073.eurprd06.prod.outlook.com (2603:10a6:102:2::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.25; Wed, 28 Apr 2021 23:51:04 +0000 Received: from PR1PR06MB4746.eurprd06.prod.outlook.com ([fe80::246f:58b2:79d6:6aba]) by PR1PR06MB4746.eurprd06.prod.outlook.com ([fe80::246f:58b2:79d6:6aba%5]) with mapi id 15.20.4065.027; Wed, 28 Apr 2021 23:51:03 +0000 Date: Thu, 29 Apr 2021 01:50:50 +0200 From: Olivier Dautricourt To: Rob Herring , Vinod Koul , Stefan Roese Cc: Olivier Dautricourt , dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] drivers: dma: altera-msgdma: add OF support Message-ID: Content-Disposition: inline X-Originating-IP: [2a01:e34:ec42:fd70:167:681b:bc47:e8b1] X-ClientProxiedBy: PR3P195CA0004.EURP195.PROD.OUTLOOK.COM (2603:10a6:102:b6::9) To PR1PR06MB4746.eurprd06.prod.outlook.com (2603:10a6:102:11::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from orolia.com (2a01:e34:ec42:fd70:167:681b:bc47:e8b1) by PR3P195CA0004.EURP195.PROD.OUTLOOK.COM (2603:10a6:102:b6::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.27 via Frontend Transport; Wed, 28 Apr 2021 23:51:03 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 878a2165-f32f-4e36-7475-08d90aa07bc4 X-MS-TrafficTypeDiagnostic: PR1PR06MB6073: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:669; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G/GwD9Zqi9U+iut4uRetBhowjh17MDinUZkrXpBzWF+JL/AX8+qkn8VjdUWIWcynWw+IgHxofDkuDkQ1xEFzwgKnHjbluzKvvbQTBx/9Rc/VCboftwXtq4SH8oj8IbRWKCjrr5orqXE56SOziWTp5yB2K2nhKusZ8MD/Z8cWgOA3f64CXPVrh8OIdlUVcwKLQdaGH5n6OOaVBprI5wFhZPAXQMpaV0CFHU65TM3wcTS4H4t8dnKt8La3D2cz0UJG+hjqxx9JPcDxd2La4EL6YxJu1/RqCP3yOGQdAVCd0SjVIeO+ivL28WP9vCeRQtWhHZi/OWP7enasK1bYmFerXJ4CKexSkIs6HsXdX49ZomDpCkOMKPlCRrOfayewrCOFGvQaGTkaSCfFGMaLQdqqkocr85gJNHfZaTy4T9x9ltepsh/TXMftX6SEee+6iVfeAGXfFu1T+/hQVdt5Ezn0it8Kws3D1I+dfMDzKXPipaC3jMZBlmvt29GnEfybN9Q3DDLzm/O9wguQ/iyAHUvtFkuytA4C7oLqBKWcLAQY35suLkSXPrwN4dyRw1I5S9XIdpFDChmWqfycydWyMjmN179bAI+7OxVrBnF/7fBsn0o= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PR1PR06MB4746.eurprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(346002)(136003)(396003)(39830400003)(376002)(55016002)(8936002)(2616005)(2906002)(83380400001)(66946007)(110136005)(8886007)(5660300002)(478600001)(36756003)(8676002)(6666004)(16526019)(186003)(316002)(38100700002)(44832011)(86362001)(66476007)(66556008)(4326008)(7696005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?SVmh7ShD3oBV90fgGLmHWCvDliozXH?= =?utf-8?q?AQitgDMQBHM8QTqt17zTv8Oz89qr5t+J66GyWpbCqcNsKyZ3uQN5sfpcjO5xOAPdH?= =?utf-8?q?7VuE9ANn8rgk5C+sZlBO9DoYtTaEsfU134UyU/ytwWbfBUGRnUBtBwGM6p2Ax6ipy?= =?utf-8?q?36+jeIXgDAVvboUDYIK9wgDSRHATMyYPTFGvvoEcrtRidya5rL93/v1LXOcN0dkYC?= =?utf-8?q?3QKTWCOER0+IqzwAwSBJpfGAP8jfV4nII+mMwCqraetGBdt2neC9VFVzZ9Jux6p51?= =?utf-8?q?+omu9YRdEkecTTmpHDCvtZoF7M95mX9j1Q+4+vpT0C9dZpA8GIfjUgG8Uret16L3t?= =?utf-8?q?b54ICYn9Qhd3fqejG3zuwUV8adOa0DEjT4Yq40A8Fsr2mR9Z4Q3bZrznkWvHy9b+3?= =?utf-8?q?t8GnREJ/jdB7xjUG/1gz7j0mZkN5jNV0zLMNOHrrKMKygx3YVwrH+HUrHqsTAJGhG?= =?utf-8?q?U3rRl33xDUDtAYr9Lk61cS+cqW2Qz02UAjh0Swnbk6h102+gK7P064yxthIZJ4THk?= =?utf-8?q?qXMrsf4HQkW3zNGiGpOTayDIsw2NVUfXrMbdjhetj7qR962W1xzgXIWcqk8pG5GE6?= =?utf-8?q?Mo70v4Rr4stxLoOhEXB9Xe/oB+Bi+lwvgw1mcu4vM6DYywJQlMLdu3HEPVhiC3VFe?= =?utf-8?q?udXBhj0FhlASgT2+kVCp4w3vTLhOlqWugAQNTUyKwhuT4uKD+TrFWgJtUWR0m81qP?= =?utf-8?q?RxCKCbTFDWQA534Mu6g7PR0yUV7gXOlETmmIMtxKLO+zb+l43+ZyX60wYt/0k9412?= =?utf-8?q?850BKbSPvvhI+bkZyKvN0ZBKhhhitI2if/L2clgJ4Fr4HzputPsq0BRgQFga0XRNy?= =?utf-8?q?xmBADck8i/JWoi/BFaS/FeK6SjSgPSp8nBYerJNW+c1RMMlJogZeNYTHUtydTex4g?= =?utf-8?q?mWxXTFOZtiRJbNjbSVjDxn/fmh6MsewhaYLhzh+akWAjKLboEhjYd0Up4so+TdtQP?= =?utf-8?q?GffPqnegJSIavBv3zEie1mP/yyMEZxG0YGxQGIU+L5rAjTppMppzMQG7nVfxGvcZj?= =?utf-8?q?fyLK3yCZRem+w8Zh0GnpxoHmVKycMnpKI1VcXVa4Adb1F20pm4pF9JqE0Bo8iZQgm?= =?utf-8?q?7+L/lHMPfbZT44GuruAWYU8z1fzoYDjkOf3xxqLz8Y1CASS/zvp0VpMWVo4jZp2CR?= =?utf-8?q?8W4vvSQT92EX0lYuSnGZFVaVVSRc3SGqWNA0uLvDmAa0Ecqz2O+mQkLZ17kWsqQY2?= =?utf-8?q?SsnRGGEJCxfdIcX2RPK2nyS23ng6Fa8I3opwUiR3b2i/rYpGFE+HLpDHRgO5Z86m0?= =?utf-8?q?c1wZfJqBosPOxwgiRF8btltWQdVtq3BOiJhffDnw1jxaqPrAAVv2kWqX7v3s1MLPh?= =?utf-8?q?qCnpMZYZEUZHJ?= X-OriginatorOrg: orolia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 878a2165-f32f-4e36-7475-08d90aa07bc4 X-MS-Exchange-CrossTenant-AuthSource: PR1PR06MB4746.eurprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2021 23:51:03.8122 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a263030c-9c1b-421f-9471-1dec0b29c664 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: lObCogh8FVkHuG96k49E3oZDIVneW6eCrlli5tzfV4w0QwEodT4/Y/+RmyhdDXyLFeHBISeQ+9mmim/IWbZw9efeaGep+9HGrogU6+Ft1Q0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR1PR06MB6073 Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org This driver had no device tree support. - add compatible field "altr,msgdma" - define msgdma_of_xlate, with no argument - register dma controller with of_dma_controller_register Signed-off-by: Olivier Dautricourt --- drivers/dma/altera-msgdma.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) -- 2.31.0.rc2 diff --git a/drivers/dma/altera-msgdma.c b/drivers/dma/altera-msgdma.c index 9a841ce5f0c5..2b062d5aa636 100644 --- a/drivers/dma/altera-msgdma.c +++ b/drivers/dma/altera-msgdma.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "dmaengine.h" @@ -784,6 +785,16 @@ static int request_and_map(struct platform_device *pdev, const char *name, return 0; } +#ifdef CONFIG_OF +static struct dma_chan *msgdma_of_xlate(struct of_phandle_args *dma_spec, + struct of_dma *ofdma) +{ + struct msgdma_device *d = ofdma->of_dma_data; + + return dma_get_any_slave_channel(&d->dmadev); +} +#endif + /** * msgdma_probe - Driver probe function * @pdev: Pointer to the platform_device structure @@ -888,6 +899,14 @@ static int msgdma_probe(struct platform_device *pdev) if (ret) goto fail; +#ifdef CONFIG_OF + ret = of_dma_controller_register(pdev->dev.of_node, msgdma_of_xlate, + mdev); + if (ret) { + dev_err(&pdev->dev, "failed to register dma controller"); + goto fail; + } +#endif dev_notice(&pdev->dev, "Altera mSGDMA driver probe success\n"); return 0; @@ -916,9 +935,19 @@ static int msgdma_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id msgdma_match[] = { + { .compatible = "altr,msgdma",}, + { } +}; + +MODULE_DEVICE_TABLE(of, msgdma_match); +#endif + static struct platform_driver msgdma_driver = { .driver = { .name = "altera-msgdma", + .of_match_table = of_match_ptr(msgdma_match), }, .probe = msgdma_probe, .remove = msgdma_remove,