summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91x40.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2012-05-15 09:21:26 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2012-05-15 09:21:26 +0200
commitb29e2679d0da91c60d3ac190d9c3bd65ac2f68c5 (patch)
tree518ec8f4bfd316e91bcc30f434edb78529557eba /arch/arm/mach-at91/at91x40.c
parentcrypto: ux500 - Add driver for HASH hardware (diff)
parentMerge tag 'soc2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc (diff)
downloadlinux-b29e2679d0da91c60d3ac190d9c3bd65ac2f68c5.tar.xz
linux-b29e2679d0da91c60d3ac190d9c3bd65ac2f68c5.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Merge mainline to add prerequisite for ARM ux500 crypto support.
Diffstat (limited to 'arch/arm/mach-at91/at91x40.c')
-rw-r--r--arch/arm/mach-at91/at91x40.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91x40.c b/arch/arm/mach-at91/at91x40.c
index 56ba3bd035ae..5400a1d65035 100644
--- a/arch/arm/mach-at91/at91x40.c
+++ b/arch/arm/mach-at91/at91x40.c
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/irq.h>
+#include <asm/proc-fns.h>
#include <asm/mach/arch.h>
#include <mach/at91x40.h>
#include <mach/at91_st.h>
@@ -37,8 +38,19 @@ unsigned long clk_get_rate(struct clk *clk)
return AT91X40_MASTER_CLOCK;
}
+static void at91x40_idle(void)
+{
+ /*
+ * Disable the processor clock. The processor will be automatically
+ * re-enabled by an interrupt or by a reset.
+ */
+ __raw_writel(AT91_PS_CR_CPU, AT91_PS_CR);
+ cpu_do_idle();
+}
+
void __init at91x40_initialize(unsigned long main_clock)
{
+ arm_pm_idle = at91x40_idle;
at91_extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1)
| (1 << AT91X40_ID_IRQ2);
}