Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752470AbdLGFj1 (ORCPT ); Thu, 7 Dec 2017 00:39:27 -0500 Received: from mail-sn1nam02on0061.outbound.protection.outlook.com ([104.47.36.61]:2752 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750980AbdLGFjW (ORCPT ); Thu, 7 Dec 2017 00:39:22 -0500 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; From: Kedareswara rao Appana To: , , , , , , CC: , , Subject: [PATCH v2 3/4] dmaengine: zynqmp_dma: Fix issues with overflow interrupt Date: Thu, 7 Dec 2017 10:54:27 +0530 Message-ID: <1512624268-13944-4-git-send-email-appanad@xilinx.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1512624268-13944-1-git-send-email-appanad@xilinx.com> References: <1512624268-13944-1-git-send-email-appanad@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.1.0.1062-23512.006 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(376002)(346002)(39860400002)(2980300002)(438002)(189003)(199004)(106466001)(2201001)(2950100002)(6666003)(33646002)(39060400002)(4326008)(575784001)(316002)(48376002)(9786002)(478600001)(50466002)(305945005)(50226002)(5660300001)(16586007)(2906002)(8936002)(77096006)(36386004)(7696005)(51416003)(106002)(63266004)(36756003)(81166006)(8676002)(81156014)(76176011)(54906003)(356003)(110136005)(47776003)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR02MB3384;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;PTR:unknown-60-83.xilinx.com;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;CY1NAM02FT014;1:crSaaDTjeI8giUnzc95m2m2stucYMuNZFOH5fEuhKkVF3TXwIm9E4Yc60RTJHqw/DS6sdJTExkNUTaRp0cCAdfoGrHPS4NQJn4KTzKEu6BhpfWOONNvun/z4eKLy0xoX MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: df1b6562-f691-40ef-2ab8-08d53d34dcb2 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(5600026)(4604075)(4608076)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603286);SRVR:CY4PR02MB3384; X-Microsoft-Exchange-Diagnostics: 1;CY4PR02MB3384;3:hJ6CK4VR/o8hi4jXqBdOty1UHCncZyIz5axoQpIN6/VSTwuvwbYsLt+Uiefj1Fjnt4TI7h9zrpYsLlzKh//tv+9kdI/DHlPLzUd67YYWMFuMt5BhebatDyaZqotZLUK3ukMNc6laL+xNZzXH+P/8qn9nOkZTO8CGFxHOlDYzD1n8QYJkFl0ihDZURXLvGCkg/cRSB8gKtp0a4YYL/DJ1SeoPUHeR5gNjpLmymCw3Wj2wVrSyxGEWnONJeHzbaShkYf3eRzwUdnqgrqupHsv0wcRjVb91u6l8fc1jRs5rKqZ/RTGvsnw22r+YgB1AcoqiU1TG6rtmUeVoi9QGNf/anyRQzNzc368K2n9vsgr7su0=;25:3d5CwK5uOxoEqOALnSuL79xFZF9BKnEaui58WRY6GqmXLF1ovfv2srhsMuWThE7zzrYPbEkVm1ZS90w89PuOSFmUGWEzLzOXu/+9AdB3QaNbmdjRW6WWRd11dFYzmrwEz9S0pS6T0n8F0YEPSaq6p2cHOx3t6PInOFYbIpddDg/LCUZO7M0u667C1WyIF759qC/OrGe9tJYMCt3GiVB/BTt/rrN8XwGVIoGCJT7V8egJp431tzHpYq6kA50Z0dQUxK73zAGxU5cKhg1hqc3gHQS8c4FQHw6tpLIej9zWfeZSPELCWWfP6pKmajGoK3WRsgD170jG3sn/KyRBcxVQmQ== X-MS-TrafficTypeDiagnostic: CY4PR02MB3384: X-Microsoft-Exchange-Diagnostics: 1;CY4PR02MB3384;31:S/uVF6OoFUl/PF83AFQNIKBvWeNvOS4JOccffx3oad04YjkB1fwwcmeqBhZ0PZ0mHAzICnQ67VyawgjHMeCmddX4i224/Dx7SVG8cZhoN2GnUqNDhZn0Df7tcatb6VyUGSAljp/v+h2d25M2nkPTXcyJmcBWJAhB8IYy+Bho3gdWRc0JyYgeU4NF/+wCi/dAeNoT6BFBp0AeGDBgiH8ENZQamQ0cmVMGA7hQnXwqs7I=;20:A6I+IC6zPYIIc6JA9WFnY25ynJStGYJ5ZadKQT0hnTZo0+kTciIKaIVtKobqIcHvR0yctZUPKXntCVU4oIFsjHyK0I9ZX31dGfcCnBf5lNN75A9QK9EJUGRcqaLaXkDB1XMkb3Erw+AEOHkjomUQTL4X86DplTzMnj4UL8GEu4Yrnrp0YIkxtPqJ9Juax4GtCLZlwc3U5VRRc/LatAbwg89znBuZjjeB83zgjxWje2B8dkceDle7d0yuHVLWMnaSkRMP9Hj5uohG/kLWbmSJahUuPYuxOBodQ6xbRx5VuvO5D71k6kLhNOYBhiM1SocGTtZfYEhcX8m5H5l9WboLMlrxtIcMYF2bQOFQtYlzw6i8xfAqXx0yCgIAb35xrHt9O0zvbvHUKp97OY56eTg7cYMSRMRNetHc3TbiWeLZmFcvaDrL/RXMMFiAXhbCxXXdLjAkFQbI6vf/vEuZuZkaBzfJKgJddMFGxar72HjyorEMReFU0Uv0MiDd4hn0crEy X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(8121501046)(5005006)(93006095)(93004095)(3231022)(10201501046)(3002001)(6055026)(6041248)(20161123564025)(20161123562025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148)(201708071742011);SRVR:CY4PR02MB3384;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:CY4PR02MB3384; X-Microsoft-Exchange-Diagnostics: 1;CY4PR02MB3384;4:d/4P24gENdgTVjTKSFMFs59Cc85XWgoupHHemTfG5Yn5Y8MEyzbeDly50gUayDX3fVAS8ZxYRV/qc1+KIuOimaW4Wfsd4BqzQ6RbqwvYoHdkQmpk+WMss3fNIbEKY1ScfZCozuR5pdsL5x5mJgFVkyCxTHi/waKJ9nmoy8Pcl4x5FFSFyjIFEdKDsAdIBMT9/iBVcXGI+Y8kBdTXnOctleWLeubua4f3ktrJwWGP2gmTEKf0zaPa+1ytgcB4B+t1nVC+a4Efm9lzb2lIezQcRk61u8c5s84e6QF7EUW8Rs2QksSXB8cGich+C/ZE7RzH X-Forefront-PRVS: 05143A8241 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY4PR02MB3384;23:xh18fe4dQxC+E5RwGwxsW6uJS7SsI3Q7pLnSTAGsi?= =?us-ascii?Q?Uutfo+oVBDhTude9eXrEzvGLrWipwOi6McTIBdP/YVzHm2qo66hfb2c+eElz?= =?us-ascii?Q?WWuh9XBELUBvzKHSPTxE6VOqzfD5vMFQtuqa/jI2R5RlLAtVE8Pvx9MQXjZf?= =?us-ascii?Q?Y+7V6CFkllhFzpVhBmqRjs4ltS8IP3jcUxSzpMxihYeyoHNPe3WNGDian8oS?= =?us-ascii?Q?Xgvc/Z2QILAzEc67izX/4l9rFVccsYNFGAVHxs+o3FjVQg4PhmNYXK8701K4?= =?us-ascii?Q?aR0r4awpe5/gvSMKnox43c1GoUlTmIXGgLWxJBMCd7AJTUxm/SuG4c4qENMw?= =?us-ascii?Q?a7XbZ/zSiB/cbnWeyvIBTkgLZ7jmhKJ1VsT25IS23cUQOPR3UOHNTgKgN4SD?= =?us-ascii?Q?cSm6hz1f6W4K0ayukZM1txw65GQnN+IuuUrGJlfQ/Lr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9biCpSgtOhD39afWrpzko1rs4o4H3mfs=;5:Dp7IoBYcl69vwcctz3VJIT0x08Yl4MjfDhlJ2faDf4DleVVGppU1v+8b7mU8jJdRrdIlBX50R6Cvuh07gJVYYNfKkWeC28CWTE3exGVdkAb1lLU5NQNzwcT68z26vungB0xcpcEjuyulcaFftxlsJ+xk34Iwfq+M8wbJC2lDC88=;24:qN4J1bIo8qPbXROvE95y+xwUOeb0tMX73aXk4/KWEyYE6SHQ797/Xoeeg5IW2YGZCYI9biBaJRdobrjAAvfLfcCg29J5+gSIPvZgwDs25fc=;7:xIFuQG49pQgdU7SQS/eazo4OWQtaB2uzicpUaom9GK9Q1MIGrp6pEeZI1HVPT1T+4LJaj6mAzyp/6CN/93TWeq0q+8djBP+X6++OQLMnFTD6TLT/uezBAJ2yKI47t71PNVVlk9Ki0yFDx23jzwo+9XFtOF/sFVuFgtxUq4RCCWPfheulaZb0HrDOC1s6JjhqDNp2iRNz4jGzv5qfh7q9eHwPh3CnCxW38oAYsNHIMAvWuqsu3OY8Fjcw54QZQIgK SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2017 05:39:18.8206 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: df1b6562-f691-40ef-2ab8-08d53d34dcb2 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR02MB3384 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1944 Lines: 54 This patch fixes the below issues. --> Need to clear the channel data count register when overflow interrupts occurs. --> Reduce the log level from _info to _dbg when overflow interrupt occurs. Signed-off-by: Kedareswara rao Appana --- Changes for v2: --> None. drivers/dma/xilinx/zynqmp_dma.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c index b9b5c0a..a297a26 100644 --- a/drivers/dma/xilinx/zynqmp_dma.c +++ b/drivers/dma/xilinx/zynqmp_dma.c @@ -48,6 +48,7 @@ #define ZYNQMP_DMA_SRC_START_MSB 0x15C #define ZYNQMP_DMA_DST_START_LSB 0x160 #define ZYNQMP_DMA_DST_START_MSB 0x164 +#define ZYNQMP_DMA_TOTAL_BYTE 0x188 #define ZYNQMP_DMA_RATE_CTRL 0x18C #define ZYNQMP_DMA_IRQ_SRC_ACCT 0x190 #define ZYNQMP_DMA_IRQ_DST_ACCT 0x194 @@ -513,6 +514,7 @@ static int zynqmp_dma_alloc_chan_resources(struct dma_chan *dchan) static void zynqmp_dma_start(struct zynqmp_dma_chan *chan) { writel(ZYNQMP_DMA_INT_EN_DEFAULT_MASK, chan->regs + ZYNQMP_DMA_IER); + writel(0, chan->regs + ZYNQMP_DMA_TOTAL_BYTE); chan->idle = false; writel(ZYNQMP_DMA_ENABLE, chan->regs + ZYNQMP_DMA_CTRL2); } @@ -524,6 +526,8 @@ static void zynqmp_dma_start(struct zynqmp_dma_chan *chan) */ static void zynqmp_dma_handle_ovfl_int(struct zynqmp_dma_chan *chan, u32 status) { + if (status & ZYNQMP_DMA_BYTE_CNT_OVRFL) + writel(0, chan->regs + ZYNQMP_DMA_TOTAL_BYTE); if (status & ZYNQMP_DMA_IRQ_DST_ACCT_ERR) readl(chan->regs + ZYNQMP_DMA_IRQ_DST_ACCT); if (status & ZYNQMP_DMA_IRQ_SRC_ACCT_ERR) @@ -724,7 +728,7 @@ static irqreturn_t zynqmp_dma_irq_handler(int irq, void *data) if (status & ZYNQMP_DMA_INT_OVRFL) { zynqmp_dma_handle_ovfl_int(chan, status); - dev_info(chan->dev, "Channel %p overflow interrupt\n", chan); + dev_dbg(chan->dev, "Channel %p overflow interrupt\n", chan); ret = IRQ_HANDLED; } -- 2.7.4