From patchwork Thu Jan 2 15:10:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King X-Patchwork-Id: 3425331 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3648F9F2E9 for ; Thu, 2 Jan 2014 15:15:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 21B9720145 for ; Thu, 2 Jan 2014 15:15:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 012032013A for ; Thu, 2 Jan 2014 15:15:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751988AbaABPPE (ORCPT ); Thu, 2 Jan 2014 10:15:04 -0500 Received: from gw-1.arm.linux.org.uk ([78.32.30.217]:54168 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751790AbaABPPB (ORCPT ); Thu, 2 Jan 2014 10:15:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=pandora; h=Date:Sender:Message-Id:Subject:Cc:To:From:References:In-Reply-To; bh=+XPiiza8U98x+ygL134wKcMSjuR23cBf3politKA2sI=; b=NNoyA0V4Tk7Mw6CtahWPc7E0rZ5ZXEFX1J/0YuXUIe8AF+gcvaya8tJKoOdJ2t9rwnYDrpN8F2itsfCX0bwKnujKQrDKXUXoHltyPQJEHtRYx1zt6k0n0Of229R8bdg76nPrElc8VO9dBXqO2xqOfpn8CpYwtxnrtQ0w1mI9834=; Received: from [2001:4d48:ad52:3201:222:68ff:fe15:37dd] (port=56294 helo=rmk-PC.arm.linux.org.uk) by pandora.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1Vyjup-0003cY-3d; Thu, 02 Jan 2014 15:10:31 +0000 Received: from rmk by rmk-PC.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1Vyjuo-0005Ea-O5; Thu, 02 Jan 2014 15:10:30 +0000 In-Reply-To: <20140102150836.GA3826@n2100.arm.linux.org.uk> References: <20140102150836.GA3826@n2100.arm.linux.org.uk> From: Russell King To: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Cc: Vinod Koul , Dan Williams Subject: [PATCH RFC 10/26] dmaengine: omap-dma: move CCR buffering disable errata out of the fast path Message-Id: Date: Thu, 02 Jan 2014 15:10:30 +0000 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since we record the CCR register in the dma transaction, we can move the processing of the iframe buffering errata out of the omap_dma_start(). Move it to the preparation functions. Signed-off-by: Russell King --- drivers/dma/omap-dma.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c index 13dca8e0ef32..ba0e10db5185 100644 --- a/drivers/dma/omap-dma.c +++ b/drivers/dma/omap-dma.c @@ -200,8 +200,6 @@ static void omap_dma_start(struct omap_chan *c, struct omap_desc *d) c->plat->dma_write(d->cicr, CICR, c->dma_ch); val = c->plat->dma_read(CCR, c->dma_ch); - if (od->plat->errata & DMA_ERRATA_IFRAME_BUFFERING) - val |= CCR_BUFFERING_DISABLE; val |= CCR_ENABLE; mb(); c->plat->dma_write(val, CCR, c->dma_ch); @@ -558,6 +556,7 @@ static struct dma_async_tx_descriptor *omap_dma_prep_slave_sg( struct dma_chan *chan, struct scatterlist *sgl, unsigned sglen, enum dma_transfer_direction dir, unsigned long tx_flags, void *context) { + struct omap_dmadev *od = to_omap_dma_dev(chan->device); struct omap_chan *c = to_omap_dma_chan(chan); enum dma_slave_buswidth dev_width; struct scatterlist *sgent; @@ -628,6 +627,8 @@ static struct dma_async_tx_descriptor *omap_dma_prep_slave_sg( d->cicr |= CICR_MISALIGNED_ERR_IE | CICR_TRANS_ERR_IE; } + if (od->plat->errata & DMA_ERRATA_IFRAME_BUFFERING) + d->ccr |= CCR_BUFFERING_DISABLE; /* * Build our scatterlist entries: each contains the address, @@ -744,6 +745,8 @@ static struct dma_async_tx_descriptor *omap_dma_prep_dma_cyclic( d->csdp |= CSDP_DST_BURST_64 | CSDP_SRC_BURST_64; } + if (od->plat->errata & DMA_ERRATA_IFRAME_BUFFERING) + d->ccr |= CCR_BUFFERING_DISABLE; c->cyclic = true;