Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3850169dbddcc9e53fd550eb093af7da5dfcefa9
Commit:     3850169dbddcc9e53fd550eb093af7da5dfcefa9
Parent:     cd7834167ffb66b470e4d9edb10efb5c1a2dfe7f
Author:     Olof Johansson <[EMAIL PROTECTED]>
AuthorDate: Wed Sep 5 12:09:45 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Fri Sep 14 01:33:22 2007 +1000

    [POWERPC] pasemi: Move pasemi_idle_init() to late_initcall()
    
    Move pasemi_idle_init() to be a late_initcall instead of being called from
    setup_arch().  This way the cpufreq driver has a chance to initialize and
    save away the boot time astate before we go to idle for the first time.
    
    Signed-off-by: Olof Johansson <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/pasemi/idle.c   |    8 +++++++-
 arch/powerpc/platforms/pasemi/pasemi.h |    2 --
 arch/powerpc/platforms/pasemi/setup.c  |    2 --
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/platforms/pasemi/idle.c 
b/arch/powerpc/platforms/pasemi/idle.c
index 3c962d5..d8e1fcc 100644
--- a/arch/powerpc/platforms/pasemi/idle.c
+++ b/arch/powerpc/platforms/pasemi/idle.c
@@ -72,8 +72,11 @@ static int pasemi_system_reset_exception(struct pt_regs 
*regs)
        return 1;
 }
 
-void __init pasemi_idle_init(void)
+static int __init pasemi_idle_init(void)
 {
+       if (!machine_is(pasemi))
+               return -ENODEV;
+
 #ifndef CONFIG_PPC_PASEMI_CPUFREQ
        printk(KERN_WARNING "No cpufreq driver, powersavings modes disabled\n");
        current_mode = 0;
@@ -82,7 +85,10 @@ void __init pasemi_idle_init(void)
        ppc_md.system_reset_exception = pasemi_system_reset_exception;
        ppc_md.power_save = modes[current_mode].entry;
        printk(KERN_INFO "Using PA6T idle loop (%s)\n", 
modes[current_mode].name);
+
+       return 0;
 }
+late_initcall(pasemi_idle_init);
 
 static int __init idle_param(char *p)
 {
diff --git a/arch/powerpc/platforms/pasemi/pasemi.h 
b/arch/powerpc/platforms/pasemi/pasemi.h
index 6fd2fe7..516acab 100644
--- a/arch/powerpc/platforms/pasemi/pasemi.h
+++ b/arch/powerpc/platforms/pasemi/pasemi.h
@@ -10,8 +10,6 @@ extern void __iomem *pasemi_pci_getcfgaddr(struct pci_dev 
*dev, int offset);
 
 extern void __init alloc_iobmap_l2(void);
 
-extern void __init pasemi_idle_init(void);
-
 /* Power savings modes, implemented in asm */
 extern void idle_spin(void);
 extern void idle_doze(void);
diff --git a/arch/powerpc/platforms/pasemi/setup.c 
b/arch/powerpc/platforms/pasemi/setup.c
index fe9a5d6..5ddf40a 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -115,8 +115,6 @@ void __init pas_setup_arch(void)
        /* Remap SDC register for doing reset */
        /* XXXOJN This should maybe come out of the device tree */
        reset_reg = ioremap(0xfc101100, 4);
-
-       pasemi_idle_init();
 }
 
 static int __init pas_setup_mce_regs(void)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to