aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2410/include/mach/system.h
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-08-05 11:14:15 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-08-07 04:55:48 -0400
commita09e64fbc0094e3073dbb09c3b4bfe4ab669244b (patch)
tree69689f467179891b498bd7423fcf61925173db31 /arch/arm/mach-s3c2410/include/mach/system.h
parenta1b81a84fff05dbfef45b7012c26e1fee9973e5d (diff)
[ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach
This just leaves include/asm-arm/plat-* to deal with. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-s3c2410/include/mach/system.h')
-rw-r--r--arch/arm/mach-s3c2410/include/mach/system.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2410/include/mach/system.h b/arch/arm/mach-s3c2410/include/mach/system.h
new file mode 100644
index 000000000000..e9f676bc0116
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/system.h
@@ -0,0 +1,58 @@
1/* arch/arm/mach-s3c2410/include/mach/system.h
2 *
3 * Copyright (c) 2003 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - System function defines and includes
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#include <mach/hardware.h>
14#include <asm/io.h>
15
16#include <mach/map.h>
17#include <mach/idle.h>
18#include <mach/reset.h>
19
20#include <mach/regs-clock.h>
21
22void (*s3c24xx_idle)(void);
23void (*s3c24xx_reset_hook)(void);
24
25void s3c24xx_default_idle(void)
26{
27 unsigned long tmp;
28 int i;
29
30 /* idle the system by using the idle mode which will wait for an
31 * interrupt to happen before restarting the system.
32 */
33
34 /* Warning: going into idle state upsets jtag scanning */
35
36 __raw_writel(__raw_readl(S3C2410_CLKCON) | S3C2410_CLKCON_IDLE,
37 S3C2410_CLKCON);
38
39 /* the samsung port seems to do a loop and then unset idle.. */
40 for (i = 0; i < 50; i++) {
41 tmp += __raw_readl(S3C2410_CLKCON); /* ensure loop not optimised out */
42 }
43
44 /* this bit is not cleared on re-start... */
45
46 __raw_writel(__raw_readl(S3C2410_CLKCON) & ~S3C2410_CLKCON_IDLE,
47 S3C2410_CLKCON);
48}
49
50static void arch_idle(void)
51{
52 if (s3c24xx_idle != NULL)
53 (s3c24xx_idle)();
54 else
55 s3c24xx_default_idle();
56}
57
58#include <mach/system-reset.h>