summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/leon_pmc.c
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2012-05-26 06:43:27 +0200
committerDavid S. Miller <davem@davemloft.net>2012-05-28 08:52:53 +0200
commit556626adf1dc1ee88183b7ba267912b87b063a57 (patch)
tree3a6ccedc5206083cba4980604ce3aa206737dc6d /arch/sparc/kernel/leon_pmc.c
parentsparc32: refactor cpu_idle() (diff)
downloadlinux-556626adf1dc1ee88183b7ba267912b87b063a57.tar.xz
linux-556626adf1dc1ee88183b7ba267912b87b063a57.zip
sparc32,leon: always include leon_pmc in build
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Daniel Hellstrom <daniel@gaisler.com> Cc: Konrad Eisele <konrad@gaisler.com>
Diffstat (limited to 'arch/sparc/kernel/leon_pmc.c')
-rw-r--r--arch/sparc/kernel/leon_pmc.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/sparc/kernel/leon_pmc.c b/arch/sparc/kernel/leon_pmc.c
index 519ca923f59f..4e174321097d 100644
--- a/arch/sparc/kernel/leon_pmc.c
+++ b/arch/sparc/kernel/leon_pmc.c
@@ -7,6 +7,7 @@
#include <linux/pm.h>
#include <asm/leon_amba.h>
+#include <asm/cpu_type.h>
#include <asm/leon.h>
/* List of Systems that need fixup instructions around power-down instruction */
@@ -65,13 +66,15 @@ void pmc_leon_idle(void)
/* Install LEON Power Down function */
static int __init leon_pmc_install(void)
{
- /* Assign power management IDLE handler */
- if (pmc_leon_need_fixup())
- pm_idle = pmc_leon_idle_fixup;
- else
- pm_idle = pmc_leon_idle;
+ if (sparc_cpu_model == sparc_leon) {
+ /* Assign power management IDLE handler */
+ if (pmc_leon_need_fixup())
+ pm_idle = pmc_leon_idle_fixup;
+ else
+ pm_idle = pmc_leon_idle;
- printk(KERN_INFO "leon: power management initialized\n");
+ printk(KERN_INFO "leon: power management initialized\n");
+ }
return 0;
}