linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: shawn.guo@linaro.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 09/15] ARM: pnx4008: use machine specific hook for late init
Date: Wed,  2 May 2012 19:33:34 +0800	[thread overview]
Message-ID: <1335958420-5193-10-git-send-email-shawn.guo@linaro.org> (raw)
In-Reply-To: <1335958420-5193-1-git-send-email-shawn.guo@linaro.org>

Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 arch/arm/mach-pnx4008/core.c |   12 ++++++++++++
 arch/arm/mach-pnx4008/pm.c   |    4 +---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-pnx4008/core.c b/arch/arm/mach-pnx4008/core.c
index be4c928..a00d2f1 100644
--- a/arch/arm/mach-pnx4008/core.c
+++ b/arch/arm/mach-pnx4008/core.c
@@ -265,6 +265,17 @@ static void pnx4008_restart(char mode, const char *cmd)
 	soft_restart(0);
 }
 
+#ifdef CONFIG_PM
+extern int pnx4008_pm_init(void);
+#else
+static inline int pnx4008_pm_init(void) { return 0; }
+#endif
+
+void __init pnx4008_init_late(void)
+{
+	pnx4008_pm_init();
+}
+
 extern struct sys_timer pnx4008_timer;
 
 MACHINE_START(PNX4008, "Philips PNX4008")
@@ -273,6 +284,7 @@ MACHINE_START(PNX4008, "Philips PNX4008")
 	.map_io 		= pnx4008_map_io,
 	.init_irq 		= pnx4008_init_irq,
 	.init_machine 		= pnx4008_init,
+	.init_late		= pnx4008_init_late,
 	.timer 			= &pnx4008_timer,
 	.restart		= pnx4008_restart,
 MACHINE_END
diff --git a/arch/arm/mach-pnx4008/pm.c b/arch/arm/mach-pnx4008/pm.c
index f3e60a0..26f8d06 100644
--- a/arch/arm/mach-pnx4008/pm.c
+++ b/arch/arm/mach-pnx4008/pm.c
@@ -124,7 +124,7 @@ static const struct platform_suspend_ops pnx4008_pm_ops = {
 	.valid = pnx4008_pm_valid,
 };
 
-static int __init pnx4008_pm_init(void)
+int __init pnx4008_pm_init(void)
 {
 	u32 sram_size_to_allocate;
 
@@ -151,5 +151,3 @@ static int __init pnx4008_pm_init(void)
 	suspend_set_ops(&pnx4008_pm_ops);
 	return 0;
 }
-
-late_initcall(pnx4008_pm_init);
-- 
1.7.5.4

  parent reply	other threads:[~2012-05-02 11:33 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-02 11:33 [PATCH 00/15] arch/arm/mach-* late_initcall cleanup Shawn Guo
2012-05-02 11:33 ` [PATCH 01/15] ARM: provide a late_initcall hook for platform initialization Shawn Guo
2012-05-02 13:14   ` Shawn Guo
2012-05-03 14:55     ` Shawn Guo
2012-05-03 14:58     ` Russell King - ARM Linux
2012-05-02 17:47   ` H Hartley Sweeten
2012-05-02 11:33 ` [PATCH 02/15] ARM: davinci: use machine specific hook for late init Shawn Guo
2012-05-04 19:58   ` Sekhar Nori
2012-05-05  6:27     ` Shawn Guo
2012-05-02 11:33 ` [PATCH 03/15] ARM: ep93xx: " Shawn Guo
2012-05-02 17:45   ` H Hartley Sweeten
2012-05-03 15:05     ` Shawn Guo
2012-05-02 11:33 ` [PATCH 04/15] ARM: exynos: " Shawn Guo
2012-05-02 11:33 ` [PATCH 05/15] ARM: imx: " Shawn Guo
2012-05-02 12:36   ` Sascha Hauer
2012-05-02 11:33 ` [PATCH 06/15] ARM: msm: " Shawn Guo
2012-05-02 18:28   ` David Brown
2012-05-02 11:33 ` [PATCH 07/15] ARM: omap1: " Shawn Guo
2012-05-02 11:33 ` [PATCH 08/15] ARM: omap2: " Shawn Guo
2012-05-02 11:33 ` Shawn Guo [this message]
2012-05-02 11:33 ` [PATCH 10/15] ARM: prima2: " Shawn Guo
2012-05-02 11:33 ` [PATCH 11/15] ARM: s3c64xx: " Shawn Guo
2012-05-02 11:33 ` [PATCH 12/15] ARM: sa1100: " Shawn Guo
2012-05-02 11:33 ` [PATCH 13/15] ARM: shmobile: " Shawn Guo
2012-05-02 11:33 ` [PATCH 14/15] ARM: tegra: " Shawn Guo
2012-05-02 15:57   ` Stephen Warren
2012-05-02 11:33 ` [PATCH 15/15] ARM: ux500: " Shawn Guo
2012-05-07 12:19   ` Linus Walleij
2012-05-08 12:39     ` Shawn Guo
2012-05-02 12:45 ` [PATCH 00/15] arch/arm/mach-* late_initcall cleanup Arnd Bergmann
2012-05-02 13:37   ` Shawn Guo
2012-05-02 13:41     ` Arnd Bergmann
2012-05-04 23:56     ` Tony Lindgren
2012-05-05  6:25       ` Shawn Guo

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=1335958420-5193-10-git-send-email-shawn.guo@linaro.org \
    --to=shawn.guo@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 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).