All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sjur Brændeland" <sjurbren@gmail.com>
To: balbi@ti.com, Carlos Chinea <carlos.chinea@nokia.com>
Cc: "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>,
	dmitry.tarnyagin@stericsson.com
Subject: Re: [RFC PATCHv5 1/7] HSI: hsi: Introducing HSI framework
Date: Sun, 24 Jul 2011 23:56:39 +0200	[thread overview]
Message-ID: <CAJK669bOjK38J3f5=UCXGLSkaB4aJ-jS4jqvp5gGfE2czH8OAQ@mail.gmail.com> (raw)
In-Reply-To: <20110722120553.GZ32058@legolas.emea.dhcp.ti.com>

Hi Carlos,

>Sorry for the long delay. My comments below:
No worries, I will probably be very slow when responding to you as
well for the next
couple of weeks...

>+ * @flow: RX flow type (SYNCHRONIZED or PIPELINE)
>+ * @arb_mode: Arbitration mode for TX frame (Round robin, priority)
>+ */
>+struct hsi_config {
>+	unsigned int	mode;
>+	unsigned int	channels;
>+	unsigned int	speed;

I have to pick up on one issue I missed earlier. The CAIF-HSI protocol
is going to use
separate RX and TX speeds, where modem and host side looks at the
throughput and
TX-queues and request their TX speeds accordingly. So I would prefer
to be able to set
the RX and TX speed in each direction individually.

...
>>>... 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.

Yes, this is probably the best way, but I'm not too concerned how this is done,
as long as the API provides some way to assure that the TX FIFO is empty
before putting the WAKE line low.


> > > > > *Missing function*: hsi_rx_fifo_occupancy()
> > > > > Before putting the link asleep we need to know if the fifo is empty
> > > > > or not.
> > > > > So we would like to have a way to read out the number of bytes in the
> > > > > RX fifo.
> > > >
> > > > This should be handled only by hsi_controller. Clients should not care
> > > > about this.
> > >
> > > There is a corner case when going to low power mode and both side has put the WAKE line low,
> > > but a RX DMA job is ongoing or the RX-fifo is not empty.
> > > In this case the host side must wait for the DMA job to complete and RX-
> > > fifo to be empty, before canceling any pending RX jobs.
> > >
> > > One option would be to provide a function hsi_rx_sync() that guarantees that any ongoing
> > > RX-job is completed and that the RX FIFO is empty. Another option could be to be
> > > able to provide API for reading RX-job states and RX-fifo occupancy.
> > >
> >
> > I think we don't need another function to do this neither. The
> > hsi_controller driver should implement a usecount scheme to know when
> > the HW can be switch off. IMO it is not a good idea to relay just on the
> > wakelines to power on/off the device, exactly because of this kind of
> > issues.

For the RX FIFO maybe you are right that the controller can handle the
power down issues
on it's own. However I'm uneasy about not having the possibility to
read out the RX
FIFO-occupancy from the HSI-controller. In the CAIF HSI implementation
queued for the 3.1
kernel (git.kernel.org/?p=linux/kernel/git/davem/net.git;a=blob;f=drivers/net/caif/caif_hsi.c
)
we use this both in probe() and when wakeline go low.
There may also be other corner-cases related to wakeline handling or
speed change,
where we need this in the future. So from my point of view think we
still need to be able read
out the RX FIFO occupancy.

Regards,
Sjur

  parent reply	other threads:[~2011-07-24 21:56 UTC|newest]

Thread overview: 35+ 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-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
2011-07-24 21:56               ` Sjur Brændeland [this message]
2011-07-25  9:17                 ` Carlos Chinea
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='CAJK669bOjK38J3f5=UCXGLSkaB4aJ-jS4jqvp5gGfE2czH8OAQ@mail.gmail.com' \
    --to=sjurbren@gmail.com \
    --cc=balbi@ti.com \
    --cc=carlos.chinea@nokia.com \
    --cc=dmitry.tarnyagin@stericsson.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    /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.