linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 12/12] ARM: imx: move special idle code to proper out-of-line pm_idle hooks
Date: Mon, 24 Oct 2011 14:58:07 +0200	[thread overview]
Message-ID: <20111024125807.GA2263@pengutronix.de> (raw)
In-Reply-To: <1319449801-12367-13-git-send-email-nico@fluxnic.net>

Nico,

On Mon, Oct 24, 2011 at 05:50:01AM -0400, Nicolas Pitre wrote:
> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> ---
>  arch/arm/mach-imx/Makefile              |    4 +-
>  arch/arm/mach-imx/idle-mx3.c            |   31 +++++++++++++++++++++++++++++
>  arch/arm/mach-imx/mm-imx31.c            |    1 +
>  arch/arm/mach-imx/mm-imx35.c            |    1 +
>  arch/arm/mach-mx5/clock-mx51-mx53.c     |    7 ++++++
>  arch/arm/plat-mxc/include/mach/system.h |   33 +------------------------------
>  6 files changed, 43 insertions(+), 34 deletions(-)
>  create mode 100644 arch/arm/mach-imx/idle-mx3.c

Please fold the following in this patch. It fixes the compile errors
in mx3_defconfig and mx51_defconfig. Also, we implemented
arch_idle and now with your patch pm_idle, thus we have to call
local_irq_enable().

With this:

Tested-by: Sascha Hauer <s.hauer@pengutronix.de>

on i.MX35, i.MX51 and i.MX27


commit 380c365d85af17d7c4bac5f0db961986fbb7f40d
Author: Sascha Hauer <s.hauer@pengutronix.de>
Date:   Mon Oct 24 14:26:20 2011 +0200

    Fix compile and runtime errors introduced with last commit
    
    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

diff --git a/arch/arm/mach-imx/idle-mx3.c b/arch/arm/mach-imx/idle-mx3.c
index 580b407..ac0d655 100644
--- a/arch/arm/mach-imx/idle-mx3.c
+++ b/arch/arm/mach-imx/idle-mx3.c
@@ -28,4 +28,6 @@ void mx3_idle(void)
 	"orr %0, %0, #0x00000004\n"
 	"mcr p15, 0, %0, c1, c0, 0\n"
 	: "=r" (reg));
+
+	local_irq_enable();
 }
diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c
index c57bd92..63dc037 100644
--- a/arch/arm/mach-mx5/clock-mx51-mx53.c
+++ b/arch/arm/mach-mx5/clock-mx51-mx53.c
@@ -15,12 +15,14 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 #include <linux/clkdev.h>
+#include <linux/pm.h>
 
 #include <asm/div64.h>
 
 #include <mach/hardware.h>
 #include <mach/common.h>
 #include <mach/clock.h>
+#include <mach/system.h>
 
 #include "crm_regs.h"
 
@@ -1532,6 +1534,8 @@ static void clk_tree_init(void)
 static void mx51_idle(void)
 {
 	mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
+
+	local_irq_enable();
 }
 
 int __init mx51_clocks_init(unsigned long ckil, unsigned long osc,
diff --git a/arch/arm/plat-mxc/include/mach/mx3x.h b/arch/arm/plat-mxc/include/mach/mx3x.h
index 388a407..24e61e4 100644
--- a/arch/arm/plat-mxc/include/mach/mx3x.h
+++ b/arch/arm/plat-mxc/include/mach/mx3x.h
@@ -203,6 +203,9 @@ static inline int mx35_revision(void)
 {
 	return mx35_cpu_rev;
 }
+
+void mx3_idle(void);
+
 #endif
 
 #endif /* ifndef __MACH_MX3x_H__ */
diff --git a/arch/arm/plat-mxc/include/mach/system.h b/arch/arm/plat-mxc/include/mach/system.h
index 89d08c5..9875cc0 100644
--- a/arch/arm/plat-mxc/include/mach/system.h
+++ b/arch/arm/plat-mxc/include/mach/system.h
@@ -20,6 +20,8 @@
 #include <mach/hardware.h>
 #include <mach/common.h>
 
+extern void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode);
+
 static inline void arch_idle(void)
 {
 	cpu_do_idle();

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2011-10-24 12:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-24  9:49 [PATCH/RFT 0/12] step towards removal of mach/system.h Nicolas Pitre
2011-10-24  9:49 ` [PATCH 01/12] ARM: clean up idle handlers Nicolas Pitre
2011-10-25  7:56   ` Tony Lindgren
2011-10-25  8:26     ` Russell King - ARM Linux
2011-10-25 11:37   ` Russell King - ARM Linux
2011-10-24  9:49 ` [PATCH 02/12] ARM: mach-at91: move special idle code to a out-of-line pm_idle hook Nicolas Pitre
2011-10-24  9:49 ` [PATCH 03/12] ARM: mach-clps711x: " Nicolas Pitre
2011-10-24  9:49 ` [PATCH 04/12] ARM: mach-ebsa110: " Nicolas Pitre
2011-10-24  9:49 ` [PATCH 05/12] ARM: mach-gemini: " Nicolas Pitre
2011-10-24  9:49 ` [PATCH 06/12] ARM: mach-h720x: " Nicolas Pitre
2011-10-24  9:49 ` [PATCH 07/12] ARM: mach-ixp23xx: properly disable CPU idle call Nicolas Pitre
2011-10-24  9:49 ` [PATCH 08/12] ARM: mach-ixp4xx: " Nicolas Pitre
2011-10-25 11:39   ` Russell King - ARM Linux
2011-10-24  9:49 ` [PATCH 09/12] ARM: s3c24xx: move special idle code to a proper out-of-line pm_idle hooks Nicolas Pitre
2011-10-24  9:49 ` [PATCH 10/12] ARM: mach-shark: properly disable CPU idle call Nicolas Pitre
2011-10-24  9:50 ` [PATCH 11/12] ARM: mach-w90x900: " Nicolas Pitre
2011-10-24  9:50 ` [PATCH 12/12] ARM: imx: move special idle code to proper out-of-line pm_idle hooks Nicolas Pitre
2011-10-24 12:58   ` Sascha Hauer [this message]
2011-10-25 12:21 ` [PATCH/RFT 0/12] step towards removal of mach/system.h Will Deacon

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=20111024125807.GA2263@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --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).