From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eugeniy.Paltsev@synopsys.com (Eugeniy Paltsev) Date: Fri, 12 Aug 2016 08:03:14 +0000 Subject: Wrong "nollp" DW DMAC parameter value on ARC SDP. List-ID: Message-ID: <1470988994.21247.33.camel@synopsys.com> To: linux-snps-arc@lists.infradead.org Hi, "nollp" parameter defines if DW DMAC channel supports multi block transfer or not. It is calculated in runtime, but differently depending on on availability of pdata. If pdata is absent "nollp" is calculated using autoconfig hardware registers. Otherwise "nollp" is calculated using the next code construction: channel_writel(dwc, LLP, DWC_LLP_LOC(0xffffffff)); dwc->nollp = DWC_LLP_LOC(channel_readl(dwc, LLP)) == 0; channel_writel(dwc, LLP, 0); I realized that these methods give different results. For example on ARC AXS101 SDP in case of using autoconfig "nollp" was calculated as "true" (and DMAC works fine),? otherwise "nollp" was calculated as "false" (and DMAC doesn't work). So I'm wondering how the code in question really works? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752054AbcHLIDY (ORCPT ); Fri, 12 Aug 2016 04:03:24 -0400 Received: from us01smtprelay-2.synopsys.com ([198.182.60.111]:46622 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751031AbcHLIDU (ORCPT ); Fri, 12 Aug 2016 04:03:20 -0400 From: Eugeniy Paltsev To: "dmaengine@vger.kernel.org" , "andriy.shevchenko@linux.intel.com" CC: "linux-kernel@vger.kernel.org" , "Nelson Pereira" , "viresh.kumar@linaro.org" , "vinod.koul@intel.com" , "linux-snps-arc@lists.infradead.org" Subject: Wrong "nollp" DW DMAC parameter value on ARC SDP. Thread-Topic: Wrong "nollp" DW DMAC parameter value on ARC SDP. Thread-Index: AQHR9G/6s4R1NpyYYUGbb0oI+xybdQ== Date: Fri, 12 Aug 2016 08:03:14 +0000 Message-ID: <1470988994.21247.33.camel@synopsys.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.121.14.112] Content-Type: text/plain; charset="utf-8" Content-ID: MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u7C83SLc015474 Hi, "nollp" parameter defines if DW DMAC channel supports multi block transfer or not. It is calculated in runtime, but differently depending on on availability of pdata. If pdata is absent "nollp" is calculated using autoconfig hardware registers. Otherwise "nollp" is calculated using the next code construction: channel_writel(dwc, LLP, DWC_LLP_LOC(0xffffffff)); dwc->nollp = DWC_LLP_LOC(channel_readl(dwc, LLP)) == 0; channel_writel(dwc, LLP, 0); I realized that these methods give different results. For example on ARC AXS101 SDP in case of using autoconfig "nollp" was calculated as "true" (and DMAC works fine),  otherwise "nollp" was calculated as "false" (and DMAC doesn't work). So I'm wondering how the code in question really works? >>From DW AHB DMAC databook I wasn't able to find anything relevant to this tricky implementation. Could you please clarify a little but what happens here? Maybe we should add "nollp" field in pdata structure and receive it from pdata/device tree (like we use "is_private" or "is_memcpu" fields) --  Paltsev Eugeniy