linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Simon Horman <horms@verge.net.au>
Cc: Yoshihiro Kaneko <ykaneko0929@gmail.com>,
	linux-i2c@vger.kernel.org, Magnus Damm <magnus.damm@gmail.com>,
	linux-sh@vger.kernel.org
Subject: Re: [PATCH/RFC] i2c: rcar: Fix order of restart and clear status
Date: Sat, 07 Mar 2015 10:33:49 +0000	[thread overview]
Message-ID: <20150307103349.GA1194@katana> (raw)
In-Reply-To: <20150306220531.GA6572@katana>

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

On Fri, Mar 06, 2015 at 11:05:31PM +0100, Wolfram Sang wrote:
> 
> > I asked Kataoka-san about this and his response was as follows:
> 
> Thanks, Simon!
> 
> > If system(CPU) is busy, the driver can't clear the status register soon
> > after kicking start.
> > 
> > If sequence of first start is as follows, there is a problem.
> > Because H/W starts by 1.
> > But sequence of re-start is as follows, there is no problem.
> > Because H/W starts by 2.
> > 
> >   1. Issue START condition by ESG bit of ICMCR register.
> >                   <--- If there is too much time, H/W finish transmitting
> >                        and set status in status register.
> >   2. Clear interrupt status (ICMSR).
> >   3. Open interrupt mask.
> >   4. Wait interrupt.
> >                   <--- If status is cleared, interrupt does not occur.
> 
> I understand. I'll add this explanation to the patch and apply it soon.

Sorry, another question came up while applying:

How can this interruption happen? The function is called in a
spin_lock_irqsave protected area. Is this an RT_PREEMPT related issue?
Am I missing something?


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

  reply	other threads:[~2015-03-07 10:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-15 14:43 [PATCH/RFC] i2c: rcar: Fix order of restart and clear status Yoshihiro Kaneko
2015-02-23 13:07 ` Wolfram Sang
2015-03-04  4:08   ` Simon Horman
2015-03-06 22:05     ` Wolfram Sang
2015-03-07 10:33       ` Wolfram Sang [this message]
2015-03-27 13:10         ` Wolfram Sang
2015-03-30  0:15           ` Simon Horman
2015-05-18  6:04             ` Simon Horman

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=20150307103349.GA1194@katana \
    --to=wsa@the-dreams.de \
    --cc=horms@verge.net.au \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=ykaneko0929@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).