linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Michal Suchanek <hramrach@gmail.com>
Cc: "Mark Brown" <broonie@kernel.org>, "Priit Laes" <plaes@plaes.org>,
	"Chen-Yu Tsai" <wens@csie.org>,
	linux-spi <linux-spi@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Emilio López" <emilio@elopez.com.ar>
Subject: Re: [PATCH 1/2] spi: sun4i: add DMA support
Date: Thu, 17 Mar 2016 08:27:21 +0100	[thread overview]
Message-ID: <20160317072721.GJ30977@lukather> (raw)
In-Reply-To: <CAOMqctQ5aq0A95ErVVF13f_8JBy0xRw9_FZ3avbYmZUGXp=Svg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1937 bytes --]

On Thu, Mar 10, 2016 at 10:01:04AM +0100, Michal Suchanek wrote:
> Hello,
> 
> On 6 March 2016 at 22:42, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > On Fri, Feb 26, 2016 at 01:51:51PM +0100, Michal Suchanek wrote:
> 
> >> Besides this non-technical objection there were multiple technical
> >> objections.
> >>
> >> IIRC one was that the driver does not handle the case when the DMA
> >> channels are not available. As I understand it the channels are
> >> exclusively reserved for a particular peripherial on sunxi platform so
> >> this ShoulNotHappen(tm). So it's probably fine for the driver to fail
> >> probe  when you have broken DT or no DMA engine support for sunxi
> >> platform.
> >
> > There's a quite trivial scenario that would trigger this: if the dma
> > driver or dmaengine is not enabled / loaded.
> 
> There are other trivial scenarios under which the driver will fail
> like loading wrong DT, not compiling or loading the sunxi pinmux
> driver, and whatnot.

I don't see what the pinmux has to do with SPI and DMA, and you're
wrong, the pinmux driver is always compiled in if you enable the sunxi
support.

And you're missing the whole point. DMA accesses are optional, pinmux
and proper machine support are not.

> When you misconfigure your kernel it does not work. So long as the
> driver just fails and does not crash and burn it's normal. Since the
> driver is pretty much useless without DMA as it is now (63 byte
> transfer limit) losing the non-DMA functionality when DMA engine is
> not compiled-in does not seem that terrible.

You're mixing two things up: the fact that we can't do more than the
FIFO length in PIO and that we're missing DMA support. We have patches
to address both, and there's no depedency between the two.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-03-17  7:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26  5:56 [PATCH RESEND 0/2] spi: sun4i: add DMA support Priit Laes
2016-02-26  5:56 ` [PATCH 1/2] " Priit Laes
2016-02-26 12:25   ` Mark Brown
2016-02-26 12:51     ` Michal Suchanek
2016-03-06 21:42       ` Maxime Ripard
2016-03-10  9:01         ` Michal Suchanek
2016-03-17  7:27           ` Maxime Ripard [this message]
2016-03-17 10:58             ` Michal Suchanek
2016-03-17 11:43               ` Mark Brown
2016-03-17 11:54                 ` Michal Suchanek
2016-03-17 11:58                   ` Mark Brown
2016-03-18 20:23                   ` Maxime Ripard
2016-03-18 20:33                     ` Mark Brown
2016-02-26  5:56 ` [PATCH 2/2] ARM: sunxi: spi: add notice about SPI FIFO limit Priit Laes
2016-03-06 18:12   ` Maxime Ripard
2016-02-26 12:15 ` [PATCH RESEND 0/2] spi: sun4i: add DMA support Mark Brown

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=20160317072721.GJ30977@lukather \
    --to=maxime.ripard@free-electrons.com \
    --cc=broonie@kernel.org \
    --cc=emilio@elopez.com.ar \
    --cc=hramrach@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=plaes@plaes.org \
    --cc=wens@csie.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;
as well as URLs for NNTP newsgroup(s).