From patchwork Thu Apr 29 14:16:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Dautricourt X-Patchwork-Id: 12231397 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,URIBL_BLOCKED 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 E876AC433ED for ; Thu, 29 Apr 2021 14:16:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A8F4661445 for ; Thu, 29 Apr 2021 14:16:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237419AbhD2ORM (ORCPT ); Thu, 29 Apr 2021 10:17:12 -0400 Received: from mail-eopbgr90078.outbound.protection.outlook.com ([40.107.9.78]:43728 "EHLO FRA01-MR2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235277AbhD2ORL (ORCPT ); Thu, 29 Apr 2021 10:17:11 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jfYc5wL+ryoNOg4AdWsuEbqSwzK+WBYj7OfibKpN33sQSUuE2B26LEok9n/wVzSUUHQniNe8iQwQWImUCggfphJwEir+IVx1v0SCAQNgIyUwXL9BjySSuPoj5mT+idePJZiC9FEvviTnCRqwXoAvz0TTanKPhayC6fue+w0fgoOEP6HWpvhaZVy+AUTKiE43EEgSqHe47ma5v6VXt3+Qm4S93euIF310A3P6fCa6ZW6k+clk8/KFMOd+rvZSYC5qnRe3RiRIjiuI528RCJOq3aH+svGgoCcuP/9dr5kJoKirHgpyBLdv2aE/TIoJ1x8RJqBIFhWQLkfVh9z7UpiP2g== 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=fIlRAc/PKxBS06pt+h2Wf74lRAt87X5opB+DutgyMUU=; b=O2I1uBIMBqPAmerTo+0mZbcSC+MMTA4KuBp3c8Ep8yD27+p89C+Y5V6bjgSNJqSNBiQfjfImjhEp5PQevonANjCMMbWXGNbeWlUf31t5jPsOwTcMMDC8pJ+uh9H8NUL1Wi6/010pmu24rZ3c50SPdLWSVu0onSN1gbuFLB6t7W2SaPtxOEcefP4jxY0Sxjv1z2eRyKRLcWNLf49Qa+r/AiYsUu6w6vyVA+suV7QV7XJvt01xNVgxu/YVooWfj0nRf1td0Mh2/5aultjlPmRBZf0n+vZfUuHkEPjhm6rc7SL22yt84KXYuozf8c6HGjpzFftQ9sfs0nv6jcTuKjIfYg== 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=fIlRAc/PKxBS06pt+h2Wf74lRAt87X5opB+DutgyMUU=; b=KgdOCJzCNVIgoJ6m/cf/Oko4ctZLCwaqQNVYgh3BmEvAhXgfSo6b0b0RBwF9Z3s/QuFrCgm3r7GN/8szemr4i1yXlU+mibm3X1FZWEKw6m5QDnZMEDZQrgmmeVM+bl61yvJrcu65fRaV4IsR1zuJqY04JNrbBj+AOXCIqUdGmk8= 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 PR1PR06MB5578.eurprd06.prod.outlook.com (2603:10a6:102:b::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.20; Thu, 29 Apr 2021 14:16:22 +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; Thu, 29 Apr 2021 14:16:22 +0000 Date: Thu, 29 Apr 2021 16:16:08 +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 v4 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: PR3P191CA0017.EURP191.PROD.OUTLOOK.COM (2603:10a6:102:54::22) 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 PR3P191CA0017.EURP191.PROD.OUTLOOK.COM (2603:10a6:102:54::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.25 via Frontend Transport; Thu, 29 Apr 2021 14:16:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4a6fd62f-06b4-459a-31d7-08d90b195dc1 X-MS-TrafficTypeDiagnostic: PR1PR06MB5578: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6f7NQ9rKAUmcf3d1Pw+KLS6ROhjKusv1M6Mq1utb4L0ZxTY2svlMDV7HI6qaSVUMTrNRrhL9UC4VU9qsaaliWbjnNczzYQsvpD8YCB/fHfIw/sN9J3FL3qy/t0Hool8PRPv5d84MTX8JlTaUnIwJxs78DWRXMzb0f1H0dAaZDM2tsQksGADOrkpDUtmgwwwh3A4PaPvKSes9nWl3vI9f2LplzqhZCbdZCOE4OYKKsqNlGDV/EkmkWZ4OmuB5eQoKzpvMgspSeNSHPDlnKvueyCrx8V3XI97JcGziGkDxiTjA31h4bc8neyE8dqRWcFyYg3k59sparDstwyuqWTiufumzVasfGXQDUkRdhlzsJae+9UFXFtnJucnSCK935iMRt1O4pWcK1UhGdXqcIc/ej+fDB5u8gFDGsYaBacNFaB3oWezSokTEKMhGeUxeNA7aoSGLfK/oUV+dECSF4+tOX9s6JA9okdnzPPQDzf51+qgaY+jdE1FXqVSdabDFDqneBA3Ign/qEUYIE4/WFOnAsXH2XI+uyVaEVMMtnwr9VtTfEBN7yvh+3Ds4u/Di6wLJ+PH4VRdr+jp9HiRCtPdCFI5OAqo2QGrz4lhlTWEcidoKwVQ7y795VfhGGAlLKtsYpC4589c1RGxyI/mk/vSg7gqmTDDML/7jEwXUEsQ7co/6mxCo8L64yQe5YCFecDN3 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)(39840400004)(376002)(366004)(396003)(136003)(346002)(86362001)(966005)(55016002)(2616005)(7696005)(66946007)(8676002)(6666004)(5660300002)(66476007)(36756003)(8886007)(66556008)(110136005)(478600001)(8936002)(4326008)(16526019)(83380400001)(38100700002)(2906002)(44832011)(186003)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?iSu6Vm7y0OE/ZboICZIdGmd068WQNF?= =?utf-8?q?MtxWMjXJzMmwau7F52Pq1SWcYdwyEOmROOosUX/kUx9xmwNwKhFY7Pn/uODKrAwWp?= =?utf-8?q?qucA+Ftzo1hiL5cH4EAAVfWUcRnEnauo2/5y5tovIGLdX+JlEW9W8RCcqM2cwDGAA?= =?utf-8?q?M9lB4nXsWp2NC+Pzwqw0dXAl5IgvdN8cMlPNtgTP5guWZ9QLHivuw4nnrlcXQ0m/8?= =?utf-8?q?J7e2a9uPg71lqFUzf/vkROGFIYlJ6tbzs7XizU2qZMXnLRxor+fw1XfMxvCLfVxAW?= =?utf-8?q?GcwR9onmo8bqPGg2fym8NcJot9/8YrnpZXdXvmOhdLUQPIRcguO/gg1eC9rZ/8YDq?= =?utf-8?q?WSLsHpmCOA51jAfnpLYYd8Y3mA7yamNsII5LnPbDJQW+XoK7xALuR2FsrHoPv4d++?= =?utf-8?q?1ujMK4wZWvBiZHTBwi9cgUAct//nz/5cKUxyr5cx5UemvR+0L4zAC7LQCePID/tk8?= =?utf-8?q?jA1uVV8jjXiTt4TRKHRrVbD2Wzn1za4YS+Us5TA0LpgAkoEeC3A6b0lENHzyuBYVB?= =?utf-8?q?ScEqw8MPH46KqrjbiJ7fZqXYcqrCwFZqgUSVMvCXyWA5+swJmlyi5zzDAgr5zGUeY?= =?utf-8?q?hb/Oq0NYblt40Yb3VjOKrEcdQngKwjBIJdWALp/lYvYxawR//7Sg60gZlF84qNWqr?= =?utf-8?q?U88MTZNMKja78YihPAIiCspmf7/Kkf8dGQxUB4TPuVhZE/Mfc+58q2JM6hHBRq0PU?= =?utf-8?q?oGBoOApENqEcrtPNEOs/dZ5QYt5AqUX8NNN/yFgJrzouso477C08OOwvSz/TFU/VY?= =?utf-8?q?V4Ya2OCCDBUnD6T6lUTWHxYYPO6CBpNKlQLV6eZMOcePVEm5/nf3lELX3O9MRXkj3?= =?utf-8?q?QGEKcZPdrp+9UR8MaX9q8+ull22Sf4iPfMooB8/5WmNuwGxoXGjqIalWOxGs37sTQ?= =?utf-8?q?1mLGcc00uB4mtJuIWMuUkQX0UStHjjMZscX9wqhkojzqAbyt22n4WABLS+X1fBoBA?= =?utf-8?q?dtV+yWI4MkgIaAF8ECluTdcSBGNiTt4m/eWfG3q1rJ4BNYRXu01TXC0O0QwMTJAuc?= =?utf-8?q?fdyDte1aaaNfZvHi4NpQj+tc0TS7bG++EE0YvjTB1v3Yzb/ourOaFf8Uo/Yp6MjR/?= =?utf-8?q?lMUANUomdKgj1MzPVSp3Rqv254uPLq6IDiz3u8j7Nv+ZAzc3gESt0kyin429ZMAaH?= =?utf-8?q?cl6J/X/tw3Ri14BovxTvDRZw4EuD+f8MHy5M1qfHXxxYMoJlPvyJvYyLderASZMB5?= =?utf-8?q?u5kuUejotNHyP6xVxvPCMu8Eo2/J1NBN3BpSwLXwgG0srHOLtBIRGLrcCtq1NAIae?= =?utf-8?q?Xs5gWv02ck1WnCEyaQk5XrMGhwV7MRBPNkwS+UVgDra1dwPx1H+/M9r/9Uz2H1h1y?= =?utf-8?q?mh+YMBmBRTWyx?= X-OriginatorOrg: orolia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4a6fd62f-06b4-459a-31d7-08d90b195dc1 X-MS-Exchange-CrossTenant-AuthSource: PR1PR06MB4746.eurprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2021 14:16:22.5675 (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: PlbTosUbK4bge+3jfKG1YS4prLY+yume99OKj4i1lyqDl8QfR4/EcMyM9TkAGXp0HcSO2Q8HcXzk+FfK/zufv1uZEkIQQNy/sCgkLjT/a80= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR1PR06MB5578 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 Reviewed-by: Stefan Roese --- Notes: Changes in v2: - fix reg size in dt example - fix dt_binding check warning - add list in MAINTAINERS entry Changes from v2 to v3: none Changes from v3 to v4: none .../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 5c90148f0369..359ab4877024 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 Thu Apr 29 14:18:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Dautricourt X-Patchwork-Id: 12231399 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,URIBL_BLOCKED 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 AC98BC433ED for ; Thu, 29 Apr 2021 14:18:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 651EF613E8 for ; Thu, 29 Apr 2021 14:18:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238846AbhD2OTV (ORCPT ); Thu, 29 Apr 2021 10:19:21 -0400 Received: from mail-eopbgr10066.outbound.protection.outlook.com ([40.107.1.66]:21180 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237338AbhD2OTQ (ORCPT ); Thu, 29 Apr 2021 10:19:16 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iA1/sgZ1IMQbNJ0VZFJv1942Z776vDEzMvkxZbwSzL7PuQbljsT9O7aN8FvtOABwW1R1pT7feTNLJvkKqsKe6pOuxXg0TGkbA3r/t51gK4jtWEroLB8JTLmYIu+YAHYIFb/MCA+tkVTLh/T9ebxJWI5axXT49AvJfSsfAJqqoyoyEunJW2+mSKXSBqPeSwNhkjs4hf84NJaLlAjfqKJp4i9RcmtDVb8CthnnG/1aMMtmzpwyd3q7vh6G9udE4j5hvPFTjmE1Kk2SrVzlnqAKpXtuSF3ezX6zSdTnI2dO9TUn+JEZhU3Xo7magHsawNd7I4gSS+tVS9ec2mvi7YWJug== 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=RZ84y2DX4bP9kJgVH7ZJn/krYAvmm/3AvWphpkDgfbE=; b=nRZ8a3yCfqwbqJxiqG9lb7PofYuluKs9q/2TjR3zIAgidWBU0s8ovI15TY7wxYWigkDAdEVjMIfW5yekw3UkySe9gTo81JmzuKiDwghzcVo+MypVVunOUUdHeHVvijSSG+R6/h6zZ7Rl3umKjYKJmIB4N9iVgutqBy7LWtU4RFOM6xylCvkFsmLDbisO4LiVRu5G20HMO7+5Ka9fu4GrrRbLIXRIu5Cgesl9hCKC6bqaK+WObULdCXvNEV/wUOa/wJiIwvpCEsqLEXxkl+/1u4/3NfyjuBYWCWa7knfBuRnVCDLZVoaQC/Y6+wlUSDcbIhShd/6iksWhbo6KJW46YQ== 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=RZ84y2DX4bP9kJgVH7ZJn/krYAvmm/3AvWphpkDgfbE=; b=mVb1ZFhwzBbZU7UhQx8Je1/kHB+8yb3CzSjiXqTNIUJfJcdcmBCB19uSRCj7V7auV6J+ZtrpfzfdJM/bXqgAz9FM5WnDfoycT52VanrhBArZAY0kGPUO8Aavd2ZqluypLdK8nql1xz9eTbW5DhcXf5PBCJPLzBrsE8scwRrb/fw= 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 PAXPR06MB7645.eurprd06.prod.outlook.com (2603:10a6:102:12e::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21; Thu, 29 Apr 2021 14:18:26 +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; Thu, 29 Apr 2021 14:18:26 +0000 Date: Thu, 29 Apr 2021 16:18:13 +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 v4 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: PR3P193CA0022.EURP193.PROD.OUTLOOK.COM (2603:10a6:102:50::27) 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 PR3P193CA0022.EURP193.PROD.OUTLOOK.COM (2603:10a6:102:50::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.25 via Frontend Transport; Thu, 29 Apr 2021 14:18:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 156e2156-e255-425d-86d7-08d90b19a794 X-MS-TrafficTypeDiagnostic: PAXPR06MB7645: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4LyjvoCPHMKrzIrIwpMEbb6F/pR6w2WHVAt64SLeqVtTQIfOo4h2u4r2Xb+PtuCkhL1D46SvYSLfyOby4XhGYoTsx7iCAmzPGKfe8SXOJz5xddd5yFC4zavlKXOb7RaD0WevXHvuogCx7oy7v5+reVEvUeBUgKSh36mbB/55ckSFyEg2RFWlabw/wmSHxyFteNv5QSJiug+dlEBYn8dbrOQHOFnCeMBYplhmrqlIT9BBOMZ5BL0DD6bjGykckSGGW0f0fpTuGfTJJu6Ima+CUvKH26McMVI8khtkfoepBkJyJ5NSvNXjxtOxS8IQD7RxA0wttM+Pad4YXF9PGgtgTBzqPvpADb4nFcevC4s3n8kECB4LOvHQ4nL+D64n2E07QsZWdiaREmmD0NijMxHbwTI2BIErfxzh47hUOHzdHl8jMcT5vKnPXidqb7aM38iTGp+QzZSRsEhF4AAOCGkfP7n+uUnaHkey/lxOY1ih7DwGxxa6eBlhT8ud13l/hxA2oF5zqkQ1SOoo+6oEwYMci4SL/tm/XuY86LBwdgEfxdzyL4a2/mOs9ENSsXxaeQoTBIeAcjkTtHac585T7PMt0IqwRnAN752YUghYx98SfFE= 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)(346002)(39840400004)(376002)(396003)(136003)(366004)(2616005)(6666004)(8936002)(8676002)(16526019)(186003)(2906002)(55016002)(44832011)(316002)(478600001)(8886007)(5660300002)(4326008)(36756003)(66476007)(110136005)(86362001)(7696005)(83380400001)(66556008)(66946007)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?yoEg5AF9oZcjSIFcjpIjSBOFzQnTo2?= =?utf-8?q?6oGsk7t/t0km2j05LSQZ0dJy4NwRryPJXTWOnSAQkHS3Y1qqWZwWX+NsKTega8NRR?= =?utf-8?q?RXDHMZirtajkszeEBWV22l4ZmFQoSfRPg/U7SIZTXWX9Nw/vu41X//dAl0gYqnpm+?= =?utf-8?q?PRUh/oOpdWGi4tHaFw249lJ4etU1U5wzF325BosTKHIGYOGf6Vva4jA9qPL7SU2sF?= =?utf-8?q?ai9NAzRV6xJ9Abt1Crx2x05FTyq3ZT32K+kxfqjh+qCJVavcl4mxsSD2n4WcDHDTP?= =?utf-8?q?bb4rcaJt+4Q4HWytQqWe954j3a8tmGyin/Xob4cd7DDYbeE8NHDTDwDbQwG0VH8BC?= =?utf-8?q?d8YXgQUaKymvtDUz1V6/F8JOudOXw4oBdbD3+8Evz3rsL4LREsrGjMr/pBj+MaWi8?= =?utf-8?q?e3ISB9tS8AtGMA8NBajacUvTT1sVFdWrRqbpIx8uw5H9tWkIdPyXFvtpPKfwZgufJ?= =?utf-8?q?2QG2yS3xByJL1Hyjl/uLNRKuCCtf5brae/2bQKRGC+ngvOTgC8rx1CrRygfOs8Lgq?= =?utf-8?q?yIXp7nr+l/AHkqnZ8VmWadySeefpjuhBQ5NLYYnX8vlcF/If/Z41+tVf8+CRNXQRc?= =?utf-8?q?nMLtbx+63X14xaq3OwBKY+Cyz8ymAzueOfj0WrUTbixizphzoyulSEjOg4orBeFbR?= =?utf-8?q?yzR8agOCcWPytXz73iPImxL4oSrehsnLewY0lV/Bm9SBIoIRCfER8khsjmdTTXQKz?= =?utf-8?q?s1QXkU96HEjD79+J95zK1KqvsQxhYDJLRqhWetvvVkb6fiCpbiFMNy17h3P14lfvF?= =?utf-8?q?36XliHR39Z+YFzVcDZoh/vT3s6GW7Lk+xY5ts0UK2WX/cKLC39CLPfuMs/cvMLPfD?= =?utf-8?q?5xDreD3XR5//5g1Ev10Y05DxkoOwZAo4bqix5KqgWu9gnitASQVEE1SiE56WanInr?= =?utf-8?q?cg/mMTcUix11CNV0GLWm2oTjD8V/y/JaQ1ePIM9rD7XdXqtYtg7dw9IghYfaU4JF4?= =?utf-8?q?qvETfbHyRHXC5qRwKhWorAAuIXELrrEAKcKAZmMPSJZVC8aNaG05E6TrRmVCnL70Z?= =?utf-8?q?tri4b9rX4Q5U4LkJNfqkZsZQC+bwX1oKtRwKAIR170m8/4KLxV7DtSlMDM1uBidTr?= =?utf-8?q?v67vziRfcdjQbX6pAg22O+IvWD9wlxWGflfenINjrrYf5ws3beYtx7tVw+a/CZ5ZY?= =?utf-8?q?OC26dD39fmXOnEmcwA/yJNfAO5a6fGaaI4wO8+Iv+H3Mge34HOW93ZIdsrADhPe+h?= =?utf-8?q?eLmaRwM6j9Lphih5t686tocHqUPS9PJHKewpxyCO8aD6nNwW4E5lI/UxdQQTv26l7?= =?utf-8?q?32R9T6Kxt1LpParIONigcE3IqpSfAP/m++KeSdyPR1ffPNiydC0Doy00dTnHpBqWO?= =?utf-8?q?L2i4tqM7zDCUY?= X-OriginatorOrg: orolia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 156e2156-e255-425d-86d7-08d90b19a794 X-MS-Exchange-CrossTenant-AuthSource: PR1PR06MB4746.eurprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2021 14:18:26.4152 (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: uM+8xY+8VUUEqU3jm1URVAX/iuV1PNo9J+vtWnz96cudzTB7QjKEWixngHK2tyuUSsGg3APVwtdMh32pNXPKgbDDoT2VAmGTcCgpdzj7PE0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR06MB7645 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 Reviewed-by: Stefan Roese --- Notes: Changes in v2: none Changes from v2 to v3: Removed CONFIG_OF #ifdef's and use if (IS_ENABLED(CONFIG_OF)) only once. Changes from v3 to v4 Reintroduce #ifdef CONFIG_OF for msgdma_match as it produces a unused variable warning 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..7e58385facef 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,14 @@ static int request_and_map(struct platform_device *pdev, const char *name, return 0; } +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); +} + /** * msgdma_probe - Driver probe function * @pdev: Pointer to the platform_device structure @@ -888,6 +897,16 @@ static int msgdma_probe(struct platform_device *pdev) if (ret) goto fail; + if (IS_ENABLED(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; + } + } + 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,