From patchwork Fri Oct 19 11:15:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Porter X-Patchwork-Id: 1618031 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by patchwork2.kernel.org (Postfix) with ESMTP id 26B14DF2AB for ; Fri, 19 Oct 2012 11:17:39 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id q9JBEhj0011289; Fri, 19 Oct 2012 06:14:43 -0500 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q9JBEhWt017417; Fri, 19 Oct 2012 06:14:43 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Fri, 19 Oct 2012 06:14:42 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id q9JBEgpH004247; Fri, 19 Oct 2012 06:14:42 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 9A9C780627; Fri, 19 Oct 2012 06:14:42 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp51.itg.ti.com (dflp51.itg.ti.com [128.247.22.94]) by linux.omap.com (Postfix) with ESMTP id C315B80626 for ; Fri, 19 Oct 2012 06:14:39 -0500 (CDT) Received: from medina.ext.ti.com (medina.ext.ti.com [192.91.81.31]) by dflp51.itg.ti.com (8.13.7/8.13.8) with ESMTP id q9JBEdbO002218 for ; Fri, 19 Oct 2012 06:14:39 -0500 (CDT) Received: from psmtp.com (na3sys009amx161.postini.com [74.125.149.87]) by medina.ext.ti.com (8.13.7/8.13.7) with SMTP id q9JBEbhU032030 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 19 Oct 2012 06:14:38 -0500 Received: from mail-ie0-f173.google.com ([209.85.223.173]) (using TLSv1) by na3sys009amx161.postini.com ([74.125.148.10]) with SMTP; Fri, 19 Oct 2012 07:14:38 EDT Received: by mail-ie0-f173.google.com with SMTP id 17so418592iea.4 for ; Fri, 19 Oct 2012 04:14:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=rPwLTFO+gHt5g3EnlkhZZVGFAGvcTp0YuaXDhSpQbZE=; b=cS5R+G3mFHa7sCmpvU3tla10BZu86KMlGdYPw+lEWv6wND/tkex6IGBQQr80NWNIOR +vqrf0464oBREntdcUbjn8K5q1D24lkW0r73JJphDodeB+zXgWpAJiJLlgOqz+pydAJC ILYPa6NIx1Xl2e+0UhJcxEBU6KWPGU09BV4gxxwQN2St3pQOWIbXyUjOJcIC3zf0/NMz 5eJTGGMVMyK7tVfvtfiqMok/QLkuRBybMkq2KIRHNd/0w6V8NGYsoOU8biXphc9LIjP+ Y6J+tiGvxygfSCgceMYF+7ZIEgEX59i9WakxxRJ8ipWJt6D5vcCTdEklhq4CyvjEmmKA c8IA== Received: by 10.50.217.167 with SMTP id oz7mr7805668igc.3.1350645277000; Fri, 19 Oct 2012 04:14:37 -0700 (PDT) Received: from beef (cpe-24-166-64-7.neo.res.rr.com. [24.166.64.7]) by mx.google.com with ESMTPS id u4sm1166337igw.6.2012.10.19.04.14.34 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Oct 2012 04:14:35 -0700 (PDT) Date: Fri, 19 Oct 2012 07:15:58 -0400 From: Matt Porter To: "Bedia, Vaibhav" Subject: Re: [RFC PATCH v3 00/16] DMA Engine support for AM33XX Message-ID: <20121019111558.GD25164@beef> References: <1350566815-409-1-git-send-email-mporter@ti.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-pstn-levels: (S:99.90000/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-dkim: 1 skipped:not-enabled X-pstn-settings: 2 (0.5000:0.0050) s cv GT3 gt2 gt1 r p m c X-pstn-addresses: from [82/3] CC: Linux DaVinci Kernel List , Linux OMAP List , Russell King , "Cousson, Benoit" , Arnd Bergmann , Linux Documentation List , Tony Lindgren , Linux MMC List , Devicetree Discuss , Mark Brown , Linux Kernel Mailing List , Rob Herring , Grant Likely , Vinod Koul , Rob Landley , Dan Williams , Linux SPI Devel List , Chris Ball , Linux ARM Kernel List X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com On Fri, Oct 19, 2012 at 10:26:20AM +0000, Bedia, Vaibhav wrote: > Hi Matt, > > On Thu, Oct 18, 2012 at 18:56:39, Porter, Matt wrote: > > Changes since v2: > > - Rebased on 3.7-rc1 > > - Fixed bug in DT/pdata parsing first found by Gururaja > > that turned out to be masked by some toolchains > > - Dropped unused mach-omap2/devices.c hsmmc patch > > - Added AM33XX crossbar DMA event mux support > > - Added am335x-evm support > > > > Changes since v1: > > - Rebased on top of mainline from 12250d8 > > - Dropped the feature removal schedule patch > > - Implemented dma_request_slave_channel_compat() and > > converted the mmc and spi drivers to use it > > - Dropped unneeded #address-cells and #size-cells from > > EDMA DT support > > - Moved private EDMA header to linux/platform_data/ and > > removed some unneeded definitions > > - Fixed parsing of optional properties > > > > TODO: > > - Add dmaengine support for per-channel caps so the > > hack to set the maximum segments can be replaced with > > a query to the dmaengine driver > > > > This series adds DMA Engine support for AM33xx, which uses > > an EDMA DMAC. The EDMA DMAC has been previously supported by only > > a private API implementation (much like the situation with OMAP > > DMA) found on the DaVinci family of SoCs. > > > > The series applies on top of 3.7-rc1 and the following patches: > > > > - GPMC fails to reserve memory fix: > > http://www.spinics.net/lists/linux-omap/msg79675.html > > - TPS65910 regulator fix: > > https://patchwork.kernel.org/patch/1593651/ > > - dmaengine DT support from Vinod's dmaengine_dt branch in > > git://git.infradead.org/users/vkoul/slave-dma.git since > > 027478851791df751176398be02a3b1c5f6aa824 > > > > The approach taken is similar to how OMAP DMA is being converted to > > DMA Engine support. With the functional EDMA private API already > > existing in mach-davinci/dma.c, we first move that to an ARM common > > area so it can be shared. Adding DT and runtime PM support to the > > private EDMA API implementation allows it to run on AM33xx. AM33xx > > *only* boots using DT so we leverage Jon's generic DT DMA helpers to > > register EDMA DMAC with the of_dma framework and then add support > > for calling the dma_request_slave_channel() API to both the mmc > > and spi drivers. > > > > With this series both BeagleBone and the AM335x EVM have working > > MMC and SPI support. > > > > This is tested on BeagleBone with a SPI framebuffer driver and MMC > > rootfs. A trivial gpio DMA event misc driver was used to test the > > crossbar DMA event support. It is also tested on the AM335x EVM > > with the onboard SPI flash and MMC rootfs. The branch at > > https://github.com/ohporter/linux/tree/edma-dmaengine-v3 has the > > complete series, dependencies, and some test drivers/defconfigs. > > > > I didn't see all the patches that you posted on edma-dmaengine-v3 > but I do seem them on edma-dmaengine-am33xx-v3 branch. I see I referenced the wrong branch in the cover letter. Thanks for testing and noticing this. Sorry to make you hunt for the correct branch in that repo. ;) https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-v3 is indeed the correct branch for those wanting to pull this in or grab some of the not-to-be-merged drivers I used for testing. > I added a couple of patches to enable earlyprintk and build the DTB > appended kernel image uImage-dtb.am335x-evm > > Here's what i see > > [...] > [ 0.175354] edma: probe of 49000000.edma failed with error -16 I missed an uninitialized pdata case in the bug fixes mentioned in the changelog and the folks previously failing the same way didn't hit the case I suspect you are hitting. Can you try this and let me know how it works? Thanks, Matt diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c index b761b7a..b43b327 100644 --- a/arch/arm/common/edma.c +++ b/arch/arm/common/edma.c @@ -1619,7 +1619,7 @@ static int __init edma_probe(struct platform_device *pdev) if (node) { pdata = devm_kzalloc(dev, - sizeof(struct edma_soc_info), + EDMA_MAX_CC*sizeof(struct edma_soc_info), GFP_KERNEL); edma_of_parse_dt(dev, node, pdata); info = &pdata;