From patchwork Fri Jul 7 19:00:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 117258 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3483697vqx; Fri, 7 Jul 2023 12:11:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlHMcqehqTArrJqm0cPg9o/HYD57XqJZUjaV5kWaK1RM4vZGKLQ0+RoyGU14RhkQI0eNLB5M X-Received: by 2002:a05:6a00:1acb:b0:681:89eb:9c9b with SMTP id f11-20020a056a001acb00b0068189eb9c9bmr5350937pfv.11.1688757078516; Fri, 07 Jul 2023 12:11:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688757078; cv=pass; d=google.com; s=arc-20160816; b=PXwHFhSDkW8uOWGYDo7lmET7oJNd65XaXfuPb54PAF8frRNyYoxQ6iVbYpO0q3VAai TRyKHMqrrFQ2rh3VmVFU4qBn/rDIdi0QOz2UT77YwFdNjKpB1ZXtdcIYJbFoiP1wo9C3 u/j1fK3x69Xi81x+Ut3Ft4xajcLsiRzSActcRdfVFStBM7uiOxm1ACDCSI7kgmMSREjW FxvB+nnGdybDWzg+jp822eH0cSmJrTZkqfYfQV+SbRRxlQnGPTudKjeklwubeLCNgjrv AeiM0CDsAJ12ktucFAb7bjElzZACAr0eUXBaYh88Otr9GvwXK9aXg3R3SLsyrTpkbPtQ cF2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iYBoFoTV/QstaSfXbdLrZSLgnkkozEypR7b08wPTWj4=; fh=5Vmygq8O+G723GYbRTAWpVJkNNJL0FD73pE22uvMeYw=; b=gxLoqkgQB790Ag9KOdyerDoz1u97vjwoWcQPwP1255eitvvzcFq/f+KUcBHhqEtTdz 0lff+cHniMg2N3uXsLJD1yxwnLsVDb9+8gOZWOGVArGzh8ePESfytTzTmWdzvHIC2BN7 a8fD2g2GM7Uuk/5W34PzoZ2kP1ToroMqtYsBM46P94cyavW4ZWUMmDwJ7HWZCKWZ2QYE e9Gm4utPg2mHLp/sJcXhy1vWev15hZ21uARFiZQsz5FiBeBfGXoovxGO6KxHmnTxjutW oqqgH2ZuD86ZksNWP0JvaZSIwfXrRApvvvgm3VeWFmDaX/52T1vw6rTy03PWMtJNYe5h C4KQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=kyI8noSB; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bq25-20020a056a000e1900b00674311392f7si4212928pfb.31.2023.07.07.12.11.00; Fri, 07 Jul 2023 12:11:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=kyI8noSB; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229963AbjGGTCL (ORCPT + 99 others); Fri, 7 Jul 2023 15:02:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229803AbjGGTCG (ORCPT ); Fri, 7 Jul 2023 15:02:06 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2049.outbound.protection.outlook.com [40.107.104.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E1F32696; Fri, 7 Jul 2023 12:01:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j8kRQPBcG/PQ6zMVNfhGFOEXZSj8LoMAzIiSM4j4TfQ7LORavvgBDu1PCxICIoqcW4Il3Y6Tl/gZJao/HhY6VENAb8tAMHTtmTfv80IfZ3N+j0RfKaw0F2TlXtJiydp575ZxgwFWv7IMAst4N8t7l5dpk0+WSq8H0FHIjjbd2KFz2L+6IS3tCrmwK5KxHYJmhnw88+jYnmmoL3T/VI2pWZp0CGKGk6/D4m7SlKwuXZE/Mdcy/2W594EsuwjQ5TV7kP2pajmc5o/UscVAmfcnsI1UXkNU6YMVwDKPK19gzGIdAVdpIbkpDWVSbUXJ6j48qh26X/JONDx1UmrJjWZCpw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iYBoFoTV/QstaSfXbdLrZSLgnkkozEypR7b08wPTWj4=; b=A0ZfZ8z2nMLEexOxe4M3ktuLsmIpytYSknoDEZQoSetcbeGBgZELs5bdnYCnnIk15kgrFbeRS+PhbYfuYwsfYWSebF5n+2qjhhqvGXNKEk6LmPMkaqhcp3yS7SgpBAYtLVt5AZMAedd3mZlZY7EH1/uHwljWqsRfLhiIdFobvZFnGiRfgbYhtJeHPmS/weRncZ4Fj4lQ7bBy03/a1EzFrqItjOuUTiKCUuR+g21128/IAnTHJ6s9r8X8tQRT+SvPIHbN0yLzUa4OuObQxTHgpQBfS9rymSRWl3lMgcRrxfSmsWoqziHWWjR9xuvMI1NZziCugXQuWBCTryK4GfTFlg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iYBoFoTV/QstaSfXbdLrZSLgnkkozEypR7b08wPTWj4=; b=kyI8noSBQZx/6q7GKXFslqwLrMxFh6tEHq+IuOpqv4/pi1acU2JgLZL+2yTmT6PMUd7ovf9dpNmFdIoCaBbPVTkuDL3wRbkyy4z34sQxc8sycIEpl0l1YOlGEsykawqBNVLQBNAHMoG0QGRzqp9r/zsbSbioFOuMVzl9c0IwJRw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by AS8PR04MB8612.eurprd04.prod.outlook.com (2603:10a6:20b:427::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Fri, 7 Jul 2023 19:01:11 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::4a2a:262e:415f:e41c]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::4a2a:262e:415f:e41c%7]) with mapi id 15.20.6565.016; Fri, 7 Jul 2023 19:01:11 +0000 From: Frank Li To: frank.li@nxp.com, vkoul@kernel.org Cc: devicetree@vger.kernel.org, dmaengine@vger.kernel.org, imx@lists.linux.dev, joy.zou@nxp.com, krzysztof.kozlowski+dt@linaro.org, linux-kernel@vger.kernel.org, peng.fan@nxp.com, robh+dt@kernel.org, shenwei.wang@nxp.com Subject: [PATCH v10 08/12] dmaengine: fsl-edma: move clearing of register interrupt into setup_irq function Date: Fri, 7 Jul 2023 15:00:25 -0400 Message-Id: <20230707190029.476005-9-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230707190029.476005-1-Frank.Li@nxp.com> References: <20230707190029.476005-1-Frank.Li@nxp.com> X-ClientProxiedBy: BYAPR11CA0067.namprd11.prod.outlook.com (2603:10b6:a03:80::44) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|AS8PR04MB8612:EE_ X-MS-Office365-Filtering-Correlation-Id: b2042b6b-dce9-4fff-254d-08db7f1c8763 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qcq7wVuhd8n7f8pXJFOckW5s5kOvdmpVsz9HAbmiwoYVcU9uF9RXp8KRG97dDDzJ5iluNhFDu4nvC2YCCJXzjFYGxa1ob44swGNF+Lua1gquLkBSh5Zs4jeX/3a0Y58CJ37BoWxdZfooxn7rE8sb26kkLl0bZmQ3mOzwLhUNl0T6JEdS4jMV9nVo8AnvsY1YET0iOPYKQdoK/kbeXHJd1HDFpyyci8M7o49BRc2jdXVh7eOMbcEhH9GfAroPYB5+2zy6bnNUh50pUqFQYKSwGyE6+hg75pLTuWrupuk29OMErdwTa3HmVAXlvHeh9fW3qXhk3Okl8BH0RSqJWFMZtLL+wmHbb/7U+YvapE3XyIotX2wxIeNvLUIO/wZ0eK55OtYKB9kpr9xE5eT2N5gOTFlBRLdhhjvIlNWzPFQ5JmPKfsvMm94GM/cmI1uXqsU+fJVdphK8qRqRPMcEP51T1i+2ghUviaXOkyp4zfLJRXtEkvo1NkjLGq2pdOWVQU+cqpiXUY/qse/WFrAfZFheokrXjYibxVviG4+RDWBv2kSFoXBGJaCgXP+jpFQzKzl7oZbHFAft1tzTc5ubSD+WtZ1e+g+PMDrtOUExPcXoh1Vn9C7SDPNdMjVLPiHDPYVC X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB4838.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(376002)(346002)(396003)(366004)(136003)(451199021)(2906002)(5660300002)(2616005)(86362001)(66946007)(8676002)(8936002)(66556008)(6666004)(26005)(1076003)(478600001)(52116002)(186003)(6512007)(38100700002)(38350700002)(83380400001)(4326008)(316002)(66476007)(6506007)(36756003)(6486002)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OBmle4fdfKhLoHj3o4a29v4t/B12mIT+0e0jyoXc++YA17ZDU50SnIzR0ZPnxaSTb4Lk2Usd7FL6d/oHKIWnD6K4okQAbRJ03YECnKXoi3UxZGdaFNyLPlTtfjf9zhtqzwM7PhqLDuNXd7w1DHOY11ZPOuNf2pgC2VNuLHjO95NhUAu3vB0oysx+2HSg1Ruod6sbLs157ebTrol7oA8Ne+QFCG7knTcuL87sMDA+XnazXR7YUjm0BHHiItgVUGmcEfZmHoCTtFwf0Gb/eU+GBzgaXx6AUKUzYKd41eqN3757F+zdvZfvQjcCkXWYdjPJLUA7eVqfVwpk3W4B5LRl1e8HrDYQVNczIOwdckqV9dQlrJzgSA4zhBpDRb31D6hWRad9Ary2WO0h+m0oTYlHDc3mFm168joNrUKOGiaxRKlcU6R2BvSVkB3qHA9gbMHk2k9HfJT8g2Pokhi6aPt7oGhY3VZnMEDzLpJTL5R3IIWI49PfJAkI1HqYXQ5BlhPWCl3q2GfDFnlkS5sG5sPIO9dA0C6jQkd4vG5wScdUU7JLE0CjzGCUgOpv5YkEAfy0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ange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 19:01:11.3076 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: lT5uiU+ABWTME1GXdv3tLWNNH4VxuDiLMWMmmhCTgHAKSSqHUct8VxgeqQ53gOWzEKOOgoodnJ/PD/fepOYryQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8612 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770790142363279623?= X-GMAIL-MSGID: =?utf-8?q?1770790142363279623?= This accommodates differences in the register layout of EDMA v3 by moving the clearing of register interrupts into the platform-specific set_irq function. This should ensure better compatibility with EDMA v3. Signed-off-by: Frank Li --- drivers/dma/fsl-edma-main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index e70cd39bf45e..04c07e9f45ca 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -113,6 +113,8 @@ fsl_edma_irq_init(struct platform_device *pdev, struct fsl_edma_engine *fsl_edma { int ret; + edma_writel(fsl_edma, ~0, fsl_edma->regs.intl); + fsl_edma->txirq = platform_get_irq_byname(pdev, "edma-tx"); if (fsl_edma->txirq < 0) return fsl_edma->txirq; @@ -154,6 +156,8 @@ fsl_edma2_irq_init(struct platform_device *pdev, int i, ret, irq; int count; + edma_writel(fsl_edma, ~0, fsl_edma->regs.intl); + count = platform_irq_count(pdev); dev_dbg(&pdev->dev, "%s Found %d interrupts\r\n", __func__, count); if (count <= 2) { @@ -322,7 +326,6 @@ static int fsl_edma_probe(struct platform_device *pdev) fsl_edma_chan_mux(fsl_chan, 0, false); } - edma_writel(fsl_edma, ~0, regs->intl); ret = fsl_edma->drvdata->setup_irq(pdev, fsl_edma); if (ret) return ret;