diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 20:48:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 20:48:14 -0400 |
commit | 2ca7d674d7ab2220707b2ada0b690c0e7c95e7ac (patch) | |
tree | 9c0927ed1d540e5fd704c1f82689870786514655 /arch/arm/mach-mxc91231/system.c | |
parent | 2195d2818c37bdf263865f1e9effccdd9fc5f9d4 (diff) | |
parent | 87d721ad7a37b7650dd710c88dd5c6a5bf9fe996 (diff) |
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (257 commits)
[ARM] Update mach-types
ARM: 5636/1: Move vendor enum to AMBA include
ARM: Fix pfn_valid() for sparse memory
[ARM] orion5x: Add LaCie NAS 2Big Network support
[ARM] pxa/sharpsl_pm: zaurus c3000 aka spitz: fix resume
ARM: 5686/1: at91: Correct AC97 reset line in at91sam9263ek board
ARM: 5640/1: This patch modifies the support of AC97 on the at91sam9263 ek board
ARM: 5689/1: Update default config of HP Jornada 700-series machines
ARM: 5691/1: fix cache aliasing issues between kmap() and kmap_atomic() with highmem
ARM: 5688/1: ks8695_serial: disable_irq() lockup
ARM: 5687/1: fix an oops with highmem
ARM: 5684/1: Add nuc960 platform to w90x900
ARM: 5683/1: Add nuc950 platform to w90x900
ARM: 5682/1: Add cpu.c and dev.c and modify some files of w90p910 platform
ARM: 5626/1: add suspend/resume functions to amba-pl011 serial driver
ARM: 5625/1: fix hard coded 4K resource size in amba bus detection
MMC: MMCI: convert realview MMC to use gpiolib
ARM: 5685/1: Make MMCI driver compile without gpiolib
ARM: implement highpte
ARM: Show FIQ in /proc/interrupts on CONFIG_FIQ
...
Fix up trivial conflict in arch/arm/kernel/signal.c.
It was due to the TIF_NOTIFY_RESUME addition in commit d0420c83f ("KEYS:
Extend TIF_NOTIFY_RESUME to (almost) all architectures") and follow-ups.
Diffstat (limited to 'arch/arm/mach-mxc91231/system.c')
-rw-r--r-- | arch/arm/mach-mxc91231/system.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/arch/arm/mach-mxc91231/system.c b/arch/arm/mach-mxc91231/system.c new file mode 100644 index 000000000000..736f7efd874a --- /dev/null +++ b/arch/arm/mach-mxc91231/system.c | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * Copyright 2009 Dmitriy Taychenachev <dimichxp@gmail.com> | ||
3 | * | ||
4 | * This file is released under the GPLv2 or later. | ||
5 | */ | ||
6 | |||
7 | #include <linux/delay.h> | ||
8 | #include <linux/io.h> | ||
9 | |||
10 | #include <asm/proc-fns.h> | ||
11 | #include <mach/hardware.h> | ||
12 | |||
13 | #include "crm_regs.h" | ||
14 | |||
15 | #define WDOG_WCR MXC91231_IO_ADDRESS(MXC91231_WDOG1_BASE_ADDR) | ||
16 | #define WDOG_WCR_OUT_ENABLE (1 << 6) | ||
17 | #define WDOG_WCR_ASSERT (1 << 5) | ||
18 | |||
19 | void mxc91231_power_off(void) | ||
20 | { | ||
21 | u16 wcr; | ||
22 | |||
23 | wcr = __raw_readw(WDOG_WCR); | ||
24 | wcr |= WDOG_WCR_OUT_ENABLE; | ||
25 | wcr &= ~WDOG_WCR_ASSERT; | ||
26 | __raw_writew(wcr, WDOG_WCR); | ||
27 | } | ||
28 | |||
29 | void mxc91231_arch_reset(char mode, const char *cmd) | ||
30 | { | ||
31 | u32 amcr; | ||
32 | |||
33 | /* Reset the AP using CRM */ | ||
34 | amcr = __raw_readl(MXC_CRMAP_AMCR); | ||
35 | amcr &= ~MXC_CRMAP_AMCR_SW_AP; | ||
36 | __raw_writel(amcr, MXC_CRMAP_AMCR); | ||
37 | |||
38 | mdelay(10); | ||
39 | cpu_reset(0); | ||
40 | } | ||
41 | |||
42 | void mxc91231_prepare_idle(void) | ||
43 | { | ||
44 | u32 crm_ctl; | ||
45 | |||
46 | /* Go to WAIT mode after WFI */ | ||
47 | crm_ctl = __raw_readl(MXC_DSM_CRM_CONTROL); | ||
48 | crm_ctl &= ~(MXC_DSM_CRM_CTRL_LPMD0 | MXC_DSM_CRM_CTRL_LPMD1); | ||
49 | crm_ctl |= MXC_DSM_CRM_CTRL_LPMD_WAIT_MODE; | ||
50 | __raw_writel(crm_ctl, MXC_DSM_CRM_CONTROL); | ||
51 | } | ||