Skip to content

Commit

Permalink
sparc32,leon: always include leon_pmc in build
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Daniel Hellstrom <daniel@gaisler.com>
Cc: Konrad Eisele <konrad@gaisler.com>
  • Loading branch information
Sam Ravnborg authored and David S. Miller committed May 28, 2012
1 parent 3732106 commit 556626a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion arch/sparc/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ obj-y += of_device_$(BITS).o
obj-$(CONFIG_SPARC64) += prom_irqtrans.o

obj-$(CONFIG_SPARC32) += leon_kernel.o
obj-$(CONFIG_SPARC_LEON)+= leon_pmc.o
obj-$(CONFIG_SPARC32) += leon_pmc.o

obj-$(CONFIG_SPARC64) += reboot.o
obj-$(CONFIG_SPARC64) += sysfs.o
Expand Down
15 changes: 9 additions & 6 deletions arch/sparc/kernel/leon_pmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 556626a

Please sign in to comment.