From patchwork Thu Jun 17 19:52:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Dautricourt X-Patchwork-Id: 12329453 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.8 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 C610EC2B9F4 for ; Thu, 17 Jun 2021 19:52:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A809B613E9 for ; Thu, 17 Jun 2021 19:52:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231693AbhFQTy4 (ORCPT ); Thu, 17 Jun 2021 15:54:56 -0400 Received: from mail-eopbgr140041.outbound.protection.outlook.com ([40.107.14.41]:48448 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231513AbhFQTy4 (ORCPT ); Thu, 17 Jun 2021 15:54:56 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m+ELhySYS43DZGzhVOmTeoEXgT7GP72FnCItwAojF57V+gc7V8A/8I13iEGM7NKG3dIhZvcMavl6eBmiSnIJN77q3yeg6DSqoyQIWVfag0ki6GpXGZ6L1lA9kA2iwY+IGvLpJM/ckOaY8jc6d/bCyXueT7GevUoziUtipRt7APtD3qUIgX9/zGlLg+MhoD9LvaY1i2ACsAIgucK3zvmExG+BGhqPdnMZ/a5q9io3A6uqGHLHzxLjcPe2+7gBzpE3QeHZG5rFm0lb48wJP+lSvcSkiKoWfm8NKY3fUTNIILPVuRqE73/HiFcNbdBPJ9j66+oimvqIS+WkbvizrMZbGQ== 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=VUrZ8/k/slv87enkgVUXLzo+h7IrxQp0cOi4b67Wixc=; b=PA8SrNOCd28BX8AofgkRriW229fnVt6i2r/l+JSyxFACLEb4mmaVkP6AlHFFuzjBijn1YYq6+FZoWGIIfXMfDVY2S7eX7DPVvBcGndskHMAVb75KjCHx4tRKj/j3gBth2uLISl1N2KjyvTbMr57PT3iHb7Fvl4WkIsAedde91JlZPBx6mgRLRNIwkbPUjwX0uJEfmxMWABGSloU6ichaGcUTHRxXLopzabJ9TFnAFFAeGJpjdUpmnZXCQ5OJOyIQaKslpUrwXO/w4LejW2+9xMcjQCKIjb8kaevrJeHp80Dzz6n/89rY8W8xihSPIidTXX67yoXYe1pcFeqsVdcpCg== 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=VUrZ8/k/slv87enkgVUXLzo+h7IrxQp0cOi4b67Wixc=; b=jcIgIGWLe07iYrhrAeK6g59dfdY5dOBHcQHut8FHNGk6NYhtI7/nFX101VJ0sDwQ7lh1fF4oqgTOPcFNunQgRx/oFqrya+9LPXKXqGJU9IgvUfmRdaS18cd8/We478OgDY4j9BkUsSEpKledLBpFQ6LXymSDg6lM4iT0Wks+h8U= 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 PAXPR06MB7710.eurprd06.prod.outlook.com (2603:10a6:102:de::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.15; Thu, 17 Jun 2021 19:52:46 +0000 Received: from PR1PR06MB4746.eurprd06.prod.outlook.com ([fe80::81ef:de90:c451:d6e3]) by PR1PR06MB4746.eurprd06.prod.outlook.com ([fe80::81ef:de90:c451:d6e3%5]) with mapi id 15.20.4195.030; Thu, 17 Jun 2021 19:52:46 +0000 Date: Thu, 17 Jun 2021 21:52:32 +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 1/2] dt-bindings: dma: altera-msgdma: make response port optional Message-ID: References: Content-Disposition: inline In-Reply-To: X-Originating-IP: [2a01:e34:ec42:fd70:167:681b:bc47:e8b1] X-ClientProxiedBy: LO4P123CA0153.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:188::14) 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 LO4P123CA0153.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:188::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.18 via Frontend Transport; Thu, 17 Jun 2021 19:52:46 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 29a39565-7860-4d16-e130-08d931c97a89 X-MS-TrafficTypeDiagnostic: PAXPR06MB7710: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2958; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /Vfa3tmxBgC3Z3Cqdfd2vNNzxVwVC2OxUcqgpoFqcgP/z+pc/3ChVT+Ktmgj2nEmx1aRwLmAQwCQ+KKC3jqGF86spzUGWxUBki0r1vyc11zPfCNb2Yks1MUfGJd2+70lFsrhb2EgIUhZrFZCiotxCr3f449u1j69ZbGFOKUwy8gNvsUW5doyiIASQ2jyrXbKJSLENlc335LuSNgCv22G6QbjdZH04AjVVNZWDpaivFpNwzzS4wpEMViYHonpVSqDiDh8TTsE88FGjJ6w8dJVy78U+dSK2QpqPWj3VTZiID1tPOwf3g72hYLHpX67AhTZomqJDSNtAAVezYbV/nYpT+Pm6mHXbYRxWC8dTxFKN3VS35cNCCOxPXplGpFfTc7TSVqyZ+CpDOcMnbh7VO/8WmscFv/xsl8aS3qXR5g7JTFsHXhaGMI5JtjNySfa/uI0Y1mD7I0286KkfzccnL+yueKx5fm+Xc5ubHPc7xWCAUUrdwkgwuP9aV9XsztceLX9q+0Rbr+Q6gzj+EAiyLuzJWm3b1GfWZOZxPA5759Ke3+HIckf/29l4D590qHVeQzjBMnZn6GTUP/gxYFqlwdDVK18oC7BwYiYFCO2cDO7v8U= 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)(39840400004)(376002)(136003)(396003)(83380400001)(8676002)(86362001)(8886007)(2616005)(478600001)(55016002)(36756003)(4744005)(38100700002)(186003)(4326008)(44832011)(16526019)(66476007)(66556008)(6666004)(66946007)(316002)(110136005)(5660300002)(8936002)(7696005)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GS7NWlM/9wGk/+WyRJ3GBVOsaIh0MzS80b9ld2KQHxQc5geT18Ze6lUKpcyfUKXApvIzjlXYtGgH6Yf7t8rBjocbFhqoywbhaOMd+WyMqKRE5EMiosj9kVuOkCzcrZQj/70RppoktneYMSldDqrofsvLl4OJxZw4N5FSKH9oIWgPhF6G0nmY7jIRTBKnZy+fesyamWSKj9LqsVg1VL1afuSfl4mKRPO5xLHXB4qKsqr6xCyr6jTXuP2u4ZuheJlGmSdxPJzDtdnMa8gHenZBL2v4ZUrzh+43VTTpOq0nT0qG+tdLff7uWv+sKZJZMTyRPf+8CtgmL1s2foBvkadedUqnMSqbOz1zJMDZUxXb5LKFAay465daRCOOeFhCpaCYDKs+ovUPeVHTkzrcJy5W5dBAlzVSDfhaNyN9EPiGGU0+ePZtPmCX/Zx0+hwOWH9CModyN1Omb60nCXu5u46uFiXUNuz7K31xIq5sCttEyB+AQPRZUBL5DVHZZIB3v1OhrKUIQX2NcWW3jWM+xXdO+hg5/Z2iD9rJ1OIQxtEix8HM/n7xJXNDAsntXR09k3fw9W0t0/F+dyDOXMhhnEZQAGnt4i3G9jE+b4dQU3WyPnYWZmdlRIcTJn9RVBzgkMn1OV25XFJhRTd3hhe/4N4H+2fwB2Xef8pIqHyWyKWCCLiFgrZVxNzFtEeZE0rhUjypmqug+LZ+Z3HppOL2kbBQw5ui0ihnLlOgmFkymn6ZjpBmOXa4q0W6EZG8G3/glQCb8E5aTys5UetcRYEshHZHnlMCfAKP/Yn57Hs0IqkIYYvEEweABaYa16ikeitjOzAUixcbkt1c6m7dD84OsvXS7O1aPTVmhQZ1haBAaKMAd5o6mZwiJP9PALbwL8nXsna42NXYDcvlQpB5QOXfV1vyjBsR+GlpzlADkRKRF0fbAPfhTfeZ/ZIhr9Yp0ddqwsqXrtsH5ZyTYnZ6gGjAoxMFTfVMQm0Pbtjb/V1+qelpxJGyxDGcW0aUp0VeHWYgihc8q/T8RB/h1PaG8HQaRvl7NDXUlrq+pzae9RXyj+zscS3cR76fPpzhFqqO08sUYfY4e7HsNA1Ay9dBRnRYL3vGIne/cY+XHwRoVLjb+camXoasUNJXNWhCrBJkLc/qimDxn186ap5/QS5ft4b4JMQKk7FR+c+z2wTssZpS3kUm2wXZ+4cVB1eplulHnVWfpH7z+0fqeAHcx58oi++Y5CP+UhBEZDsEWYmOM3fe9bjaWaXJsVozMW6Che7pIsQKfPZhDazSqp7oBQrNfWedR9YT0l1OLtc6bRFEm9Uq6NjqLepgGIo/w32PkbkuyyM9h1dLvqQp+aGjHcBvwZNoeL3iRLqgDngcgAUOkCNiZhbLMIHyUUaIORX/L2A6ouSxAp4d X-OriginatorOrg: orolia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 29a39565-7860-4d16-e130-08d931c97a89 X-MS-Exchange-CrossTenant-AuthSource: PR1PR06MB4746.eurprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2021 19:52:46.4549 (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: AAFr03B7scWwiAStLdnWRMqyKTiCfCH1Ej4gmU8m3vDKpL6Y8fKLgwGMqJPRCzSHEY4fH/8l3+VC21tLwlobJv8U/tWMAh57TDGJM+H/7jQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR06MB7710 Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Response port is not required in some configuration of the IP core. Signed-off-by: Olivier Dautricourt Reviewed-by: Stefan Roese Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/dma/altr,msgdma.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.31.0.rc2 diff --git a/Documentation/devicetree/bindings/dma/altr,msgdma.yaml b/Documentation/devicetree/bindings/dma/altr,msgdma.yaml index a4f9fe23dcd9..b193ee2db4a7 100644 --- a/Documentation/devicetree/bindings/dma/altr,msgdma.yaml +++ b/Documentation/devicetree/bindings/dma/altr,msgdma.yaml @@ -24,13 +24,15 @@ properties: items: - description: Control and Status Register Slave Port - description: Descriptor Slave Port - - description: Response Slave Port + - description: Response Slave Port (Optional) + minItems: 2 reg-names: items: - const: csr - const: desc - const: resp + minItems: 2 interrupts: maxItems: 1 From patchwork Thu Jun 17 19:53:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Dautricourt X-Patchwork-Id: 12329455 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.8 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 C559CC2B9F4 for ; Thu, 17 Jun 2021 19:53:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A0FFF613D6 for ; Thu, 17 Jun 2021 19:53:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230161AbhFQTzn (ORCPT ); Thu, 17 Jun 2021 15:55:43 -0400 Received: from mail-eopbgr10087.outbound.protection.outlook.com ([40.107.1.87]:34791 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230039AbhFQTzm (ORCPT ); Thu, 17 Jun 2021 15:55:42 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dfo4Zodf9VtU0bVKAcMuwnLTHWEvQU9Hq1xrudbhi8KJ26KEx1TelEHCvrRIyvQK2U4yPeaIq49xeBcDpUvJZd83KCpXp/GYJkPVqvSpT3XhGzCqx2KH30C9fp377LUskapza1Y1L/UTDCp9oi/FG5/W3cnhnKCSGQuU/lTVtrO1M4NXDRJec869pPmwQTrqoTUNtGN21yZVs0aUk2PYzw6YYqvHlnriToAvBk2jzkXtuTUQKYHtMMLfJowYBLCSPDBH6HttqFSRcGk3v7DOTdFtSdYxjc5xKWUKrefK50V+u8f4nC3Nj0mgvBBDeYeTHfmS7uvozxf6lbIe3Lqh0A== 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=FZu5JboXnL6ZHX4tMUTk82zb6sV47V19ykSVOezA0dw=; b=Xtlu1+gdJHZ2jMiTWxKHQaMsKAYhaT4VC3JdHvnyMEVW3QjSs3CWYcHQUlGqmGwQT/hBIgr+c2NJ1GhDaA9HjFfvo6nToUjTPEYGqbHsnYfkDu7blqQfxZKfHagOddlenSAIw4YtLOuIDRs400kK1S1e6maRD+Z2Btz9yy+UBTi/Qm/ayG1jsHnv9eEurpSvQMvWwbxYm/53OF62eX5jR7V7b5ol5w6YpKZDPoiegc1EZ4qd9zCXDtNgIsJ9UE4bPHVP4oncKuSnztiNTP72hD244uKgBOdNZo6H7/VNQ6zDtCDBJ6kQN8AmmWZIvDmR8wRLxOGbAfLAURNa0Ldupg== 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=FZu5JboXnL6ZHX4tMUTk82zb6sV47V19ykSVOezA0dw=; b=pB3HQbnSqggcjwG6Y4bI35pAr1KiE+k1GgDgSKd2YbLuT1btJqGqdPt0h4OlHDzAcTWFshSjdxszti70xvtrJw+njHQ+kYM1Wu3apqS7WMdSeY6rdoNPyMAMWphZ8iaX7z5lpx2XlKMYXrafJjtPIUdkkl4Q2gYikjNSt08KdJM= 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 PAXPR06MB7710.eurprd06.prod.outlook.com (2603:10a6:102:de::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.15; Thu, 17 Jun 2021 19:53:32 +0000 Received: from PR1PR06MB4746.eurprd06.prod.outlook.com ([fe80::81ef:de90:c451:d6e3]) by PR1PR06MB4746.eurprd06.prod.outlook.com ([fe80::81ef:de90:c451:d6e3%5]) with mapi id 15.20.4195.030; Thu, 17 Jun 2021 19:53:32 +0000 Date: Thu, 17 Jun 2021 21:53:18 +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 2/2] dmaengine: altera-msgdma: make response port optional Message-ID: <8220756f2191ca08cb21702252d1f2d4f753a7f5.1623898678.git.olivier.dautricourt@orolia.com> References: Content-Disposition: inline In-Reply-To: X-Originating-IP: [2a01:e34:ec42:fd70:167:681b:bc47:e8b1] X-ClientProxiedBy: LO4P123CA0070.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:153::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 LO4P123CA0070.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:153::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19 via Frontend Transport; Thu, 17 Jun 2021 19:53:31 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8840a06c-8f5c-4a41-4bb5-08d931c995ee X-MS-TrafficTypeDiagnostic: PAXPR06MB7710: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2887; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4NEw81uPR9r4JG5j4yHPgjuQ0BiEf9PgvR3aqRdpaEn07En3nZEHNzb4iZrJjuOQYkP380zeKhCDEy0tIIPvEZE9/4Y2sL58NzyFQrWLeMpRM/uCMxJQh8Jokp1Pj0zZnjKxEDNlBhiqVQ1HBKBwPqBjQgYOmiy2mZ2Ahe4vmtagKB/XfzBeCK3svtLT6eo01Adzqg3QOkUCN6mnjEHpzagmIZNfuwSZYB7+zvl5oGp1aggybwMar7hLC+wGWqalL07dlvtO+eI+8eeMXVl9n57IpsHv197BXd3wVzv7i6U/xe6Lh5pGhhjruqt+q0Q4iNV9DgjleSBU+ve9pE0y9qAiLBxybby+j4BpZRnK5F3LjInk1v/cO2nCQf5WxArEShc2sX/GUagCCYKOLEbtwFqw27Bl6AD5rHyYWN13KMHSFSFS/9a7jp0pmheUzrwkBstDX1mos0vCjliDUR9euDxv7ow7FszwWP+szRnV6/NYpeaDqidgIcIiN5e/JRJ+Ml2KwgdjJJCuldZR+CQ1cRdhkEvO+zJS1Ev26gtqSz4BrSTAswf+SgH5gjt/RIIYX3NI+ANjmdSDOVLFIr2urn5wYtw9r2QgmxoKmctRF5Wu7mMWxFkHBnT/IQBTIKjbGrQjpanBvQDJQfXBBSxR0mZUGLWYl+msurd8pAx4GQvMyWKHGyGrqHLMbgqBkvO2QB6KeAuaPjNAXidWDavPYDP63PWoYmvpXAN6zGOSlcQ= 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)(39840400004)(376002)(136003)(396003)(83380400001)(8676002)(86362001)(8886007)(2616005)(478600001)(55016002)(36756003)(966005)(38100700002)(186003)(4326008)(44832011)(16526019)(66476007)(66556008)(6666004)(66946007)(316002)(110136005)(5660300002)(8936002)(7696005)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uEXusXrf5gYGsh/OgPBOoLe6CljjVr7k7ITm64stmpM5lZRI+kInIsHr0nU5Tm9jMjfcH1kYZ91ROzb1hCdlUbxDLZU2qu9f/GRK+I3ncfnyMAqFjOoaAwM0e5uzghUUJ7i2os9A407awMRrFDl9JsthtMEV0quwR4gdOcvT6MebO4424M0lGgCnANK8m93sWKQy8AUnIV0DA47K92MH3R7QWXXK0HWtLmz3x+kaxJ1DxHK3EgMwYtOFZQMYO7lybmqYA8dDqWbfpMBa50S0ibcncYLjD0H/MvzdNQ/zCH6MYOdYpejqwdMmyCSTxhZwdl7zd0K++eNhQc/UM8LTx8vLfjJNIaCn6xMDW1DI+T+rPImBNsszw3Z+Ap/cfactb/4Q7F7yRevT8MXf6Jbr4RPXTcMxEEiD/xY47+yoM8VO41oZSu+MPShCDat/7wPsVYbCT7qYCCNp0dWBIyHzMsHu5EA6rPeUO+pDu7ujBwEUBhaJRXCrPsEJceRDbjH2QqTFXcuW3pu0nX4pz4m4+3T3JOHvqdMoaIn2JanMUna0X7tZcSGf2wcdOBdHFq6ywmatysFcrHuYy2McuYrX+0jo8J0APCHhgR4YBf3YXfjoBJW8PMnYqRpGkcemT6xkTNDc5lX5gyYKP6UW+mj4Vomqp4H1ABp6lOMpw9dUxzhI75IycUQhbnleCuoaaYluxWptDvcn7Y6XZg6Z9tRHIgvEOkHsO1vjuqRPM7iNFleLVke8aLmVEgmNbATKPuV128CjCtRr2qz78w8MQt1Y+pwcnm9racjZhqyJyBOIWAKds3HCErs2B1xOrZ+ttObP9XH+CwwVQO+NlsRE2+y2ik0+fw6llVBu+DxdKVI/rxnrU6cXCoqa6xhL9JFdXSfGxYznrjxebYgoQCtQMM48gPO7d864qJGYSCZnTnTzIQmpgtlPNDDh16KIDVbjw5/HC9S7cWjNL3FfbZDADMIkiusk1jgyQ0A4/j2yoHngOD56Fa6DL4nk0DisxvIAJdJDIn/49CTf362qt0joWfU4KppIuwl9Ypxk2Gtg9pFBG3+gxnivKFulSq4gTh2fnBnk7hTzSs31KZoSJVhGVhLzUuD3V+28C77ZU1hdfVgXM4eTzS8spcDzOHdoGdyGHiIiAzkOlOnvrToBKtITJf+II8dJ83QgVRHMz74Y/5esKstgPpKOOONNiR0ofde74fL7Klrm5DmmdOoFeVlecdNNVSb8Wz83YBUcQcRTIB7fG8VTVK2n65RlpSDRt2Wa4eNLqguPSv7m8VqUoFDnrxltMhoqgZKy6xENznQOyD6eECInIsiI2cUX4CEA/UtUaEknpKRa0I//GJhk2RWCbEjqu/ep+qsTmYK9MslhRjtfKsHUjby3Zj0plrzEkvfypFsD X-OriginatorOrg: orolia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8840a06c-8f5c-4a41-4bb5-08d931c995ee X-MS-Exchange-CrossTenant-AuthSource: PR1PR06MB4746.eurprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2021 19:53:32.4714 (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: qF5KuoeLDaiYy90deb5DUdec6yQLUcLOnkcCrGx/UiCNnJG1cKYyKaiOcq4q+whXg/WnNCeriBq6r845D/8mz4j9I3vsGMjP0b1lJh0XaYg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR06MB7710 Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org The response slave port can be disabled in some configuration [1] and csr + MSGDMA_CSR_RESP_FILL_LEVEL will be 0 even if transfer has suceeded. We have to only rely on the interrupts in that scenario. This was tested on cyclone V with the controller resp port disabled. [1] https://www.intel.com/content/www/us/en/programmable/documentation/sfo1400787952932.html 30.3.1.2 30.3.1.3 30.5.5 Fixes: https://forum.rocketboards.org/t/ip-msgdma-linux-driver/1919 Signed-off-by: Olivier Dautricourt Reviewed-by: Stefan Roese --- drivers/dma/altera-msgdma.c | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) -- 2.31.0.rc2 diff --git a/drivers/dma/altera-msgdma.c b/drivers/dma/altera-msgdma.c index 0fe0676f8e1d..5a2c7573b692 100644 --- a/drivers/dma/altera-msgdma.c +++ b/drivers/dma/altera-msgdma.c @@ -691,10 +691,14 @@ static void msgdma_tasklet(struct tasklet_struct *t) spin_lock_irqsave(&mdev->lock, flags); - /* Read number of responses that are available */ - count = ioread32(mdev->csr + MSGDMA_CSR_RESP_FILL_LEVEL); - dev_dbg(mdev->dev, "%s (%d): response count=%d\n", - __func__, __LINE__, count); + if (mdev->resp) { + /* Read number of responses that are available */ + count = ioread32(mdev->csr + MSGDMA_CSR_RESP_FILL_LEVEL); + dev_dbg(mdev->dev, "%s (%d): response count=%d\n", + __func__, __LINE__, count); + } else { + count = 1; + } while (count--) { /* @@ -703,8 +707,12 @@ static void msgdma_tasklet(struct tasklet_struct *t) * have any real values, like transferred bytes or error * bits. So we need to just drop these values. */ - size = ioread32(mdev->resp + MSGDMA_RESP_BYTES_TRANSFERRED); - status = ioread32(mdev->resp + MSGDMA_RESP_STATUS); + if (mdev->resp) { + size = ioread32(mdev->resp + + MSGDMA_RESP_BYTES_TRANSFERRED); + status = ioread32(mdev->resp + + MSGDMA_RESP_STATUS); + } msgdma_complete_descriptor(mdev); msgdma_chan_desc_cleanup(mdev); @@ -757,14 +765,21 @@ static void msgdma_dev_remove(struct msgdma_device *mdev) } static int request_and_map(struct platform_device *pdev, const char *name, - struct resource **res, void __iomem **ptr) + struct resource **res, void __iomem **ptr, + bool optional) { struct resource *region; struct device *device = &pdev->dev; *res = platform_get_resource_byname(pdev, IORESOURCE_MEM, name); if (*res == NULL) { - dev_err(device, "resource %s not defined\n", name); + if (optional) { + *ptr = NULL; + dev_info(device, "optional resource %s not defined\n", + name); + return 0; + } + dev_err(device, "mandatory resource %s not defined\n", name); return -ENODEV; } @@ -805,17 +820,17 @@ static int msgdma_probe(struct platform_device *pdev) mdev->dev = &pdev->dev; /* Map CSR space */ - ret = request_and_map(pdev, "csr", &dma_res, &mdev->csr); + ret = request_and_map(pdev, "csr", &dma_res, &mdev->csr, false); if (ret) return ret; /* Map (extended) descriptor space */ - ret = request_and_map(pdev, "desc", &dma_res, &mdev->desc); + ret = request_and_map(pdev, "desc", &dma_res, &mdev->desc, false); if (ret) return ret; /* Map response space */ - ret = request_and_map(pdev, "resp", &dma_res, &mdev->resp); + ret = request_and_map(pdev, "resp", &dma_res, &mdev->resp, true); if (ret) return ret;