aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-s3c6400
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s3c6400')
-rw-r--r--arch/arm/mach-s3c6400/include/mach/regs-clock.h16
-rw-r--r--arch/arm/mach-s3c6400/include/mach/system.h22
2 files changed, 37 insertions, 1 deletions
diff --git a/arch/arm/mach-s3c6400/include/mach/regs-clock.h b/arch/arm/mach-s3c6400/include/mach/regs-clock.h
new file mode 100644
index 00000000000..a6c7f4eb3a1
--- /dev/null
+++ b/arch/arm/mach-s3c6400/include/mach/regs-clock.h
@@ -0,0 +1,16 @@
+/* linux/arch/arm/mach-s3c6400/include/mach/regs-clock.h
+ *
+ * Copyright 2008 Openmoko, Inc.
+ * Copyright 2008 Simtec Electronics
+ * http://armlinux.simtec.co.uk/
+ * Ben Dooks <ben@simtec.co.uk>
+ *
+ * S3C64XX - clock register compatibility with s3c24xx
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <plat/regs-clock.h>
+
diff --git a/arch/arm/mach-s3c6400/include/mach/system.h b/arch/arm/mach-s3c6400/include/mach/system.h
index 652bbc403f0..3165f509780 100644
--- a/arch/arm/mach-s3c6400/include/mach/system.h
+++ b/arch/arm/mach-s3c6400/include/mach/system.h
@@ -11,9 +11,29 @@
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H __FILE__
+#include <linux/io.h>
+#include <mach/map.h>
+
+#include <plat/regs-sys.h>
+#include <plat/regs-syscon-power.h>
+
static void arch_idle(void)
{
- /* nothing here yet */
+ unsigned long flags;
+ u32 mode;
+
+ /* ensure that if we execute the cpu idle sequence that we
+ * go into idle mode instead of powering off. */
+
+ local_irq_save(flags);
+ mode = __raw_readl(S3C64XX_PWR_CFG);
+ mode &= ~S3C64XX_PWRCFG_CFG_WFI_MASK;
+ mode |= S3C64XX_PWRCFG_CFG_WFI_IDLE;
+ __raw_writel(mode, S3C64XX_PWR_CFG);
+
+ local_irq_restore(flags);
+
+ cpu_do_idle();
}
static void arch_reset(char mode)