From patchwork Wed Apr 28 12:44:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Dautricourt X-Patchwork-Id: 12228693 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=unavailable 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 7F5F7C433B4 for ; Wed, 28 Apr 2021 12:44:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 31D81613DC for ; Wed, 28 Apr 2021 12:44:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237717AbhD1MpO (ORCPT ); Wed, 28 Apr 2021 08:45:14 -0400 Received: from mail-eopbgr120050.outbound.protection.outlook.com ([40.107.12.50]:60163 "EHLO FRA01-PR2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237798AbhD1MpN (ORCPT ); Wed, 28 Apr 2021 08:45:13 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R99sEB60VzMKV30aB0qjmz9hnpc+Ary5lWkgZ2ML12mQL7fJ+IJjZDpvQ4JauRSbAzB6jn6S8StBSpUrvXumfiH5P+frn7mMkMibyGN7Sa55OSJLKze+JpOLm95fOWE4zBbw/xqS5hHQFtaKOe5x9uOrxgP1LN3ja5fMrnaRRAkYaKZLlYQIYCdmUMlL6504J8KvdrWc66odGFmvKeabDS+869jwsPlhG6lRx61LrZ2AYofTeCiNctLRCih0ZgBxd6I59C5o/cM/TGkbjH7AImpocbsznRu473zRkM8KAeJJilIMCZkDPe7OOIya6S0wtNb/MwzFjFZZ9OZfuakgIQ== 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=8/zHtfvyIfGu8oMGr1lPKRGJHWg7Q2ZVlu3paLfK+kc=; b=chQkN5aveRpcfiwLZ8lxHrrCS3cELjpRh83I3VkSTo6w7sGfmlvyaJF+RYTplaAGNK3pLyt0J37G1XeNw6gPVuXtGprffrO9Lmvygh4wTvhlb4HBEMvrbYKuRem0w8I9MwVgdO9h2TmXafTHkeBOT3NCukWeH3OkJx+p3HEV4JsnLiJPKganArpRSVDZjBEfvE/mEB72SNq2hm80NmpY+Icyh9olPaAL8A6VWU6elVUoZkE3dPjf2QX+FF0FWbOkgzuTTgL9BCTKkY61FXisfSM9g8+WqJJn3ptIo/7Ciey2YesM1YApJFDcpgQiU8dg4MzRutB+PGxPPVZ8Y+cEzQ== 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=8/zHtfvyIfGu8oMGr1lPKRGJHWg7Q2ZVlu3paLfK+kc=; b=VWzcy3PiymIdBVzjzvJyiFSepUuQFxR9YkVZ/heT8PSeSafMPfJSRH8XmY6M2nVzbOUDZuWwWsUYIkiGY2asrY27nkk74HMRFaFbX0e2vUxqQG5TQmRtbJQvRQiou3GpFF5crCq3JhSuNyzwOVossn2rPyenbPSAAFmEppQG26E= 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 PR1PR06MB4729.eurprd06.prod.outlook.com (2603:10a6:102:2::32) 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 12:44: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; Wed, 28 Apr 2021 12:44:26 +0000 Date: Wed, 28 Apr 2021 14:44:12 +0200 From: Olivier Dautricourt To: Rob Herring , Vinod Koul , Stefan Roese Cc: dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 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: PR3PR09CA0016.eurprd09.prod.outlook.com (2603:10a6:102:b7::21) 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 PR3PR09CA0016.eurprd09.prod.outlook.com (2603:10a6:102:b7::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.25 via Frontend Transport; Wed, 28 Apr 2021 12:44:25 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 62c7c51b-1d83-44dd-a73e-08d90a435b20 X-MS-TrafficTypeDiagnostic: PR1PR06MB4729: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wB/gVTeRt6XZUoFLRHdrUX4kFDzsFzR602OcweJzM3o8Yoz875vy1v8lJLQLSPy+Y4EVqfKSRhhWhpsYBlDMsoozqmG4ILhZW51np3/lTpcvffnrz8qPNBQ95H+8o7+oQzDXTAn29tM67MjcE4Dv3f+iv+SHGLSLyz/cthAR2l8VkdtS3VortQ2Lr+/ZQHZ3Usjnp1xpMNmnbxpz5g/WKreX/OoRX+2Jwmnx0gz/Nv5cYawYwzqWMdtSr+UZ7LbnGniZTQGJ3WpJFliYbkBt15ny+UvMcV5KaezfVqeBtcmSxf6/uwcvau+6MVEhvBVNNpxLg7n97rqfCB7lweQMpotGlXZOozYT2GJpNkO4pnqMXmRa11U4uXivK9MfKlGPjUqjiHm1qDFW9aOoho3Pm6nqueHjORH+l40PA6K3rUBWFqsaKDaS/ZQ/xhLave0ljREF8Ji6fzmWrpHDK5VQTwUsoT10DtZIC72hWJFVKdgXUCy3iNBAlwLPziwiJMYHioiDaz1MWGZjbLVKZXsokDM4eTqF22ix/c8B9jgK0/oO8OKTdSXNTVhh1TseeFgaGG1elWMfhHt6g5Jp1ZVSbXChZch4vjY6kny4zqdn4Mrsp3EPHmpyihZanaoad+3igIjTH5iotCGRGyzY322uJru24YfZcljP5qE/cJzdZe8= 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)(136003)(346002)(396003)(376002)(366004)(39850400004)(5660300002)(966005)(478600001)(86362001)(38100700002)(66556008)(8676002)(6666004)(8936002)(7696005)(4326008)(16526019)(83380400001)(186003)(36756003)(44832011)(66476007)(66946007)(110136005)(8886007)(2616005)(55016002)(316002)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?A4gmlusT0STUI/u0UyIQUectKhxUSe?= =?utf-8?q?PCf2xEMahRg4fD1+1BSC3at7u4o2D5B4lSh/PU1xdBQggxM5Geb2CADaDHJTC1l8z?= =?utf-8?q?gNmIkam7oPYeenh8HsM4x9FyGYmkZVYvdjyjkkstF5sQsGcqenEOqNJ5d7D+7YCzK?= =?utf-8?q?oeqMC61WluNSaTy3Q5AxYa8Gwv+oOfNsxfL0RftwdfRuKnDJamHjPP0LEcPFbSZHD?= =?utf-8?q?BOxQ46lSlQUV0leg/6iG/QjKoF0mFgRydKgJhr2A/y7G6PfwbfMBqLULK3oEMUem4?= =?utf-8?q?s/N29V3lUAN0HouWIc/bREKvOByMEbZhP+cKf8arXB6pE2ISEFzbm1M8UBqXX0/7q?= =?utf-8?q?A4kBAGC8Zhlud1oU0qQSxyrEj87rE9Vgek63rma8ocYy+DWI14MNeTK8s5iUJwpW/?= =?utf-8?q?fHIOvWQAKZpY1SD8mk5v+OQUPI7Z9dRrPzm2gMSn3fY8KwaKg28fclXUFKWlgnQoE?= =?utf-8?q?B5DNIp5VHhr0GXZbs08QvFDkJ83zceS9Y93mMcTu5Mcsc6eJL9eXx0QYFCH+3CyYg?= =?utf-8?q?iJZkhiFnnho4Hl1fWL8VUF99HSKv0fLo1zaGXaewgRmyon3df6/vJfx3jfrnYdBv3?= =?utf-8?q?QnWYOO4RX8L3FZNTIQOelJsSD9jeShJ4LIT5HHOr4vyQD7lhOBQhsOL3VEch5cIQv?= =?utf-8?q?5XDZAds960CABT6lghs+9bLgNtSemou/J+/8cU0zInHtqBkfCH0uozPoI7Cvj1b5H?= =?utf-8?q?rwW0XHkFIJu8Cyvl4PG0rm9eE3NVJU3Anj/oUVeP06vsUfL6M4Z7wfwMhp+5+p6wf?= =?utf-8?q?fhYQbbmduQmVjHxfNUgA1gYcLiIEghWr8/uabvqHZvR+2lqaIcrUxpzO+GNldH1eO?= =?utf-8?q?jJe7ANAU/D3pmZoO0G7jkVDEHy45Y+ONjM97zLvOEteO4qKCcxuIulzFYPB6Jir1t?= =?utf-8?q?mpsxIQPnaG1Cyg2n2FZ6F6A6divkM7auStgcl2Reu+piLYroWMKZ+xhQ644botn4p?= =?utf-8?q?G5tnoqmyF9JmXok9MqBbQh3V1b50BEbnSriCMwT369mrubN2vE7m60p3FVqumlvf0?= =?utf-8?q?FHVISsM7sUt2tdUrGTvUkpUdQ2B+MJB9yF0FZk8dXsTJk5S5DfsP91jfjtput4SDP?= =?utf-8?q?IdMNadet8l6yZ161TVSV8JgQPz1VlaVI0pqqyVFZ50Nx4Qorxfol6pPwM7zMkKKdu?= =?utf-8?q?5UreFRt1Z4YQczHJclQ6Ui2opsrZUAU/Tub+pKM6sxLWaPKh8wvb1XR8ysKGMF6oN?= =?utf-8?q?yOQiKfKWGhgkHbpxo/qq++42/RrCcCmDp6Lwx8S5i557w+m+S2l/ydfOm9SP6ex+t?= =?utf-8?q?Us2RUiNC+654Ii0h/NAg3dP0bERkgYhQnRTqydqvKhhO6hmQeNCcE/PPm89oDX8kh?= =?utf-8?q?39nJuyZCxCkGE?= X-OriginatorOrg: orolia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 62c7c51b-1d83-44dd-a73e-08d90a435b20 X-MS-Exchange-CrossTenant-AuthSource: PR1PR06MB4746.eurprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2021 12:44:25.8668 (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: wAR1KW30pxoZamxSI+bubhCWmwG5xq8OsIB9511klIPfovJ09GDJHW70friKlFW1ulY8DtXGqIJ3Uxc04AaRw9Ogyx6iYuof7T3/PCJn7o8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR1PR06MB4729 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 --- .../devicetree/bindings/dma/altr,msgdma.yaml | 62 +++++++++++++++++++ MAINTAINERS | 6 ++ 2 files changed, 68 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..8189b4fb5944 --- /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 dicards 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@0xff200b00 { + compatible = "altr,msgdma"; + reg = <0xff200b00 0x04>, <0xff200c00 0x04>, <0xff200d00 0x04>; + reg-names = "csr", "desc", "resp"; + interrupts = <0 67 IRQ_TYPE_LEVEL_HIGH>; + #dma-cells = <1>; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 04e7de8c95be..b2f7158d811e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -782,6 +782,12 @@ M: Ley Foon Tan S: Maintained F: drivers/mailbox/mailbox-altera.c +ALTERA MSGDMA IP CORE DRIVER +M: Olivier Dautricourt +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 12:45:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Dautricourt X-Patchwork-Id: 12228695 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 7A581C433ED for ; Wed, 28 Apr 2021 12:45:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 322D461428 for ; Wed, 28 Apr 2021 12:45:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239477AbhD1Mq2 (ORCPT ); Wed, 28 Apr 2021 08:46:28 -0400 Received: from mail-vi1eur05on2083.outbound.protection.outlook.com ([40.107.21.83]:35137 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237717AbhD1Mq1 (ORCPT ); Wed, 28 Apr 2021 08:46:27 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l7HJk3duwbIhN6yxSamhhPO6B2kncJ2acPISZ9L9IWaNjpUrmQIRvrfhsfnUbU6Efoa2VwnbjfGWmaYR9prOqSb07+4MZY2/SCYdDJoNoTu7O2aD04uZfK+H5Rm9v3nVjRA32JTRDySbAyJ5gEWqYPUc4OnxjO7b9UimQuIVnPJf1R9nlJa1hBdJCnPNolTw4R7Wm4Fg8Z7jTd/l3ldYOBvFb0eiaJKmgaaeRwUlaPM+HRHnU8oFd1pUb/EM8k5g/Gj3XiE9EPAiVG40iV02BilmOc5ZoASq6mRQATyeUzQEzFi4ybuL7qk06bHDB1qtg5xLPo/odnbFsGC1S97ggw== 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=EYsUBv9Lp6v5ykL+SXURJS4l3ZCarMRY6YJqiUo0xVEedemISgf+CgHuJr7aTCf6wsItdGoOPgYx4S2dtxMFN/pF8i0Shwr4OCsOSyV2YdJRBNGr/FBBvXaWt+OGSEFTblkq4+yPcjtZ3x2allpMS8VYdD0+ZmbhBFa80Pusk4mHEKkW5EI9w0txeigdujQ0+8IwwNbLS7voOeAK9Bu29UpbnqHpVfHvHmZoF9PetaT/M0CnWQ2xp9IUp0KdP+0APAXjKukdVgkFHByZ/A1uZZ6lPHHPYpLaBcVQmHODnz/SHD0u04Y8MDN32aDAtG+cB6RV+zJizhni3Ci8PSnVbQ== 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=IEGEYDlG3mf5HdeZhMz9fkggfgrS0nIbPD6lsAJH/LKlMJbv4D3uS6VI5w+uXtULY8234xrqFhvdYTTrmRjPUiUhSE1qEFyMSGImTGrQZyHJkCPwts7SeFE/GifFavqF5u2wk/YYjuSgLnUCripIdn0BDdPmYbAkxMYNiy/YTR0= 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 PAXPR06MB7805.eurprd06.prod.outlook.com (2603:10a6:102:12e::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21; Wed, 28 Apr 2021 12:45:39 +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 12:45:39 +0000 Date: Wed, 28 Apr 2021 14:45:26 +0200 From: Olivier Dautricourt To: Rob Herring , Vinod Koul , Stefan Roese Cc: dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 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: PR3P193CA0020.EURP193.PROD.OUTLOOK.COM (2603:10a6:102:50::25) 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 PR3P193CA0020.EURP193.PROD.OUTLOOK.COM (2603:10a6:102:50::25) 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 12:45:39 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: baf644ee-4529-4d10-e1b9-08d90a438712 X-MS-TrafficTypeDiagnostic: PAXPR06MB7805: 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: wFHNw9+vTrkfc3VSn1jugpmG2uiXcI3hMRZTT4rVFo+Z6VVJAFKkveb6TH+cwM6Bbf+YdZbiBNXCrNt94KxKnZTtf0TvtXlgW1MKw2J/BMNofORa8FDk5f1MSdfd6cdrw0OhN3msReaIOBXb/UsWa+Tz9bRSQHSpeqbfZEnvZfcQ8Jb3rJaKV/hqZKwO2PVPN0wmtUZOmQ0jTM4PE8E/xxfAQVSvQ5IuZ+8CMgQZJdsTnY1KYZeWzXPGnQ+jwgZavJkEm+9yBl5WGxo5DKojjVjDw4SNiSaAiYNLgoajrCtkJHVxVKWFGPSeEd+BTC24ME4QZ8LyIMfw9DipTBxkXmOgX6IrqiIMtztQq6WGVwN4wESzoUIyYylMaJ187JhRH2BslaXc9ZPcPhavawG5szpe9fuygqut2A3O/vrjRsehtwhLxXhppQ0e5+5lJ5iUriZRkFFIhibDW+pip255Zu5BrCCaKns1hyCQRujbrYtJzQUVqgVoPhvR4F1F5JDDIlNwIYK43RAJrxBpBL1lAu1jdINa1jO1lj8x6BfkKbVTLtU6srftH45LpBtJKg3zR1J+AzLeb2toPhsusKuDbpf4KYiD3WcWM4WgE3bG5fk= 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)(136003)(396003)(39850400004)(366004)(346002)(376002)(110136005)(4326008)(478600001)(186003)(8936002)(8676002)(7696005)(83380400001)(38100700002)(44832011)(36756003)(316002)(2906002)(16526019)(86362001)(8886007)(2616005)(5660300002)(66556008)(66946007)(66476007)(6666004)(55016002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?ZDwoM9bqrN8PMqTVMAGvDkBW3mATKI?= =?utf-8?q?ImBjI1YQqOgVfHkuCvAjdcQ1MA8D+GURqGP0qpJmMpqjnh3869WmJ/G49oIWKh/FP?= =?utf-8?q?bUZmbzOalPH4LS5t202cqPh9i/4dSmpUimQ/4zujoP/4AsZ2UoQKz3/7hQRl09kyN?= =?utf-8?q?S8Lmop2AaQcFFzVSwM915GAY7Zv11OKki0OWZKR8SPWRbXhFAg6v+Fc4Bs9FYTyoF?= =?utf-8?q?EdA4To/CKbY9oianWyfPgR/NmUs0k3o9QSMkIbRmSWi1Ui8Rss7GeZguKC9//wXpi?= =?utf-8?q?f/2s1uvRCrURRbchTMjpIywqRyF7gNM7fn8pvvU8G1j6H5b844Ci/eWNNjb8wQery?= =?utf-8?q?hRML0WP38iMrnleIgg3n8zPHuzHgmreQqNMuHoWi725c5iBCY4vO9Sjml0qeFhxSH?= =?utf-8?q?UhI/w7UT7smzWq52HT6StfpC9r6paTE+kkeK+M38Fb9c7XX0ownQRRhJbRmwLKaIK?= =?utf-8?q?yZyFdZlkwv77YHdcE+H4TAuIl71ZGh787i9IEdxVPIRL59bN5f7wTnceds8zzmN3z?= =?utf-8?q?jys4CLWHG7L6jwLphYNodGFe/yG3BtBKcYe4aORz8KTNGmdNn83CTJGG4wbGiCL7O?= =?utf-8?q?En2R9T6ULWMrnG61t3Jfavj1FbgF7RhpHRrBmKJvQy5vC2I8pfJQFKMp7gPpHlNmf?= =?utf-8?q?0E8SRo0sGxSdLPl8v/VyrpGkhpGjTi3lK/vgsJQglHDVv2TnnSOyPoXSqc7t5mcCp?= =?utf-8?q?L0Z6k4P74meoTyBysT+6Yx44K/Zt3cOcmfPgyiDpLyw1N2VRsqLh3H1VnWAMoCi0u?= =?utf-8?q?dNJSSbSGj3lWJ+jMZQkKk6RGluMFRPGarGQ7MdVMs7GNdXmtzv3BJNlFTmS1iGpwq?= =?utf-8?q?KuCy021w4heIa0stnYsMwx5zy9Y8y7jMa7DtS36rKIrtRzKEJZv6fUwHCLofsndJ3?= =?utf-8?q?NwcbljYVITOz/lbQyIAFxFJT7qKZ3YSIGRCFEYXSmqk1kysqrni2aWiw1PQsm/1hf?= =?utf-8?q?jGS/X0iJ7EkXckfyRLbKGHFt6bquUuoMrjYylg9zKEnPWTzM+CFo4eHQcv88hrz94?= =?utf-8?q?RhTIvCDy6ujxZZ7nJrE2S2jyVwNazmxIy4shAVJs9G+wQbkaRJpC/JR0Wc7cGZNzU?= =?utf-8?q?moe1cij+/VfELanwSmSgkQXSH9b+HFDdRwGXFLRLqdLrF3LKqiulF6fBRpV8v7Huw?= =?utf-8?q?9wK9v59efT0YdXwbXsz7QvnNZlMOqlZB4M/6Dap5jcrPisdmAJ3MrHE5cEdrEacwE?= =?utf-8?q?mHhwxltADuIcPi+GXis2EphRLjBWi2Wu90lKrSNf2tFZ1PqHOFCYNBtA3Y+gpl/N6?= =?utf-8?q?gdL6xPa1t4WcJc73ZV3l+E6oO9l1psp9Rda7FlTUobfp84bF4wZxHL/Lid2sboW5l?= =?utf-8?q?gdfftpBoUppsE?= X-OriginatorOrg: orolia.com X-MS-Exchange-CrossTenant-Network-Message-Id: baf644ee-4529-4d10-e1b9-08d90a438712 X-MS-Exchange-CrossTenant-AuthSource: PR1PR06MB4746.eurprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2021 12:45:39.5773 (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: BfPuM5MaDyZbofub8siVlHv0HJpby79U98HiiMD5WNHmKMV1VwujIUKyp5FdN1DK8/lI5TBX2IWUx7isATwT0SEkuxUfZ6p4zeuPagavwHA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR06MB7805 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,