From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux Subject: Re: [PATCH 05/12] mmc: omap_hsmmc: add DMA engine support Date: Fri, 27 Apr 2012 20:03:32 +0100 Message-ID: <20120427190332.GG28062@n2100.arm.linux.org.uk> References: <20120423160409.GE24299@n2100.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-omap-owner@vger.kernel.org To: Linus Walleij Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-mmc@vger.kernel.org, Chris Ball List-Id: linux-mmc@vger.kernel.org On Fri, Apr 27, 2012 at 09:00:22PM +0200, Linus Walleij wrote: > On Mon, Apr 23, 2012 at 6:05 PM, Russell King > wrote: >=20 > > Add DMA engine support to the OMAP HSMMC driver. =A0This supplement= s the > > private DMA API implementation contained within this driver, and th= e > > driver can be switched at build time between using DMA engine and t= he > > private DMA API. > > > > Signed-off-by: Russell King >=20 > Great, >=20 > > +#if 1 > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 sig =3D host->dma_line_rx; > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 host->rx_chan =3D dma_request_channel= (mask, omap_dma_filter_fn, &sig); > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (!host->rx_chan) { > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 dev_warn(mmc_dev(host= ->mmc), "unable to obtain RX DMA engine channel %u\n", sig); > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > > +#endif > > +#if 1 > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 sig =3D host->dma_line_tx; > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 host->tx_chan =3D dma_request_channel= (mask, omap_dma_filter_fn, &sig); > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (!host->tx_chan) { > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 dev_warn(mmc_dev(host= ->mmc), "unable to obtain TX DMA engine channel %u\n", sig); > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > > +#endif >=20 > Are these development artifacts? Read the commit message. ;) They're there (and removed by the next patch) so that the driver can be easily switched between DMA engine and the private DMA API. Simply change the relevant #if to zero at build time. I don't think it warrants config symbols or trying to do it via module params as its just a stepping stone through the process. -- To unsubscribe from this list: send the line "unsubscribe linux-omap" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: linux@arm.linux.org.uk (Russell King - ARM Linux) Date: Fri, 27 Apr 2012 20:03:32 +0100 Subject: [PATCH 05/12] mmc: omap_hsmmc: add DMA engine support In-Reply-To: References: <20120423160409.GE24299@n2100.arm.linux.org.uk> Message-ID: <20120427190332.GG28062@n2100.arm.linux.org.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, Apr 27, 2012 at 09:00:22PM +0200, Linus Walleij wrote: > On Mon, Apr 23, 2012 at 6:05 PM, Russell King > wrote: > > > Add DMA engine support to the OMAP HSMMC driver. ?This supplements the > > private DMA API implementation contained within this driver, and the > > driver can be switched at build time between using DMA engine and the > > private DMA API. > > > > Signed-off-by: Russell King > > Great, > > > +#if 1 > > + ? ? ? ? ? ? ? sig = host->dma_line_rx; > > + ? ? ? ? ? ? ? host->rx_chan = dma_request_channel(mask, omap_dma_filter_fn, &sig); > > + ? ? ? ? ? ? ? if (!host->rx_chan) { > > + ? ? ? ? ? ? ? ? ? ? ? dev_warn(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel %u\n", sig); > > + ? ? ? ? ? ? ? } > > +#endif > > +#if 1 > > + ? ? ? ? ? ? ? sig = host->dma_line_tx; > > + ? ? ? ? ? ? ? host->tx_chan = dma_request_channel(mask, omap_dma_filter_fn, &sig); > > + ? ? ? ? ? ? ? if (!host->tx_chan) { > > + ? ? ? ? ? ? ? ? ? ? ? dev_warn(mmc_dev(host->mmc), "unable to obtain TX DMA engine channel %u\n", sig); > > + ? ? ? ? ? ? ? } > > +#endif > > Are these development artifacts? Read the commit message. ;) They're there (and removed by the next patch) so that the driver can be easily switched between DMA engine and the private DMA API. Simply change the relevant #if to zero at build time. I don't think it warrants config symbols or trying to do it via module params as its just a stepping stone through the process.