From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Russell King - ARM Linux <linux@armlinux.org.uk>,
Aaro Koskinen <aaro.koskinen@iki.fi>
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>
Subject: Re: [PATCH] dmaengine: ti: omap-dma: Configure LCH_TYPE for OMAP1
Date: Fri, 23 Nov 2018 13:54:12 +0200 [thread overview]
Message-ID: <cca7279a-2f93-ee43-0f1a-8f04d2e7b694@ti.com> (raw)
In-Reply-To: <20181123002549.GO6920@n2100.armlinux.org.uk>
On 23/11/2018 2.25, Russell King - ARM Linux wrote:
> On Fri, Nov 23, 2018 at 12:24:26AM +0200, Aaro Koskinen wrote:
>> Hi,
>>
>> On Thu, Nov 22, 2018 at 03:12:36PM +0000, Russell King - ARM Linux wrote:
>>> On Thu, Nov 22, 2018 at 10:29:48AM +0000, Russell King - ARM Linux wrote:
>>>> On Tue, Nov 20, 2018 at 11:04:06PM +0200, Aaro Koskinen wrote:
>>>>> 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.
>>>>
>>>> A solution to that would be to do what the warning message says, and
>>>> update the driver to the DMAengine API.
>>
>> Fully agreed, but I was busy debugging other more serious issues, and
>> just wanted to get a reliable ssh or USB serial access to the device
>> without any extra noise, so switching to PIO using a module parameter
>> is probably what most users do in such situations.
>>
>>> Here's a partial conversion (not even build tested) - it only supports
>>> OUT transfers with dmaengine at the moment.
>>
>> Thanks, I'll take a closer look and try to do some testing hopefully
>> during the weekend.
>
> The patch was more for Peter to take a peek at - there's definitely
> some bits missing in the dmaengine driver (like the write to the
> LCH_CTRL register) that would need to be fixed somehow.
>
> However, it's worth noting that there is exactly one user of
> omap_set_dma_channel_mode(), which is omap-udc, which means any DMA
> channel made use of by omap-udc will have the LCH_CTRL register
> modified to LCH_P, and it will remain that way even if someone else
> subsequently makes use of the same channel. That's rather suspicious
> to me... maybe we can just initialise all LCH_CTRL registers to LCH_P
> in the dmaengine driver in that case! If not, then there's a bug
> right there.
Hrm, right. memcpy will break if we take a channel which was used by
omap_udc at some point as LCH_P is not capable of dealing with it.
With this patch it should be fine as we configure the LCH_CTRL to P or
2D depending on the transfer type (slave vs non-slave).
But, we might just set the lch to 2D regardless as it works for slave
and memcpy channels fine.
>
- Péter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
next prev parent reply other threads:[~2018-11-23 11:53 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-19 10:40 Peter Ujfalusi
2018-11-19 18:46 ` Aaro Koskinen
2018-11-20 7:28 ` Peter Ujfalusi
2018-11-20 21:04 ` Aaro Koskinen
2018-11-22 8:31 ` Peter Ujfalusi
2018-11-22 22:01 ` Aaro Koskinen
2018-11-23 11:45 ` Peter Ujfalusi
2018-11-24 0:17 ` Aaro Koskinen
2018-11-24 17:48 ` Russell King - ARM Linux
2018-11-24 19:06 ` Aaro Koskinen
2018-11-24 19:29 ` Russell King - ARM Linux
2018-11-22 10:29 ` Russell King - ARM Linux
2018-11-22 15:12 ` Russell King - ARM Linux
2018-11-22 22:24 ` Aaro Koskinen
2018-11-23 0:25 ` Russell King - ARM Linux
2018-11-23 1:23 ` Aaro Koskinen
2018-11-23 11:54 ` Peter Ujfalusi [this message]
2018-11-23 12:35 ` Peter Ujfalusi
2018-11-23 15:43 ` Russell King - ARM Linux
2018-11-23 16:16 ` Russell King - ARM Linux
2018-11-23 23:27 ` Russell King - ARM Linux
2018-11-23 18:52 ` Aaro Koskinen
2018-11-24 20:09 ` Russell King - ARM Linux
2018-11-25 1:07 ` Tony Lindgren
2018-11-25 1:11 ` Tony Lindgren
2018-11-25 11:11 ` Russell King - ARM Linux
2018-11-25 11:57 ` Russell King - ARM Linux
2018-11-25 16:58 ` Aaro Koskinen
2018-11-25 17:14 ` Tony Lindgren
2018-12-17 23:47 ` Aaro Koskinen
2018-12-18 15:55 ` Tony Lindgren
2018-12-17 19:16 ` Aaro Koskinen
2018-12-18 10:11 ` Peter Ujfalusi
2018-11-23 11:49 ` Peter Ujfalusi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cca7279a-2f93-ee43-0f1a-8f04d2e7b694@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=aaro.koskinen@iki.fi \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=tony@atomide.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®