All of lore.kernel.org
 help / color / mirror / Atom feed
From: ben-linux@fluff.org (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] ARM: SAMSUNG: Add idle support
Date: Tue, 12 Jan 2010 00:06:06 +0000	[thread overview]
Message-ID: <20100112000606.GR3738@trinity.fluff.org> (raw)
In-Reply-To: <20100111100253.GA30556@n2100.arm.linux.org.uk>

On Mon, Jan 11, 2010 at 10:02:54AM +0000, Russell King - ARM Linux wrote:
> On Mon, Jan 11, 2010 at 06:44:32PM +0900, Kukjin Kim wrote:
> > This patch adds common idle functionality for all Samsung SoC's.
> 
> NAK.  Please use the existing support already provided.  There's no point
> in double-indirection - it just makes the code harder to follow.
> 
> Just set pm_idle to your idle function.

Hmm, the default_idle() function that pm_idle is set to at init time does
more than what arch_idle() does. We'd end up having to copy the logic in
default_idle() into each of our idle routines. How difficult would it be
to change the callers of pm_idle() to check whether it actually needs
calling and to re-enable the interrupt state after calling it?

We did this originally as before we issue the WFI co-processor instruction
we need to set the sleep mode. A number of the Samsung SoC have the WFI
line on the cpu routed via a mux to various functions, such as IDLE or
much deeper sleep modes such as the SUSPEND state.

I've no data on whether the write is needed before each sleep or not, so
my preference would be to ensure that this mux is setup before each call,
but it might be possible to simply ensure that it is setup correctly on
init and after suspend/resume.

-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.

  reply	other threads:[~2010-01-12  0:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11  9:44 [PATCH 3/3] ARM: SAMSUNG: Add idle support Kukjin Kim
2010-01-11 10:02 ` Russell King - ARM Linux
2010-01-12  0:06   ` Ben Dooks [this message]
2010-01-12 10:12     ` Russell King - ARM Linux
2010-01-12 14:18       ` Ben Dooks
2010-01-12 14:47         ` Russell King - ARM Linux
2010-01-11 10:35 ` Mark Brown
2010-01-13  0:12 ` Ben Dooks
2010-01-13 23:51   ` Kukjin Kim
  -- strict thread matches above, loose matches on Subject: below --
2010-01-11  3:21 [PATCH 1/3] ARM: SAMSUNG: Add config option for number of additional GPIO pins Kukjin Kim
2010-01-11  3:21 ` [PATCH 2/3] ARM: SAMSUNG: Make clk_default_setrate and clk_ops_def_setrate visible Kukjin Kim
2010-01-11  3:21   ` [PATCH 3/3] ARM: SAMSUNG: Add idle support Kukjin Kim
2010-01-11  8:40     ` Ben Dooks

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=20100112000606.GR3738@trinity.fluff.org \
    --to=ben-linux@fluff.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.