All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Fenkart <andreas.fenkart@streamunlimited.com>
To: santosh.shilimkar@ti.com
Cc: jon-hunter@ti.com, khilman@deeprootsystems.com,
	grant.likely@secretlab.ca, linus.walleij@linaro.org,
	linux-omap@vger.kernel.org, daniel@zonque.org
Subject: gpio/omap v2: map irq_enable/disable to mask/unmask.
Date: Thu, 11 Apr 2013 15:18:42 +0200	[thread overview]
Message-ID: <20130411131842.GA9331@blumentopf> (raw)

Hi Santosh,

I submitted the following patch a while back.
https://patchwork.kernel.org/patch/1886421/

As already said, the patch is straight forward, but without it,
we probably will not see decent SDIO performance on am335x chips.

[why it is needed]

The omap_hsmmc module is suspended whenever it is idle, its
functional clock being turned off. In this mode it is not able to
forwared IRQs to the system. For that to happen, it needs to tell
the PRCM to restore it's fclk.

                   ------
                  | PRCM |
                   ------
                    | ^
               fclk | | swakeup
                    v |
                  -------               ------
      <-- IRQ -- | hsmmc | <-- CIRQ -- | card |
                  -------               ------

This is done through the swakeup line, which can be configured to
trigger for various events, among others; CIRQ. The problem is
that on the AM335x family the swakeup line is missing, it has not
been routed from the module to the PRCM.

[solution]
the simplest solution was to keep the fclk enabled all the
time. But that was not accepted, instead this was suggested

> > The alternative was to configure dat1 line as a GPIO, while
> > waiting for an IRQ. Then configuring it back as dat1 to serve
> > the SDIO card after it signalled an IRQ. Or when the host
> > wants to start a transfer.
>
> The way to implement this is set named states in the .dts file
> for the pins using pinctrl-single.c, then have the MMC driver
> request states "default" "active" and "idle" during the probe,
> then toggle between active and idle during the runtime.

Surprisingly the induced overhead is quite small, the performance
is similar to keeping the fclk enabled at all times. See here
for full thread:
http://www.spinics.net/lists/linux-omap/msg83363.html
https://patchwork.kernel.org/patch/1901471/  ... or just the patch

There are still open questions to gpio patch itself, see here
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg87217.html

So could we pls reopen that thread? It might be on the other side
of your mailbox

rgds,
Andi


             reply	other threads:[~2013-04-11 13:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11 13:18 Andreas Fenkart [this message]
2013-04-11 15:40 ` gpio/omap v2: map irq_enable/disable to mask/unmask Tony Lindgren
2013-04-11 15:54 ` Santosh Shilimkar
2013-04-11 17:52   ` Jon Hunter

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=20130411131842.GA9331@blumentopf \
    --to=andreas.fenkart@streamunlimited.com \
    --cc=daniel@zonque.org \
    --cc=grant.likely@secretlab.ca \
    --cc=jon-hunter@ti.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=santosh.shilimkar@ti.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.