From patchwork Thu Mar 3 06:04:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 8488171 Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 643AB9F314 for ; Thu, 3 Mar 2016 06:04:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 72C3E20268 for ; Thu, 3 Mar 2016 06:04:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7DDB020270 for ; Thu, 3 Mar 2016 06:04:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751149AbcCCGEt (ORCPT ); Thu, 3 Mar 2016 01:04:49 -0500 Received: from relmlor3.renesas.com ([210.160.252.173]:17525 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751004AbcCCGEs (ORCPT ); Thu, 3 Mar 2016 01:04:48 -0500 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie2.idc.renesas.com with ESMTP; 03 Mar 2016 15:04:45 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 34C0E50090; Thu, 3 Mar 2016 15:04:45 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id 381FC1806F; Thu, 3 Mar 2016 15:04:45 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id 3315E1800A; Thu, 3 Mar 2016 15:04:45 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac3.idc.renesas.com with ESMTP id RAH05071; Thu, 3 Mar 2016 15:04:45 +0900 X-IronPort-AV: E=Sophos;i="5.22,531,1449500400"; d="scan'";a="205620055" Received: from mail-sg2apc01lp0239.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.239]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 03 Mar 2016 15:04:43 +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=T18fIh+Voz+gEgj6ebq+kuFIKbneGwxGnyUmdAe0FQg=; b=MWkeiMUUy7/fhVgYqZZbta8wntK+ytyf+Yx+Y01nXommYfF3gmzQZvkiAx43EhiZCpE3MY1bJPD3qty77D0bzdXDQyFIBVWGXn4KtJSGFqZLc09sR7Fx8yWPtgBsbQ+8qP5tXkd49QYfwfle0PlIpM0QbswVx9NE6wt1YphiUZk= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by SIXPR06MB1024.apcprd06.prod.outlook.com (10.160.242.28) with Microsoft SMTP Server (TLS) id 15.1.415.20; Thu, 3 Mar 2016 06:04:40 +0000 Message-ID: <87d1rcayon.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH] dmaengine: rcar-dmac: clear pertinence number of channels User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: , , CC: , , , , , , MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Thu, 3 Mar 2016 06:04:40 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OS1PR01CA0025.jpnprd01.prod.outlook.com (25.161.225.163) To SIXPR06MB1024.apcprd06.prod.outlook.com (25.160.242.28) X-Microsoft-Exchange-Diagnostics: 1; SIXPR06MB1024; 2:PtAOFJcr4J7R/v98hjeA9Mp6uUzFjc7IcX0x9ueJo71WRSQ+uXln/81YnzxWml6QlFrz2DV/wX4bh68PRoMN7AZUhV3NKXkL7jgG51GW1w0AzK8DIrSA8XZBc+MmijWeVVAAGAkYZMCljyEIBeQVzg==; 3:3P82ENgoiLJ7QJiZGYbpjNQZFrgVaFds8C5tyfnAGjG/sb63in0Jt2SBdtz73z1SZnfDcdgb7d36+eR3z4qfo0hu+rAHxRY+w1bWS4tAsJSwsyBxM28vib3bbIu0+hzw; 25:nUo87qRbWxoeKZWMcdIGr9N+O8KXhVivy5ZeOCvN2VTEfhyhVcbSVx9NtNt5izDE5sV2JNY2kLnBJGWpgUbL26urSZWSFigRsXgw0sfV12aF/YyfGB2kJ8hSgEPQduixw8Jy+WzvOxk/rbcnoontBzLociQ9ZrdddRP4Sb7YrFOFrO7cGHir1ipS/LJHCs7O3K0Gukf2i/QroJEK8fEy31fBzPRvwB0JfHEc+jnxS5/XJtfY+Httjps/5vdGBPVDXx5dWNOWhPFiG1ThxZ0dbYFIQedPKnpbNf0eStie/myd/BQUBIo5EncE9psTvZWPgosPNKvIMguobfsVlstEyg== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SIXPR06MB1024; X-MS-Office365-Filtering-Correlation-Id: 6cd5f977-a208-40bb-5bda-08d34329b5f7 X-Microsoft-Exchange-Diagnostics: 1; SIXPR06MB1024; 20:jvWSq1qH+c+5fRCQf5PuOascPtMriHsJktqM+dqxuZ6hzgEnm81t+c5lF3/XLE13tqoSLkCxsEah82nFVOIfgCyUXLYziKWYD4af3MQFLWcqQkTZt3LAUjYomhIIQVHeST5Y/8d69eILIUc7Z/fTPQzfsfrM04X8YmhIwGImH/f5Xmx3PRsQ/o+QcAdvtD/VSQwgYdCt50LzQ4D2Sls0JcpPtsTc5QOggvNGBuC790wXRuqCVJ9hEillTNbDLx2azwtgBOfVu07jdP/RZHl2CxC3mgE/k7D/lTU8clk3rF1R6E+Q7S3UB+BceLqknUj16JwpGECbhWN2uVhIADZUjmXZcNbIDju0L53vP95TuL5Xrtdko2RUbXtLu5KKHQp6gk0QywUq5lNUHizIq/ZY79pAtNTdcMq4kXKtUQ1+TRtDiF9tYJ3Z0Y6tlifi9IyMfYC90kVPoek1JdoX9jBfV1XZaR2gczIIyEufqOenURbDxeA4pEYgrkaOOFK9PaSv; 4:I7MYZDnAM4E23GoshQALDLUkPypOyztCHdB1V63nkoNOrntColixZPvbTa4ETRpKOdMyVPGG/8DbUo92tRyP+oOBd6ifelqD02bnE3bWkADtDB0b77zeJqe9bUSjAQEbLzvayLnmCSHTSsoiU+5Fry/41hwriVgDMHU6Ud+ERNiyzIQ1k9LwlqwloIVrvzzv5yqlGhsL1t+xGiLievejpulCjZTsIH0xSkoLqdb2fixWe95oExKiXNm4a3EgrnR6u5CVPO2Wl9Zs1si7H9qruo6/LfIBSLAKxmZRPH9ctj8wrPGo30dHY1KOCHG3LCMOGHqB7WaP7qZgMrn/yjRpbo54kFG8M47MrYu6zJ5JXs29vpMke+L8/QlEAlA5fkY+ 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:SIXPR06MB1024; BCL:0; PCL:0; RULEID:; SRVR:SIXPR06MB1024; X-Forefront-PRVS: 0870212862 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(92566002)(66066001)(4326007)(47776003)(5004730100002)(4001350100001)(229853001)(42186005)(5001960100004)(19580405001)(5001770100001)(50466002)(1096002)(40100003)(19580395003)(189998001)(23726003)(586003)(83506001)(2906002)(6116002)(3846002)(36756003)(5008740100001)(77096005)(2201001)(86362001)(87976001)(46406003)(53416004)(50986999)(54356999)(33646002)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:SIXPR06MB1024; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SIXPR06MB1024; 23:8Rev2Fg0zCnELdu1qQMgiHQQxO/SAsx80FLTxztdB?= =?us-ascii?Q?bHCfTJBGkDCsp+Ln6zwka1+tPoP2Th0CJGpvxY/P55I2hLtWIEaL58TGyG5z?= =?us-ascii?Q?RJZmoNaON/m9DCIAN/WLr7MrwOjgh1TK8d2W1DISnFlOucZctszqmQwJyDo6?= =?us-ascii?Q?4sZymVSRJ6PBvUq7UC+RYeI6lr5liu+csWpgEArWcBEmuiPOB+Qu6o3L6X5x?= =?us-ascii?Q?hQOQ7NGZS4k5YZ70W/2u3TofpxvJHJMl4HE+zTMYkXtqqE6gQ8wH+uqMcTY+?= =?us-ascii?Q?Ank6eMJH8A2wVbq8COIwW1BojjKsnGzdpNEQcEP2NozbahJ5hq2o3NJ3OZ+v?= =?us-ascii?Q?PI0y1H/T38KOlLHJrmdQmtoOXn9Gzlsqw2GbfZW258Rgb8m1rGgx/DuKWNHd?= =?us-ascii?Q?YxpNQIEpa7Xt5xaTk26wBmW3jupb5wyqGRYk0vatC88P1pT4mkaB9ZtTpor4?= =?us-ascii?Q?jg0Yc4lfyfCJ7ENV1pTKGNd6iUZsLEex9rRBq/jYKyyOVzEs2J57B3RgrSma?= =?us-ascii?Q?qUsb4632LsS8HZOJtyirU1T4WQSnSGQS0L/w2+CA2GFhlnmTHDZd171SL43a?= =?us-ascii?Q?HaycQ4MJbYwSXv/HsqF7bCWFrQxWwpt7ffzXieN6FjOH28nnOd6++uS2X9dL?= =?us-ascii?Q?U+dr7kRBwrPd1IKZoQOuEXz9XKASfEnA8ygGIDQU8pim7XvH8RAgSgQa3lFH?= =?us-ascii?Q?mXxO6NYxqkfhc6t7bFY+a7eEByIiZ2dUHlEuE6qsJ9is2FkpLPXvu+aainEj?= =?us-ascii?Q?e2jG5LqWfRPITWa+Ikz/KurrMbchxqebXFOdOCdrfE+NblVM2OCxMOth2Ex/?= =?us-ascii?Q?fYnUwtFC3LX2SGD+yQxalXyaMlURI8NA6qOPiVjkDXGW2MujSrETWPwzONdT?= =?us-ascii?Q?wgpvzu3fQUsouNygqF88VZw0IS0tp31eDYjxXxA7ccyZnnLUGejqU8q3wMTI?= =?us-ascii?Q?kU5T37bMP1JGGBjaLY8+EE6o2sMWBR2owxJYQuP0zINg8w9w4dQEu40A5Xba?= =?us-ascii?Q?qU=3D?= X-Microsoft-Exchange-Diagnostics: 1; SIXPR06MB1024; 5:arfIhwRLo+MEJ6dtwElOemd/K2JMCcNW15ZNlVR4KNVrqHTRrX+0gmuGaKBb1sh4OGJEkl0mlSME321711KST6Bb9Rsk7SdXWkU1zFXAqqd3QsFRJ2xYFk2w4mByIAiYB7nrkK+RwfB9svjW2Jdgtw==; 24:65wMC5sPsCEzmeLlMdI/HzCGpCLg9sQ+57+08UDjFEcy8BBhKXZVAZeDpHp4l+4XPEPM5wkx2kAYImdxI0hNKoxb2U/a8+Ahy/6xYgmHR44=; 20:FJmytB43+aj94xwVd3NZCS5Qj/9Ue9B6Oqezt7JVg0CemLYUl4FlotqObVOIAuozPE9BTtyNMOMxe0KtlBME9Y4ouA8PMK62Nl3QTzF6mJodVvsDqhkFI2/JV7UHKi2QAJfPinsVjHxsIrdFZvRKW778iAnUCwGfG26DXeARZJk= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2016 06:04:40.1898 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SIXPR06MB1024 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 14ch), it is not good match for Gen3 or Gen2 Audio DMAC. This patch fixes it Signed-off-by: Kuninori Morimoto Acked-by: Geert Uytterhoeven --- 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);