From patchwork Fri Oct 19 16:46:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Porter X-Patchwork-Id: 1619101 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by patchwork2.kernel.org (Postfix) with ESMTP id C19DDE0196 for ; Fri, 19 Oct 2012 16:45:05 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id q9JGj5EG020974 for ; Fri, 19 Oct 2012 11:45:05 -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 q9JGj5KG021362 for ; Fri, 19 Oct 2012 11:45:05 -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 11:45:04 -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 q9JGj4gv028187 for ; Fri, 19 Oct 2012 11:45:04 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 91E768062C for ; Fri, 19 Oct 2012 11:45:02 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp52.itg.ti.com (dflp52.itg.ti.com [128.247.22.96]) by linux.omap.com (Postfix) with ESMTP id DC0E380626 for ; Fri, 19 Oct 2012 11:44:54 -0500 (CDT) Received: from neches.ext.ti.com (neches.ext.ti.com [192.91.81.29]) by dflp52.itg.ti.com (8.13.7/8.13.8) with ESMTP id q9JGisd5006322 for ; Fri, 19 Oct 2012 11:44:54 -0500 (CDT) Received: from psmtp.com (na3sys009amx194.postini.com [74.125.149.175]) by neches.ext.ti.com (8.13.7/8.13.7) with SMTP id q9JGirxN027038 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 19 Oct 2012 11:44:54 -0500 Received: from mail-ie0-f173.google.com ([209.85.223.173]) (using TLSv1) by na3sys009amx194.postini.com ([74.125.148.10]) with SMTP; Fri, 19 Oct 2012 09:44:54 PDT Received: by mail-ie0-f173.google.com with SMTP id 17so905770iea.4 for ; Fri, 19 Oct 2012 09:44:53 -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=BxWP3qSg4OEB0sNGlwidXGKpYCMTouSM/ceSiCDJVeY=; b=N4ob+PvfBMNj9mMaG9uBWl+zlRh+1upnRrhQn7yhf5/kF2Th7ekD43GzyiOjulEo5D BGRiyGf6HQQ85LPFRssdZVGsgV6ohWb4QM6JzRHAhB3O4xwEi/yFJ1eepfR+H84++RZR C5JVcIcJe8iHtvJIF+jsjt+o2umpYJ++bhvZMLAtpRPbyeO3e1F9wnZohAKbWIdVt+lo 2VLXsXVv+XIVAJUQPRbcPXRwXtECKQFvPB9H5qRc66hhIkhEYRbELdgHHTqrQbl/T5me ZKgIDWIk684y2hm54vl7EZBX/ezekno5a4Cp3U4aVQwmmZK8bR1WkaHDd1GFs4zBdqrs 0sAQ== Received: by 10.50.188.199 with SMTP id gc7mr9359004igc.4.1350665093089; Fri, 19 Oct 2012 09:44:53 -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 s20sm1775492igs.10.2012.10.19.09.44.50 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Oct 2012 09:44:52 -0700 (PDT) Date: Fri, 19 Oct 2012 12:46:15 -0400 From: Matt Porter To: "Bedia, Vaibhav" Subject: Re: [RFC PATCH v3 00/16] DMA Engine support for AM33XX Message-ID: <20121019164615.GH25164@beef> References: <1350566815-409-1-git-send-email-mporter@ti.com> <20121019111558.GD25164@beef> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-pstn-neptune: 0/0/0.00/0 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 , Chris Ball , Russell King , "Cousson, Benoit" , Arnd Bergmann , Linux Documentation List , Tony Lindgren , Devicetree Discuss , Mark Brown , Linux MMC List , Linux Kernel Mailing List , Rob Herring , Grant Likely , Vinod Koul , Rob Landley , Dan Williams , Linux SPI Devel List , Linux OMAP List , 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+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com On Fri, Oct 19, 2012 at 12:02:42PM +0000, Bedia, Vaibhav wrote: > On Fri, Oct 19, 2012 at 16:45:58, Porter, Matt wrote: > > On Fri, Oct 19, 2012 at 10:26:20AM +0000, Bedia, Vaibhav wrote: > [...] > > > > > > 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. ;) > > > > No problem. > > > 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? > > > > That doesn't help :( Ok, so I dumped my Linaro toolchain which was masking this issue that you got unlucky with on EVM, whereas I was lucky. Switching toolchains I was able to reproduce the problem. Pantelis Antoniou suggested some changes and the following fixes this issue for me...verified on both BeagleBone and EVM. Let me know if that works on your end and I'll incorporate some version of it in the next update. > Looking at the original crash log, I suspect something is not correct > with the irq portion, probably in the DT or the driver. > > "genirq: Flags mismatch irq 28. 00000000 (edma) vs. 00000000 (edma)" > > The warning below that is coming due to fail case in edma_probe not tracking > the request_irq status properly and but IMO that's a separate issue. It is a separate issue, indeed. My ideal goal was to avoid changing anything in this existing davinci dma implementation, that's why the error paths were unmodified. Since I'm having to rework a few more things I'll look at those and generate an improved version. Russ Dill also made some good simplification/cleanup suggestions for the of parsing on irc which I'll incorporate in the next version. -Matt diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c index b761b7a..6ed394f 100644 --- a/arch/arm/common/edma.c +++ b/arch/arm/common/edma.c @@ -1598,6 +1598,8 @@ static struct of_dma_filter_info edma_filter_info = { static int __init edma_probe(struct platform_device *pdev) { struct edma_soc_info **info = pdev->dev.platform_data; + struct edma_soc_info *ninfo[EDMA_MAX_CC] = {NULL, NULL}; + struct edma_soc_info tmpinfo; s8 (*queue_priority_mapping)[2]; s8 (*queue_tc_mapping)[2]; int i, j, off, ln, found = 0; @@ -1614,15 +1616,13 @@ static int __init edma_probe(struct platform_device *pdev) char irq_name[10]; struct device_node *node = pdev->dev.of_node; struct device *dev = &pdev->dev; - struct edma_soc_info *pdata; int ret; if (node) { - pdata = devm_kzalloc(dev, - sizeof(struct edma_soc_info), - GFP_KERNEL); - edma_of_parse_dt(dev, node, pdata); - info = &pdata; + info = ninfo; + edma_of_parse_dt(dev, node, &tmpinfo); + info[0] = &tmpinfo; + dma_cap_set(DMA_SLAVE, edma_filter_info.dma_cap); of_dma_controller_register(dev->of_node, of_dma_simple_xlate,