From: Carlos Chinea <carlos.chinea@nokia.com>
To: balbi@ti.com
Cc: ext Sjur BRENDELAND <sjur.brandeland@stericsson.com>,
"sjurbren@gmail.com" <sjurbren@gmail.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCHv5 1/7] HSI: hsi: Introducing HSI framework
Date: Fri, 22 Jul 2011 16:02:09 +0300 [thread overview]
Message-ID: <1311339729.32639.99.camel@groo> (raw)
In-Reply-To: <20110722120553.GZ32058@legolas.emea.dhcp.ti.com>
On Fri, 2011-07-22 at 15:05 +0300, ext Felipe Balbi wrote:
> Hi,
>
> On Fri, Jul 22, 2011 at 02:51:12PM +0300, Carlos Chinea wrote:
> > Hi Felipe,
>
> hello there :-)
>
> > > are you already using pm_runtime ? You could put that logic grouped in
> > > runtime_suspend()/runtime_resume() calls and from the driver, just call
> > > pm_runtime_put()/pm_runtime_get_sync() whenever you want to
> > > suspend/resume.
> >
> > In the case of the omap_ssi driver not yet, but hopefully the
> > implementation will come soon ;) Anyway, the DATA/FLAG workaround is not
> > something I'm going to add to the omap_ssi, at least not now. This seems
> > to be needed by ST-Ericcson in their HSI controller.
>
> aha, I see. Thanks for the clarification.
>
> > > true, but I'm not sure a usecount is a good way to go. Why don't you
> > > just remove the sync API altogether and use only async, then the OMAP
> > > HSI controller driver is supposed to know when it can go to sleep. If
> > > you receive some data before a client queues a request, you just defer
> > > processing of that data until a new request is queued, or something...
> >
> > Hmmm, Do you mean I remove the hsi_start_tx() and hsi_stop_tx()
> > completely ? Or Do I just create an async version of them ?
>
> I would say remove completely and add async-only version.
>
> > The truth is that they should not even exist in the first place, and the
> > wakelines should have been handled silently by the hsi controllers.
> > But they are need because the hsi_clients/protocols, like CAIF or the
> > ssi_protocol in N900, need access to the wakelines to implement some
> > workarounds due to some races in the HSI/SSI HW spec.
>
> that's quite nasty situation :-)
>
> I still think, though, that if the clients don't really start a transfer
> straight away (meaning it's all ASYNC), you might be able to handle the
> workarounds in the HSI framework itself by having some extra flags on
> your hsi request structure (?).
>
> See for example the use of short_not_ok flags on the gadget framework.
> The gadget drivers which can't handle short transfers (as of today only
> the Mass Storage gadget) will set that flag to tell the controller that
> we're not expecting a short packet and if we do, treat it as error. In
> case of such error, gadget driver is required to dequeue any queued
> transfer, flush the FIFO and restart ;-)
>
> Maybe you could have something similar ? Depending on the workaround
> you're talking about, this might be feasible with few lines of code on
> the async API.
>
The problem is that there is no standard way to handle this situation :(
For example ssi_protocol tries to deal with the wakelines race problem
by raising the wakeline and then waiting for the other end to send a
"READY to receive" data frame, before start sending. But as you can see
in the case of CAIF, they went for a solution where they raise their
wakeline and wait for the other end to raise its wakeline to signal that
they are "READY to received". Both solutions have their pros and cons.
Br,
--
Carlos Chinea <carlos.chinea@nokia.com>
next prev parent reply other threads:[~2011-07-22 13:07 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-10 13:38 [RFC PATCHv5 0/7] HSI framework and drivers Carlos Chinea
2011-06-10 13:38 ` [RFC PATCHv5 1/7] HSI: hsi: Introducing HSI framework Carlos Chinea
2011-06-10 13:38 ` [RFC PATCHv5 2/7] HSI: omap_ssi: Introducing OMAP SSI driver Carlos Chinea
2011-06-13 13:21 ` Tony Lindgren
2011-06-14 12:09 ` Carlos Chinea
2011-06-13 20:21 ` Kevin Hilman
2011-06-14 12:12 ` Carlos Chinea
2011-06-15 15:37 ` Kevin Hilman
2011-06-10 13:38 ` [RFC PATCHv5 3/7] HSI: omap_ssi: Add OMAP SSI to the kernel configuration Carlos Chinea
2011-06-10 13:38 ` [RFC PATCHv5 4/7] HSI: hsi_char: Add HSI char device driver Carlos Chinea
2011-06-22 19:37 ` Sjur Brændeland
2011-06-23 9:12 ` Carlos Chinea
2011-06-10 13:38 ` [RFC PATCHv5 5/7] HSI: hsi_char: Add HSI char device kernel configuration Carlos Chinea
2011-06-10 13:38 ` [RFC PATCHv5 6/7] HSI: Add HSI API documentation Carlos Chinea
2011-06-10 13:38 ` [RFC PATCHv5 7/7] HSI: hsi_char: Update ioctl-number.txt Carlos Chinea
2011-06-14 9:35 ` [RFC PATCHv5 0/7] HSI framework and drivers Alan Cox
2011-06-15 9:27 ` Andras Domokos
2011-06-22 19:11 ` [RFC PATCHv5 1/7] HSI: hsi: Introducing HSI framework Sjur Brændeland
2011-06-22 19:25 ` Linus Walleij
2011-06-23 13:08 ` Carlos Chinea
2011-06-28 13:05 ` Sjur BRENDELAND
2011-07-22 10:43 ` Carlos Chinea
2011-07-22 11:01 ` Felipe Balbi
2011-07-22 11:51 ` Carlos Chinea
2011-07-22 12:05 ` Felipe Balbi
2011-07-22 13:02 ` Carlos Chinea [this message]
2011-07-24 21:56 ` Sjur Brændeland
2011-07-25 9:17 ` Carlos Chinea
2011-10-20 12:57 ` [RFC PATCHv5 0/7] HSI framework and drivers Sebastian Reichel
2011-10-21 9:54 ` Linus Walleij
2011-10-21 10:28 ` Carlos Chinea
2011-10-21 12:19 ` Linus Walleij
2011-10-21 13:36 ` Alan Cox
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=1311339729.32639.99.camel@groo \
--to=carlos.chinea@nokia.com \
--cc=balbi@ti.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=sjur.brandeland@stericsson.com \
--cc=sjurbren@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).