diff options
author | Olof Johansson <olof@lixom.net> | 2007-09-04 22:09:45 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-09-13 11:33:22 -0400 |
commit | 3850169dbddcc9e53fd550eb093af7da5dfcefa9 (patch) | |
tree | 006b679ddb52704f1a3a945513bd9316733962af /arch/powerpc | |
parent | cd7834167ffb66b470e4d9edb10efb5c1a2dfe7f (diff) |
[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 <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/pasemi/idle.c | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/pasemi/pasemi.h | 2 | ||||
-rw-r--r-- | 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 3c962d5757be..d8e1fcc78513 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) | |||
72 | return 1; | 72 | return 1; |
73 | } | 73 | } |
74 | 74 | ||
75 | void __init pasemi_idle_init(void) | 75 | static int __init pasemi_idle_init(void) |
76 | { | 76 | { |
77 | if (!machine_is(pasemi)) | ||
78 | return -ENODEV; | ||
79 | |||
77 | #ifndef CONFIG_PPC_PASEMI_CPUFREQ | 80 | #ifndef CONFIG_PPC_PASEMI_CPUFREQ |
78 | printk(KERN_WARNING "No cpufreq driver, powersavings modes disabled\n"); | 81 | printk(KERN_WARNING "No cpufreq driver, powersavings modes disabled\n"); |
79 | current_mode = 0; | 82 | current_mode = 0; |
@@ -82,7 +85,10 @@ void __init pasemi_idle_init(void) | |||
82 | ppc_md.system_reset_exception = pasemi_system_reset_exception; | 85 | ppc_md.system_reset_exception = pasemi_system_reset_exception; |
83 | ppc_md.power_save = modes[current_mode].entry; | 86 | ppc_md.power_save = modes[current_mode].entry; |
84 | printk(KERN_INFO "Using PA6T idle loop (%s)\n", modes[current_mode].name); | 87 | printk(KERN_INFO "Using PA6T idle loop (%s)\n", modes[current_mode].name); |
88 | |||
89 | return 0; | ||
85 | } | 90 | } |
91 | late_initcall(pasemi_idle_init); | ||
86 | 92 | ||
87 | static int __init idle_param(char *p) | 93 | static int __init idle_param(char *p) |
88 | { | 94 | { |
diff --git a/arch/powerpc/platforms/pasemi/pasemi.h b/arch/powerpc/platforms/pasemi/pasemi.h index 6fd2fe75a608..516acabb4e96 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); | |||
10 | 10 | ||
11 | extern void __init alloc_iobmap_l2(void); | 11 | extern void __init alloc_iobmap_l2(void); |
12 | 12 | ||
13 | extern void __init pasemi_idle_init(void); | ||
14 | |||
15 | /* Power savings modes, implemented in asm */ | 13 | /* Power savings modes, implemented in asm */ |
16 | extern void idle_spin(void); | 14 | extern void idle_spin(void); |
17 | extern void idle_doze(void); | 15 | extern void idle_doze(void); |
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c index fe9a5d631431..5ddf40a66ae8 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) | |||
115 | /* Remap SDC register for doing reset */ | 115 | /* Remap SDC register for doing reset */ |
116 | /* XXXOJN This should maybe come out of the device tree */ | 116 | /* XXXOJN This should maybe come out of the device tree */ |
117 | reset_reg = ioremap(0xfc101100, 4); | 117 | reset_reg = ioremap(0xfc101100, 4); |
118 | |||
119 | pasemi_idle_init(); | ||
120 | } | 118 | } |
121 | 119 | ||
122 | static int __init pas_setup_mce_regs(void) | 120 | static int __init pas_setup_mce_regs(void) |