From patchwork Thu Apr 29 07:27:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Dautricourt X-Patchwork-Id: 12230593 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=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 2F09BC433ED for ; Thu, 29 Apr 2021 07:28:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E0D9A6143E for ; Thu, 29 Apr 2021 07:28:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239352AbhD2H2t (ORCPT ); Thu, 29 Apr 2021 03:28:49 -0400 Received: from mail-db8eur05on2050.outbound.protection.outlook.com ([40.107.20.50]:60609 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231528AbhD2H2t (ORCPT ); Thu, 29 Apr 2021 03:28:49 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kFKjeEbE8HpjpjamHPiXbNWax1NY5UTjjvmh97CTj4z/kp0RFC+3UA+U091bgq3tee0sme13i3tiKfvS+R6/Athh+dyGStgFZL2ABQi8/MJZBJBsgiu1Oo0JcqOUuXRq4gUcDz+FJ3v3NJcrEEi2OotdxM3VSJGs9X6OiphCnuhv/1CqJPnp+V5X7Ftx1gYy8vF9zzuTPnABILXg/xZvv8snpKwQWiYIyJXEwzRsjGGakcRJRXmZmDulbUmJQAuKXCuUJTVsrZPzEk0c3uavoE0SgkogoeRpXx+lDpsa/ZLZUTLHYpxnaxXMldr/n55rLzNVp3gQKjLbp8XdKp2A3Q== 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=f7M5BwGtc+TGxk1+g6Ru77Bm1u2VBpxv+oxxYW/INUw=; b=TIM6l3ChT7OupZrFdU/h73UNVHrkgK2cQgy6mlXQZQia0n/Mahc78awJq5kSog+QafJ+0XeuNEuHbXWbZHJov6DphwIrF0ng/H/S04tIj6vi788NWa1hpcnOcXub8fF1o4PATJdO2cyR7Xz+6zypb3Lb5cQRRqDXr3bew5eJagKifWiJgVyJEkCNeCAQj/RHujFI2x8lRIIxX1Rui+85X4/DvZThe93D8tcNWTOerSFmx/mhuu5M1AmnH+oCdV9gcJdNHwEoIk0hK+O1/gaCENGQ0USSc2eOoJrsD4kyMfWkzDTL9SvvsTNoFNKsvsGBIShrLD3C7aX5FBRWwFCOtw== 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=f7M5BwGtc+TGxk1+g6Ru77Bm1u2VBpxv+oxxYW/INUw=; b=HvedZG3Z7G8HLNiwXMgfNXxOCElIJntYYuYC3SKAIq3UBo6ItCm9cLA+JwwqO4L/50y1uigPU1uxq6v/S/8lx1/vMDq3T+5vL6Hiznt3DNuLuecOvGCd/ZFTcxwdJ0Px5vOMmaxwikAD/gyti1tVeWAeuBoA7AnoW006E7/314o= 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 PAXPR06MB7552.eurprd06.prod.outlook.com (2603:10a6:102:157::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.25; Thu, 29 Apr 2021 07:28:00 +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 07:28:00 +0000 Date: Thu, 29 Apr 2021 09:27:46 +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 v3 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: PR0P264CA0241.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100::13) 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 PR0P264CA0241.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100::13) 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 07:28:00 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: de7c6af0-8f84-4ccf-6c0b-08d90ae05162 X-MS-TrafficTypeDiagnostic: PAXPR06MB7552: 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: FVqHJJphg8ZwvqMrO/tzSGBGu0rskwdj4DYRYEfm9gWqvZ/vExbtuacf4M4/t+XhHS6eR7ffDWL/YGktQE58s67+0jk07jSOD521AXuEKy/+KWZ3RzcMJ5sbJk415AkyUj/jas5oUMu3mA5nxYjE4Qa3Jd+eVa/qLEsQanHxKNeZsSGFggo90YjcktazNzUSU+GTQlnLZlhETVKgB4zQ2beNk1qBXwX/pnQfddNJqo+W2QBXh/RsKE6DzQXWDPTngpGPN4bAp217wh01RN14KnugW42AYixYGE4NCAVctvC8/ct2W3+NRexHZwx6rYvH4oWFr7Z9tTFn2wr/nLlhttbV/6dq98emGMXrwi/ID6CJo9AwhwIz107K2Wfj3zrvvpZg0JofpVAz711XxJsLCPyr7yzK81U5D128KLHIAbtxC8wCj9lWBRAeuH0N+N2Q2LV7HI9DT30CNdup9DVXHMGXdFq2IzYJb4ef39MsajFD1seiiIs2qUrH18Vwlwhd0VYNRs2Dl4Hsm1cG1T3aJsIokaAiNTnbav6Eg8LgfJJB7BIIs8REFajmQJBorIVVu5bABRAGBS4tw4jc7OsV7OU2q4A+d3AiD0M19pLYExOACblk80PYpZU2qSogEIqNGTTwRJAT1meGnumHLL176kmjUnuv+Jk9+mr2sH0V3Zzu1nhT7ZTzg6puIG8Ns9BeDuliKz4mnKojIlFnM7UzwTF2MQlfpch++KQswtioXUo= 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)(136003)(366004)(376002)(396003)(38100700002)(7696005)(186003)(316002)(966005)(5660300002)(66556008)(66946007)(16526019)(478600001)(44832011)(8676002)(55016002)(110136005)(66476007)(86362001)(8936002)(2616005)(8886007)(83380400001)(6666004)(2906002)(36756003)(4326008)(67856001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?YcDyWufslc3usUTdJPONuqNyUmIubX?= =?utf-8?q?8mPrvOk61A8AFM7Fo04iQgIHUV6vIzTpuYw4r2spw23Pfrf1H8+zj5GlNdGQXBNAo?= =?utf-8?q?bc8DmV8ZNKAMoQX0QTfhdxSvmks5AZLM1anDx0Wgj8IYkQhvWw9WUMEy/4R8cb4Rk?= =?utf-8?q?d8g9opC7cFdx+HjCJ0hW7vbgctWNPZhLwKIy8P8IWeY2j5ptfMR1Z7mE3YlYPj8W0?= =?utf-8?q?qRL4LaLkf+BlpFea+KDVa+lkR8H+hJZv3w+ypDGHgur+YnNndW7UcdTvOYL6cFDTO?= =?utf-8?q?ENJo8wMtXIkbhH1KMNBqF+rJn0rkdH706u/5WaSTz5v3SsvoXP2cOBZlZ543sSrJY?= =?utf-8?q?VDxfcu1t3AJaLEjkOCHXTXyTEIU/AMON3z/EnJiJJfavKdaE7qEDnNSHlcSi7Djxz?= =?utf-8?q?q+x/HrH9UHQvpINFgozbue+knFMuEppPDgk4bhuynRGOgEnjjyp0BgNlTLGMfCGao?= =?utf-8?q?BphfPDpMPQS7HaOWn/bPYmt7Jlo6CyIkDiSo+XTXjmpkbnrdglvOduzCzoPFAuD6Y?= =?utf-8?q?a5cyQpPXnTXxlLSoUkZb6KfSRUSi0v/vo38EKFMymFfw/lYqllPRXcQwuQUe0c2Sa?= =?utf-8?q?rpKkHWTy5Kcm5je4skmz5RPbwYrUuipivimAbSSnG0QkBKQiws5knfWqTwhbwXibx?= =?utf-8?q?S4HSgoNXi/ldFoJnqhia+GefiBn/GkGcWWR50C96fN9K0Weju0HN0uT4s1dtpqaJ8?= =?utf-8?q?g0BYiTxEJ4AUV5xVPpqiv3CBZLBCr8Z6H0c3jQLn7D+fYbOmfXa893z+bT2rzCnz7?= =?utf-8?q?X0+/twxoaVx5QllYXizxzGMWv4BVF8eUd7KsSLrmuc5l4iv6m3h5g9xL/kxubjPux?= =?utf-8?q?/5vEUFfG8y406YYmsU2d/CMLjzgjeDqz+DqbrLsuBE1RQxudQwGYvHc1sxyZpvNzO?= =?utf-8?q?8sgkp5YynBh2bBoQIlIX32tXnJHD37jLcSBzcRjMaUxlLKWTk1iRd3v4GKWVdKT+q?= =?utf-8?q?ZnFAwq3UoR4CPo1dCGGFCMwmnnk8Z82NKqWPXvc/kWHzLVRFjaqmUyJYhb8/ufBow?= =?utf-8?q?kgTXxyGArXby0ygur+OKc+vVq7IGxCK+dj1qvntr36tC7eSXJcAvMpfIzTX7KXWnl?= =?utf-8?q?Tfbnkq3R0v2zzTDA7KEPjR8TmJ64+Q5tk7y4kuXJFDAq9nk2iJRUwijokWeIKfSQR?= =?utf-8?q?lqMJOomuRsaGhUy2fpC6xmd1mP+KTqZSw6tpjej+bU0Ct4pO/N4l5jN0JQ5dBBipg?= =?utf-8?q?+vJ+AESbqX4oODli1YwdBZZU2XBO1eDJssS/Ost+rOj/YTalrNlkbZnAPDmRyANOU?= =?utf-8?q?N1YSFeKo954ZerDPnW4PS4WXPOdfuH7sSi3zEc4FF0Yg7F2I2zl+EaY5AgEn4wwTn?= =?utf-8?q?bgS4gYk+t3W/p?= X-OriginatorOrg: orolia.com X-MS-Exchange-CrossTenant-Network-Message-Id: de7c6af0-8f84-4ccf-6c0b-08d90ae05162 X-MS-Exchange-CrossTenant-AuthSource: PR1PR06MB4746.eurprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2021 07:28:00.5012 (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: n5lOou+6rSS/OqsFm2qgfpikW1yyLwGVNDqSkXlT4cvDRAINm5SR5jnSrKY11irsiOiYlALLeDGlWN0gN49X2HqqdHHNQsfSBZQlbBBOqWM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR06MB7552 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: 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 .../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 07:29:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Dautricourt X-Patchwork-Id: 12230595 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 B4F3FC433ED for ; Thu, 29 Apr 2021 07:29:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7C91661431 for ; Thu, 29 Apr 2021 07:29:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239733AbhD2Han (ORCPT ); Thu, 29 Apr 2021 03:30:43 -0400 Received: from mail-eopbgr40067.outbound.protection.outlook.com ([40.107.4.67]:30751 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239259AbhD2Had (ORCPT ); Thu, 29 Apr 2021 03:30:33 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SfYd58N3RzuB9IMVMl5sYomgV4r9jZPFTSGAMo3G0tFQLvQ8FykWTUTE0UBuR8YtM4ws254t6XBF6aUFJEVZHfZVrVE9nJYJ0/jjHWYOBg2ChxIAXqWZPXNfborOnHZCJUEZljv7NApRW87bqIPBmd0pMAEOI23uUADgkOzQoVu85Xza2s9hPoOqE2lQ8t4aBgE4mD5kQ2sB4c5rXXok/ZFYx179Seqbqar4ggAhGupfajEapI51sCToi5Y3dkukCMWKurd1d7nJ2R6Q0u+AzSo6I3vYUqdGJfj//pe4pczEFojQMZIhhk4YvBNUkOuE3/J1r1Iw4HSCBqW736K9iA== 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=cXenXv0aE0GXZlpKqm2uUhHw6PMu1jnT6YkVOjrAvUc=; b=YxR4Xnnihde3mcclUWTfo3aPiQJLbgBKajubGaSOWoMXMHHMNIlcVdtvu2V7oN3nKGic2TlTTSjmoEllkEZ11AnfVtSYVCDHLlBOUh8LloN0fE0SuhKhvl09VIB5LV3eBA1pZTjMNP7ucvRz19XkdRY08V3EY54gqfkZ896U/+z/auVuDunzDn0ruZFGRy4AB6xDnwKV6r0x0tS0a8FTJA1lgKCRHluV+xgBv09Zr+x2tmsB95o+Sui/QZBDfE94pFmj/POqK+vzNdEq+qOY/8Jfb6scCjqJGKu5AAHzz5jut/gtEmxSsJZ+f67m9moaBQ3CQP3zAFvLckCFbfyLqg== 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=cXenXv0aE0GXZlpKqm2uUhHw6PMu1jnT6YkVOjrAvUc=; b=GS7+t/wX/2wjRHzKptVXOn6hi9XVz/IUALjOEYxhrieqi5NX6/+Dzq4VYOtlrlGp6uLI9MEs1AaCQ+X9y1n503b8i3KE2BxU5mXLws7MkYyw8MV3nv7lLpcdWF/i8ob1K961h86Fe7TRadAxdD9yWn/sUajgmnXh0SFkuy8x4d0= 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 PAXPR06MB7423.eurprd06.prod.outlook.com (2603:10a6:102:154::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.23; Thu, 29 Apr 2021 07:29:33 +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 07:29:33 +0000 Date: Thu, 29 Apr 2021 09:29:20 +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 v3 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: PR3PR09CA0008.eurprd09.prod.outlook.com (2603:10a6:102:b7::13) 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 PR3PR09CA0008.eurprd09.prod.outlook.com (2603:10a6:102:b7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.27 via Frontend Transport; Thu, 29 Apr 2021 07:29:33 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c9edc8e9-9a6b-4876-98e8-08d90ae088d3 X-MS-TrafficTypeDiagnostic: PAXPR06MB7423: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4125; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: f7u0N1SliL0V9B70mXXQFPidWeYNNHVmyKwncegpCmr5vNI0NsjnKk3Xx8Vz6fpVogIWkpf8Aj9Qn10oHDbB5/4adRao1ccudKMQYOAvLIruYSx3FGZEp0pBGYuTZlg+iJ89F1ChupxsP8drZYAi/M3nWcWsMi/oiCECv6NtDluiBm6AplUSgAu8gTPftsEP/BmRE+GG/JICMZ419pyPSRVAx07H934GQcf8hHqmrDvjqGpNCZNEcC60Rxx8EV2zGKxklKQAOjqeVAQpk525GdGKPsWYS+YKHmqAIfTVslGtXSXWJQVPvZ1q7EodqgkZjv+ST5Yn6y3xcAoFuwB6JXJzLEnUz9U/B3US60kWphFV3zXbC6sk4YHW1vRh4z8VzfS8NuIIKaRJNrMzXhCxxm5j47c0IaBjFZjTMDcr/f1t5XkHfZUD2hL/+g0wMWZugp2UD7LBwuYokw/Eas7JZbL8VB7E6H3ttyYeR9Axiy6akhsaFhXkANh56EUQX5La1PSe+wiXxMS+w67t1sGo11SWCN+C9etZcOr9XpeBnMaATTZBUYXq/R6riq8NwpOo0sCcEnFeYuBdigkucTaGJ8KovKpkNgT10Bww1fEhyB4= 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)(366004)(376002)(396003)(39840400004)(186003)(16526019)(4326008)(8886007)(5660300002)(36756003)(7696005)(8676002)(38100700002)(478600001)(2616005)(55016002)(86362001)(6666004)(44832011)(8936002)(2906002)(66556008)(316002)(66946007)(66476007)(110136005)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?iBFAZR4PhcQRaxgQUoQ1k+rrqyH+fh?= =?utf-8?q?Of0xP9sj4BXzBgnZ8ftUt1B/UlFIUbADh9ZWQFJlPRyDZ+z+GdQVGHJiRDAvrW4hK?= =?utf-8?q?VHKNgGzZyS3VfvTZBFU2JNUPnQRl+NaJqByB1nEbXL7UQ9r8Pr7t+wZwHXUcCg7m9?= =?utf-8?q?yK9r9P8KL6UBGPMmsmIYmgPj4f5UJKkk/4QP/tx1rITQz6JzifeOk2ZnanpPiph2h?= =?utf-8?q?/fMBIJWlteGaV779gKAZtaZKXJeyltA1auOdK+mpZFtIHmMif/KBKMiVINgAQhgXB?= =?utf-8?q?OdJZHDe9vuwPOpDna0S/FN1O9BpiovV68KFdOO552SD/VdCWpRrwXE5MavBET9TkD?= =?utf-8?q?zNEQlDLff37GtGWJAgPyPc06I82AOAqwUIRfw+1/H+TDvQ7itHpM6O0Kbl/CbA7NJ?= =?utf-8?q?sRWeMiUIpV+3Rqqorzpxi5ofXG4DKndCw/NFz/OA7PaJNXj2lvouvfPDSZFz893gS?= =?utf-8?q?CdsXw7dmEng/o+9jjSIQ12DXYeXDW5FKMSTA5Zah0oWE+X4aF2xolrtariSCuqzf5?= =?utf-8?q?G9B4QrU1vujyXRiHUojiaML4rlKZN8G29mwz7/BcscUWAf//FEIOwUKavgO5n+1L3?= =?utf-8?q?rdPBICN4VskjtHjneoADm9cXaGYyO90pa2YIuE/pwYPbjClJp847Iz6ZgKhhj32YJ?= =?utf-8?q?Oq7o8lJ+OIoSfM4zMOiK8eYMdvbmNbhkl869NeZV4dG5T7DW+xkZVlfHgQx7K7+/U?= =?utf-8?q?iVAuTU+hPW212X7rFCi2Xr79pjkGR21DzB1uuIwi528C3zoeS+OOtADdlBraTsHZ/?= =?utf-8?q?rjfPt9F3Q427ppQ/8EQE+m9pE1SUl6tVHVN2e08Tc5FJEGwzti5voU26wu6Hto0bd?= =?utf-8?q?/I5+kcDutM8pF4cmu9oKsRnpttIvG4uJDtOGHlQRgz6KJsZX56jeoRYM2jltmh2C+?= =?utf-8?q?8Wt6ntIYIDjQZfdzhAIRaEn3EgfJvwhobZPu6nTQbYQKKlA55LcRTzKrTj/nidHqC?= =?utf-8?q?aChT+4tD/8qeG2yoWJwLPnlrEZSDnKrFA+c/SYeRsbydP0qjCNxVyVGQ4osIMLZew?= =?utf-8?q?XoMviyZN9FeIyW9+dZhsiTQfFY0Q6V9hqvqGowENDWOJ20UHgxTYRauo8RQXpUmyX?= =?utf-8?q?iEAeTN5CYkf/hPhJJf6kISq/qEvGylnxa0ACIE5PbPDD19pQ0g6Gjow2lklUJ22Lf?= =?utf-8?q?a+WEzIzyE8RkeAObrYI/7oO6++KiXw4EVPLeuIvNg2FI32ej9Zo1LoIJBKKc+5c+q?= =?utf-8?q?omyYgECW6AIUWR/iLUmgDVeYSOJhgkjkHAoe2FiINKNH76P4V6DBrWG5tZMSeKN4g?= =?utf-8?q?+wWbShDtC1hoKsX9gvM2f6wlXa5ZOw2aHxulRSGsHwJCOi8UvbBrm63fF+TxkifJC?= =?utf-8?q?XesgRoSlTr+/X?= X-OriginatorOrg: orolia.com X-MS-Exchange-CrossTenant-Network-Message-Id: c9edc8e9-9a6b-4876-98e8-08d90ae088d3 X-MS-Exchange-CrossTenant-AuthSource: PR1PR06MB4746.eurprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2021 07:29:33.4976 (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: Mk8JJQBVu810cxyBJ0T2I1HM8SEA8Ixa0mrgXYiTmDlaWSFEe40aH63NNpyLBsJjtJZBHGI0Ghb8JibZhF3V++ERAFVqQpS93J4QsPDmGOU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR06MB7423 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 Reported-by: kernel test robot --- Notes: Changes in v2: none Changes from v2 to v3: Removed CONFIG_OF #ifdef's and use if (IS_ENABLED(CONFIG_OF)) only once. drivers/dma/altera-msgdma.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) -- 2.31.0.rc2 diff --git a/drivers/dma/altera-msgdma.c b/drivers/dma/altera-msgdma.c index 9a841ce5f0c5..5a6eb5b501ad 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,17 @@ static int msgdma_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id msgdma_match[] = { + { .compatible = "altr,msgdma",}, + { } +}; + +MODULE_DEVICE_TABLE(of, msgdma_match); + static struct platform_driver msgdma_driver = { .driver = { .name = "altera-msgdma", + .of_match_table = of_match_ptr(msgdma_match), }, .probe = msgdma_probe, .remove = msgdma_remove,