From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030208AbcBZOEr (ORCPT ); Fri, 26 Feb 2016 09:04:47 -0500 Received: from mail-sn1nam02on0085.outbound.protection.outlook.com ([104.47.36.85]:12469 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754003AbcBZOEi (ORCPT ); Fri, 26 Feb 2016 09:04:38 -0500 Authentication-Results: spf=pass (sender IP is 149.199.60.100) 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 v3 3/4] dmaengine: xilinx_vdma: Fix issues with non-parking mode Date: Fri, 26 Feb 2016 19:33:53 +0530 Message-ID: <1456495434-11722-3-git-send-email-appanad@xilinx.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1456495434-11722-1-git-send-email-appanad@xilinx.com> References: <1456495434-11722-1-git-send-email-appanad@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22156.006 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.100;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(47776003)(5003940100001)(4001450100002)(63266004)(50986999)(76176999)(1096002)(1220700001)(92566002)(86362001)(45336002)(42186005)(586003)(46386002)(5001960100002)(50226001)(19580405001)(19580395003)(189998001)(90966002)(5008740100001)(2201001)(33646002)(106466001)(4326007)(50466002)(6806005)(5001770100001)(11100500001)(36756003)(48376002)(229853001)(2906002)(52956003)(87936001)(103686003)(2950100001)(107986001)(2101003);DIR:OUT;SFP:1101;SCL:1;SRVR:BL2NAM02HT211;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;MLV:sfv;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 5eaf4585-3248-44af-ab2b-08d33eb5c2ac X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(8251501002);SRVR:BL2NAM02HT211; X-Microsoft-Antispam-PRVS: <26fec48cc6bd406f9d4afe0f04bc45fc@BL2NAM02HT211.eop-nam02.prod.protection.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(13023025)(5005006)(13018025)(13017025)(13015025)(13024025)(8121501046)(10201501046)(3002001);SRVR:BL2NAM02HT211;BCL:0;PCL:0;RULEID:;SRVR:BL2NAM02HT211; X-Forefront-PRVS: 0864A36BBF X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Feb 2016 14:04:36.3596 (UTC) 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.100];Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2NAM02HT211 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fixes issues with the Non-parking mode(Cirular mode). With the existing driver in cirular mode if we submit frames less than h/w configured we simply end-up having misconfigured vdma h/w. This patch fixes this issue by configuring the frame count register. Signed-off-by: Kedareswara rao Appana --- Changes for v3: ---> None. Changes for v2: ---> splitted the changes into multiple patches. drivers/dma/xilinx/xilinx_vdma.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/dma/xilinx/xilinx_vdma.c b/drivers/dma/xilinx/xilinx_vdma.c index ce330d4..70b2b32 100644 --- a/drivers/dma/xilinx/xilinx_vdma.c +++ b/drivers/dma/xilinx/xilinx_vdma.c @@ -646,6 +646,10 @@ static void xilinx_vdma_start_transfer(struct xilinx_vdma_chan *chan) else reg &= ~XILINX_VDMA_DMACR_FRAMECNT_EN; + /* Configure channel to allow number frame buffers */ + vdma_ctrl_write(chan, XILINX_VDMA_REG_FRMSTORE, + chan->desc_pendingcount); + /* * With SG, start with circular mode, so that BDs can be fetched. * In direct register mode, if not parking, enable circular mode -- 2.1.2 From mboxrd@z Thu Jan 1 00:00:00 1970 From: appana.durga.rao@xilinx.com (Kedareswara rao Appana) Date: Fri, 26 Feb 2016 19:33:53 +0530 Subject: [PATCH v3 3/4] dmaengine: xilinx_vdma: Fix issues with non-parking mode In-Reply-To: <1456495434-11722-1-git-send-email-appanad@xilinx.com> References: <1456495434-11722-1-git-send-email-appanad@xilinx.com> Message-ID: <1456495434-11722-3-git-send-email-appanad@xilinx.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org This patch fixes issues with the Non-parking mode(Cirular mode). With the existing driver in cirular mode if we submit frames less than h/w configured we simply end-up having misconfigured vdma h/w. This patch fixes this issue by configuring the frame count register. Signed-off-by: Kedareswara rao Appana --- Changes for v3: ---> None. Changes for v2: ---> splitted the changes into multiple patches. drivers/dma/xilinx/xilinx_vdma.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/dma/xilinx/xilinx_vdma.c b/drivers/dma/xilinx/xilinx_vdma.c index ce330d4..70b2b32 100644 --- a/drivers/dma/xilinx/xilinx_vdma.c +++ b/drivers/dma/xilinx/xilinx_vdma.c @@ -646,6 +646,10 @@ static void xilinx_vdma_start_transfer(struct xilinx_vdma_chan *chan) else reg &= ~XILINX_VDMA_DMACR_FRAMECNT_EN; + /* Configure channel to allow number frame buffers */ + vdma_ctrl_write(chan, XILINX_VDMA_REG_FRMSTORE, + chan->desc_pendingcount); + /* * With SG, start with circular mode, so that BDs can be fetched. * In direct register mode, if not parking, enable circular mode -- 2.1.2