Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751972AbdI1QRi (ORCPT ); Thu, 28 Sep 2017 12:17:38 -0400 Received: from mga14.intel.com ([192.55.52.115]:37375 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751691AbdI1QRf (ORCPT ); Thu, 28 Sep 2017 12:17:35 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,450,1500966000"; d="scan'208";a="140557590" Date: Thu, 28 Sep 2017 21:51:25 +0530 From: Vinod Koul To: Dmitry Osipenko Cc: Thierry Reding , Jonathan Hunter , Laxman Dewangan , Peter De Schrijver , Prashant Gaikwad , Michael Turquette , Stephen Boyd , Rob Herring , linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 4/5] dmaengine: Add driver for NVIDIA Tegra AHB DMA controller Message-ID: <20170928162125.GE30097@localhost> References: <0a45e058baba72124b91c663ce1d908d275f4044.1506380746.git.digetx@gmail.com> <20170928092949.GB30097@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 923 Lines: 28 On Thu, Sep 28, 2017 at 05:06:03PM +0300, Dmitry Osipenko wrote: > On 28.09.2017 12:29, Vinod Koul wrote: > >> + default: > >> + return -EINVAL; > >> + } > >> + > >> + ahb_seq = burst << TEGRA_AHBDMA_CHANNEL_AHB_BURST_SHIFT; > >> + ahb_seq |= TEGRA_AHBDMA_CHANNEL_ADDR_WRAP; > >> + ahb_seq |= TEGRA_AHBDMA_CHANNEL_INTR_ENB; > >> + > >> + writel_relaxed(ahb_seq, > >> + ahbdma_chan->regs + TEGRA_AHBDMA_CHANNEL_AHB_SEQ); > >> + > >> + writel_relaxed(ahb_addr, > >> + ahbdma_chan->regs + TEGRA_AHBDMA_CHANNEL_AHB_PTR); > > > > oh no, you don't write to HW here. This can be called anytime when you have > > txn running! You should save these and use them in prep_ calls. > > > > BTW, some of the DMA drivers have exactly the same problem. I now see that it is > actually documented explicitly in provider.txt, but that's inconsistent across > the actual drivers. yeah they need to be fixed! -- ~Vinod