]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/arm/mach-at91/at91x40.c
ARM: at91/at91x40: remove use of at91_sys_read/write
[mv-sheeva.git] / arch / arm / mach-at91 / at91x40.c
index 56ba3bd035aeff76f6bc0db6459c20d47ab9d09f..5400a1d6503566d7258a801e6b8aca3e6c636021 100644 (file)
@@ -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);
 }