linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: toddpoynor@google.com (Todd Poynor)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] OMAP2+: hwmod: Add API to enable IO ring wakeup.
Date: Sat, 7 May 2011 10:54:34 -0700	[thread overview]
Message-ID: <BANLkTikoYy1E2vyFjR-fKqOsC7B-xWDWbw@mail.gmail.com> (raw)
In-Reply-To: <1304676557-15613-2-git-send-email-govindraj.raja@ti.com>

On Fri, May 6, 2011 at 3:09 AM, Govindraj.R <govindraj.raja@ti.com> wrote:

> ...
> +
> +/**
> + * omap_hwmod_enable_ioring_wakeup - Set wakeup bit for iopad ring.
> + * @oh: struct omap_hwmod *
> + * @enable: based on 0 or 1 set or unset wakeup bit.
> + *
> + * Traverse through dynamic pads, if pad is enabled then
> + * set wakeup enable bit flag for the mux pin. Wakeup pad bit
> + * will be set during hwmod idle transistion.
> + * Return error if pads are not enabled or not available.
> + */
> +int omap_hwmod_enable_ioring_wakeup(struct omap_hwmod *oh, bool enable)
> +{
> +       struct omap_device_pad *pad;
> +       int ret = -EINVAL, j;
> +       int val = 0;
> +
> +       /* Enable pin mux to make pad wake-up capable */
> +       if (enable)
> +               val = OMAP_WAKEUP_EN;
> +       else
> +               val = ~OMAP_WAKEUP_EN;
> +
> +       if (oh->mux->enabled) {
> +               for (j = 0; j < oh->mux->nr_pads_dynamic; j++) {
> +                       pad = oh->mux->pads_dynamic[j];
> +                       if (pad->flags & OMAP_DEVICE_PAD_WAKEUP) {
> +                               pad->idle = pad->enable | val;
>

I haven't gone to find the patch uses the pad->idle value (or the TRM docs),
but the !enable case that OR's in every bit except for OMAP_WAKEUP_EN seems
strange, should the non-wakeup-enabled idle value for the pad set all other
bits in that reg?

..

Todd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110507/796e9df6/attachment-0001.html>

  parent reply	other threads:[~2011-05-07 17:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-06 10:09 [PATCH 0/2] OMAP2+: hwmod: Add hwmod's API's for pad wakeup Govindraj.R
2011-05-06 10:09 ` [PATCH 1/2] OMAP2+: hwmod: Add API to enable IO ring wakeup Govindraj.R
2011-05-06 20:37   ` Paul Walmsley
2011-05-07 17:54   ` Todd Poynor [this message]
2011-05-06 10:09 ` [PATCH 2/2] OMAP2+: hwmod: Add API to check IO PAD wakeup status Govindraj.R

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=BANLkTikoYy1E2vyFjR-fKqOsC7B-xWDWbw@mail.gmail.com \
    --to=toddpoynor@google.com \
    --cc=linux-arm-kernel@lists.infradead.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 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).