From patchwork Mon Feb 10 15:56:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King X-Patchwork-Id: 3619541 X-Patchwork-Delegate: vinod.koul@intel.com Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2923ABF418 for ; Mon, 10 Feb 2014 15:56:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 508CB200EC for ; Mon, 10 Feb 2014 15:56:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 37F9B201DE for ; Mon, 10 Feb 2014 15:56:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752540AbaBJP4s (ORCPT ); Mon, 10 Feb 2014 10:56:48 -0500 Received: from gw-1.arm.linux.org.uk ([78.32.30.217]:60034 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752111AbaBJP4q (ORCPT ); Mon, 10 Feb 2014 10:56:46 -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=/g8CRFJCruPDpSy7a2LUjS8NC84f/bApXcwEFAmPA74=; b=bkqeKvfU4qruJwAu1W89uleDdDpKKJ335N5IKLg0OMYHDLDDK6D7zF7vuSjnJEt1rMroL1+cfW5BP4s5yX4eMdlkWrZaYBUaGFWW3Cs71Fxls5QnBDHHIun4ca71j4BOyuw6g2P00XbeGeTCyggto/kO+C+iHtPbq0Kh8BWbNMY=; Received: from e0022681537dd.dyn.arm.linux.org.uk ([2001:4d48:ad52:3201:222:68ff:fe15:37dd]:41015 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 1WCtDw-00053c-Py; Mon, 10 Feb 2014 15:56:44 +0000 Received: from rmk by rmk-PC.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1WCtDw-0006Wg-Dr; Mon, 10 Feb 2014 15:56:44 +0000 In-Reply-To: <20140210155531.GB26684@n2100.arm.linux.org.uk> References: <20140210155531.GB26684@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: Dan Williams , Vinod Koul Subject: [PATCH 10/26] dmaengine: omap-dma: move CCR buffering disable errata out of the fast path Message-Id: Date: Mon, 10 Feb 2014 15:56:44 +0000 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-7.4 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 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c index 6cf66e608338..324f4c7c5dd0 100644 --- a/drivers/dma/omap-dma.c +++ b/drivers/dma/omap-dma.c @@ -201,8 +201,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; @@ -636,6 +635,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, @@ -760,6 +761,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;