mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Rob Landley <rob@landley.net>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Christoph Hellwig <hch@lst.de>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	Rich Felker <dalias@libc.org>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Linux IOMMU <iommu@lists.linux-foundation.org>,
	Jacopo Mondi <jacopo+renesas@jmondi.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux-sh list <linux-sh@vger.kernel.org>
Subject: Re: use the generic dma-noncoherent code for sh V2
Date: Mon, 30 Jul 2018 11:24:52 +0200	[thread overview]
Message-ID: <CAMuHMdXkaoypaszdyXyVA-qZvDtbcEdtdbEwpdoT8ocx-2TPYA@mail.gmail.com> (raw)
In-Reply-To: <18df6608-61c1-963d-bb1a-d46320232f40@landley.net>

Hi Rob,

CC Guennadi

On Fri, Jul 27, 2018 at 6:21 PM Rob Landley <rob@landley.net> wrote:
> On 07/24/2018 03:21 PM, Christoph Hellwig wrote:
> > On Tue, Jul 24, 2018 at 02:01:42PM +0200, Christoph Hellwig wrote:
> >> can you review these patches to switch sh to use the generic
> >> dma-noncoherent code?  All the requirements are in mainline already
> >> and we've switched various architectures over to it already.
> >
> > Ok, there is one more issue with this version.   Wait for a new one
> > tomorrow.
>
> Speaking of DMA:
>
> I'm trying to wire up DMAEngine to an sh7760 board that uses platform data (and
> fix the smc91x.c driver to use DMAEngine without #ifdef arm), so I've been
> reading through all that stuff, but the docs seem kinda... thin?
>
> Is there something I should have read other than
> Documentation/driver-model/platform.txt,
> Documentation/dmaegine/{provider,client}.txt, then trying to picking through the
> source code and the sh7760 hardware pdf? (And watching the youtube video of
> Laurent Pinchart's 2014 ELC talk on DMA, Maxime Ripard's 2015 ELC overview of
> DMAEngine, the Xilinx video on DMAEngine...)
>
> At first I thought the SH_DMAE could initialize itself, but the probe function
> needs platform data, and although arch/sh/kernel/cpu/sh4a/setup-sh7722.c looks
> _kind_ of like a model I can crib from:
>
> A) "make ARCH=sh se7722_defconfig" results in a config with SH_DMA disabled??!?
> (This is why I use miniconfig instead of defconfig format, I'm assuming that's
> bit rot?)
>
> B) That platform data is supplying sh_dmae_slave_config preallocating slave
> channels to devices? (Does it have to? The docs gave me the impression the
> driver would dynamically request them and devices could even share. Wasn't that
> sort of the point of DMAEngine? Can my new board data _not_ do that? What's the
> minimum amount of micromanaging I have to do?)
>
> C) It's full of stuff like setting ts_low_shift to CHCR_TS_LOW_SHIFT where both
> grepping Docuemntation and Google "dmaengine ts_low_shift" are unhelpful.
>
> What I'd really like is a "hello world" version of DMAEngine somewhere I can
> build and run on a supported qemu target, to set up _one_ channel with a block
> device or something using it. I can't tell what's optional, or what the minimal
> version of this looks like.

I have no experience with DMA on SH, only with DMA on (DT-based) Renesas
ARM SoCs. But I believe the DMA engines are somewhat similar.

I don't know if all pieces to support DMA were ever upstreamed.
See e.g. commit 219fb0c1436e4893 ("serial: sh-sci: Remove the platform data
dma slave rx/tx channel IDs").

Perhaps Guennadi knows/remembers?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  parent reply	other threads:[~2018-07-30  9:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 12:01 Christoph Hellwig
2018-07-24 12:01 ` [PATCH 1/5] sh: simplify get_arch_dma_ops Christoph Hellwig
2018-07-24 12:01 ` [PATCH 2/5] sh: introduce a sh_cacheop_vaddr helper Christoph Hellwig
2018-07-24 12:01 ` [PATCH 3/5] sh: use dma_direct_ops for the CONFIG_DMA_COHERENT case Christoph Hellwig
2018-07-24 12:01 ` [PATCH 4/5] sh: split arch/sh/mm/consistent.c Christoph Hellwig
2018-07-24 12:01 ` [PATCH 5/5] sh: use generic dma_noncoherent_ops Christoph Hellwig
2018-07-24 20:21 ` use the generic dma-noncoherent code for sh V2 Christoph Hellwig
2018-07-27 16:20   ` Rob Landley
2018-07-30  9:06     ` Christoph Hellwig
2018-07-31 13:25       ` Arnd Bergmann
2018-07-30  9:24     ` Geert Uytterhoeven [this message]
2018-07-31 12:56     ` Arnd Bergmann
2018-08-17 17:04       ` dmaengine for sh7760 (was Re: use the generic dma-noncoherent code for sh V2) Rob Landley
2018-08-17 20:23         ` Arnd Bergmann
2018-08-19  5:38           ` Rob Landley
2018-08-20 12:33             ` Arnd Bergmann

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=CAMuHMdXkaoypaszdyXyVA-qZvDtbcEdtdbEwpdoT8ocx-2TPYA@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=dalias@libc.org \
    --cc=g.liakhovetski@gmx.de \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jacopo+renesas@jmondi.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=rob@landley.net \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=ysato@users.sourceforge.jp \
    /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®