From patchwork Mon Jan 13 22:18:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 3481061 Return-Path: X-Original-To: patchwork-dmaengine@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 726299F381 for ; Mon, 13 Jan 2014 22:18:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9015020165 for ; Mon, 13 Jan 2014 22:18:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B594720160 for ; Mon, 13 Jan 2014 22:18:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752287AbaAMWSw (ORCPT ); Mon, 13 Jan 2014 17:18:52 -0500 Received: from mho-02-ewr.mailhop.org ([204.13.248.72]:40582 "EHLO mho-02-ewr.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751762AbaAMWSv (ORCPT ); Mon, 13 Jan 2014 17:18:51 -0500 Received: from [99.127.230.128] (helo=atomide.com) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.72) (envelope-from ) id 1W2pqN-0004sk-2V; Mon, 13 Jan 2014 22:18:51 +0000 X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 99.127.230.128 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19sgYFB48XRwGQJkV4sIr0q Date: Mon, 13 Jan 2014 14:18:30 -0800 From: Tony Lindgren To: Russell King Cc: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, Vinod Koul , Dan Williams Subject: Re: [PATCH RFC 05/26] dmaengine: omap-dma: control start/stop directly Message-ID: <20140113221830.GE7993@atomide.com> References: <20140102150836.GA3826@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 * Russell King [140102 07:14]: > --- a/drivers/dma/omap-dma.c > +++ b/drivers/dma/omap-dma.c > @@ -570,20 +695,27 @@ static int omap_dma_terminate_all(struct omap_chan *c) > > /* > * Stop DMA activity: we assume the callback will not be called > - * after omap_stop_dma() returns (even if it does, it will see > + * after omap_dma_stop() returns (even if it does, it will see > * c->desc is NULL and exit.) > */ > if (c->desc) { > c->desc = NULL; > /* Avoid stopping the dma twice */ > if (!c->paused) > - omap_stop_dma(c->dma_ch); > + omap_dma_stop(c); > } > > if (c->cyclic) { > c->cyclic = false; > c->paused = false; > - omap_dma_unlink_lch(c->dma_ch, c->dma_ch); > + > + if (__dma_omap15xx(od->plat->dma_attr)) { > + uint32_t val; > + > + val = c->plat->dma_read(CCR, c->dma_ch); > + val &= ~(3 << 8); > + c->plat->dma_write(val, CCR, c->dma_ch); > + } > } > > vchan_get_all_descriptors(&c->vc, &head); This won't build for omap1 as od is just d in this function. Something like the following needs to be folded in. Tony 8< ----------------------- --- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/dma/omap-dma.c +++ b/drivers/dma/omap-dma.c @@ -682,16 +682,16 @@ static int omap_dma_slave_config(struct omap_chan *c, struct dma_slave_config *c static int omap_dma_terminate_all(struct omap_chan *c) { - struct omap_dmadev *d = to_omap_dma_dev(c->vc.chan.device); + struct omap_dmadev *od = to_omap_dma_dev(c->vc.chan.device); unsigned long flags; LIST_HEAD(head); spin_lock_irqsave(&c->vc.lock, flags); /* Prevent this channel being scheduled */ - spin_lock(&d->lock); + spin_lock(&od->lock); list_del_init(&c->node); - spin_unlock(&d->lock); + spin_unlock(&od->lock); /* * Stop DMA activity: we assume the callback will not be called