All of lore.kernel.org
 help / color / mirror / Atom feed
From: linus.walleij@linaro.org (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM/sp810: introduce API to change system mode
Date: Mon, 27 Feb 2012 11:38:14 +0100	[thread overview]
Message-ID: <CACRpkdaG2e12fdCFDUoQ_n71VcqU3ZpkH0raHW+EAZg==JOxrg@mail.gmail.com> (raw)
In-Reply-To: <bd90082f199c9bd0e48e0177ced627a50d5f850e.1329988357.git.viresh.kumar@st.com>

On Thu, Feb 23, 2012 at 10:13 AM, Viresh Kumar <viresh.kumar@st.com> wrote:

> sp810 controller can change system's working mode to various power save
> states. Introduce an API to accomplish the same.

OK...

> +static inline int sysctl_change_mode(void __iomem *base, int mode)

Why do you make this a static inline?

And why is the present soft reset code also static inlined?

When I look at how this is used in arch/arm/mach-vexpress/v2m.c
it's apparently glued back-to-back with the SP804
so I think it should be some CONFIG_HAS_SP810
and put directly into common/timer-sp.c.

#ifdef CONFIG_HAS_SP810

/* Put SP810 specific support functions here */

void __init sp810_clockevents_init(void __iomem *sp804_base, void
__iomem *sp810_base, unsigned int irq, const char *name)
{
  /* Do some SP810 magic stuff */
  /* Calls sp804_clockevents_init() */
}

#endif

Maybe I'm delusional but I think this could help centralizing the use
of the SP* cells, since they're obviously used in both SPEAr and
versatile express.

Yours,
Linus Walleij

  parent reply	other threads:[~2012-02-27 10:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-23  9:13 [PATCH] ARM/sp810: introduce API to change system mode Viresh Kumar
2012-02-23 10:03 ` Russell King - ARM Linux
2012-02-23 10:31   ` Viresh Kumar
2012-02-27 10:38 ` Linus Walleij [this message]
2012-02-27 10:55   ` Russell King - ARM Linux
2012-02-27 15:29     ` Linus Walleij
2012-02-27 15:42       ` Russell King - ARM Linux
2012-02-29 20:14 ` Russell King - ARM Linux
2012-03-01  3:51   ` Viresh Kumar

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='CACRpkdaG2e12fdCFDUoQ_n71VcqU3ZpkH0raHW+EAZg==JOxrg@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --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 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.