All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Linux I2C <linux-i2c@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Subject: Re: [PATCH 1/1] i2c: rcar: handle RXDMA HW behaviour on Gen3
Date: Fri, 29 Jun 2018 09:54:04 +0200	[thread overview]
Message-ID: <20180629075404.ivnaauv2hdir32ig@ninjato> (raw)
In-Reply-To: <CAMuHMdWEce9+Se0b0pH2Uvma68ozSXxiPGUu__XFFX=yBtmKjw@mail.gmail.com>

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


> > +       /* Gen3 needs a reset before allowing RXDMA once */
> > +       if (priv->devtype == I2C_RCAR_GEN3) {
> 
> So on R-Car Gen3 the device is always reset, even if no reads will be done?
> Or is that something you cannot check for at this point?

You got a point. I copied the behaviour from the BSP to do this as early
as possible. Still, it might be worthwhile to merge this into
rcar_i2c_request_dma() and move the call to it to the front. Will check.

> > +       if (priv->devtype == I2C_RCAR_GEN3) {
> > +               priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
> > +               if (!IS_ERR(priv->rstc)) {
> > +                       ret = reset_control_status(priv->rstc);
> 
> Why this call and check? To check if .status() is implemented (it always is
> on R-Car Gen3, if CONFIG_RESET_CONTROLLER is enabled), and to avoid the
> timeout in rcar_i2c_do_reset() on every transfer?

Yes. We can save all the hazzle if it is not implemented. And I didn't
want to implicitly assume that it will be implemented anywhere forever.
That could be a very subtle bug later.

Thanks,

   Wolfram


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-06-29  7:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-28 20:45 [PATCH 0/1] i2c: rcar: handle RXDMA HW behaviour on Gen3 Wolfram Sang
2018-06-28 20:45 ` [PATCH 1/1] " Wolfram Sang
2018-06-29  7:18   ` Geert Uytterhoeven
2018-06-29  7:54     ` Wolfram Sang [this message]
2018-07-23 17:50       ` Wolfram Sang
2018-07-23 17:55   ` Wolfram Sang
2018-07-24 13:00     ` 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=20180629075404.ivnaauv2hdir32ig@ninjato \
    --to=wsa@the-dreams.de \
    --cc=geert@linux-m68k.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=yoshihiro.shimoda.uh@renesas.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 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.