Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3191037imu; Fri, 23 Nov 2018 23:44:17 -0800 (PST) X-Google-Smtp-Source: AFSGD/V4hblxwFYkICY9LFtQSZRudBaLlbROtKY9TPbPff0Y2NpBgkamx4eHi3BaGTE3eNvmRAcM X-Received: by 2002:a63:d547:: with SMTP id v7mr16789031pgi.339.1543045457710; Fri, 23 Nov 2018 23:44:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543045457; cv=none; d=google.com; s=arc-20160816; b=ntt2eFvYG4JOqTxSu4BlUKZdVjI7YMAbRK0pTBYpYx6bOQ/vzvmbaxJVcUqK1UMKF5 pARlmXzE8TpbUV9Z3hPrj448Rw1tUk6tYcpIyQKb4tzcV04Us9SRd2HQ8mHzej8rUSKG 3USYGbdxI9TgPzIbWUn00zN7GSigOrMIteVfkGmMjObNAmqxKpgntxZTykDj+fR8JyaU 3wdCxtTH9SAIJw57uPP3+G4m9GyKKz/flZYAKWhmHY8yueuTGpy0NK9lcmT4SxbqmWxk JGhWQS+drTAU1jByCHt8bOoSRdUmtUWssYqqTh09EX4MU/M7XWbNs21R/4NyJxtQ5tqC Gjpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=yAnTTqaB4h00K0Ar8xQ5bZX/IHx82Pd9xEFTDpGhUX4=; b=TeFFf5SgmMnc4MzRfIMiAJ/+zCQ/dFpJmuVtE/n+oxpaOL65WAdk5MzCp/HZstLNf9 8nwww5IZ+zRv8HjadyCyATrS06bGvwV0C6qNEYOmxx9I4Y3KC6WKPbEBriF6ogUZXY/3 eqiTIjpcmgCEdV0Up6OP0suU2T3eC1DaXVC8XyC0khf0VbexEieaB56Zyd9lDw4aU/Jd zYpD5Rhr5XJAfxn1+89Pw+WFYeWU7B8xyaBkBVTFDS7YTH9WIArAHe164Jjyrz4RwF/6 Zls8Il5Ej/AFm1mHUi0KYePcqBH9OjEvk7iQSGiDuisjz9GdztIGmLyonQb98A8zPSOo nn4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4si8572363pgg.492.2018.11.23.23.44.03; Fri, 23 Nov 2018 23:44:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407755AbeKWImj (ORCPT + 99 others); Fri, 23 Nov 2018 03:42:39 -0500 Received: from emh04.mail.saunalahti.fi ([62.142.5.110]:49120 "EHLO emh04.mail.saunalahti.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730054AbeKWImi (ORCPT ); Fri, 23 Nov 2018 03:42:38 -0500 Received: from darkstar.musicnaut.iki.fi (85-76-84-147-nat.elisa-mobile.fi [85.76.84.147]) by emh04.mail.saunalahti.fi (Postfix) with ESMTP id 22D7E300CF; Fri, 23 Nov 2018 00:01:15 +0200 (EET) Date: Fri, 23 Nov 2018 00:01:14 +0200 From: Aaro Koskinen To: Peter Ujfalusi Cc: vkoul@kernel.org, dan.j.williams@intel.com, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, tony@atomide.com, linux-omap@vger.kernel.org, rmk+kernel@armlinux.org.uk, Felipe Balbi Subject: Re: [PATCH] dmaengine: ti: omap-dma: Configure LCH_TYPE for OMAP1 Message-ID: <20181122220114.GB11423@darkstar.musicnaut.iki.fi> References: <20181119104040.12885-1-peter.ujfalusi@ti.com> <20181119184649.GE16897@darkstar.musicnaut.iki.fi> <6af8c6e7-bf5c-5555-161b-5d3fb7ecae43@ti.com> <20181120210406.GB24888@darkstar.musicnaut.iki.fi> <4eb3b03e-0a97-6195-f162-e03e32705fe0@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4eb3b03e-0a97-6195-f162-e03e32705fe0@ti.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Nov 22, 2018 at 10:31:31AM +0200, Peter Ujfalusi wrote: > On 20/11/2018 23.04, Aaro Koskinen wrote: > > On Tue, Nov 20, 2018 at 09:28:37AM +0200, Peter Ujfalusi wrote: > >> On 19/11/2018 20.46, Aaro Koskinen wrote: > >>> On Mon, Nov 19, 2018 at 12:40:40PM +0200, Peter Ujfalusi wrote: > >>>> When the channel is configured for slave operation the LCH_TYPE needs to be > >>>> set to LCh-P. For memcpy channels the LCH_TYPE must be set to LCh-2D. > >>>> > >>>> Signed-off-by: Peter Ujfalusi > >>> > >>> I don't have the documentation, but based on what omap_udc driver (still > >>> using the legacy OMAP DMA API) does this seems to be correct. > >> > >> They are hard to fine, true. From the omap1710 TRM: > >> > >> Logical channel types (LCh types) supported are: > >> - LCh-2D for nonsynchronized transfers (memory transfers, 1D and 2D) > >> - LCh-P for synchronized transfers (mostly peripheral transfers) > >> - LCh-PD similar to LCh-P but runs on a dedicated physical channel > >> - LCh-G for graphical transfers/operations > >> - LCh-D for display transfers > > > > (I found a public document "OMAP5912 Multimedia Processor Direct > > Memory Access (DMA) Support Reference Guide", documenting these; easy > > to confuse with "OMAP5910 Dual-Core Processor System DMA Controller > > Reference Guide".) > > > >> Looking at other part it looks like hat LCH-2D channel mode can happily > >> service a peripheral. LCH-P supports the same features as LCH-2D, but it > >> lacks support for Single/Double-indexed addressing mode on the > >> peripheral port side. > >> > >> So, this patch might not be needed at all. Can you test the omap_udc > >> with s/OMAP_DMA_LCH_P/OMAP_DMA_LCH_2D > >> > >> If USB works, then we can just drop this patch. > > > > Unfortunately omap_udc does not seem to work at all anymore with DMA on > > my 770 setup. :-( > > > > I had switched to PIO mode in 2015 since the WARNs about legacy DMA > > API were too annoying and flooding the console. And now that I tried > > using DMA again with g_ether, it doesn't work anymore. The device get's > > recognized on host side, but no traffic goes through. Switching back to > > PIO makes it to work again. > > After some tinkering I got omap_udc working with DMA (not DMAengine, > yet) on 770 - using nfsroot. Configuring the channels to OMAP_DMA_LCH_2D > works as expected. Would be interesting to know how you got it working with DMA. Which gadget driver were you using? I bisected my issue, and got: commit 387f869d2579e379ee343f5493dcd360be60f5c6 (refs/bisect/bad) Author: Felipe Balbi Date: Wed Mar 22 13:25:18 2017 +0200 usb: gadget: u_ether: conditionally align transfer size With that reverted, the DMA works OK (and I can also now confirm that OMAP_DMA_LCH_2D works). I haven't yet checked if we actually need that quirk in OMAP UDC, or if this is related to RMK's findings of potential bugs in the driver. Anyway, there is clearly yet another regression. A.