linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: linux-i2c@vger.kernel.org
Cc: linux-sh@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>,
	Magnus Damm <magnus.damm@gmail.com>,
	Simon Horman <horms@verge.net.au>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [RFC 0/3] i2c: sh_mobile: add DMA support
Date: Fri, 31 Oct 2014 10:51:15 +0000	[thread overview]
Message-ID: <1414752678-26078-1-git-send-email-wsa@the-dreams.de> (raw)

Here is my RFC to support DMA with the i2c-sh_mobile core. DMA works nicely
with my tests so far and we save 1 interrupt per transferred byte, yay! DMA is
opt-in, so if setting it up fails, we will fall back to PIO. The threshold for
selecting DMA is still under test, but probably good enough already. The major
issue currently: This driver uses subsys_initcall() but at that time DMA is not
available, and there is no deferred probe for DMA. So, switching to
module_init() makes DMA work, but this may cause side-effects for older boards
which rely on I2C being available early (to control some PMIC, for example).
This needs some more investigation. Also, the driver (like all I2C DMA drivers
currently) assumes that i2c message buffers are DMA capable. This is not always
true and might need some assistance from the I2C core.

Other than that, please test, review, comment. The series is based on
renesas-devel-20141030-v3.18-rc2 with Laurent's series "[PATCH v4 0/5] R-Car
Gen2 DMA Controller driver" on top of it. A git tree can be found here:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/i2c-shmobile-dma-experimental

Thanks,

    Wolfram


Wolfram Sang (3):
  i2c: sh_mobile: add DMA support
  ARM: shmobile: r8a7790: add DMA nodes for IIC
  ARM: shmobile: r8a7791: add DMA nodes for IIC

 .../devicetree/bindings/i2c/i2c-sh_mobile.txt      |   5 +
 arch/arm/boot/dts/r8a7790.dtsi                     |   8 +
 arch/arm/boot/dts/r8a7791.dtsi                     |   6 +
 drivers/i2c/busses/i2c-sh_mobile.c                 | 203 +++++++++++++++++++--
 4 files changed, 203 insertions(+), 19 deletions(-)

-- 
2.0.0


             reply	other threads:[~2014-10-31 10:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31 10:51 Wolfram Sang [this message]
2014-10-31 10:51 ` [RFC 1/3] i2c: sh_mobile: add DMA support Wolfram Sang
2014-11-02 22:04   ` Laurent Pinchart
2014-11-03  7:47     ` Wolfram Sang
2014-11-03  8:58   ` Geert Uytterhoeven
     [not found]     ` <CAMuHMdX1-ANQQhZkfKG67-TSKEUO6sFeiUMkkA323Ww4Cw9JrA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-04 10:19       ` Wolfram Sang
     [not found] ` <1414752678-26078-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2014-10-31 10:51   ` [RFC 2/3] ARM: shmobile: r8a7790: add DMA nodes for IIC Wolfram Sang
     [not found]     ` <1414752678-26078-3-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2014-11-02 21:47       ` Laurent Pinchart
2014-11-03  9:04     ` Geert Uytterhoeven
2014-10-31 10:51 ` [RFC 3/3] ARM: shmobile: r8a7791: " Wolfram Sang
2014-11-02 21:47   ` Laurent Pinchart
     [not found]   ` <1414752678-26078-4-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2014-11-03  9:04     ` Geert Uytterhoeven
2014-11-02 21:14 ` [RFC 0/3] i2c: sh_mobile: add DMA support Laurent Pinchart
2014-11-02 21:53   ` Wolfram Sang

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=1414752678-26078-1-git-send-email-wsa@the-dreams.de \
    --to=wsa@the-dreams.de \
    --cc=geert@linux-m68k.org \
    --cc=horms@verge.net.au \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    /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).