Message ID | 1531275016-9809-2-git-send-email-yoshihiro.shimoda.uh@renesas.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show
Return-Path: <dmaengine-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 16D236032C for <patchwork-dmaengine@patchwork.kernel.org>; Wed, 11 Jul 2018 02:11:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 074E526530 for <patchwork-dmaengine@patchwork.kernel.org>; Wed, 11 Jul 2018 02:11:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EBE0C28FD0; Wed, 11 Jul 2018 02:11:29 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 8DB5A26530 for <patchwork-dmaengine@patchwork.kernel.org>; Wed, 11 Jul 2018 02:11:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732296AbeGKCNW (ORCPT <rfc822;patchwork-dmaengine@patchwork.kernel.org>); Tue, 10 Jul 2018 22:13:22 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:35658 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732287AbeGKCNW (ORCPT <rfc822; dmaengine@vger.kernel.org>); Tue, 10 Jul 2018 22:13:22 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie2.idc.renesas.com with ESMTP; 11 Jul 2018 11:11:23 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id 6AB7E5FB39; Wed, 11 Jul 2018 11:11:23 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.51,336,1526310000"; d="scan'208";a="285029637" Received: from mail-ty1jpn01lp0178.outbound.protection.outlook.com (HELO JPN01-TY1-obe.outbound.protection.outlook.com) ([23.103.139.178]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 11 Jul 2018 11:11:23 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=N/IigvsdiPSygSSeAh3T2GEmsC4g/Kvoeiaa4vHsORM=; b=Ez1b2tLx/oQwN5R0KhmW/I1sNPKiBLq+9nzQDzvnAGicYl7i8Bf5eb4esEkrSxurSlkBcZMYOhATcxCIw+kAcaG+gAYZUjxtikVbpFx7QV0nWsT1EP8RVUp+6hTDbwjKHGCLjFrGUyvRp8wpaWlSWVt+zYbFQJSYEmAJ8jUF3dY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.144) by OSBPR01MB2293.jpnprd01.prod.outlook.com (2603:1096:603:26::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.952.17; Wed, 11 Jul 2018 02:11:19 +0000 From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> To: vinod.koul@intel.com Cc: dmaengine@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Subject: [PATCH v2 1/2] dmaengine: sh: rcar-dmac: add a new function to clear CHCR.DE with barrier Date: Wed, 11 Jul 2018 11:10:15 +0900 Message-Id: <1531275016-9809-2-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1531275016-9809-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1531275016-9809-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR01CA0178.jpnprd01.prod.outlook.com (2603:1096:402::30) To OSBPR01MB2293.jpnprd01.prod.outlook.com (2603:1096:603:26::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3327ebcd-3e75-48d8-a807-08d5e6d3973e X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(8559020)(8990107)(48565401081)(2017052603328)(7153060)(7193020); SRVR:OSBPR01MB2293; X-Microsoft-Exchange-Diagnostics: 1; OSBPR01MB2293; 3:/Icm1Ep2II4pEPWZfrA39oiL2OJULKfOPTX9rleTjzqAR7RgE/Mf9M8ouXkOhfI+KnoNPmpkBMSINPiWP3Scd40qPKfWEJ5+/ezZXN0RqnnHZbd41znw8Exd8DoWPgE059sMrTdz7lue80jAxzg+cqcbhA80spRffP6N3sJxDLtxs6wbGcmEvbaoMJTdZI7NhTvPOwrLwjz0bySlPPl99CY/tS9ZgQyBvedSdJLMYxGSkVu2IDahJ/bHUONq1t25; 25:VStFU04rVHpNnIZDL/pccPQw2ngt3SlW0J5WgZPaTuOysSKLkrOv/aqIlMrL2vaLx0Bk3qsqxU+TCcTTGOF6bUnWzHaFqUvSoQXXdtBjNMIEJ4ewt+hh4+UJDIH8/d1b6pAvKhpIn5qaJUjgfxdAVcb3JaBmIy4ySgo56h6HA8NEPUiJHFCDpP1gtO4i0u8/x5XEdqZyFvkD8a5omBFtr5iu/Bd69y8+8bjRJi8O/+lfyCAE9iaMCc8SDZDYMRP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SrHvIvZi4kTRe/H3Dk/LLljHwldzuwdK6HtJB64iP73SMCccmLDE/5eUHk0y+9rNeByjnOo574ZEx2XNOiKx4QPenAqjbYtoa6EQ1r5f4zi8q+vqpDVA== X-Microsoft-Antispam-PRVS: <OSBPR01MB2293B8E07F3D6D5B4DB0A3FCB85A0@OSBPR01MB2293.jpnprd01.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(10201501046)(3231311)(944501410)(52105095)(3002001)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(6072148)(201708071742011)(7699016); SRVR:OSBPR01MB2293; BCL:0; PCL:0; RULEID:; SRVR:OSBPR01MB2293; X-Forefront-PRVS: 0730093765 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(346002)(396003)(136003)(366004)(376002)(39860400002)(199004)(189003)(316002)(105586002)(305945005)(106356001)(2351001)(16586007)(6666003)(486006)(386003)(6506007)(446003)(107886003)(97736004)(476003)(53936002)(956004)(11346002)(2616005)(50226002)(3846002)(6116002)(7736002)(5660300001)(47776003)(66066001)(42882007)(81156014)(81166006)(68736007)(8676002)(48376002)(8936002)(6512007)(2906002)(4326008)(52116002)(16526019)(78352004)(25786009)(36756003)(6486002)(498600001)(2361001)(50466002)(6916009)(76176011)(26005)(51416003)(3720700003); DIR:OUT; SFP:1102; SCL:1; SRVR:OSBPR01MB2293; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:0; MX:0; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; OSBPR01MB2293; 23:AqTDLI7VqBk4dnR2wBZItpIRVpaSrRGCXdwX780hN?=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Rm7DigWERxhOXyk9cIx9Y?= =?us-ascii?Q?pH8wRN+Oa5eVdU1rnlFvyjpMuFgo/QGW6Yn3rik3ogReBIprB2tdK0ROZKbt?= =?us-ascii?Q?LpojvJKdMe5aIqxrD35iluaf5NgoeDWuUIia2tQ4jS0xsYDSQSLvcAgRJrFN?= =?us-ascii?Q?P8EkdxxrOrn624xlF1fuMj4zqUTHm8m2s6o1Ht0CB0LbM8OGJ40JfggR7Nbk?= =?us-ascii?Q?BHeqH9bGixK+GloqlKJp05e9ounPbCK0l8nOkQagD881aUVro9GOmU7yyFQ0?= =?us-ascii?Q?oy0rhW0BJFgtXLKOD79GbCJrHKTyxp05ptt/WvVNPRlai6oF459iIv3Xox/j?= =?us-ascii?Q?4xCiHF7T2xd8If4yxGUJQfBAx3UVldvDr8plKM3?= X-Microsoft-Antispam-Message-Info: d9b2LX2N7Jx8d6Y+nNkRJsYflLlY2Kb6z/vNz8no/gkUul8mfWhHPbg842NZBiRv5F+E5KLPcolwIREk2eMHdc6L31xhl89T2f3jvuRLtVXdTSabNl2gPMho3iDb2BYLaeSco1gvJGovFtOjpTJ7jM/gSpFW+oknE26LJqKhgjq/3gfdEG5YTApjtLbB+sVzkLyOdArCCe2xulRP0QpX6KwEuKIZD81sdqhLp8vfCZoViE7N8PtRLJelfQwFYwM3gH8flL3scuMKvzni6H5KfvSTMDNqTEaOpeARPPvaXc8QmQqq5fH++2627KWxOSOYA/xEAy9ae2jM424uLyoWqeHk+00cObEqSn5Vn+ocjlc= X-Microsoft-Exchange-Diagnostics: 1; OSBPR01MB2293; 6:M9/1gd2rF1mt65dxvqpQ6dSnvPpR/2N+p4x+x8QDKVg1AC3XdWsIYfBjG39kqTDv5/IAflrHE70QZaTr6bCF84qvoT4MZ1eY5vaP9W3ToPAtxrfUJWlLoy2DSeQzcGtN1EIydgba7cfe/6B+Ayphv/wd44oa/L56i+Y34WFlNhZ/0IXJJwFH/g7me4M3pYZ+L8g6wHbIgwbD4w9uMJ3ZuExTiQxfxcii4qlceBjLbLOD1EdGUfSko8ZKf71qbVquXw8g9MgZDW/KRmCd9u8PoGw0EntUOIW9GjZIHSfWcViQP21X1gNY5lyEUJSF5fcxeLI6ElyYEflxvUV40L7KCBQkiphIPr+FrtdAKbuHzba6mms4DevIViTYgCrxDfKvCO3A2+4QAcJtlMXbiaG5oHZ4Wk6g0tys424Yneu8C5sVgWtyWAqQIETwgwQhVMsQGvJrrEibAcfqFGRM9dPCxQ==; 5:/DLRoJdWAuP+EOFRTj4a74loUlVLQl12BvsCwQKGyzWCgswCYEDFZJO9OcB3o8ZrB4FQTTjS7lhoNG8R/qb5l2GCQcfto1Y3VFGStCeLnnBW2Y/7/gvOTTTNteskhkhdKX/tzZkwlLb8i0Dvz9/yr1tDT2OlhTDyoqgslFGc+F0=; 24:VS5LjCnMYoxodWGCpfqYB4iXEkcBO7Ib2O59Q5DzSWMGm/yx9YKi8td0EhJ0cvduJCrdwtHtISrxD9CS9xVysGIQvOUV+Zmp16Zst4XTey8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; OSBPR01MB2293; 7:nGoD87dgJ0m4DUbXxCookKSOTxmmN+n51N8FRFRjXzcQikciYIgb2MqIJhMOkQ+ygUBjjlcNavzRKMDG/B59/zlpz4U6ow+brcQzdxvTXeWw41WJk3JJNChacR8jwROtfX9xeEEkXXcf1NnztOuCSRd6baFhuoQOoOxQ/iiUnj+GBeeH/MJnHAyQ0W8bIanvKvWNdsxr8fGluKcyrXxURyEyv5t0ktwktivAPgc9eWr9Fpty4hxu4XPVYaJEe32S; 20:tSHaDFdBZXjNGUnEaH4/QJCK1MXr/6j3ITKPDGDx1GISl7NOjsBr/spK11e3HZCtQt/gyh+qjqxdPcxYjsgyLSqHh1fHAVhqE7qDMKWGOzBY+SD1SIOqf0VfHpa+We23MXhY1pi9HHFPieiiK9DxRit9woQ/JayWwJ8H1LCvGO4= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2018 02:11:19.1646 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3327ebcd-3e75-48d8-a807-08d5e6d3973e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB2293 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: <dmaengine.vger.kernel.org> X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
On Wed, Jul 11, 2018 at 4:11 AM Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> wrote: > This patch adds a new function rcar_dmac_clear_chcr_de() to simplify > adding pause function later. > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Gr{oetje,eeting}s, Geert
diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c index 9906a9c..d3b7388 100644 --- a/drivers/dma/sh/rcar-dmac.c +++ b/drivers/dma/sh/rcar-dmac.c @@ -759,18 +759,25 @@ static void rcar_dmac_chcr_de_barrier(struct rcar_dmac_chan *chan) dev_err(chan->chan.device->dev, "CHCR DE check error\n"); } -static void rcar_dmac_sync_tcr(struct rcar_dmac_chan *chan) +static void rcar_dmac_clear_chcr_de(struct rcar_dmac_chan *chan) { u32 chcr = rcar_dmac_chan_read(chan, RCAR_DMACHCR); - if (!(chcr & RCAR_DMACHCR_DE)) - return; - /* set DE=0 and flush remaining data */ rcar_dmac_chan_write(chan, RCAR_DMACHCR, (chcr & ~RCAR_DMACHCR_DE)); /* make sure all remaining data was flushed */ rcar_dmac_chcr_de_barrier(chan); +} + +static void rcar_dmac_sync_tcr(struct rcar_dmac_chan *chan) +{ + u32 chcr = rcar_dmac_chan_read(chan, RCAR_DMACHCR); + + if (!(chcr & RCAR_DMACHCR_DE)) + return; + + rcar_dmac_clear_chcr_de(chan); /* back DE if remain data exists */ if (rcar_dmac_chan_read(chan, RCAR_DMATCR))
This patch adds a new function rcar_dmac_clear_chcr_de() to simplify adding pause function later. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> --- drivers/dma/sh/rcar-dmac.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)