From patchwork Thu Mar 3 08:25:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 8490081 Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 955F3C0553 for ; Thu, 3 Mar 2016 08:30:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AB523201C7 for ; Thu, 3 Mar 2016 08:30:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B3BAC201BC for ; Thu, 3 Mar 2016 08:30:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756955AbcCCIad (ORCPT ); Thu, 3 Mar 2016 03:30:33 -0500 Received: from relmlor2.renesas.com ([210.160.252.172]:19736 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756748AbcCCIaa (ORCPT ); Thu, 3 Mar 2016 03:30:30 -0500 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie1.idc.renesas.com with ESMTP; 03 Mar 2016 17:30:28 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 2AA7762D85; Thu, 3 Mar 2016 17:30:28 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 169DF8002E; Thu, 3 Mar 2016 17:30:28 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 0C8558002D; Thu, 3 Mar 2016 17:30:28 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac1.idc.renesas.com with ESMTP id TAE00666; Thu, 3 Mar 2016 17:30:28 +0900 X-IronPort-AV: E=Sophos;i="5.22,531,1449500400"; d="scan'";a="206903254" Received: from mail-sg2apc01lp0246.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.246]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 03 Mar 2016 17:30:27 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Ra7d618NVSJ6SvbjwJtejnlPRKtvUovX81YG3ht3IrI=; b=c5NnJhgPrmn154biOAu57+vTJKvkO9mury4VM1v/1nU+gg5HgA03lRrI0X0qb5rrj72pOMIEZW3DPom9yjBwbroqJsHxJ4iQdv5i7Hf/csr2qDQ2lkE4d1AJjBLYrEpTHm7DXIJe+mSs9EDHtdWRydLaRL0EJcDShnuCKqA3hGM= Authentication-Results: linux-m68k.org; dkim=none (message not signed) header.d=none; linux-m68k.org; dmarc=none action=none header.from=renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by SG2PR06MB1017.apcprd06.prod.outlook.com (10.161.9.25) with Microsoft SMTP Server (TLS) id 15.1.415.20; Thu, 3 Mar 2016 08:30:24 +0000 Date: Thu, 3 Mar 2016 17:25:53 +0900 Message-ID: <874mcoarxq.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2] dma: rcar-dmac: clear pertinence number of channels User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Geert Uytterhoeven , Robin Murphy , Vinod Koul , Laurent Pinchart , Linus Walleij , Dan Williams , Arnd Bergmann CC: , "linux-kernel@vger.kernel.org" , In-Reply-To: References: <87d1rcayon.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: KAWPR01CA0046.jpnprd01.prod.outlook.com (25.165.48.156) To SG2PR06MB1017.apcprd06.prod.outlook.com (25.161.9.25) X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1017; 2:lwGKusCRSUcCpxvFdJxgFogsrKnVQWHa+1fucwih9OiPOuktwZbaySo+lg1IzHIT7kTX9wNTNWzlYta9/FJMhxnHpt4bcKXpUoN/eHOiyrsfMQlkSN0cHZm0SJ1kzY9hTN8e8Lfy7kMHklK1A9MpZw==; 3:zv0wSFQKS9evxL2T2050MpOIl9N2zF9JoRPPnJgcxLqI43K3O8UOQaoMSuuVjVrE3ULYuMD3yauTfH/UAPNIJrgWE9sXFKWgmut/K0pStbqByp12Gnelzr2iBfiXIEvD; 25:MxeceG0x33gvjnlLbNV0P21tryo2hY82JqIV9vOX5Sp4ecAsLHYPqR8yVwqCrGViSt2+YJ8qfPjrK4wb9b4OvMi5NhJnmQPjjvITUzEReBEy7GFGRySnddJFbo6ejqmQtVQan4nUVdqQ451AcwYqahlLf8QmPguz04VqF33iQO37NwcV3uvMZz3Uss7icWosqntxtHMgc6r5HSpnMH8R3i7DRy5EO8Iovu8WzUc1kDNmK3ZiUCLV9XEuvCsQHof6PqjiAgu+HQ3hnlOURcpUn0V2UcO08q6RIklvnH6LzCL0e+t/+c9t4fQVl9r9DQTW2w+zkz1mxzmJZ9269vtgeA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SG2PR06MB1017; X-MS-Office365-Filtering-Correlation-Id: 0e427c22-af65-4ee1-3f86-08d3433e11b4 X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1017; 20:08ni5cxCKjIiRsnV4Vn6Woz+7dvC4hHhGduLbnV3/EkCi19p9VUxKwqFAmV3tDB4kh/EjpIqpQKhltuAh/8uWCb/FoKwo8fYRh7rCy1nfgf3YnDTo79oEOTpnKdefV2EL80G0bGr4DhN5inZV+ZvREP1Ll4mBN11L5ky3jSKJMsg3dNAwky5OMg1WKe4lzzy529MnsblN7biZD114RwwaqdPK7+mEtv3hbJ1EojzoL5ggyPxBd0Ykjnjnpgx7/cn0TGccXvyTo1ysxE386GurU4zUSKtRXcwGqurnecE7E2hxIlwBMoJmiGyfvRgpadeEPXgOF8KF5RGnC3d339eqJB9AkgB3/sFIAbIcrI8DYqR7aMVbpzl+fqmOhuWPoXfPQgSqgooLT7KKOXJLsXfpqt3k8MsHEeDv1+7SPOxOmDGc8P1azCOwQCKRd6Eha4Xs/UAjbNQS90GTX3f0Ku1CpdO85DMvqnmTUkEVX4jEFXpPSXdP/xf2yt8WSXKsg8S; 4:Z9+cf1RVOQ4q78RL244rqH5/X45vbS/9Xdvmt685uPl1Pcr+ULUU/dM+qKcpsYkAwBpfVQMUXJ1OMk8sj6EUtP+deEnB/1R5D3GHfF4YkVz3ureC7/klV/xTshZ1bfUZn5fQu61V1sJ7AV33F1LDaSvkbxmDlgOzVvu71HfStVEYNQ43IwglYmgQUoeByVlj0pTUh8s0fB1b+VHNwx0h6aEvQdje9vVr2/LXVXQh76v0ufJase60a/GeTin3oGKMMMg2DF0SiqoS0D6b9v59xoACzf1gZAZVVFOcWVxZYNY5fH1ihfQMqPLlrSVh2iHmaV8PR6mKhHS7vdqIefppUCRRfy2sRAL1zJRFTPyG1qe/5WB72cZZp1UyGBj5n0QM X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:SG2PR06MB1017; BCL:0; PCL:0; RULEID:; SRVR:SG2PR06MB1017; X-Forefront-PRVS: 0870212862 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(86362001)(5004730100002)(2950100001)(46406003)(92566002)(33646002)(229853001)(40100003)(5001960100004)(47776003)(66066001)(42186005)(83506001)(19580405001)(50986999)(36756003)(76176999)(54356999)(4001350100001)(19580395003)(586003)(23726003)(77096005)(1096002)(87976001)(5001770100001)(3846002)(6116002)(50466002)(189998001)(2906002)(5008740100001)(53416004)(4326007)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR06MB1017; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SG2PR06MB1017; 23:NJMUgt/saJEH5oVSHCP0V6V2lxcvZVyCSYGS7XoFa?= =?us-ascii?Q?fOcS98MeO9OKCBooGVKcGJ/xO2gRHYxvAB4Ov5dhf+mJU9xuX/8+IfqhGYQK?= =?us-ascii?Q?Lm1OzzltmGLuHk0sTsHThf4R8c77v5eA5IUZL9bW0P02kNmY4dB0oAcny+Rh?= =?us-ascii?Q?FLjyYWHv8nnpdnOVZz6tJ2LnjG8d+bkrwEi5lSeCyX479mp4xup1e82FYqb4?= =?us-ascii?Q?sGCtRjAN8Va9dlTt69bBPdE7TnzyMbnrL+6000ycCEChnKmqR9GcaKWtGtOj?= =?us-ascii?Q?jWNUrGJRi3ZJXptqAZP3BuIu6SJOT0VszeSWuu000rysFXZa1jTcdHAk7ju9?= =?us-ascii?Q?aKgMLokZQwlnuRYXqxMoI0auRG6ywsrl00uDKPmS9GpvCJX0YvwVbr2MBHmO?= =?us-ascii?Q?z2SHE2WphVPiaDa3iDCKxCBxlPymUr7REiOveP9pzGVBEOapy02Te7EoTtvZ?= =?us-ascii?Q?AEwBYrUH5F6u/xQLUwOxS+jgi/+jCExpt4u9SZGWLbh0AZqvAbMGpleDzd55?= =?us-ascii?Q?87hZEtoFfrPjNpd1936dzl3VzO0JHZRU3aJcYUgp1+XBBRxBfitDvAkGCsdw?= =?us-ascii?Q?/T6jajq3l1ggaEPdo37RPa3qlyBbEuh51f6dKG6aNVsP71meFL2ET8EIrkit?= =?us-ascii?Q?hdF4ozMGxkz/MIc4Pvr5Z2u0WqoPIS7iG39OK/PTowxrPxAPMFAlD1e1Me76?= =?us-ascii?Q?VBKlv4jzbiIoeefl4rpqOKyyJBlU2Y/+/bolb+EoXMnFVVV0y2Xr99BsHvla?= =?us-ascii?Q?CZ4OIkF1BQA6ic19sKV0iWbvXw7z83IR97BS8agwPTC3CO7rXJ6GcSAc/9Ut?= =?us-ascii?Q?eU9dBAu88TkzM5JZfjfsRN+Y8smMvnIfb9qViRvTniG8dgDhlv4zmVioTDOc?= =?us-ascii?Q?TN2oYhpO3qPC3RGm3M2oohz3b/p1JWyZ4wOLO44nIaeJJnHksZaiMuriF7pD?= =?us-ascii?Q?MaMaRjsHL0V0f+YxbAz5gwKCh7ie2g/N3MgWc3KLWlPw1kyCgiJptepgZfED?= =?us-ascii?Q?mWX5s53dquFpPHrzEf8ZPITQeOMCnxTaC3pr2oGVTZH+w=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1017; 5:Fgi8Vhi9k8oiISJ8rQGjDE4fBY/K5oYdJLC3QLrWdkg8AQVDNTh+1D4MS1UoTYmpswSFGNyUvccZrOsjyB/F0gm+q9dvkcU63UFfEQm6ddc1fJioE4apQQHB11awQSPUcNuzXFaZSjPOVWR3Yi06wQ==; 24:O0VyM21ydaSOJdBcZkqOlzcG9UXIZvEOYoDoeEWAP14QmbVNlEbxX4RiMGgbeUSGdzYl+Cbwa5ezPj5XZP9qE02f65/tPASp+g0RnRG9H6M=; 20:8Ope8BT0bMPYeKBUTCQg5KTRDEKNih/cty8KaqFbtFm9RYmFfleydAUu7tKp3/KDaZ4IIa6acVYcX6aE9sPm5wJqNMQleJdO8R/ccpc7a7zUNXVqXsSoUwJ6OZIvO7LCqQ/JYStdS0JGCcTrwNm0nK9Yr9QaEOGwSU/D7Zk8+Wo= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2016 08:30:24.3899 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB1017 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto DMACHCLR clears each channels, but its channel number is based on its SoC or IP. Current driver is using fixed 0x7fff (= for 15ch), it is not good match for Gen3 or Gen2 Audio DMAC. This patch fixes it Signed-off-by: Kuninori Morimoto Acked-by: Geert Uytterhoeven Acked-by: Laurent Pinchart --- v1 -> v2 - 14ch -> 15ch drivers/dma/sh/rcar-dmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c index 57a6dfc9..02b86c6 100644 --- a/drivers/dma/sh/rcar-dmac.c +++ b/drivers/dma/sh/rcar-dmac.c @@ -422,7 +422,7 @@ static int rcar_dmac_init(struct rcar_dmac *dmac) u16 dmaor; /* Clear all channels and enable the DMAC globally. */ - rcar_dmac_write(dmac, RCAR_DMACHCLR, 0x7fff); + rcar_dmac_write(dmac, RCAR_DMACHCLR, GENMASK(dmac->n_channels - 1, 0)); rcar_dmac_write(dmac, RCAR_DMAOR, RCAR_DMAOR_PRI_FIXED | RCAR_DMAOR_DME);