From patchwork Fri May 10 10:14:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 10938505 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6F67B933 for ; Fri, 10 May 2019 10:14:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5FEE128C2D for ; Fri, 10 May 2019 10:14:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5346628C47; Fri, 10 May 2019 10:14:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED4E128C2D for ; Fri, 10 May 2019 10:14:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727399AbfEJKOQ (ORCPT ); Fri, 10 May 2019 06:14:16 -0400 Received: from mail-eopbgr20078.outbound.protection.outlook.com ([40.107.2.78]:63908 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727389AbfEJKOP (ORCPT ); Fri, 10 May 2019 06:14:15 -0400 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=SV5H3agBaistDtUEGiaYiRDiYipcCTZf8rCwhHmAFrM=; b=Z0uyff3u5jn6Ihjkwya+ukiAPXHk7anfzlkzwSUWpzTjZAyeZNMi0FMOusgR4KIP2AAXPCcNQetL1hkXytU5h7QzQAIbVfDUUfo1dZX9hSYn8ptnk9jXCrBaSb69dVRdcRZr90VeVXwo5lARykcfd+8Yx/gxXuI5vDs3FkiPcyM= Received: from VI1PR04MB4543.eurprd04.prod.outlook.com (20.177.55.90) by VI1PR04MB3007.eurprd04.prod.outlook.com (10.170.228.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1856.12; Fri, 10 May 2019 10:14:12 +0000 Received: from VI1PR04MB4543.eurprd04.prod.outlook.com ([fe80::d85b:d2:194c:2b94]) by VI1PR04MB4543.eurprd04.prod.outlook.com ([fe80::d85b:d2:194c:2b94%4]) with mapi id 15.20.1878.022; Fri, 10 May 2019 10:14:12 +0000 From: Robin Gong To: "robh@kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "festevam@gmail.com" , "mark.rutland@arm.com" , "vkoul@kernel.org" , "dan.j.williams@intel.com" CC: dl-linux-imx , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "dmaengine@vger.kernel.org" , "devicetree@vger.kernel.org" , "kernel@pengutronix.de" Subject: [PATCH v1 2/6] dmaengine: mcf-edma: update to 'dmamux_nr' Thread-Topic: [PATCH v1 2/6] dmaengine: mcf-edma: update to 'dmamux_nr' Thread-Index: AQHVBxkdDB3d1BKeOU+Q7kmGptbRJA== Date: Fri, 10 May 2019 10:14:12 +0000 Message-ID: <1557512248-8440-3-git-send-email-yibin.gong@nxp.com> References: <1557512248-8440-1-git-send-email-yibin.gong@nxp.com> In-Reply-To: <1557512248-8440-1-git-send-email-yibin.gong@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR01CA0062.apcprd01.prod.exchangelabs.com (2603:1096:203:a6::26) To VI1PR04MB4543.eurprd04.prod.outlook.com (2603:10a6:803:6d::26) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yibin.gong@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 61da59c3-33ea-4d91-a160-08d6d5303fc3 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020);SRVR:VI1PR04MB3007; x-ms-traffictypediagnostic: VI1PR04MB3007: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2201; x-forefront-prvs: 0033AAD26D x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(136003)(39860400002)(396003)(346002)(366004)(199004)(189003)(14454004)(2201001)(110136005)(54906003)(478600001)(2501003)(8936002)(8676002)(81166006)(81156014)(50226002)(316002)(86362001)(66066001)(25786009)(7416002)(53936002)(4326008)(36756003)(7736002)(71200400001)(2616005)(71190400001)(446003)(11346002)(66946007)(14444005)(256004)(486006)(2906002)(186003)(26005)(102836004)(476003)(5660300002)(3846002)(6486002)(6116002)(15650500001)(76176011)(52116002)(6506007)(386003)(68736007)(305945005)(66476007)(66556008)(64756008)(66446008)(73956011)(99286004)(6436002)(6512007);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB3007;H:VI1PR04MB4543.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: M1YtOFvQdX7Jx6r2nNHc40XOC97i+Cd/oQZtjoNn28CMYq6Qmi0CfeSBWv6vB016lkG845uafOEUeP5VxCr8ICfbxE2SoFxgKkvx631rDh7pqnZUYLkd2w3Ii9PgAIBXDzJpul6Ky9ZpQJ6n+VDyQumASBk5mbnxj/zSbJ+y0eHMzhwqliBSari8CnOPI9UakdcVV/0BP2Z9rYa337bceeFJ97el8kBq9SZDrWGjn+IFVWxpJGhx8gQIJt+g+1x62L8inevIDw/wiPeaj/4/zpOf6i0mtvF84aAPPB4ke4aPAxj3EhxDPPYUPQxzUH74MDx6t/uR+kFfj0IgZSI5G+PBlzGIApMhNQSLy0K4DluZ4m3qdLAdkNpQarQwTDuMfAOsZYeSlCjbNYg7M1JiCzkePf1krmJPeQ+ECe6v38g= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 61da59c3-33ea-4d91-a160-08d6d5303fc3 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 May 2019 10:14:12.8748 (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-Transport-CrossTenantHeadersStamped: VI1PR04MB3007 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Update to 'dmamux_nr' instead of static macro DMAMUX_NR since new version edma only has one dmamux. Signed-off-by: Robin Gong --- drivers/dma/fsl-edma-common.c | 2 +- drivers/dma/mcf-edma.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c index 680b2a0..c9a17fc 100644 --- a/drivers/dma/fsl-edma-common.c +++ b/drivers/dma/fsl-edma-common.c @@ -84,7 +84,7 @@ void fsl_edma_chan_mux(struct fsl_edma_chan *fsl_chan, void __iomem *muxaddr; unsigned int chans_per_mux, ch_off; - chans_per_mux = fsl_chan->edma->n_chans / DMAMUX_NR; + chans_per_mux = fsl_chan->edma->n_chans / fsl_chan->edma->dmamux_nr; ch_off = fsl_chan->vchan.chan.chan_id % chans_per_mux; muxaddr = fsl_chan->edma->muxbase[ch / chans_per_mux]; slot = EDMAMUX_CHCFG_SOURCE(slot); diff --git a/drivers/dma/mcf-edma.c b/drivers/dma/mcf-edma.c index 7de54b2f..4484190 100644 --- a/drivers/dma/mcf-edma.c +++ b/drivers/dma/mcf-edma.c @@ -189,6 +189,7 @@ static int mcf_edma_probe(struct platform_device *pdev) /* Set up version for ColdFire edma */ mcf_edma->version = v2; + mcf_edma->dmamux_nr = DMAMUX_NR; mcf_edma->big_endian = 1; if (!mcf_edma->n_chans) {