All of lore.kernel.org
 help / color / mirror / Atom feed
From: emilio@elopez.com.ar (Emilio López)
To: linux-arm-kernel@lists.infradead.org
Subject: [linux-sunxi] [PATCH] dma: sun4i: expose block size and wait cycle configuration to DMA users
Date: Mon, 7 Mar 2016 14:15:07 -0300	[thread overview]
Message-ID: <56DDB71B.5050801@elopez.com.ar> (raw)
In-Reply-To: <20160307164702.59f5d9d1@bbrezillon>

Hi,

El 07/03/16 a las 12:47, Boris Brezillon escribi?:
(...)
>> Does SPI refer the Serial Peripheral Interface?
>>
>> If yes, then I would point out that current sun4i SPI driver doesn't
>> actually use DMA [1]
>>
>> http://lists.infradead.org/pipermail/linux-arm-kernel/2016-February/411
>> 722.html
> 
> I just moved this assignment and the associated comment in the driver,
> so maybe we should ask Emilio why he thinks SPI config should be the
> default one, and how he tested it...

When I was working on the dmaengine driver, I needed a way to test
mem<->dev and mem<->mem transfers. I used dmatest.ko for the latter, and
SPI was a good fit for the former as I had a logic analyzer. That's why
there's patches to support DMA on it (but, as Priit pointed out, are not
in mainline yet).

At first SPI was acting weird when using DMA, but the problems went away
when configuring the timings with these magic values you see on the
driver today. These timings turned out to also work for audio, so there
was no need for a mechanism to configure them.

And that's basically the story behind SUN4I_DDMA_MAGIC_SPI_PARAMETERS :)

Cheers,
Emilio

WARNING: multiple messages have this Message-ID (diff)
From: "Emilio López" <emilio@elopez.com.ar>
To: Boris Brezillon <boris.brezillon@free-electrons.com>,
	Priit Laes <plaes@plaes.org>
Cc: Vinod Koul <vinod.koul@intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	dmaengine@vger.kernel.org,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	Chen-Yu Tsai <wens@csie.org>,
	linux-sunxi@googlegroups.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [linux-sunxi] [PATCH] dma: sun4i: expose block size and wait cycle configuration to DMA users
Date: Mon, 7 Mar 2016 14:15:07 -0300	[thread overview]
Message-ID: <56DDB71B.5050801@elopez.com.ar> (raw)
In-Reply-To: <20160307164702.59f5d9d1@bbrezillon>

Hi,

El 07/03/16 a las 12:47, Boris Brezillon escribió:
(...)
>> Does SPI refer the Serial Peripheral Interface?
>>
>> If yes, then I would point out that current sun4i SPI driver doesn't
>> actually use DMA [1]
>>
>> http://lists.infradead.org/pipermail/linux-arm-kernel/2016-February/411
>> 722.html
> 
> I just moved this assignment and the associated comment in the driver,
> so maybe we should ask Emilio why he thinks SPI config should be the
> default one, and how he tested it...

When I was working on the dmaengine driver, I needed a way to test
mem<->dev and mem<->mem transfers. I used dmatest.ko for the latter, and
SPI was a good fit for the former as I had a logic analyzer. That's why
there's patches to support DMA on it (but, as Priit pointed out, are not
in mainline yet).

At first SPI was acting weird when using DMA, but the problems went away
when configuring the timings with these magic values you see on the
driver today. These timings turned out to also work for audio, so there
was no need for a mechanism to configure them.

And that's basically the story behind SUN4I_DDMA_MAGIC_SPI_PARAMETERS :)

Cheers,
Emilio

  reply	other threads:[~2016-03-07 17:15 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-07  9:59 [PATCH] dma: sun4i: expose block size and wait cycle configuration to DMA users Boris Brezillon
2016-03-07  9:59 ` Boris Brezillon
2016-03-07 14:54 ` Vinod Koul
2016-03-07 14:54   ` Vinod Koul
2016-03-07 15:08   ` Boris Brezillon
2016-03-07 15:08     ` Boris Brezillon
2016-03-07 20:30     ` Maxime Ripard
2016-03-07 20:30       ` Maxime Ripard
2016-03-08  2:55       ` Vinod Koul
2016-03-08  2:55         ` Vinod Koul
2016-03-08  2:59         ` Vinod Koul
2016-03-08  2:59           ` Vinod Koul
2016-03-08  7:51         ` Maxime Ripard
2016-03-08  7:51           ` Maxime Ripard
2016-03-08  8:42           ` [linux-sunxi] " Hans de Goede
2016-03-08  8:42             ` Hans de Goede
2016-03-08 10:05             ` Vinod Koul
2016-03-08 10:05               ` Vinod Koul
2016-03-09 10:58               ` Maxime Ripard
2016-03-09 10:58                 ` Maxime Ripard
2016-03-08  8:46           ` Boris Brezillon
2016-03-08  8:46             ` Boris Brezillon
2016-03-08  9:10             ` [linux-sunxi] " Priit Laes
2016-03-08  9:10               ` Priit Laes
2016-03-08 10:04             ` Vinod Koul
2016-03-08 10:04               ` Vinod Koul
2016-03-09 10:08             ` [linux-sunxi] " LABBE Corentin
2016-03-09 10:08               ` LABBE Corentin
2016-03-08  9:59           ` Vinod Koul
2016-03-08  9:59             ` Vinod Koul
2016-03-09 10:14         ` Boris Brezillon
2016-03-09 10:14           ` Boris Brezillon
2016-03-11  6:24           ` Vinod Koul
2016-03-11  6:24             ` Vinod Koul
2016-03-11  9:40             ` Boris Brezillon
2016-03-11  9:40               ` Boris Brezillon
2016-03-11 10:06               ` Vinod Koul
2016-03-11 10:06                 ` Vinod Koul
2016-03-11 10:26                 ` Boris Brezillon
2016-03-11 10:26                   ` Boris Brezillon
2016-03-11 11:21                   ` Vinod Koul
2016-03-11 11:21                     ` Vinod Koul
2016-03-09 11:06         ` Boris Brezillon
2016-03-09 11:06           ` Boris Brezillon
2016-03-11  6:26           ` Vinod Koul
2016-03-11  6:26             ` Vinod Koul
2016-03-11  9:45             ` Boris Brezillon
2016-03-11  9:45               ` Boris Brezillon
2016-03-11 10:09               ` Vinod Koul
2016-03-11 10:09                 ` Vinod Koul
2016-03-11 10:55                 ` Maxime Ripard
2016-03-11 10:55                   ` Maxime Ripard
2016-03-11 11:18                   ` Vinod Koul
2016-03-11 11:18                     ` Vinod Koul
2016-03-14 11:46                     ` Maxime Ripard
2016-03-14 11:46                       ` Maxime Ripard
2016-03-16  3:22                       ` Vinod Koul
2016-03-16  3:22                         ` Vinod Koul
2016-03-07 15:30 ` [linux-sunxi] " Priit Laes
2016-03-07 15:30   ` Priit Laes
2016-03-07 15:47   ` Boris Brezillon
2016-03-07 15:47     ` Boris Brezillon
2016-03-07 17:15     ` Emilio López [this message]
2016-03-07 17:15       ` Emilio López

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=56DDB71B.5050801@elopez.com.ar \
    --to=emilio@elopez.com.ar \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.